mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
12 lines
301 KiB
JavaScript
12 lines
301 KiB
JavaScript
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function c(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(f){if(f.ep)return;f.ep=!0;const d=c(f);fetch(f.href,d)}})();var Ic={exports:{}},ka={};var Vd;function O0(){if(Vd)return ka;Vd=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(r,f,d){var m=null;if(d!==void 0&&(m=""+d),f.key!==void 0&&(m=""+f.key),"key"in f){d={};for(var b in f)b!=="key"&&(d[b]=f[b])}else d=f;return f=d.ref,{$$typeof:u,type:r,key:m,ref:f!==void 0?f:null,props:d}}return ka.Fragment=i,ka.jsx=c,ka.jsxs=c,ka}var Qd;function z0(){return Qd||(Qd=1,Ic.exports=O0()),Ic.exports}var v=z0(),er={exports:{}},I={};var Zd;function M0(){if(Zd)return I;Zd=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),C=Symbol.iterator;function z(_){return _===null||typeof _!="object"?null:(_=C&&_[C]||_["@@iterator"],typeof _=="function"?_:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,Y={};function L(_,B,G){this.props=_,this.context=B,this.refs=Y,this.updater=G||H}L.prototype.isReactComponent={},L.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,B,"setState")},L.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function q(){}q.prototype=L.prototype;function Q(_,B,G){this.props=_,this.context=B,this.refs=Y,this.updater=G||H}var P=Q.prototype=new q;P.constructor=Q,k(P,L.prototype),P.isPureReactComponent=!0;var ye=Array.isArray;function Re(){}var $={H:null,A:null,T:null,S:null},Te=Object.prototype.hasOwnProperty;function xe(_,B,G){var Z=G.ref;return{$$typeof:u,type:_,key:B,ref:Z!==void 0?Z:null,props:G}}function Ue(_,B){return xe(_.type,B,_.props)}function Xe(_){return typeof _=="object"&&_!==null&&_.$$typeof===u}function We(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(G){return B[G]})}var Hn=/\/+/g;function kt(_,B){return typeof _=="object"&&_!==null&&_.key!=null?We(""+_.key):B.toString(36)}function Nt(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Re,Re):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function w(_,B,G,Z,ee){var le=typeof _;(le==="undefined"||le==="boolean")&&(_=null);var de=!1;if(_===null)de=!0;else switch(le){case"bigint":case"string":case"number":de=!0;break;case"object":switch(_.$$typeof){case u:case i:de=!0;break;case E:return de=_._init,w(de(_._payload),B,G,Z,ee)}}if(de)return ee=ee(_),de=Z===""?"."+kt(_,0):Z,ye(ee)?(G="",de!=null&&(G=de.replace(Hn,"$&/")+"/"),w(ee,B,G,"",function(Jl){return Jl})):ee!=null&&(Xe(ee)&&(ee=Ue(ee,G+(ee.key==null||_&&_.key===ee.key?"":(""+ee.key).replace(Hn,"$&/")+"/")+de)),B.push(ee)),1;de=0;var Pe=Z===""?".":Z+":";if(ye(_))for(var De=0;De<_.length;De++)Z=_[De],le=Pe+kt(Z,De),de+=w(Z,B,G,le,ee);else if(De=z(_),typeof De=="function")for(_=De.call(_),De=0;!(Z=_.next()).done;)Z=Z.value,le=Pe+kt(Z,De++),de+=w(Z,B,G,le,ee);else if(le==="object"){if(typeof _.then=="function")return w(Nt(_),B,G,Z,ee);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return de}function X(_,B,G){if(_==null)return _;var Z=[],ee=0;return w(_,Z,"","",function(le){return B.call(G,le,ee++)}),Z}function F(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(G){(_._status===0||_._status===-1)&&(_._status=1,_._result=G)},function(G){(_._status===0||_._status===-1)&&(_._status=2,_._result=G)}),_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return _._result.default;throw _._result}var ve=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},_e={map:X,forEach:function(_,B,G){X(_,function(){B.apply(this,arguments)},G)},count:function(_){var B=0;return X(_,function(){B++}),B},toArray:function(_){return X(_,function(B){return B})||[]},only:function(_){if(!Xe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return I.Activity=S,I.Children=_e,I.Component=L,I.Fragment=c,I.Profiler=f,I.PureComponent=Q,I.StrictMode=r,I.Suspense=p,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,I.__COMPILER_RUNTIME={__proto__:null,c:function(_){return $.H.useMemoCache(_)}},I.cache=function(_){return function(){return _.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(_,B,G){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var Z=k({},_.props),ee=_.key;if(B!=null)for(le in B.key!==void 0&&(ee=""+B.key),B)!Te.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(Z[le]=B[le]);var le=arguments.length-2;if(le===1)Z.children=G;else if(1<le){for(var de=Array(le),Pe=0;Pe<le;Pe++)de[Pe]=arguments[Pe+2];Z.children=de}return xe(_.type,ee,Z)},I.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:d,_context:_},_},I.createElement=function(_,B,G){var Z,ee={},le=null;if(B!=null)for(Z in B.key!==void 0&&(le=""+B.key),B)Te.call(B,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=B[Z]);var de=arguments.length-2;if(de===1)ee.children=G;else if(1<de){for(var Pe=Array(de),De=0;De<de;De++)Pe[De]=arguments[De+2];ee.children=Pe}if(_&&_.defaultProps)for(Z in de=_.defaultProps,de)ee[Z]===void 0&&(ee[Z]=de[Z]);return xe(_,le,ee)},I.createRef=function(){return{current:null}},I.forwardRef=function(_){return{$$typeof:b,render:_}},I.isValidElement=Xe,I.lazy=function(_){return{$$typeof:E,_payload:{_status:-1,_result:_},_init:F}},I.memo=function(_,B){return{$$typeof:y,type:_,compare:B===void 0?null:B}},I.startTransition=function(_){var B=$.T,G={};$.T=G;try{var Z=_(),ee=$.S;ee!==null&&ee(G,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Re,ve)}catch(le){ve(le)}finally{B!==null&&G.types!==null&&(B.types=G.types),$.T=B}},I.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},I.use=function(_){return $.H.use(_)},I.useActionState=function(_,B,G){return $.H.useActionState(_,B,G)},I.useCallback=function(_,B){return $.H.useCallback(_,B)},I.useContext=function(_){return $.H.useContext(_)},I.useDebugValue=function(){},I.useDeferredValue=function(_,B){return $.H.useDeferredValue(_,B)},I.useEffect=function(_,B){return $.H.useEffect(_,B)},I.useEffectEvent=function(_){return $.H.useEffectEvent(_)},I.useId=function(){return $.H.useId()},I.useImperativeHandle=function(_,B,G){return $.H.useImperativeHandle(_,B,G)},I.useInsertionEffect=function(_,B){return $.H.useInsertionEffect(_,B)},I.useLayoutEffect=function(_,B){return $.H.useLayoutEffect(_,B)},I.useMemo=function(_,B){return $.H.useMemo(_,B)},I.useOptimistic=function(_,B){return $.H.useOptimistic(_,B)},I.useReducer=function(_,B,G){return $.H.useReducer(_,B,G)},I.useRef=function(_){return $.H.useRef(_)},I.useState=function(_){return $.H.useState(_)},I.useSyncExternalStore=function(_,B,G){return $.H.useSyncExternalStore(_,B,G)},I.useTransition=function(){return $.H.useTransition()},I.version="19.2.0",I}var Kd;function Nu(){return Kd||(Kd=1,er.exports=M0()),er.exports}var T=Nu(),tr={exports:{}},Xa={},nr={exports:{}},lr={};var Jd;function D0(){return Jd||(Jd=1,(function(u){function i(w,X){var F=w.length;w.push(X);e:for(;0<F;){var ve=F-1>>>1,_e=w[ve];if(0<f(_e,X))w[ve]=X,w[F]=_e,F=ve;else break e}}function c(w){return w.length===0?null:w[0]}function r(w){if(w.length===0)return null;var X=w[0],F=w.pop();if(F!==X){w[0]=F;e:for(var ve=0,_e=w.length,_=_e>>>1;ve<_;){var B=2*(ve+1)-1,G=w[B],Z=B+1,ee=w[Z];if(0>f(G,F))Z<_e&&0>f(ee,G)?(w[ve]=ee,w[Z]=F,ve=Z):(w[ve]=G,w[B]=F,ve=B);else if(Z<_e&&0>f(ee,F))w[ve]=ee,w[Z]=F,ve=Z;else break e}}return X}function f(w,X){var F=w.sortIndex-X.sortIndex;return F!==0?F:w.id-X.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;u.unstable_now=function(){return d.now()}}else{var m=Date,b=m.now();u.unstable_now=function(){return m.now()-b}}var p=[],y=[],E=1,S=null,C=3,z=!1,H=!1,k=!1,Y=!1,L=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function P(w){for(var X=c(y);X!==null;){if(X.callback===null)r(y);else if(X.startTime<=w)r(y),X.sortIndex=X.expirationTime,i(p,X);else break;X=c(y)}}function ye(w){if(k=!1,P(w),!H)if(c(p)!==null)H=!0,Re||(Re=!0,We());else{var X=c(y);X!==null&&Nt(ye,X.startTime-w)}}var Re=!1,$=-1,Te=5,xe=-1;function Ue(){return Y?!0:!(u.unstable_now()-xe<Te)}function Xe(){if(Y=!1,Re){var w=u.unstable_now();xe=w;var X=!0;try{e:{H=!1,k&&(k=!1,q($),$=-1),z=!0;var F=C;try{t:{for(P(w),S=c(p);S!==null&&!(S.expirationTime>w&&Ue());){var ve=S.callback;if(typeof ve=="function"){S.callback=null,C=S.priorityLevel;var _e=ve(S.expirationTime<=w);if(w=u.unstable_now(),typeof _e=="function"){S.callback=_e,P(w),X=!0;break t}S===c(p)&&r(p),P(w)}else r(p);S=c(p)}if(S!==null)X=!0;else{var _=c(y);_!==null&&Nt(ye,_.startTime-w),X=!1}}break e}finally{S=null,C=F,z=!1}X=void 0}}finally{X?We():Re=!1}}}var We;if(typeof Q=="function")We=function(){Q(Xe)};else if(typeof MessageChannel<"u"){var Hn=new MessageChannel,kt=Hn.port2;Hn.port1.onmessage=Xe,We=function(){kt.postMessage(null)}}else We=function(){L(Xe,0)};function Nt(w,X){$=L(function(){w(u.unstable_now())},X)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(w){w.callback=null},u.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<w?Math.floor(1e3/w):5},u.unstable_getCurrentPriorityLevel=function(){return C},u.unstable_next=function(w){switch(C){case 1:case 2:case 3:var X=3;break;default:X=C}var F=C;C=X;try{return w()}finally{C=F}},u.unstable_requestPaint=function(){Y=!0},u.unstable_runWithPriority=function(w,X){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var F=C;C=w;try{return X()}finally{C=F}},u.unstable_scheduleCallback=function(w,X,F){var ve=u.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ve+F:ve):F=ve,w){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=F+_e,w={id:E++,callback:X,priorityLevel:w,startTime:F,expirationTime:_e,sortIndex:-1},F>ve?(w.sortIndex=F,i(y,w),c(p)===null&&w===c(y)&&(k?(q($),$=-1):k=!0,Nt(ye,F-ve))):(w.sortIndex=_e,i(p,w),H||z||(H=!0,Re||(Re=!0,We()))),w},u.unstable_shouldYield=Ue,u.unstable_wrapCallback=function(w){var X=C;return function(){var F=C;C=X;try{return w.apply(this,arguments)}finally{C=F}}}})(lr)),lr}var $d;function w0(){return $d||($d=1,nr.exports=D0()),nr.exports}var ar={exports:{}},Fe={};var Wd;function j0(){if(Wd)return Fe;Wd=1;var u=Nu();function i(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)y+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var r={d:{f:c,r:function(){throw Error(i(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(p,y,E){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:p,containerInfo:y,implementation:E}}var m=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Fe.createPortal=function(p,y){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(i(299));return d(p,y,null,E)},Fe.flushSync=function(p){var y=m.T,E=r.p;try{if(m.T=null,r.p=2,p)return p()}finally{m.T=y,r.p=E,r.d.f()}},Fe.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,r.d.C(p,y))},Fe.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Fe.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var E=y.as,S=b(E,y.crossOrigin),C=typeof y.integrity=="string"?y.integrity:void 0,z=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;E==="style"?r.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:S,integrity:C,fetchPriority:z}):E==="script"&&r.d.X(p,{crossOrigin:S,integrity:C,fetchPriority:z,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Fe.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var E=b(y.as,y.crossOrigin);r.d.M(p,{crossOrigin:E,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&r.d.M(p)},Fe.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var E=y.as,S=b(E,y.crossOrigin);r.d.L(p,E,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Fe.preloadModule=function(p,y){if(typeof p=="string")if(y){var E=b(y.as,y.crossOrigin);r.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:E,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else r.d.m(p)},Fe.requestFormReset=function(p){r.d.r(p)},Fe.unstable_batchedUpdates=function(p,y){return p(y)},Fe.useFormState=function(p,y,E){return m.H.useFormState(p,y,E)},Fe.useFormStatus=function(){return m.H.useHostTransitionStatus()},Fe.version="19.2.0",Fe}var Fd;function U0(){if(Fd)return ar.exports;Fd=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),ar.exports=j0(),ar.exports}var Pd;function B0(){if(Pd)return Xa;Pd=1;var u=w0(),i=Nu(),c=U0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(r(188))}function y(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return p(a),e;if(s===l)return p(a),t;s=s.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=s;else{for(var o=!1,h=a.child;h;){if(h===n){o=!0,n=a,l=s;break}if(h===l){o=!0,l=a,n=s;break}h=h.sibling}if(!o){for(h=s.child;h;){if(h===n){o=!0,n=s,l=a;break}if(h===l){o=!0,l=s,n=a;break}h=h.sibling}if(!o)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,C=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),Re=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),xe=Symbol.for("react.activity"),Ue=Symbol.for("react.memo_cache_sentinel"),Xe=Symbol.iterator;function We(e){return e===null||typeof e!="object"?null:(e=Xe&&e[Xe]||e["@@iterator"],typeof e=="function"?e:null)}var Hn=Symbol.for("react.client.reference");function kt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Hn?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case L:return"Profiler";case Y:return"StrictMode";case ye:return"Suspense";case Re:return"SuspenseList";case xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case Q:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:kt(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return kt(e(t))}catch{}}return null}var Nt=Array.isArray,w=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},ve=[],_e=-1;function _(e){return{current:e}}function B(e){0>_e||(e.current=ve[_e],ve[_e]=null,_e--)}function G(e,t){_e++,ve[_e]=e.current,e.current=t}var Z=_(null),ee=_(null),le=_(null),de=_(null);function Pe(e,t){switch(G(le,t),G(ee,e),G(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dd(t),e=md(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Z),G(Z,e)}function De(){B(Z),B(ee),B(le)}function Jl(e){e.memoizedState!==null&&G(de,e);var t=Z.current,n=md(t,e.type);t!==n&&(G(ee,e),G(Z,n))}function ei(e){ee.current===e&&(B(Z),B(ee)),de.current===e&&(B(de),La._currentValue=F)}var Uu,kr;function qn(e){if(Uu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Uu=t&&t[1]||"",kr=-1<n.stack.indexOf(`
|
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
`+Uu+e+kr}var Bu=!1;function Lu(e,t){if(!e||Bu)return"";Bu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(M){var O=M}Reflect.construct(e,[],U)}else{try{U.call()}catch(M){O=M}e.call(U.prototype)}}else{try{throw Error()}catch(M){O=M}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(M){if(M&&O&&typeof M.stack=="string")return[M.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),o=s[0],h=s[1];if(o&&h){var g=o.split(`
|
|
`),N=h.split(`
|
|
`);for(a=l=0;l<g.length&&!g[l].includes("DetermineComponentFrameRoot");)l++;for(;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;if(l===g.length||a===N.length)for(l=g.length-1,a=N.length-1;1<=l&&0<=a&&g[l]!==N[a];)a--;for(;1<=l&&0<=a;l--,a--)if(g[l]!==N[a]){if(l!==1||a!==1)do if(l--,a--,0>a||g[l]!==N[a]){var D=`
|
|
`+g[l].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=l&&0<=a);break}}}finally{Bu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function up(e,t){switch(e.tag){case 26:case 27:case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return e.child!==t&&t!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return Lu(e.type,!1);case 11:return Lu(e.type.render,!1);case 1:return Lu(e.type,!0);case 31:return qn("Activity");default:return""}}function Xr(e){try{var t="",n=null;do t+=up(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
Error generating stack: `+l.message+`
|
|
`+l.stack}}var Hu=Object.prototype.hasOwnProperty,qu=u.unstable_scheduleCallback,Yu=u.unstable_cancelCallback,sp=u.unstable_shouldYield,cp=u.unstable_requestPaint,st=u.unstable_now,rp=u.unstable_getCurrentPriorityLevel,Gr=u.unstable_ImmediatePriority,Vr=u.unstable_UserBlockingPriority,ti=u.unstable_NormalPriority,op=u.unstable_LowPriority,Qr=u.unstable_IdlePriority,fp=u.log,hp=u.unstable_setDisableYieldValue,$l=null,ct=null;function hn(e){if(typeof fp=="function"&&hp(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode($l,e)}catch{}}var rt=Math.clz32?Math.clz32:pp,dp=Math.log,mp=Math.LN2;function pp(e){return e>>>=0,e===0?32:31-(dp(e)/mp|0)|0}var ni=256,li=262144,ai=4194304;function Yn(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ii(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,s=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~s,l!==0?a=Yn(l):(o&=h,o!==0?a=Yn(o):n||(n=h&~e,n!==0&&(a=Yn(n))))):(h=l&~s,h!==0?a=Yn(h):o!==0?a=Yn(o):n||(n=l&~e,n!==0&&(a=Yn(n)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:a}function Wl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zr(){var e=ai;return ai<<=1,(ai&62914560)===0&&(ai=4194304),e}function ku(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vp(e,t,n,l,a,s){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,g=e.expirationTimes,N=e.hiddenUpdates;for(n=o&~n;0<n;){var D=31-rt(n),U=1<<D;h[D]=0,g[D]=-1;var O=N[D];if(O!==null)for(N[D]=null,D=0;D<O.length;D++){var M=O[D];M!==null&&(M.lane&=-536870913)}n&=~U}l!==0&&Kr(e,l,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(o&~t))}function Kr(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-rt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Jr(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-rt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function $r(e,t){var n=t&-t;return n=(n&42)!==0?1:Xu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Xu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Gu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wr(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Ld(e.type))}function Fr(e,t){var n=X.p;try{return X.p=e,t()}finally{X.p=n}}var dn=Math.random().toString(36).slice(2),Qe="__reactFiber$"+dn,et="__reactProps$"+dn,ul="__reactContainer$"+dn,Vu="__reactEvents$"+dn,gp="__reactListeners$"+dn,bp="__reactHandles$"+dn,Pr="__reactResources$"+dn,Pl="__reactMarker$"+dn;function Qu(e){delete e[Qe],delete e[et],delete e[Vu],delete e[gp],delete e[bp]}function sl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ul]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xd(e);e!==null;){if(n=e[Qe])return n;e=xd(e)}return t}e=n,n=e.parentNode}return null}function cl(e){if(e=e[Qe]||e[ul]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Il(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function rl(e){var t=e[Pr];return t||(t=e[Pr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ge(e){e[Pl]=!0}var Ir=new Set,eo={};function kn(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(eo[e]=t,e=0;e<t.length;e++)Ir.add(t[e])}var Sp=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]*$"),to={},no={};function xp(e){return Hu.call(no,e)?!0:Hu.call(to,e)?!1:Sp.test(e)?no[e]=!0:(to[e]=!0,!1)}function ui(e,t,n){if(xp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function si(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Xt(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _p(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zu(e){if(!e._valueTracker){var t=lo(e)?"checked":"value";e._valueTracker=_p(e,t,""+e[t])}}function ao(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=lo(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ci(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ep=/[\n"\\]/g;function gt(e){return e.replace(Ep,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ku(e,t,n,l,a,s,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+vt(t)):e.value!==""+vt(t)&&(e.value=""+vt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Ju(e,o,vt(t)):n!=null?Ju(e,o,vt(n)):l!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+vt(h):e.removeAttribute("name")}function io(e,t,n,l,a,s,o,h){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Zu(e);return}n=n!=null?""+vt(n):"",t=t!=null?""+vt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Zu(e)}function Ju(e,t,n){t==="number"&&ci(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function fl(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+vt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function uo(e,t,n){if(t!=null&&(t=""+vt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+vt(n):""}function so(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(Nt(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=vt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Zu(e)}function hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function co(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Tp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ro(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&co(e,a,l)}else for(var s in t)t.hasOwnProperty(s)&&co(e,s,t[s])}function $u(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ap=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"]]),Cp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ri(e){return Cp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Gt(){}var Wu=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dl=null,ml=null;function oo(e){var t=cl(e);if(t&&(e=t.stateNode)){var n=e[et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ku(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+gt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[et]||null;if(!a)throw Error(r(90));Ku(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&ao(l)}break e;case"textarea":uo(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fl(e,!!n.multiple,t,!1)}}}var Pu=!1;function fo(e,t,n){if(Pu)return e(t,n);Pu=!0;try{var l=e(t);return l}finally{if(Pu=!1,(dl!==null||ml!==null)&&(Wi(),dl&&(t=dl,e=ml,ml=dl=null,oo(t),e)))for(t=0;t<e.length;t++)oo(e[t])}}function ea(e,t){var n=e.stateNode;if(n===null)return null;var l=n[et]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Iu=!1;if(Vt)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{Iu=!1}var mn=null,es=null,oi=null;function ho(){if(oi)return oi;var e,t=es,n=t.length,l,a="value"in mn?mn.value:mn.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===a[s-l];l++);return oi=a.slice(e,1<l?1-l:void 0)}function fi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hi(){return!0}function mo(){return!1}function tt(e){function t(n,l,a,s,o){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(s):s[h]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?hi:mo,this.isPropagationStopped=mo,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=hi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hi)},persist:function(){},isPersistent:hi}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},di=tt(Xn),na=S({},Xn,{view:0,detail:0}),Rp=tt(na),ts,ns,la,mi=S({},na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:as,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==la&&(la&&e.type==="mousemove"?(ts=e.screenX-la.screenX,ns=e.screenY-la.screenY):ns=ts=0,la=e),ts)},movementY:function(e){return"movementY"in e?e.movementY:ns}}),po=tt(mi),Np=S({},mi,{dataTransfer:0}),Op=tt(Np),zp=S({},na,{relatedTarget:0}),ls=tt(zp),Mp=S({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),Dp=tt(Mp),wp=S({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jp=tt(wp),Up=S({},Xn,{data:0}),yo=tt(Up),Bp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lp={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"},Hp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hp[e])?!!t[e]:!1}function as(){return qp}var Yp=S({},na,{key:function(e){if(e.key){var t=Bp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Lp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:as,charCode:function(e){return e.type==="keypress"?fi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kp=tt(Yp),Xp=S({},mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vo=tt(Xp),Gp=S({},na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:as}),Vp=tt(Gp),Qp=S({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zp=tt(Qp),Kp=S({},mi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Jp=tt(Kp),$p=S({},Xn,{newState:0,oldState:0}),Wp=tt($p),Fp=[9,13,27,32],is=Vt&&"CompositionEvent"in window,aa=null;Vt&&"documentMode"in document&&(aa=document.documentMode);var Pp=Vt&&"TextEvent"in window&&!aa,go=Vt&&(!is||aa&&8<aa&&11>=aa),bo=" ",So=!1;function xo(e,t){switch(e){case"keyup":return Fp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _o(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function Ip(e,t){switch(e){case"compositionend":return _o(t);case"keypress":return t.which!==32?null:(So=!0,bo);case"textInput":return e=t.data,e===bo&&So?null:e;default:return null}}function ey(e,t){if(pl)return e==="compositionend"||!is&&xo(e,t)?(e=ho(),oi=es=mn=null,pl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return go&&t.locale!=="ko"?null:t.data;default:return null}}var ty={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Eo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ty[e.type]:t==="textarea"}function To(e,t,n,l){dl?ml?ml.push(l):ml=[l]:dl=l,t=lu(t,"onChange"),0<t.length&&(n=new di("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ia=null,ua=null;function ny(e){sd(e,0)}function pi(e){var t=Il(e);if(ao(t))return e}function Ao(e,t){if(e==="change")return t}var Co=!1;if(Vt){var us;if(Vt){var ss="oninput"in document;if(!ss){var Ro=document.createElement("div");Ro.setAttribute("oninput","return;"),ss=typeof Ro.oninput=="function"}us=ss}else us=!1;Co=us&&(!document.documentMode||9<document.documentMode)}function No(){ia&&(ia.detachEvent("onpropertychange",Oo),ua=ia=null)}function Oo(e){if(e.propertyName==="value"&&pi(ua)){var t=[];To(t,ua,e,Fu(e)),fo(ny,t)}}function ly(e,t,n){e==="focusin"?(No(),ia=t,ua=n,ia.attachEvent("onpropertychange",Oo)):e==="focusout"&&No()}function ay(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pi(ua)}function iy(e,t){if(e==="click")return pi(t)}function uy(e,t){if(e==="input"||e==="change")return pi(t)}function sy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:sy;function sa(e,t){if(ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Hu.call(t,a)||!ot(e[a],t[a]))return!1}return!0}function zo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mo(e,t){var n=zo(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zo(n)}}function Do(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Do(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ci(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ci(e.document)}return t}function cs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var cy=Vt&&"documentMode"in document&&11>=document.documentMode,yl=null,rs=null,ca=null,os=!1;function jo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||yl==null||yl!==ci(l)||(l=yl,"selectionStart"in l&&cs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ca&&sa(ca,l)||(ca=l,l=lu(rs,"onSelect"),0<l.length&&(t=new di("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=yl)))}function Gn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vl={animationend:Gn("Animation","AnimationEnd"),animationiteration:Gn("Animation","AnimationIteration"),animationstart:Gn("Animation","AnimationStart"),transitionrun:Gn("Transition","TransitionRun"),transitionstart:Gn("Transition","TransitionStart"),transitioncancel:Gn("Transition","TransitionCancel"),transitionend:Gn("Transition","TransitionEnd")},fs={},Uo={};Vt&&(Uo=document.createElement("div").style,"AnimationEvent"in window||(delete vl.animationend.animation,delete vl.animationiteration.animation,delete vl.animationstart.animation),"TransitionEvent"in window||delete vl.transitionend.transition);function Vn(e){if(fs[e])return fs[e];if(!vl[e])return e;var t=vl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Uo)return fs[e]=t[n];return e}var Bo=Vn("animationend"),Lo=Vn("animationiteration"),Ho=Vn("animationstart"),ry=Vn("transitionrun"),oy=Vn("transitionstart"),fy=Vn("transitioncancel"),qo=Vn("transitionend"),Yo=new Map,hs="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(" ");hs.push("scrollEnd");function Ot(e,t){Yo.set(e,t),kn(t,[e])}var yi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},bt=[],gl=0,ds=0;function vi(){for(var e=gl,t=ds=gl=0;t<e;){var n=bt[t];bt[t++]=null;var l=bt[t];bt[t++]=null;var a=bt[t];bt[t++]=null;var s=bt[t];if(bt[t++]=null,l!==null&&a!==null){var o=l.pending;o===null?a.next=a:(a.next=o.next,o.next=a),l.pending=a}s!==0&&ko(n,a,s)}}function gi(e,t,n,l){bt[gl++]=e,bt[gl++]=t,bt[gl++]=n,bt[gl++]=l,ds|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function ms(e,t,n,l){return gi(e,t,n,l),bi(e)}function Qn(e,t){return gi(e,null,null,t),bi(e)}function ko(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,s=e.return;s!==null;)s.childLanes|=n,l=s.alternate,l!==null&&(l.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-rt(n),e=s.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),s):null}function bi(e){if(50<za)throw za=0,Ec=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bl={};function hy(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,n,l){return new hy(e,t,n,l)}function ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qt(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Xo(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Si(e,t,n,l,a,s){var o=0;if(l=e,typeof e=="function")ps(e)&&(o=1);else if(typeof e=="string")o=v0(e,n,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case xe:return e=ft(31,n,t,a),e.elementType=xe,e.lanes=s,e;case k:return Zn(n.children,a,s,t);case Y:o=8,a|=24;break;case L:return e=ft(12,n,t,a|2),e.elementType=L,e.lanes=s,e;case ye:return e=ft(13,n,t,a),e.elementType=ye,e.lanes=s,e;case Re:return e=ft(19,n,t,a),e.elementType=Re,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:o=10;break e;case q:o=9;break e;case P:o=11;break e;case $:o=14;break e;case Te:o=16,l=null;break e}o=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=ft(o,n,t,a),t.elementType=e,t.type=l,t.lanes=s,t}function Zn(e,t,n,l){return e=ft(7,e,l,t),e.lanes=n,e}function ys(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Go(e){var t=ft(18,null,null,0);return t.stateNode=e,t}function vs(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Vo=new WeakMap;function St(e,t){if(typeof e=="object"&&e!==null){var n=Vo.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Xr(t)},Vo.set(e,t),t)}return{value:e,source:t,stack:Xr(t)}}var Sl=[],xl=0,xi=null,ra=0,xt=[],_t=0,pn=null,jt=1,Ut="";function Zt(e,t){Sl[xl++]=ra,Sl[xl++]=xi,xi=e,ra=t}function Qo(e,t,n){xt[_t++]=jt,xt[_t++]=Ut,xt[_t++]=pn,pn=e;var l=jt;e=Ut;var a=32-rt(l)-1;l&=~(1<<a),n+=1;var s=32-rt(t)+a;if(30<s){var o=a-a%5;s=(l&(1<<o)-1).toString(32),l>>=o,a-=o,jt=1<<32-rt(t)+a|n<<a|l,Ut=s+e}else jt=1<<s|n<<a|l,Ut=e}function gs(e){e.return!==null&&(Zt(e,1),Qo(e,1,0))}function bs(e){for(;e===xi;)xi=Sl[--xl],Sl[xl]=null,ra=Sl[--xl],Sl[xl]=null;for(;e===pn;)pn=xt[--_t],xt[_t]=null,Ut=xt[--_t],xt[_t]=null,jt=xt[--_t],xt[_t]=null}function Zo(e,t){xt[_t++]=jt,xt[_t++]=Ut,xt[_t++]=pn,jt=t.id,Ut=t.overflow,pn=e}var Ze=null,Ae=null,ce=!1,yn=null,Et=!1,Ss=Error(r(519));function vn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oa(St(t,e)),Ss}function Ko(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Qe]=e,t[et]=l,n){case"dialog":ie("cancel",t),ie("close",t);break;case"iframe":case"object":case"embed":ie("load",t);break;case"video":case"audio":for(n=0;n<Da.length;n++)ie(Da[n],t);break;case"source":ie("error",t);break;case"img":case"image":case"link":ie("error",t),ie("load",t);break;case"details":ie("toggle",t);break;case"input":ie("invalid",t),io(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ie("invalid",t);break;case"textarea":ie("invalid",t),so(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||fd(t.textContent,n)?(l.popover!=null&&(ie("beforetoggle",t),ie("toggle",t)),l.onScroll!=null&&ie("scroll",t),l.onScrollEnd!=null&&ie("scrollend",t),l.onClick!=null&&(t.onclick=Gt),t=!0):t=!1,t||vn(e,!0)}function Jo(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:Et=!1;return;case 27:case 3:Et=!0;return;default:Ze=Ze.return}}function _l(e){if(e!==Ze)return!1;if(!ce)return Jo(e),ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Hc(e.type,e.memoizedProps)),n=!n),n&&Ae&&vn(e),Jo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=Sd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=Sd(e)}else t===27?(t=Ae,Mn(e.type)?(e=Gc,Gc=null,Ae=e):Ae=t):Ae=Ze?At(e.stateNode.nextSibling):null;return!0}function Kn(){Ae=Ze=null,ce=!1}function xs(){var e=yn;return e!==null&&(it===null?it=e:it.push.apply(it,e),yn=null),e}function oa(e){yn===null?yn=[e]:yn.push(e)}var _s=_(null),Jn=null,Kt=null;function gn(e,t,n){G(_s,t._currentValue),t._currentValue=n}function Jt(e){e._currentValue=_s.current,B(_s)}function Es(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Ts(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var o=a.child;s=s.firstContext;e:for(;s!==null;){var h=s;s=a;for(var g=0;g<t.length;g++)if(h.context===t[g]){s.lanes|=n,h=s.alternate,h!==null&&(h.lanes|=n),Es(s.return,n,e),l||(o=null);break e}s=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(r(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Es(o,n,e),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function El(e,t,n,l){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(r(387));if(o=o.memoizedProps,o!==null){var h=a.type;ot(a.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(a===de.current){if(o=a.alternate,o===null)throw Error(r(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(La):e=[La])}a=a.return}e!==null&&Ts(t,e,n,l),t.flags|=262144}function _i(e){for(e=e.firstContext;e!==null;){if(!ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $n(e){Jn=e,Kt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return $o(Jn,e)}function Ei(e,t){return Jn===null&&$n(e),$o(e,t)}function $o(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Kt===null){if(e===null)throw Error(r(308));Kt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kt=Kt.next=t;return n}var dy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},my=u.unstable_scheduleCallback,py=u.unstable_NormalPriority,Be={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function As(){return{controller:new dy,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&my(py,function(){e.controller.abort()})}var ha=null,Cs=0,Tl=0,Al=null;function yy(e,t){if(ha===null){var n=ha=[];Cs=0,Tl=Oc(),Al={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Cs++,t.then(Wo,Wo),t}function Wo(){if(--Cs===0&&ha!==null){Al!==null&&(Al.status="fulfilled");var e=ha;ha=null,Tl=0,Al=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function vy(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Fo=w.S;w.S=function(e,t){Uh=st(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&yy(e,t),Fo!==null&&Fo(e,t)};var Wn=_(null);function Rs(){var e=Wn.current;return e!==null?e:Ee.pooledCache}function Ti(e,t){t===null?G(Wn,Wn.current):G(Wn,t.pool)}function Po(){var e=Rs();return e===null?null:{parent:Be._currentValue,pool:e}}var Cl=Error(r(460)),Ns=Error(r(474)),Ai=Error(r(542)),Ci={then:function(){}};function Io(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ef(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Gt,Gt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nf(e),e;default:if(typeof t.status=="string")t.then(Gt,Gt);else{if(e=Ee,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nf(e),e}throw Pn=t,Cl}}function Fn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pn=n,Cl):n}}var Pn=null;function tf(){if(Pn===null)throw Error(r(459));var e=Pn;return Pn=null,e}function nf(e){if(e===Cl||e===Ai)throw Error(r(483))}var Rl=null,da=0;function Ri(e){var t=da;return da+=1,Rl===null&&(Rl=[]),ef(Rl,e,t)}function ma(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ni(e,t){throw t.$$typeof===C?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lf(e){function t(A,x){if(e){var R=A.deletions;R===null?(A.deletions=[x],A.flags|=16):R.push(x)}}function n(A,x){if(!e)return null;for(;x!==null;)t(A,x),x=x.sibling;return null}function l(A){for(var x=new Map;A!==null;)A.key!==null?x.set(A.key,A):x.set(A.index,A),A=A.sibling;return x}function a(A,x){return A=Qt(A,x),A.index=0,A.sibling=null,A}function s(A,x,R){return A.index=R,e?(R=A.alternate,R!==null?(R=R.index,R<x?(A.flags|=67108866,x):R):(A.flags|=67108866,x)):(A.flags|=1048576,x)}function o(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function h(A,x,R,j){return x===null||x.tag!==6?(x=ys(R,A.mode,j),x.return=A,x):(x=a(x,R),x.return=A,x)}function g(A,x,R,j){var J=R.type;return J===k?D(A,x,R.props.children,j,R.key):x!==null&&(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Te&&Fn(J)===x.type)?(x=a(x,R.props),ma(x,R),x.return=A,x):(x=Si(R.type,R.key,R.props,null,A.mode,j),ma(x,R),x.return=A,x)}function N(A,x,R,j){return x===null||x.tag!==4||x.stateNode.containerInfo!==R.containerInfo||x.stateNode.implementation!==R.implementation?(x=vs(R,A.mode,j),x.return=A,x):(x=a(x,R.children||[]),x.return=A,x)}function D(A,x,R,j,J){return x===null||x.tag!==7?(x=Zn(R,A.mode,j,J),x.return=A,x):(x=a(x,R),x.return=A,x)}function U(A,x,R){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=ys(""+x,A.mode,R),x.return=A,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case z:return R=Si(x.type,x.key,x.props,null,A.mode,R),ma(R,x),R.return=A,R;case H:return x=vs(x,A.mode,R),x.return=A,x;case Te:return x=Fn(x),U(A,x,R)}if(Nt(x)||We(x))return x=Zn(x,A.mode,R,null),x.return=A,x;if(typeof x.then=="function")return U(A,Ri(x),R);if(x.$$typeof===Q)return U(A,Ei(A,x),R);Ni(A,x)}return null}function O(A,x,R,j){var J=x!==null?x.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return J!==null?null:h(A,x,""+R,j);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case z:return R.key===J?g(A,x,R,j):null;case H:return R.key===J?N(A,x,R,j):null;case Te:return R=Fn(R),O(A,x,R,j)}if(Nt(R)||We(R))return J!==null?null:D(A,x,R,j,null);if(typeof R.then=="function")return O(A,x,Ri(R),j);if(R.$$typeof===Q)return O(A,x,Ei(A,R),j);Ni(A,R)}return null}function M(A,x,R,j,J){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return A=A.get(R)||null,h(x,A,""+j,J);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case z:return A=A.get(j.key===null?R:j.key)||null,g(x,A,j,J);case H:return A=A.get(j.key===null?R:j.key)||null,N(x,A,j,J);case Te:return j=Fn(j),M(A,x,R,j,J)}if(Nt(j)||We(j))return A=A.get(R)||null,D(x,A,j,J,null);if(typeof j.then=="function")return M(A,x,R,Ri(j),J);if(j.$$typeof===Q)return M(A,x,R,Ei(x,j),J);Ni(x,j)}return null}function V(A,x,R,j){for(var J=null,oe=null,K=x,ne=x=0,se=null;K!==null&&ne<R.length;ne++){K.index>ne?(se=K,K=null):se=K.sibling;var fe=O(A,K,R[ne],j);if(fe===null){K===null&&(K=se);break}e&&K&&fe.alternate===null&&t(A,K),x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe,K=se}if(ne===R.length)return n(A,K),ce&&Zt(A,ne),J;if(K===null){for(;ne<R.length;ne++)K=U(A,R[ne],j),K!==null&&(x=s(K,x,ne),oe===null?J=K:oe.sibling=K,oe=K);return ce&&Zt(A,ne),J}for(K=l(K);ne<R.length;ne++)se=M(K,A,ne,R[ne],j),se!==null&&(e&&se.alternate!==null&&K.delete(se.key===null?ne:se.key),x=s(se,x,ne),oe===null?J=se:oe.sibling=se,oe=se);return e&&K.forEach(function(Bn){return t(A,Bn)}),ce&&Zt(A,ne),J}function W(A,x,R,j){if(R==null)throw Error(r(151));for(var J=null,oe=null,K=x,ne=x=0,se=null,fe=R.next();K!==null&&!fe.done;ne++,fe=R.next()){K.index>ne?(se=K,K=null):se=K.sibling;var Bn=O(A,K,fe.value,j);if(Bn===null){K===null&&(K=se);break}e&&K&&Bn.alternate===null&&t(A,K),x=s(Bn,x,ne),oe===null?J=Bn:oe.sibling=Bn,oe=Bn,K=se}if(fe.done)return n(A,K),ce&&Zt(A,ne),J;if(K===null){for(;!fe.done;ne++,fe=R.next())fe=U(A,fe.value,j),fe!==null&&(x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe);return ce&&Zt(A,ne),J}for(K=l(K);!fe.done;ne++,fe=R.next())fe=M(K,A,ne,fe.value,j),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?ne:fe.key),x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe);return e&&K.forEach(function(N0){return t(A,N0)}),ce&&Zt(A,ne),J}function Se(A,x,R,j){if(typeof R=="object"&&R!==null&&R.type===k&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case z:e:{for(var J=R.key;x!==null;){if(x.key===J){if(J=R.type,J===k){if(x.tag===7){n(A,x.sibling),j=a(x,R.props.children),j.return=A,A=j;break e}}else if(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Te&&Fn(J)===x.type){n(A,x.sibling),j=a(x,R.props),ma(j,R),j.return=A,A=j;break e}n(A,x);break}else t(A,x);x=x.sibling}R.type===k?(j=Zn(R.props.children,A.mode,j,R.key),j.return=A,A=j):(j=Si(R.type,R.key,R.props,null,A.mode,j),ma(j,R),j.return=A,A=j)}return o(A);case H:e:{for(J=R.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===R.containerInfo&&x.stateNode.implementation===R.implementation){n(A,x.sibling),j=a(x,R.children||[]),j.return=A,A=j;break e}else{n(A,x);break}else t(A,x);x=x.sibling}j=vs(R,A.mode,j),j.return=A,A=j}return o(A);case Te:return R=Fn(R),Se(A,x,R,j)}if(Nt(R))return V(A,x,R,j);if(We(R)){if(J=We(R),typeof J!="function")throw Error(r(150));return R=J.call(R),W(A,x,R,j)}if(typeof R.then=="function")return Se(A,x,Ri(R),j);if(R.$$typeof===Q)return Se(A,x,Ei(A,R),j);Ni(A,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,x!==null&&x.tag===6?(n(A,x.sibling),j=a(x,R),j.return=A,A=j):(n(A,x),j=ys(R,A.mode,j),j.return=A,A=j),o(A)):n(A,x)}return function(A,x,R,j){try{da=0;var J=Se(A,x,R,j);return Rl=null,J}catch(K){if(K===Cl||K===Ai)throw K;var oe=ft(29,K,null,A.mode);return oe.lanes=j,oe.return=A,oe}finally{}}}var In=lf(!0),af=lf(!1),bn=!1;function Os(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Sn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(he&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=bi(e),ko(e,null,n),t}return gi(e,l,t,n),bi(e)}function pa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Jr(e,n)}}function Ms(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?a=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ds=!1;function ya(){if(Ds){var e=Al;if(e!==null)throw e}}function va(e,t,n,l){Ds=!1;var a=e.updateQueue;bn=!1;var s=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var g=h,N=g.next;g.next=null,o===null?s=N:o.next=N,o=g;var D=e.alternate;D!==null&&(D=D.updateQueue,h=D.lastBaseUpdate,h!==o&&(h===null?D.firstBaseUpdate=N:h.next=N,D.lastBaseUpdate=g))}if(s!==null){var U=a.baseState;o=0,D=N=g=null,h=s;do{var O=h.lane&-536870913,M=O!==h.lane;if(M?(ue&O)===O:(l&O)===O){O!==0&&O===Tl&&(Ds=!0),D!==null&&(D=D.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var V=e,W=h;O=t;var Se=n;switch(W.tag){case 1:if(V=W.payload,typeof V=="function"){U=V.call(Se,U,O);break e}U=V;break e;case 3:V.flags=V.flags&-65537|128;case 0:if(V=W.payload,O=typeof V=="function"?V.call(Se,U,O):V,O==null)break e;U=S({},U,O);break e;case 2:bn=!0}}O=h.callback,O!==null&&(e.flags|=64,M&&(e.flags|=8192),M=a.callbacks,M===null?a.callbacks=[O]:M.push(O))}else M={lane:O,tag:h.tag,payload:h.payload,callback:h.callback,next:null},D===null?(N=D=M,g=U):D=D.next=M,o|=O;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;M=h,h=M.next,M.next=null,a.lastBaseUpdate=M,a.shared.pending=null}}while(!0);D===null&&(g=U),a.baseState=g,a.firstBaseUpdate=N,a.lastBaseUpdate=D,s===null&&(a.shared.lanes=0),Cn|=o,e.lanes=o,e.memoizedState=U}}function uf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function sf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)uf(n[e],t)}var Nl=_(null),Oi=_(0);function cf(e,t){e=ln,G(Oi,e),G(Nl,t),ln=e|t.baseLanes}function ws(){G(Oi,ln),G(Nl,Nl.current)}function js(){ln=Oi.current,B(Nl),B(Oi)}var ht=_(null),Tt=null;function _n(e){var t=e.alternate;G(we,we.current&1),G(ht,e),Tt===null&&(t===null||Nl.current!==null||t.memoizedState!==null)&&(Tt=e)}function Us(e){G(we,we.current),G(ht,e),Tt===null&&(Tt=e)}function rf(e){e.tag===22?(G(we,we.current),G(ht,e),Tt===null&&(Tt=e)):En()}function En(){G(we,we.current),G(ht,ht.current)}function dt(e){B(ht),Tt===e&&(Tt=null),B(we)}var we=_(0);function zi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||kc(n)||Xc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $t=0,te=null,ge=null,Le=null,Mi=!1,Ol=!1,el=!1,Di=0,ga=0,zl=null,gy=0;function ze(){throw Error(r(321))}function Bs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ot(e[n],t[n]))return!1;return!0}function Ls(e,t,n,l,a,s){return $t=s,te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?Zf:Ps,el=!1,s=n(l,a),el=!1,Ol&&(s=ff(t,n,l,a)),of(e),s}function of(e){w.H=xa;var t=ge!==null&&ge.next!==null;if($t=0,Le=ge=te=null,Mi=!1,ga=0,zl=null,t)throw Error(r(300));e===null||He||(e=e.dependencies,e!==null&&_i(e)&&(He=!0))}function ff(e,t,n,l){te=e;var a=0;do{if(Ol&&(zl=null),ga=0,Ol=!1,25<=a)throw Error(r(301));if(a+=1,Le=ge=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}w.H=Kf,s=t(n,l)}while(Ol);return s}function by(){var e=w.H,t=e.useState()[0];return t=typeof t.then=="function"?ba(t):t,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(te.flags|=1024),t}function Hs(){var e=Di!==0;return Di=0,e}function qs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ys(e){if(Mi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mi=!1}$t=0,Le=ge=te=null,Ol=!1,ga=Di=0,zl=null}function Ie(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?te.memoizedState=Le=e:Le=Le.next=e,Le}function je(){if(ge===null){var e=te.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Le===null?te.memoizedState:Le.next;if(t!==null)Le=t,ge=e;else{if(e===null)throw te.alternate===null?Error(r(467)):Error(r(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Le===null?te.memoizedState=Le=e:Le=Le.next=e}return Le}function wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ba(e){var t=ga;return ga+=1,zl===null&&(zl=[]),e=ef(zl,e,t),t=te,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?Zf:Ps),e}function ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ba(e);if(e.$$typeof===Q)return Ke(e)}throw Error(r(438,String(e)))}function ks(e){var t=null,n=te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=te.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=wi(),te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Ue;return t.index++,n}function Wt(e,t){return typeof t=="function"?t(e):t}function Ui(e){var t=je();return Xs(t,ge,e)}function Xs(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,s=l.pending;if(s!==null){if(a!==null){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,l.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var h=o=null,g=null,N=t,D=!1;do{var U=N.lane&-536870913;if(U!==N.lane?(ue&U)===U:($t&U)===U){var O=N.revertLane;if(O===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),U===Tl&&(D=!0);else if(($t&O)===O){N=N.next,O===Tl&&(D=!0);continue}else U={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},g===null?(h=g=U,o=s):g=g.next=U,te.lanes|=O,Cn|=O;U=N.action,el&&n(s,U),s=N.hasEagerState?N.eagerState:n(s,U)}else O={lane:U,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},g===null?(h=g=O,o=s):g=g.next=O,te.lanes|=U,Cn|=U;N=N.next}while(N!==null&&N!==t);if(g===null?o=s:g.next=h,!ot(s,e.memoizedState)&&(He=!0,D&&(n=Al,n!==null)))throw n;e.memoizedState=s,e.baseState=o,e.baseQueue=g,l.lastRenderedState=s}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Gs(e){var t=je(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do s=e(s,o.action),o=o.next;while(o!==a);ot(s,t.memoizedState)||(He=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function hf(e,t,n){var l=te,a=je(),s=ce;if(s){if(n===void 0)throw Error(r(407));n=n()}else n=t();var o=!ot((ge||a).memoizedState,n);if(o&&(a.memoizedState=n,He=!0),a=a.queue,Zs(pf.bind(null,l,a,e),[e]),a.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(l.flags|=2048,Ml(9,{destroy:void 0},mf.bind(null,l,a,n,t),null),Ee===null)throw Error(r(349));s||($t&127)!==0||df(l,t,n)}return n}function df(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=te.updateQueue,t===null?(t=wi(),te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function mf(e,t,n,l){t.value=n,t.getSnapshot=l,yf(t)&&vf(e)}function pf(e,t,n){return n(function(){yf(t)&&vf(e)})}function yf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ot(e,n)}catch{return!0}}function vf(e){var t=Qn(e,2);t!==null&&ut(t,e,2)}function Vs(e){var t=Ie();if(typeof e=="function"){var n=e;if(e=n(),el){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:e},t}function gf(e,t,n,l){return e.baseState=n,Xs(e,ge,typeof l=="function"?l:Wt)}function Sy(e,t,n,l,a){if(Hi(e))throw Error(r(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){s.listeners.push(o)}};w.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,bf(t,s)):(s.next=n.next,t.pending=n.next=s)}}function bf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var s=w.T,o={};w.T=o;try{var h=n(a,l),g=w.S;g!==null&&g(o,h),Sf(e,t,h)}catch(N){Qs(e,t,N)}finally{s!==null&&o.types!==null&&(s.types=o.types),w.T=s}}else try{s=n(a,l),Sf(e,t,s)}catch(N){Qs(e,t,N)}}function Sf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){xf(e,t,l)},function(l){return Qs(e,t,l)}):xf(e,t,n)}function xf(e,t,n){t.status="fulfilled",t.value=n,_f(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,bf(e,n)))}function Qs(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,_f(t),t=t.next;while(t!==l)}e.action=null}function _f(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ef(e,t){return t}function Tf(e,t){if(ce){var n=Ee.formState;if(n!==null){e:{var l=te;if(ce){if(Ae){t:{for(var a=Ae,s=Et;a.nodeType!==8;){if(!s){a=null;break t}if(a=At(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Ae=At(a.nextSibling),l=a.data==="F!";break e}}vn(l)}l=!1}l&&(t=n[0])}}return n=Ie(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ef,lastRenderedState:t},n.queue=l,n=Gf.bind(null,te,l),l.dispatch=n,l=Vs(!1),s=Fs.bind(null,te,!1,l.queue),l=Ie(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Sy.bind(null,te,a,s,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Af(e){var t=je();return Cf(t,ge,e)}function Cf(e,t,n){if(t=Xs(e,t,Ef)[0],e=Ui(Wt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ba(t)}catch(o){throw o===Cl?Ai:o}else l=t;t=je();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(te.flags|=2048,Ml(9,{destroy:void 0},xy.bind(null,a,n),null)),[l,s,e]}function xy(e,t){e.action=t}function Rf(e){var t=je(),n=ge;if(n!==null)return Cf(t,n,e);je(),t=t.memoizedState,n=je();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ml(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=te.updateQueue,t===null&&(t=wi(),te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Nf(){return je().memoizedState}function Bi(e,t,n,l){var a=Ie();te.flags|=e,a.memoizedState=Ml(1|t,{destroy:void 0},n,l===void 0?null:l)}function Li(e,t,n,l){var a=je();l=l===void 0?null:l;var s=a.memoizedState.inst;ge!==null&&l!==null&&Bs(l,ge.memoizedState.deps)?a.memoizedState=Ml(t,s,n,l):(te.flags|=e,a.memoizedState=Ml(1|t,s,n,l))}function Of(e,t){Bi(8390656,8,e,t)}function Zs(e,t){Li(2048,8,e,t)}function _y(e){te.flags|=4;var t=te.updateQueue;if(t===null)t=wi(),te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function zf(e){var t=je().memoizedState;return _y({ref:t,nextImpl:e}),function(){if((he&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Mf(e,t){return Li(4,2,e,t)}function Df(e,t){return Li(4,4,e,t)}function wf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jf(e,t,n){n=n!=null?n.concat([e]):null,Li(4,4,wf.bind(null,t,e),n)}function Ks(){}function Uf(e,t){var n=je();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Bs(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Bf(e,t){var n=je();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Bs(t,l[1]))return l[0];if(l=e(),el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l}function Js(e,t,n){return n===void 0||($t&1073741824)!==0&&(ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Lh(),te.lanes|=e,Cn|=e,n)}function Lf(e,t,n,l){return ot(n,t)?n:Nl.current!==null?(e=Js(e,n,l),ot(e,t)||(He=!0),e):($t&42)===0||($t&1073741824)!==0&&(ue&261930)===0?(He=!0,e.memoizedState=n):(e=Lh(),te.lanes|=e,Cn|=e,t)}function Hf(e,t,n,l,a){var s=X.p;X.p=s!==0&&8>s?s:8;var o=w.T,h={};w.T=h,Fs(e,!1,t,n);try{var g=a(),N=w.S;if(N!==null&&N(h,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var D=vy(g,l);Sa(e,t,D,yt(e))}else Sa(e,t,l,yt(e))}catch(U){Sa(e,t,{then:function(){},status:"rejected",reason:U},yt())}finally{X.p=s,o!==null&&h.types!==null&&(o.types=h.types),w.T=o}}function Ey(){}function $s(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=qf(e).queue;Hf(e,a,t,F,n===null?Ey:function(){return Yf(e),n(l)})}function qf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yf(e){var t=qf(e);t.next===null&&(t=e.alternate.memoizedState),Sa(e,t.next.queue,{},yt())}function Ws(){return Ke(La)}function kf(){return je().memoizedState}function Xf(){return je().memoizedState}function Ty(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yt();e=Sn(n);var l=xn(t,e,n);l!==null&&(ut(l,t,n),pa(l,t,n)),t={cache:As()},e.payload=t;return}t=t.return}}function Ay(e,t,n){var l=yt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hi(e)?Vf(t,n):(n=ms(e,t,n,l),n!==null&&(ut(n,e,l),Qf(n,t,l)))}function Gf(e,t,n){var l=yt();Sa(e,t,n,l)}function Sa(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hi(e))Vf(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,h=s(o,n);if(a.hasEagerState=!0,a.eagerState=h,ot(h,o))return gi(e,t,a,0),Ee===null&&vi(),!1}catch{}finally{}if(n=ms(e,t,a,l),n!==null)return ut(n,e,l),Qf(n,t,l),!0}return!1}function Fs(e,t,n,l){if(l={lane:2,revertLane:Oc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Hi(e)){if(t)throw Error(r(479))}else t=ms(e,n,l,2),t!==null&&ut(t,e,2)}function Hi(e){var t=e.alternate;return e===te||t!==null&&t===te}function Vf(e,t){Ol=Mi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Jr(e,n)}}var xa={readContext:Ke,use:ji,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze};xa.useEffectEvent=ze;var Zf={readContext:Ke,use:ji,useCallback:function(e,t){return Ie().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Of,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Bi(4194308,4,wf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bi(4194308,4,e,t)},useInsertionEffect:function(e,t){Bi(4,2,e,t)},useMemo:function(e,t){var n=Ie();t=t===void 0?null:t;var l=e();if(el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Ie();if(n!==void 0){var a=n(t);if(el){hn(!0);try{n(t)}finally{hn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Ay.bind(null,te,e),[l.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:function(e){e=Vs(e);var t=e.queue,n=Gf.bind(null,te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ks,useDeferredValue:function(e,t){var n=Ie();return Js(n,e,t)},useTransition:function(){var e=Vs(!1);return e=Hf.bind(null,te,e.queue,!0,!1),Ie().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=te,a=Ie();if(ce){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ee===null)throw Error(r(349));(ue&127)!==0||df(l,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,Of(pf.bind(null,l,s,e),[e]),l.flags|=2048,Ml(9,{destroy:void 0},mf.bind(null,l,s,n,t),null),n},useId:function(){var e=Ie(),t=Ee.identifierPrefix;if(ce){var n=Ut,l=jt;n=(l&~(1<<32-rt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Di++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=gy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ws,useFormState:Tf,useActionState:Tf,useOptimistic:function(e){var t=Ie();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,te,!0,n),n.dispatch=t,[e,t]},useMemoCache:ks,useCacheRefresh:function(){return Ie().memoizedState=Ty.bind(null,te)},useEffectEvent:function(e){var t=Ie(),n={impl:e};return t.memoizedState=n,function(){if((he&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Ps={readContext:Ke,use:ji,useCallback:Uf,useContext:Ke,useEffect:Zs,useImperativeHandle:jf,useInsertionEffect:Mf,useLayoutEffect:Df,useMemo:Bf,useReducer:Ui,useRef:Nf,useState:function(){return Ui(Wt)},useDebugValue:Ks,useDeferredValue:function(e,t){var n=je();return Lf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Ui(Wt)[0],t=je().memoizedState;return[typeof e=="boolean"?e:ba(e),t]},useSyncExternalStore:hf,useId:kf,useHostTransitionStatus:Ws,useFormState:Af,useActionState:Af,useOptimistic:function(e,t){var n=je();return gf(n,ge,e,t)},useMemoCache:ks,useCacheRefresh:Xf};Ps.useEffectEvent=zf;var Kf={readContext:Ke,use:ji,useCallback:Uf,useContext:Ke,useEffect:Zs,useImperativeHandle:jf,useInsertionEffect:Mf,useLayoutEffect:Df,useMemo:Bf,useReducer:Gs,useRef:Nf,useState:function(){return Gs(Wt)},useDebugValue:Ks,useDeferredValue:function(e,t){var n=je();return ge===null?Js(n,e,t):Lf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Gs(Wt)[0],t=je().memoizedState;return[typeof e=="boolean"?e:ba(e),t]},useSyncExternalStore:hf,useId:kf,useHostTransitionStatus:Ws,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var n=je();return ge!==null?gf(n,ge,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ks,useCacheRefresh:Xf};Kf.useEffectEvent=zf;function Is(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ec={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=yt(),a=Sn(l);a.payload=t,n!=null&&(a.callback=n),t=xn(e,a,l),t!==null&&(ut(t,e,l),pa(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=yt(),a=Sn(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=xn(e,a,l),t!==null&&(ut(t,e,l),pa(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),l=Sn(n);l.tag=2,t!=null&&(l.callback=t),t=xn(e,l,n),t!==null&&(ut(t,e,n),pa(t,e,n))}};function Jf(e,t,n,l,a,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,o):t.prototype&&t.prototype.isPureReactComponent?!sa(n,l)||!sa(a,s):!0}function $f(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&ec.enqueueReplaceState(t,t.state,null)}function tl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Wf(e){yi(e)}function Ff(e){console.error(e)}function Pf(e){yi(e)}function qi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function If(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function tc(e,t,n){return n=Sn(n),n.tag=3,n.payload={element:null},n.callback=function(){qi(e,t)},n}function eh(e){return e=Sn(e),e.tag=3,e}function th(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var s=l.value;e.payload=function(){return a(s)},e.callback=function(){If(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){If(t,n,l),typeof a!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Cy(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&El(t,n,a,!0),n=ht.current,n!==null){switch(n.tag){case 31:case 13:return Tt===null?Fi():n.alternate===null&&Me===0&&(Me=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Ci?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Cc(e,l,a)),!1;case 22:return n.flags|=65536,l===Ci?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Cc(e,l,a)),!1}throw Error(r(435,n.tag))}return Cc(e,l,a),Fi(),!1}if(ce)return t=ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Ss&&(e=Error(r(422),{cause:l}),oa(St(e,n)))):(l!==Ss&&(t=Error(r(423),{cause:l}),oa(St(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=St(l,n),a=tc(e.stateNode,l,a),Ms(e,a),Me!==4&&(Me=2)),!1;var s=Error(r(520),{cause:l});if(s=St(s,n),Oa===null?Oa=[s]:Oa.push(s),Me!==4&&(Me=2),t===null)return!0;l=St(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=tc(n.stateNode,l,e),Ms(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Rn===null||!Rn.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,a=eh(a),th(a,e,n,l),Ms(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(r(461)),He=!1;function Je(e,t,n,l){t.child=e===null?af(t,null,n,l):In(t,e.child,n,l)}function nh(e,t,n,l,a){n=n.render;var s=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return $n(t),l=Ls(e,t,n,o,s,a),h=Hs(),e!==null&&!He?(qs(e,t,a),Ft(e,t,a)):(ce&&h&&gs(t),t.flags|=1,Je(e,t,l,a),t.child)}function lh(e,t,n,l,a){if(e===null){var s=n.type;return typeof s=="function"&&!ps(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,ah(e,t,s,l,a)):(e=Si(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!oc(e,a)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:sa,n(o,l)&&e.ref===t.ref)return Ft(e,t,a)}return t.flags|=1,e=Qt(s,l),e.ref=t.ref,e.return=t,t.child=e}function ah(e,t,n,l,a){if(e!==null){var s=e.memoizedProps;if(sa(s,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=s,oc(e,a))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,Ft(e,t,a)}return lc(e,t,n,l,a)}function ih(e,t,n,l){var a=l.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~s}else l=0,t.child=null;return uh(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ti(t,s!==null?s.cachePool:null),s!==null?cf(t,s):ws(),rf(t);else return l=t.lanes=536870912,uh(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(Ti(t,s.cachePool),cf(t,s),En(),t.memoizedState=null):(e!==null&&Ti(t,null),ws(),En());return Je(e,t,a,n),t.child}function _a(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uh(e,t,n,l,a){var s=Rs();return s=s===null?null:{parent:Be._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Ti(t,null),ws(),rf(t),e!==null&&El(e,t,l,!0),t.childLanes=a,null}function Yi(e,t){return t=Xi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sh(e,t,n){return In(t,e.child,null,n),e=Yi(t,t.pendingProps),e.flags|=2,dt(t),t.memoizedState=null,e}function Ry(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ce){if(l.mode==="hidden")return e=Yi(t,l),t.lanes=536870912,_a(null,e);if(Us(t),(e=Ae)?(e=bd(e,Et),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:jt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},n=Go(e),n.return=t,t.child=n,Ze=t,Ae=null)):e=null,e===null)throw vn(t);return t.lanes=536870912,null}return Yi(t,l)}var s=e.memoizedState;if(s!==null){var o=s.dehydrated;if(Us(t),a)if(t.flags&256)t.flags&=-257,t=sh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(He||El(e,t,n,!1),a=(n&e.childLanes)!==0,He||a){if(l=Ee,l!==null&&(o=$r(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,Qn(e,o),ut(l,e,o),nc;Fi(),t=sh(e,t,n)}else e=s.treeContext,Ae=At(o.nextSibling),Ze=t,ce=!0,yn=null,Et=!1,e!==null&&Zo(t,e),t=Yi(t,l),t.flags|=4096;return t}return e=Qt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ki(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function lc(e,t,n,l,a){return $n(t),n=Ls(e,t,n,l,void 0,a),l=Hs(),e!==null&&!He?(qs(e,t,a),Ft(e,t,a)):(ce&&l&&gs(t),t.flags|=1,Je(e,t,n,a),t.child)}function ch(e,t,n,l,a,s){return $n(t),t.updateQueue=null,n=ff(t,l,n,a),of(e),l=Hs(),e!==null&&!He?(qs(e,t,s),Ft(e,t,s)):(ce&&l&&gs(t),t.flags|=1,Je(e,t,n,s),t.child)}function rh(e,t,n,l,a){if($n(t),t.stateNode===null){var s=bl,o=n.contextType;typeof o=="object"&&o!==null&&(s=Ke(o)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ec,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},Os(t),o=n.contextType,s.context=typeof o=="object"&&o!==null?Ke(o):bl,s.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(Is(t,n,o,l),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(o=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),o!==s.state&&ec.enqueueReplaceState(s,s.state,null),va(t,l,s,a),ya(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var h=t.memoizedProps,g=tl(n,h);s.props=g;var N=s.context,D=n.contextType;o=bl,typeof D=="object"&&D!==null&&(o=Ke(D));var U=n.getDerivedStateFromProps;D=typeof U=="function"||typeof s.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,D||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(h||N!==o)&&$f(t,s,l,o),bn=!1;var O=t.memoizedState;s.state=O,va(t,l,s,a),ya(),N=t.memoizedState,h||O!==N||bn?(typeof U=="function"&&(Is(t,n,U,l),N=t.memoizedState),(g=bn||Jf(t,n,g,l,O,N,o))?(D||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=N),s.props=l,s.state=N,s.context=o,l=g):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,zs(e,t),o=t.memoizedProps,D=tl(n,o),s.props=D,U=t.pendingProps,O=s.context,N=n.contextType,g=bl,typeof N=="object"&&N!==null&&(g=Ke(N)),h=n.getDerivedStateFromProps,(N=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==U||O!==g)&&$f(t,s,l,g),bn=!1,O=t.memoizedState,s.state=O,va(t,l,s,a),ya();var M=t.memoizedState;o!==U||O!==M||bn||e!==null&&e.dependencies!==null&&_i(e.dependencies)?(typeof h=="function"&&(Is(t,n,h,l),M=t.memoizedState),(D=bn||Jf(t,n,D,l,O,M,g)||e!==null&&e.dependencies!==null&&_i(e.dependencies))?(N||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,M,g),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,M,g)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=M),s.props=l,s.state=M,s.context=g,l=D):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,ki(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=In(t,e.child,null,a),t.child=In(t,null,n,a)):Je(e,t,n,a),t.memoizedState=s.state,e=t.child):e=Ft(e,t,a),e}function oh(e,t,n,l){return Kn(),t.flags|=256,Je(e,t,n,l),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ic(e){return{baseLanes:e,cachePool:Po()}}function uc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pt),e}function fh(e,t,n){var l=t.pendingProps,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(we.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ce){if(a?_n(t):En(),(e=Ae)?(e=bd(e,Et),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:jt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},n=Go(e),n.return=t,t.child=n,Ze=t,Ae=null)):e=null,e===null)throw vn(t);return Xc(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,a?(En(),a=t.mode,h=Xi({mode:"hidden",children:h},a),l=Zn(l,a,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=ic(n),l.childLanes=uc(e,o,n),t.memoizedState=ac,_a(null,l)):(_n(t),sc(t,h))}var g=e.memoizedState;if(g!==null&&(h=g.dehydrated,h!==null)){if(s)t.flags&256?(_n(t),t.flags&=-257,t=cc(e,t,n)):t.memoizedState!==null?(En(),t.child=e.child,t.flags|=128,t=null):(En(),h=l.fallback,a=t.mode,l=Xi({mode:"visible",children:l.children},a),h=Zn(h,a,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,In(t,e.child,null,n),l=t.child,l.memoizedState=ic(n),l.childLanes=uc(e,o,n),t.memoizedState=ac,t=_a(null,l));else if(_n(t),Xc(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var N=o.dgst;o=N,l=Error(r(419)),l.stack="",l.digest=o,oa({value:l,source:null,stack:null}),t=cc(e,t,n)}else if(He||El(e,t,n,!1),o=(n&e.childLanes)!==0,He||o){if(o=Ee,o!==null&&(l=$r(o,n),l!==0&&l!==g.retryLane))throw g.retryLane=l,Qn(e,l),ut(o,e,l),nc;kc(h)||Fi(),t=cc(e,t,n)}else kc(h)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,Ae=At(h.nextSibling),Ze=t,ce=!0,yn=null,Et=!1,e!==null&&Zo(t,e),t=sc(t,l.children),t.flags|=4096);return t}return a?(En(),h=l.fallback,a=t.mode,g=e.child,N=g.sibling,l=Qt(g,{mode:"hidden",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,N!==null?h=Qt(N,h):(h=Zn(h,a,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,_a(null,l),l=t.child,h=e.child.memoizedState,h===null?h=ic(n):(a=h.cachePool,a!==null?(g=Be._currentValue,a=a.parent!==g?{parent:g,pool:g}:a):a=Po(),h={baseLanes:h.baseLanes|n,cachePool:a}),l.memoizedState=h,l.childLanes=uc(e,o,n),t.memoizedState=ac,_a(e.child,l)):(_n(t),n=e.child,e=n.sibling,n=Qt(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function sc(e,t){return t=Xi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xi(e,t){return e=ft(22,e,null,t),e.lanes=0,e}function cc(e,t,n){return In(t,e.child,null,n),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hh(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Es(e.return,t,n)}function rc(e,t,n,l,a,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=a,o.treeForkCount=s)}function dh(e,t,n){var l=t.pendingProps,a=l.revealOrder,s=l.tail;l=l.children;var o=we.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,G(we,o),Je(e,t,l,n),l=ce?ra:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hh(e,n,t);else if(e.tag===19)hh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&zi(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),rc(t,!1,a,n,s,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&zi(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}rc(t,!0,n,null,s,l);break;case"together":rc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(El(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_i(e)))}function Ny(e,t,n){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),gn(t,Be,e.memoizedState.cache),Kn();break;case 27:case 5:Jl(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:gn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Us(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_n(t),t.flags|=128,null):(n&t.child.childLanes)!==0?fh(e,t,n):(_n(t),e=Ft(e,t,n),e!==null?e.sibling:null);_n(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(El(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return dh(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),G(we,we.current),l)break;return null;case 22:return t.lanes=0,ih(e,t,n,t.pendingProps);case 24:gn(t,Be,e.memoizedState.cache)}return Ft(e,t,n)}function mh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!oc(e,n)&&(t.flags&128)===0)return He=!1,Ny(e,t,n);He=(e.flags&131072)!==0}else He=!1,ce&&(t.flags&1048576)!==0&&Qo(t,ra,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Fn(t.elementType),t.type=e,typeof e=="function")ps(e)?(l=tl(e,l),t.tag=1,t=rh(null,t,e,l,n)):(t.tag=0,t=lc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===P){t.tag=11,t=nh(null,t,e,l,n);break e}else if(a===$){t.tag=14,t=lh(null,t,e,l,n);break e}}throw t=kt(e)||e,Error(r(306,t,""))}}return t;case 0:return lc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=tl(l,t.pendingProps),rh(e,t,l,a,n);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var s=t.memoizedState;a=s.element,zs(e,t),va(t,l,null,n);var o=t.memoizedState;if(l=o.cache,gn(t,Be,l),l!==s.cache&&Ts(t,[Be],n,!0),ya(),l=o.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=oh(e,t,l,n);break e}else if(l!==a){a=St(Error(r(424)),t),oa(a),t=oh(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ae=At(e.firstChild),Ze=t,ce=!0,yn=null,Et=!0,n=af(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kn(),l===a){t=Ft(e,t,n);break e}Je(e,t,l,n)}t=t.child}return t;case 26:return ki(e,t),e===null?(n=Ad(t.type,null,t.pendingProps,null))?t.memoizedState=n:ce||(n=t.type,e=t.pendingProps,l=au(le.current).createElement(n),l[Qe]=t,l[et]=e,$e(l,n,e),Ge(l),t.stateNode=l):t.memoizedState=Ad(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jl(t),e===null&&ce&&(l=t.stateNode=_d(t.type,t.pendingProps,le.current),Ze=t,Et=!0,a=Ae,Mn(t.type)?(Gc=a,Ae=At(l.firstChild)):Ae=a),Je(e,t,t.pendingProps.children,n),ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ce&&((a=l=Ae)&&(l=a0(l,t.type,t.pendingProps,Et),l!==null?(t.stateNode=l,Ze=t,Ae=At(l.firstChild),Et=!1,a=!0):a=!1),a||vn(t)),Jl(t),a=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,Hc(a,s)?l=null:o!==null&&Hc(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=Ls(e,t,by,null,null,n),La._currentValue=a),ki(e,t),Je(e,t,l,n),t.child;case 6:return e===null&&ce&&((e=n=Ae)&&(n=i0(n,t.pendingProps,Et),n!==null?(t.stateNode=n,Ze=t,Ae=null,e=!0):e=!1),e||vn(t)),null;case 13:return fh(e,t,n);case 4:return Pe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=In(t,null,l,n):Je(e,t,l,n),t.child;case 11:return nh(e,t,t.type,t.pendingProps,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,gn(t,t.type,l.value),Je(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,$n(t),a=Ke(a),l=l(a),t.flags|=1,Je(e,t,l,n),t.child;case 14:return lh(e,t,t.type,t.pendingProps,n);case 15:return ah(e,t,t.type,t.pendingProps,n);case 19:return dh(e,t,n);case 31:return Ry(e,t,n);case 22:return ih(e,t,n,t.pendingProps);case 24:return $n(t),l=Ke(Be),e===null?(a=Rs(),a===null&&(a=Ee,s=As(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},Os(t),gn(t,Be,a)):((e.lanes&n)!==0&&(zs(e,t),va(t,null,null,n),ya()),a=e.memoizedState,s=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),gn(t,Be,l)):(l=s.cache,gn(t,Be,l),l!==a.cache&&Ts(t,[Be],n,!0))),Je(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Pt(e){e.flags|=4}function fc(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(kh())e.flags|=8192;else throw Pn=Ci,Ns}else e.flags&=-16777217}function ph(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zd(t))if(kh())e.flags|=8192;else throw Pn=Ci,Ns}function Gi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Zr():536870912,e.lanes|=t,Ul|=t)}function Ea(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Oy(e,t,n){var l=t.pendingProps;switch(bs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Ce(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jt(Be),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(_l(t)?Pt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xs())),Ce(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(Pt(t),s!==null?(Ce(t),ph(t,s)):(Ce(t),fc(t,a,null,l,n))):s?s!==e.memoizedState?(Pt(t),Ce(t),ph(t,s)):(Ce(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Pt(t),Ce(t),fc(t,a,e,l,n)),null;case 27:if(ei(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}e=Z.current,_l(t)?Ko(t):(e=_d(a,l,n),t.stateNode=e,Pt(t))}return Ce(t),null;case 5:if(ei(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}if(s=Z.current,_l(t))Ko(t);else{var o=au(le.current);switch(s){case 1:s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=o.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?o.createElement(a,{is:l.is}):o.createElement(a)}}s[Qe]=t,s[et]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)s.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=s;e:switch($e(s,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Pt(t)}}return Ce(t),fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=le.current,_l(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ze,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||fd(e.nodeValue,n)),e||vn(t,!0)}else e=au(e).createTextNode(l),e[Qe]=t,t.stateNode=e}return Ce(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=_l(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Qe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),e=!1}else n=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(dt(t),t):(dt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ce(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=_l(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[Qe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),a=!1}else a=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(dt(t),t):(dt(t),null)}return dt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gi(t,t.updateQueue),Ce(t),null);case 4:return De(),e===null&&wc(t.stateNode.containerInfo),Ce(t),null;case 10:return Jt(t.type),Ce(t),null;case 19:if(B(we),l=t.memoizedState,l===null)return Ce(t),null;if(a=(t.flags&128)!==0,s=l.rendering,s===null)if(a)Ea(l,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=zi(e),s!==null){for(t.flags|=128,Ea(l,!1),e=s.updateQueue,t.updateQueue=e,Gi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Xo(n,e),n=n.sibling;return G(we,we.current&1|2),ce&&Zt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&st()>Ji&&(t.flags|=128,a=!0,Ea(l,!1),t.lanes=4194304)}else{if(!a)if(e=zi(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Gi(t,e),Ea(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ce)return Ce(t),null}else 2*st()-l.renderingStartTime>Ji&&n!==536870912&&(t.flags|=128,a=!0,Ea(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=st(),e.sibling=null,n=we.current,G(we,a?n&1|2:n&1),ce&&Zt(t,l.treeForkCount),e):(Ce(t),null);case 22:case 23:return dt(t),js(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),n=t.updateQueue,n!==null&&Gi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&B(Wn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jt(Be),Ce(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function zy(e,t){switch(bs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jt(Be),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ei(t),null;case 31:if(t.memoizedState!==null){if(dt(t),t.alternate===null)throw Error(r(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(we),null;case 4:return De(),null;case 10:return Jt(t.type),null;case 22:case 23:return dt(t),js(),e!==null&&B(Wn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jt(Be),null;case 25:return null;default:return null}}function yh(e,t){switch(bs(t),t.tag){case 3:Jt(Be),De();break;case 26:case 27:case 5:ei(t);break;case 4:De();break;case 31:t.memoizedState!==null&&dt(t);break;case 13:dt(t);break;case 19:B(we);break;case 10:Jt(t.type);break;case 22:case 23:dt(t),js(),e!==null&&B(Wn);break;case 24:Jt(Be)}}function Ta(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var s=n.create,o=n.inst;l=s(),o.destroy=l}n=n.next}while(n!==a)}}catch(h){pe(t,t.return,h)}}function Tn(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=t;var g=n,N=h;try{N()}catch(D){pe(a,g,D)}}}l=l.next}while(l!==s)}}catch(D){pe(t,t.return,D)}}function vh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{sf(t,n)}catch(l){pe(e,e.return,l)}}}function gh(e,t,n){n.props=tl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){pe(e,t,l)}}function Aa(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){pe(e,t,a)}}function Bt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){pe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){pe(e,t,a)}else n.current=null}function bh(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){pe(e,e.return,a)}}function hc(e,t,n){try{var l=e.stateNode;Py(l,e.type,n,t),l[et]=t}catch(a){pe(e,e.return,a)}}function Sh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mn(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gt));else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(mc(e,t,n),e=e.sibling;e!==null;)mc(e,t,n),e=e.sibling}function Vi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Vi(e,t,n),e=e.sibling;e!==null;)Vi(e,t,n),e=e.sibling}function xh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);$e(t,l,n),t[Qe]=e,t[et]=n}catch(s){pe(e,e.return,s)}}var It=!1,qe=!1,pc=!1,_h=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function My(e,t){if(e=e.containerInfo,Bc=fu,e=wo(e),cs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,h=-1,g=-1,N=0,D=0,U=e,O=null;t:for(;;){for(var M;U!==n||a!==0&&U.nodeType!==3||(h=o+a),U!==s||l!==0&&U.nodeType!==3||(g=o+l),U.nodeType===3&&(o+=U.nodeValue.length),(M=U.firstChild)!==null;)O=U,U=M;for(;;){if(U===e)break t;if(O===n&&++N===a&&(h=o),O===s&&++D===l&&(g=o),(M=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=M}n=h===-1||g===-1?null:{start:h,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lc={focusedElem:e,selectionRange:n},fu=!1,Ve=t;Ve!==null;)if(t=Ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ve=e;else for(;Ve!==null;){switch(t=Ve,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,a=s.memoizedProps,s=s.memoizedState,l=n.stateNode;try{var V=tl(n.type,a);e=l.getSnapshotBeforeUpdate(V,s),l.__reactInternalSnapshotBeforeUpdate=e}catch(W){pe(n,n.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Yc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Ve=e;break}Ve=t.return}}function Eh(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:tn(e,n),l&4&&Ta(5,n);break;case 1:if(tn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){pe(n,n.return,o)}else{var a=tl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){pe(n,n.return,o)}}l&64&&vh(n),l&512&&Aa(n,n.return);break;case 3:if(tn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{sf(e,t)}catch(o){pe(n,n.return,o)}}break;case 27:t===null&&l&4&&xh(n);case 26:case 5:tn(e,n),t===null&&l&4&&bh(n),l&512&&Aa(n,n.return);break;case 12:tn(e,n);break;case 31:tn(e,n),l&4&&Ch(e,n);break;case 13:tn(e,n),l&4&&Rh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yy.bind(null,n),u0(e,n))));break;case 22:if(l=n.memoizedState!==null||It,!l){t=t!==null&&t.memoizedState!==null||qe,a=It;var s=qe;It=l,(qe=t)&&!s?nn(e,n,(n.subtreeFlags&8772)!==0):tn(e,n),It=a,qe=s}break;case 30:break;default:tn(e,n)}}function Th(e){var t=e.alternate;t!==null&&(e.alternate=null,Th(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ne=null,nt=!1;function en(e,t,n){for(n=n.child;n!==null;)Ah(e,t,n),n=n.sibling}function Ah(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount($l,n)}catch{}switch(n.tag){case 26:qe||Bt(n,t),en(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qe||Bt(n,t);var l=Ne,a=nt;Mn(n.type)&&(Ne=n.stateNode,nt=!1),en(e,t,n),ja(n.stateNode),Ne=l,nt=a;break;case 5:qe||Bt(n,t);case 6:if(l=Ne,a=nt,Ne=null,en(e,t,n),Ne=l,nt=a,Ne!==null)if(nt)try{(Ne.nodeType===9?Ne.body:Ne.nodeName==="HTML"?Ne.ownerDocument.body:Ne).removeChild(n.stateNode)}catch(s){pe(n,t,s)}else try{Ne.removeChild(n.stateNode)}catch(s){pe(n,t,s)}break;case 18:Ne!==null&&(nt?(e=Ne,vd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Gl(e)):vd(Ne,n.stateNode));break;case 4:l=Ne,a=nt,Ne=n.stateNode.containerInfo,nt=!0,en(e,t,n),Ne=l,nt=a;break;case 0:case 11:case 14:case 15:Tn(2,n,t),qe||Tn(4,n,t),en(e,t,n);break;case 1:qe||(Bt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&gh(n,t,l)),en(e,t,n);break;case 21:en(e,t,n);break;case 22:qe=(l=qe)||n.memoizedState!==null,en(e,t,n),qe=l;break;default:en(e,t,n)}}function Ch(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gl(e)}catch(n){pe(t,t.return,n)}}}function Rh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(n){pe(t,t.return,n)}}function Dy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _h),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _h),t;default:throw Error(r(435,e.tag))}}function Qi(e,t){var n=Dy(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=ky.bind(null,e,l);l.then(a,a)}})}function lt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],s=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Mn(h.type)){Ne=h.stateNode,nt=!1;break e}break;case 5:Ne=h.stateNode,nt=!1;break e;case 3:case 4:Ne=h.stateNode.containerInfo,nt=!0;break e}h=h.return}if(Ne===null)throw Error(r(160));Ah(s,o,a),Ne=null,nt=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nh(t,e),t=t.sibling}var zt=null;function Nh(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:lt(t,e),at(e),l&4&&(Tn(3,e,e.return),Ta(3,e),Tn(5,e,e.return));break;case 1:lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),l&64&&It&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=zt;if(lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),l&4){var s=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":s=a.getElementsByTagName("title")[0],(!s||s[Pl]||s[Qe]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(l),a.head.insertBefore(s,a.querySelector("head > title"))),$e(s,l,n),s[Qe]=e,Ge(s),l=s;break e;case"link":var o=Nd("link","href",a).get(l+(n.href||""));if(o){for(var h=0;h<o.length;h++)if(s=o[h],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(h,1);break t}}s=a.createElement(l),$e(s,l,n),a.head.appendChild(s);break;case"meta":if(o=Nd("meta","content",a).get(l+(n.content||""))){for(h=0;h<o.length;h++)if(s=o[h],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(h,1);break t}}s=a.createElement(l),$e(s,l,n),a.head.appendChild(s);break;default:throw Error(r(468,l))}s[Qe]=e,Ge(s),l=s}e.stateNode=l}else Od(a,e.type,e.stateNode);else e.stateNode=Rd(a,l,e.memoizedProps);else s!==l?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,l===null?Od(a,e.type,e.stateNode):Rd(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&hc(e,e.memoizedProps,n.memoizedProps)}break;case 27:lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),n!==null&&l&4&&hc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),e.flags&32){a=e.stateNode;try{hl(a,"")}catch(V){pe(e,e.return,V)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,hc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(pc=!0);break;case 6:if(lt(t,e),at(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(V){pe(e,e.return,V)}}break;case 3:if(su=null,a=zt,zt=iu(t.containerInfo),lt(t,e),zt=a,at(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(V){pe(e,e.return,V)}pc&&(pc=!1,Oh(e));break;case 4:l=zt,zt=iu(e.stateNode.containerInfo),lt(t,e),at(e),zt=l;break;case 12:lt(t,e),at(e);break;case 31:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qi(e,l)));break;case 13:lt(t,e),at(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ki=st()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qi(e,l)));break;case 22:a=e.memoizedState!==null;var g=n!==null&&n.memoizedState!==null,N=It,D=qe;if(It=N||a,qe=D||g,lt(t,e),qe=D,It=N,at(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||It||qe||nl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){g=n=t;try{if(s=g.stateNode,a)o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=g.stateNode;var U=g.memoizedProps.style,O=U!=null&&U.hasOwnProperty("display")?U.display:null;h.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(V){pe(g,g.return,V)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?"":g.memoizedProps}catch(V){pe(g,g.return,V)}}}else if(t.tag===18){if(n===null){g=t;try{var M=g.stateNode;a?gd(M,!0):gd(g.stateNode,!1)}catch(V){pe(g,g.return,V)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Qi(e,n))));break;case 19:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qi(e,l)));break;case 30:break;case 21:break;default:lt(t,e),at(e)}}function at(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Sh(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode,s=dc(e);Vi(e,s,a);break;case 5:var o=n.stateNode;n.flags&32&&(hl(o,""),n.flags&=-33);var h=dc(e);Vi(e,h,o);break;case 3:case 4:var g=n.stateNode.containerInfo,N=dc(e);mc(e,N,g);break;default:throw Error(r(161))}}catch(D){pe(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Oh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Oh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function tn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Eh(e,t.alternate,t),t=t.sibling}function nl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tn(4,t,t.return),nl(t);break;case 1:Bt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&gh(t,t.return,n),nl(t);break;case 27:ja(t.stateNode);case 26:case 5:Bt(t,t.return),nl(t);break;case 22:t.memoizedState===null&&nl(t);break;case 30:nl(t);break;default:nl(t)}e=e.sibling}}function nn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,s=t,o=s.flags;switch(s.tag){case 0:case 11:case 15:nn(a,s,n),Ta(4,s);break;case 1:if(nn(a,s,n),l=s,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(N){pe(l,l.return,N)}if(l=s,a=l.updateQueue,a!==null){var h=l.stateNode;try{var g=a.shared.hiddenCallbacks;if(g!==null)for(a.shared.hiddenCallbacks=null,a=0;a<g.length;a++)uf(g[a],h)}catch(N){pe(l,l.return,N)}}n&&o&64&&vh(s),Aa(s,s.return);break;case 27:xh(s);case 26:case 5:nn(a,s,n),n&&l===null&&o&4&&bh(s),Aa(s,s.return);break;case 12:nn(a,s,n);break;case 31:nn(a,s,n),n&&o&4&&Ch(a,s);break;case 13:nn(a,s,n),n&&o&4&&Rh(a,s);break;case 22:s.memoizedState===null&&nn(a,s,n),Aa(s,s.return);break;case 30:break;default:nn(a,s,n)}t=t.sibling}}function yc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Mt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)zh(e,t,n,l),t=t.sibling}function zh(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Mt(e,t,n,l),a&2048&&Ta(9,t);break;case 1:Mt(e,t,n,l);break;case 3:Mt(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(a&2048){Mt(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,h=s.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(g){pe(t,t.return,g)}}else Mt(e,t,n,l);break;case 31:Mt(e,t,n,l);break;case 13:Mt(e,t,n,l);break;case 23:break;case 22:s=t.stateNode,o=t.alternate,t.memoizedState!==null?s._visibility&2?Mt(e,t,n,l):Ca(e,t):s._visibility&2?Mt(e,t,n,l):(s._visibility|=2,Dl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&yc(o,t);break;case 24:Mt(e,t,n,l),a&2048&&vc(t.alternate,t);break;default:Mt(e,t,n,l)}}function Dl(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,o=t,h=n,g=l,N=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(s,o,h,g,a),Ta(8,o);break;case 23:break;case 22:var D=o.stateNode;o.memoizedState!==null?D._visibility&2?Dl(s,o,h,g,a):Ca(s,o):(D._visibility|=2,Dl(s,o,h,g,a)),a&&N&2048&&yc(o.alternate,o);break;case 24:Dl(s,o,h,g,a),a&&N&2048&&vc(o.alternate,o);break;default:Dl(s,o,h,g,a)}t=t.sibling}}function Ca(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Ca(n,l),a&2048&&yc(l.alternate,l);break;case 24:Ca(n,l),a&2048&&vc(l.alternate,l);break;default:Ca(n,l)}t=t.sibling}}var Ra=8192;function wl(e,t,n){if(e.subtreeFlags&Ra)for(e=e.child;e!==null;)Mh(e,t,n),e=e.sibling}function Mh(e,t,n){switch(e.tag){case 26:wl(e,t,n),e.flags&Ra&&e.memoizedState!==null&&g0(n,zt,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,n);break;case 3:case 4:var l=zt;zt=iu(e.stateNode.containerInfo),wl(e,t,n),zt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ra,Ra=16777216,wl(e,t,n),Ra=l):wl(e,t,n));break;default:wl(e,t,n)}}function Dh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ve=l,jh(l,e)}Dh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wh(e),e=e.sibling}function wh(e){switch(e.tag){case 0:case 11:case 15:Na(e),e.flags&2048&&Tn(9,e,e.return);break;case 3:Na(e);break;case 12:Na(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zi(e)):Na(e);break;default:Na(e)}}function Zi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ve=l,jh(l,e)}Dh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tn(8,t,t.return),Zi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zi(t));break;default:Zi(t)}e=e.sibling}}function jh(e,t){for(;Ve!==null;){var n=Ve;switch(n.tag){case 0:case 11:case 15:Tn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:fa(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ve=l;else e:for(n=e;Ve!==null;){l=Ve;var a=l.sibling,s=l.return;if(Th(l),l===n){Ve=null;break e}if(a!==null){a.return=s,Ve=a;break e}Ve=s}}}var wy={getCacheForType:function(e){var t=Ke(Be),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ke(Be).controller.signal}},jy=typeof WeakMap=="function"?WeakMap:Map,he=0,Ee=null,ae=null,ue=0,me=0,mt=null,An=!1,jl=!1,gc=!1,ln=0,Me=0,Cn=0,ll=0,bc=0,pt=0,Ul=0,Oa=null,it=null,Sc=!1,Ki=0,Uh=0,Ji=1/0,$i=null,Rn=null,ke=0,Nn=null,Bl=null,an=0,xc=0,_c=null,Bh=null,za=0,Ec=null;function yt(){return(he&2)!==0&&ue!==0?ue&-ue:w.T!==null?Oc():Wr()}function Lh(){if(pt===0)if((ue&536870912)===0||ce){var e=li;li<<=1,(li&3932160)===0&&(li=262144),pt=e}else pt=536870912;return e=ht.current,e!==null&&(e.flags|=32),pt}function ut(e,t,n){(e===Ee&&(me===2||me===9)||e.cancelPendingCommit!==null)&&(Ll(e,0),On(e,ue,pt,!1)),Fl(e,n),((he&2)===0||e!==Ee)&&(e===Ee&&((he&2)===0&&(ll|=n),Me===4&&On(e,ue,pt,!1)),Lt(e))}function Hh(e,t,n){if((he&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Wl(e,t),a=l?Ly(e,t):Ac(e,t,!0),s=l;do{if(a===0){jl&&!l&&On(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Uy(n)){a=Ac(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;a=Oa;var g=h.current.memoizedState.isDehydrated;if(g&&(Ll(h,o).flags|=256),o=Ac(h,o,!1),o!==2){if(gc&&!g){h.errorRecoveryDisabledLanes|=s,ll|=s,a=4;break e}s=it,it=a,s!==null&&(it===null?it=s:it.push.apply(it,s))}a=o}if(s=!1,a!==2)continue}}if(a===1){Ll(e,0),On(e,t,0,!0);break}e:{switch(l=e,s=a,s){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:On(l,t,pt,!An);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=Ki+300-st(),10<a)){if(On(l,t,pt,!An),ii(l,0,!0)!==0)break e;an=t,l.timeoutHandle=pd(qh.bind(null,l,n,it,$i,Sc,t,pt,ll,Ul,An,s,"Throttled",-0,0),a);break e}qh(l,n,it,$i,Sc,t,pt,ll,Ul,An,s,null,-0,0)}}break}while(!0);Lt(e)}function qh(e,t,n,l,a,s,o,h,g,N,D,U,O,M){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gt},Mh(t,s,U);var V=(s&62914560)===s?Ki-st():(s&4194048)===s?Uh-st():0;if(V=b0(U,V),V!==null){an=s,e.cancelPendingCommit=V(Kh.bind(null,e,t,s,n,l,a,o,h,g,D,U,null,O,M)),On(e,s,o,!N);return}}Kh(e,t,s,n,l,a,o,h,g)}function Uy(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],s=a.getSnapshot;a=a.value;try{if(!ot(s(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function On(e,t,n,l){t&=~bc,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var s=31-rt(a),o=1<<s;l[s]=-1,a&=~o}n!==0&&Kr(e,n,t)}function Wi(){return(he&6)===0?(Ma(0),!1):!0}function Tc(){if(ae!==null){if(me===0)var e=ae.return;else e=ae,Kt=Jn=null,Ys(e),Rl=null,da=0,e=ae;for(;e!==null;)yh(e.alternate,e),e=e.return;ae=null}}function Ll(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,t0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),an=0,Tc(),Ee=e,ae=n=Qt(e.current,null),ue=t,me=0,mt=null,An=!1,jl=Wl(e,t),gc=!1,Ul=pt=bc=ll=Cn=Me=0,it=Oa=null,Sc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-rt(l),s=1<<a;t|=e[a],l&=~s}return ln=t,vi(),n}function Yh(e,t){te=null,w.H=xa,t===Cl||t===Ai?(t=tf(),me=3):t===Ns?(t=tf(),me=4):me=t===nc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mt=t,ae===null&&(Me=1,qi(e,St(t,e.current)))}function kh(){var e=ht.current;return e===null?!0:(ue&4194048)===ue?Tt===null:(ue&62914560)===ue||(ue&536870912)!==0?e===Tt:!1}function Xh(){var e=w.H;return w.H=xa,e===null?xa:e}function Gh(){var e=w.A;return w.A=wy,e}function Fi(){Me=4,An||(ue&4194048)!==ue&&ht.current!==null||(jl=!0),(Cn&134217727)===0&&(ll&134217727)===0||Ee===null||On(Ee,ue,pt,!1)}function Ac(e,t,n){var l=he;he|=2;var a=Xh(),s=Gh();(Ee!==e||ue!==t)&&($i=null,Ll(e,t)),t=!1;var o=Me;e:do try{if(me!==0&&ae!==null){var h=ae,g=mt;switch(me){case 8:Tc(),o=6;break e;case 3:case 2:case 9:case 6:ht.current===null&&(t=!0);var N=me;if(me=0,mt=null,Hl(e,h,g,N),n&&jl){o=0;break e}break;default:N=me,me=0,mt=null,Hl(e,h,g,N)}}By(),o=Me;break}catch(D){Yh(e,D)}while(!0);return t&&e.shellSuspendCounter++,Kt=Jn=null,he=l,w.H=a,w.A=s,ae===null&&(Ee=null,ue=0,vi()),o}function By(){for(;ae!==null;)Vh(ae)}function Ly(e,t){var n=he;he|=2;var l=Xh(),a=Gh();Ee!==e||ue!==t?($i=null,Ji=st()+500,Ll(e,t)):jl=Wl(e,t);e:do try{if(me!==0&&ae!==null){t=ae;var s=mt;t:switch(me){case 1:me=0,mt=null,Hl(e,t,s,1);break;case 2:case 9:if(Io(s)){me=0,mt=null,Qh(t);break}t=function(){me!==2&&me!==9||Ee!==e||(me=7),Lt(e)},s.then(t,t);break e;case 3:me=7;break e;case 4:me=5;break e;case 7:Io(s)?(me=0,mt=null,Qh(t)):(me=0,mt=null,Hl(e,t,s,7));break;case 5:var o=null;switch(ae.tag){case 26:o=ae.memoizedState;case 5:case 27:var h=ae;if(o?zd(o):h.stateNode.complete){me=0,mt=null;var g=h.sibling;if(g!==null)ae=g;else{var N=h.return;N!==null?(ae=N,Pi(N)):ae=null}break t}}me=0,mt=null,Hl(e,t,s,5);break;case 6:me=0,mt=null,Hl(e,t,s,6);break;case 8:Tc(),Me=6;break e;default:throw Error(r(462))}}Hy();break}catch(D){Yh(e,D)}while(!0);return Kt=Jn=null,w.H=l,w.A=a,he=n,ae!==null?0:(Ee=null,ue=0,vi(),Me)}function Hy(){for(;ae!==null&&!sp();)Vh(ae)}function Vh(e){var t=mh(e.alternate,e,ln);e.memoizedProps=e.pendingProps,t===null?Pi(e):ae=t}function Qh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=ch(n,t,t.pendingProps,t.type,void 0,ue);break;case 11:t=ch(n,t,t.pendingProps,t.type.render,t.ref,ue);break;case 5:Ys(t);default:yh(n,t),t=ae=Xo(t,ln),t=mh(n,t,ln)}e.memoizedProps=e.pendingProps,t===null?Pi(e):ae=t}function Hl(e,t,n,l){Kt=Jn=null,Ys(t),Rl=null,da=0;var a=t.return;try{if(Cy(e,a,t,n,ue)){Me=1,qi(e,St(n,e.current)),ae=null;return}}catch(s){if(a!==null)throw ae=a,s;Me=1,qi(e,St(n,e.current)),ae=null;return}t.flags&32768?(ce||l===1?e=!0:jl||(ue&536870912)!==0?e=!1:(An=e=!0,(l===2||l===9||l===3||l===6)&&(l=ht.current,l!==null&&l.tag===13&&(l.flags|=16384))),Zh(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){Zh(t,An);return}e=t.return;var n=Oy(t.alternate,t,ln);if(n!==null){ae=n;return}if(t=t.sibling,t!==null){ae=t;return}ae=t=e}while(t!==null);Me===0&&(Me=5)}function Zh(e,t){do{var n=zy(e.alternate,e);if(n!==null){n.flags&=32767,ae=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ae=e;return}ae=e=n}while(e!==null);Me=6,ae=null}function Kh(e,t,n,l,a,s,o,h,g){e.cancelPendingCommit=null;do Ii();while(ke!==0);if((he&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,s|=ds,vp(e,n,s,o,h,g),e===Ee&&(ae=Ee=null,ue=0),Bl=t,Nn=e,an=n,xc=s,_c=a,Bh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Xy(ti,function(){return Ph(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=w.T,w.T=null,a=X.p,X.p=2,o=he,he|=4;try{My(e,t,n)}finally{he=o,X.p=a,w.T=l}}ke=1,Jh(),$h(),Wh()}}function Jh(){if(ke===1){ke=0;var e=Nn,t=Bl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=w.T,w.T=null;var l=X.p;X.p=2;var a=he;he|=4;try{Nh(t,e);var s=Lc,o=wo(e.containerInfo),h=s.focusedElem,g=s.selectionRange;if(o!==h&&h&&h.ownerDocument&&Do(h.ownerDocument.documentElement,h)){if(g!==null&&cs(h)){var N=g.start,D=g.end;if(D===void 0&&(D=N),"selectionStart"in h)h.selectionStart=N,h.selectionEnd=Math.min(D,h.value.length);else{var U=h.ownerDocument||document,O=U&&U.defaultView||window;if(O.getSelection){var M=O.getSelection(),V=h.textContent.length,W=Math.min(g.start,V),Se=g.end===void 0?W:Math.min(g.end,V);!M.extend&&W>Se&&(o=Se,Se=W,W=o);var A=Mo(h,W),x=Mo(h,Se);if(A&&x&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==x.node||M.focusOffset!==x.offset)){var R=U.createRange();R.setStart(A.node,A.offset),M.removeAllRanges(),W>Se?(M.addRange(R),M.extend(x.node,x.offset)):(R.setEnd(x.node,x.offset),M.addRange(R))}}}}for(U=[],M=h;M=M.parentNode;)M.nodeType===1&&U.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<U.length;h++){var j=U[h];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}fu=!!Bc,Lc=Bc=null}finally{he=a,X.p=l,w.T=n}}e.current=t,ke=2}}function $h(){if(ke===2){ke=0;var e=Nn,t=Bl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=w.T,w.T=null;var l=X.p;X.p=2;var a=he;he|=4;try{Eh(e,t.alternate,t)}finally{he=a,X.p=l,w.T=n}}ke=3}}function Wh(){if(ke===4||ke===3){ke=0,cp();var e=Nn,t=Bl,n=an,l=Bh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ke=5:(ke=0,Bl=Nn=null,Fh(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Rn=null),Gu(n),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot($l,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=w.T,a=X.p,X.p=2,w.T=null;try{for(var s=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];s(h.value,{componentStack:h.stack})}}finally{w.T=t,X.p=a}}(an&3)!==0&&Ii(),Lt(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Ec?za++:(za=0,Ec=e):za=0,Ma(0)}}function Fh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Ii(){return Jh(),$h(),Wh(),Ph()}function Ph(){if(ke!==5)return!1;var e=Nn,t=xc;xc=0;var n=Gu(an),l=w.T,a=X.p;try{X.p=32>n?32:n,w.T=null,n=_c,_c=null;var s=Nn,o=an;if(ke=0,Bl=Nn=null,an=0,(he&6)!==0)throw Error(r(331));var h=he;if(he|=4,wh(s.current),zh(s,s.current,o,n),he=h,Ma(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot($l,s)}catch{}return!0}finally{X.p=a,w.T=l,Fh(e,t)}}function Ih(e,t,n){t=St(n,t),t=tc(e.stateNode,t,2),e=xn(e,t,2),e!==null&&(Fl(e,2),Lt(e))}function pe(e,t,n){if(e.tag===3)Ih(e,e,n);else for(;t!==null;){if(t.tag===3){Ih(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Rn===null||!Rn.has(l))){e=St(n,e),n=eh(2),l=xn(t,n,2),l!==null&&(th(n,l,t,e),Fl(l,2),Lt(l));break}}t=t.return}}function Cc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new jy;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(gc=!0,a.add(n),e=qy.bind(null,e,t,n),t.then(e,e))}function qy(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ee===e&&(ue&n)===n&&(Me===4||Me===3&&(ue&62914560)===ue&&300>st()-Ki?(he&2)===0&&Ll(e,0):bc|=n,Ul===ue&&(Ul=0)),Lt(e)}function ed(e,t){t===0&&(t=Zr()),e=Qn(e,t),e!==null&&(Fl(e,t),Lt(e))}function Yy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function ky(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),ed(e,n)}function Xy(e,t){return qu(e,t)}var eu=null,ql=null,Rc=!1,tu=!1,Nc=!1,zn=0;function Lt(e){e!==ql&&e.next===null&&(ql===null?eu=ql=e:ql=ql.next=e),tu=!0,Rc||(Rc=!0,Vy())}function Ma(e,t){if(!Nc&&tu){Nc=!0;do for(var n=!1,l=eu;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var s=0;else{var o=l.suspendedLanes,h=l.pingedLanes;s=(1<<31-rt(42|e)+1)-1,s&=a&~(o&~h),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,ad(l,s))}else s=ue,s=ii(l,l===Ee?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Wl(l,s)||(n=!0,ad(l,s));l=l.next}while(n);Nc=!1}}function Gy(){td()}function td(){tu=Rc=!1;var e=0;zn!==0&&e0()&&(e=zn);for(var t=st(),n=null,l=eu;l!==null;){var a=l.next,s=nd(l,t);s===0?(l.next=null,n===null?eu=a:n.next=a,a===null&&(ql=n)):(n=l,(e!==0||(s&3)!==0)&&(tu=!0)),l=a}ke!==0&&ke!==5||Ma(e),zn!==0&&(zn=0)}function nd(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var o=31-rt(s),h=1<<o,g=a[o];g===-1?((h&n)===0||(h&l)!==0)&&(a[o]=yp(h,t)):g<=t&&(e.expiredLanes|=h),s&=~h}if(t=Ee,n=ue,n=ii(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(me===2||me===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Yu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Wl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Yu(l),Gu(n)){case 2:case 8:n=Vr;break;case 32:n=ti;break;case 268435456:n=Qr;break;default:n=ti}return l=ld.bind(null,e),n=qu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Yu(l),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(ke!==0&&ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ii()&&e.callbackNode!==n)return null;var l=ue;return l=ii(e,e===Ee?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Hh(e,l,t),nd(e,st()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ad(e,t){if(Ii())return null;Hh(e,t,!0)}function Vy(){n0(function(){(he&6)!==0?qu(Gr,Gy):td()})}function Oc(){if(zn===0){var e=Tl;e===0&&(e=ni,ni<<=1,(ni&261888)===0&&(ni=256)),zn=e}return zn}function id(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ri(""+e)}function ud(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Qy(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var s=id((a[et]||null).action),o=l.submitter;o&&(t=(t=o[et]||null)?id(t.formAction):o.getAttribute("formAction"),t!==null&&(s=t,o=null));var h=new di("action","action",null,l,a);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var g=o?ud(a,o):new FormData(a);$s(n,{pending:!0,data:g,method:a.method,action:s},null,g)}}else typeof s=="function"&&(h.preventDefault(),g=o?ud(a,o):new FormData(a),$s(n,{pending:!0,data:g,method:a.method,action:s},s,g))},currentTarget:a}]})}}for(var zc=0;zc<hs.length;zc++){var Mc=hs[zc],Zy=Mc.toLowerCase(),Ky=Mc[0].toUpperCase()+Mc.slice(1);Ot(Zy,"on"+Ky)}Ot(Bo,"onAnimationEnd"),Ot(Lo,"onAnimationIteration"),Ot(Ho,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(ry,"onTransitionRun"),Ot(oy,"onTransitionStart"),Ot(fy,"onTransitionCancel"),Ot(qo,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Da="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(" "),Jy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Da));function sd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],g=h.instance,N=h.currentTarget;if(h=h.listener,g!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=N;try{s(a)}catch(D){yi(D)}a.currentTarget=null,s=g}else for(o=0;o<l.length;o++){if(h=l[o],g=h.instance,N=h.currentTarget,h=h.listener,g!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=N;try{s(a)}catch(D){yi(D)}a.currentTarget=null,s=g}}}}function ie(e,t){var n=t[Vu];n===void 0&&(n=t[Vu]=new Set);var l=e+"__bubble";n.has(l)||(cd(t,e,2,!1),n.add(l))}function Dc(e,t,n){var l=0;t&&(l|=4),cd(n,e,l,t)}var nu="_reactListening"+Math.random().toString(36).slice(2);function wc(e){if(!e[nu]){e[nu]=!0,Ir.forEach(function(n){n!=="selectionchange"&&(Jy.has(n)||Dc(n,!1,e),Dc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[nu]||(t[nu]=!0,Dc("selectionchange",!1,t))}}function cd(e,t,n,l){switch(Ld(t)){case 2:var a=_0;break;case 8:a=E0;break;default:a=Jc}n=a.bind(null,t,n,e),a=void 0,!Iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function jc(e,t,n,l,a){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=l.return;o!==null;){var g=o.tag;if((g===3||g===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=sl(h),o===null)return;if(g=o.tag,g===5||g===6||g===26||g===27){l=s=o;continue e}h=h.parentNode}}l=l.return}fo(function(){var N=s,D=Fu(n),U=[];e:{var O=Yo.get(e);if(O!==void 0){var M=di,V=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":M=kp;break;case"focusin":V="focus",M=ls;break;case"focusout":V="blur",M=ls;break;case"beforeblur":case"afterblur":M=ls;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=po;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Op;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Vp;break;case Bo:case Lo:case Ho:M=Dp;break;case qo:M=Zp;break;case"scroll":case"scrollend":M=Rp;break;case"wheel":M=Jp;break;case"copy":case"cut":case"paste":M=jp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=vo;break;case"toggle":case"beforetoggle":M=Wp}var W=(t&4)!==0,Se=!W&&(e==="scroll"||e==="scrollend"),A=W?O!==null?O+"Capture":null:O;W=[];for(var x=N,R;x!==null;){var j=x;if(R=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||R===null||A===null||(j=ea(x,A),j!=null&&W.push(wa(x,j,R))),Se)break;x=x.return}0<W.length&&(O=new M(O,V,null,n,D),U.push({event:O,listeners:W}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",O&&n!==Wu&&(V=n.relatedTarget||n.fromElement)&&(sl(V)||V[ul]))break e;if((M||O)&&(O=D.window===D?D:(O=D.ownerDocument)?O.defaultView||O.parentWindow:window,M?(V=n.relatedTarget||n.toElement,M=N,V=V?sl(V):null,V!==null&&(Se=d(V),W=V.tag,V!==Se||W!==5&&W!==27&&W!==6)&&(V=null)):(M=null,V=N),M!==V)){if(W=po,j="onMouseLeave",A="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(W=vo,j="onPointerLeave",A="onPointerEnter",x="pointer"),Se=M==null?O:Il(M),R=V==null?O:Il(V),O=new W(j,x+"leave",M,n,D),O.target=Se,O.relatedTarget=R,j=null,sl(D)===N&&(W=new W(A,x+"enter",V,n,D),W.target=R,W.relatedTarget=Se,j=W),Se=j,M&&V)t:{for(W=$y,A=M,x=V,R=0,j=A;j;j=W(j))R++;j=0;for(var J=x;J;J=W(J))j++;for(;0<R-j;)A=W(A),R--;for(;0<j-R;)x=W(x),j--;for(;R--;){if(A===x||x!==null&&A===x.alternate){W=A;break t}A=W(A),x=W(x)}W=null}else W=null;M!==null&&rd(U,O,M,W,!1),V!==null&&Se!==null&&rd(U,Se,V,W,!0)}}e:{if(O=N?Il(N):window,M=O.nodeName&&O.nodeName.toLowerCase(),M==="select"||M==="input"&&O.type==="file")var oe=Ao;else if(Eo(O))if(Co)oe=uy;else{oe=ay;var K=ly}else M=O.nodeName,!M||M.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?N&&$u(N.elementType)&&(oe=Ao):oe=iy;if(oe&&(oe=oe(e,N))){To(U,oe,n,D);break e}K&&K(e,O,N),e==="focusout"&&N&&O.type==="number"&&N.memoizedProps.value!=null&&Ju(O,"number",O.value)}switch(K=N?Il(N):window,e){case"focusin":(Eo(K)||K.contentEditable==="true")&&(yl=K,rs=N,ca=null);break;case"focusout":ca=rs=yl=null;break;case"mousedown":os=!0;break;case"contextmenu":case"mouseup":case"dragend":os=!1,jo(U,n,D);break;case"selectionchange":if(cy)break;case"keydown":case"keyup":jo(U,n,D)}var ne;if(is)e:{switch(e){case"compositionstart":var se="onCompositionStart";break e;case"compositionend":se="onCompositionEnd";break e;case"compositionupdate":se="onCompositionUpdate";break e}se=void 0}else pl?xo(e,n)&&(se="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(se="onCompositionStart");se&&(go&&n.locale!=="ko"&&(pl||se!=="onCompositionStart"?se==="onCompositionEnd"&&pl&&(ne=ho()):(mn=D,es="value"in mn?mn.value:mn.textContent,pl=!0)),K=lu(N,se),0<K.length&&(se=new yo(se,e,null,n,D),U.push({event:se,listeners:K}),ne?se.data=ne:(ne=_o(n),ne!==null&&(se.data=ne)))),(ne=Pp?Ip(e,n):ey(e,n))&&(se=lu(N,"onBeforeInput"),0<se.length&&(K=new yo("onBeforeInput","beforeinput",null,n,D),U.push({event:K,listeners:se}),K.data=ne)),Qy(U,e,N,n,D)}sd(U,t)})}function wa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lu(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=ea(e,n),a!=null&&l.unshift(wa(e,a,s)),a=ea(e,t),a!=null&&l.push(wa(e,a,s))),e.tag===3)return l;e=e.return}return[]}function $y(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rd(e,t,n,l,a){for(var s=t._reactName,o=[];n!==null&&n!==l;){var h=n,g=h.alternate,N=h.stateNode;if(h=h.tag,g!==null&&g===l)break;h!==5&&h!==26&&h!==27||N===null||(g=N,a?(N=ea(n,s),N!=null&&o.unshift(wa(n,N,g))):a||(N=ea(n,s),N!=null&&o.push(wa(n,N,g)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Wy=/\r\n?/g,Fy=/\u0000|\uFFFD/g;function od(e){return(typeof e=="string"?e:""+e).replace(Wy,`
|
|
`).replace(Fy,"")}function fd(e,t){return t=od(t),od(e)===t}function be(e,t,n,l,a,s){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||hl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&hl(e,""+l);break;case"className":si(e,"class",l);break;case"tabIndex":si(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":si(e,n,l);break;case"style":ro(e,l,s);break;case"data":if(t!=="object"){si(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ri(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 s=="function"&&(n==="formAction"?(t!=="input"&&be(e,t,"name",a.name,a,null),be(e,t,"formEncType",a.formEncType,a,null),be(e,t,"formMethod",a.formMethod,a,null),be(e,t,"formTarget",a.formTarget,a,null)):(be(e,t,"encType",a.encType,a,null),be(e,t,"method",a.method,a,null),be(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ri(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Gt);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=ri(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":ie("beforetoggle",e),ie("toggle",e),ui(e,"popover",l);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ui(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Ap.get(n)||n,ui(e,n,l))}}function Uc(e,t,n,l,a,s){switch(n){case"style":ro(e,l,s);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?hl(e,l):(typeof l=="number"||typeof l=="bigint")&&hl(e,""+l);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Gt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!eo.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),s=e[et]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,a),typeof l=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):ui(e,n,l)}}}function $e(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ie("error",e),ie("load",e);var l=!1,a=!1,s;for(s in n)if(n.hasOwnProperty(s)){var o=n[s];if(o!=null)switch(s){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:be(e,t,s,o,n,null)}}a&&be(e,t,"srcSet",n.srcSet,n,null),l&&be(e,t,"src",n.src,n,null);return;case"input":ie("invalid",e);var h=s=o=a=null,g=null,N=null;for(l in n)if(n.hasOwnProperty(l)){var D=n[l];if(D!=null)switch(l){case"name":a=D;break;case"type":o=D;break;case"checked":g=D;break;case"defaultChecked":N=D;break;case"value":s=D;break;case"defaultValue":h=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:be(e,t,l,D,n,null)}}io(e,s,h,g,N,o,a,!1);return;case"select":ie("invalid",e),l=o=s=null;for(a in n)if(n.hasOwnProperty(a)&&(h=n[a],h!=null))switch(a){case"value":s=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:be(e,t,a,h,n,null)}t=s,n=o,e.multiple=!!l,t!=null?fl(e,!!l,t,!1):n!=null&&fl(e,!!l,n,!0);return;case"textarea":ie("invalid",e),s=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(h=n[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":a=h;break;case"children":s=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:be(e,t,o,h,n,null)}so(e,l,a,s);return;case"option":for(g in n)if(n.hasOwnProperty(g)&&(l=n[g],l!=null))switch(g){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:be(e,t,g,l,n,null)}return;case"dialog":ie("beforetoggle",e),ie("toggle",e),ie("cancel",e),ie("close",e);break;case"iframe":case"object":ie("load",e);break;case"video":case"audio":for(l=0;l<Da.length;l++)ie(Da[l],e);break;case"image":ie("error",e),ie("load",e);break;case"details":ie("toggle",e);break;case"embed":case"source":case"link":ie("error",e),ie("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in n)if(n.hasOwnProperty(N)&&(l=n[N],l!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:be(e,t,N,l,n,null)}return;default:if($u(t)){for(D in n)n.hasOwnProperty(D)&&(l=n[D],l!==void 0&&Uc(e,t,D,l,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!=null&&be(e,t,h,l,n,null))}function Py(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,o=null,h=null,g=null,N=null,D=null;for(M in n){var U=n[M];if(n.hasOwnProperty(M)&&U!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":g=U;default:l.hasOwnProperty(M)||be(e,t,M,null,l,U)}}for(var O in l){var M=l[O];if(U=n[O],l.hasOwnProperty(O)&&(M!=null||U!=null))switch(O){case"type":s=M;break;case"name":a=M;break;case"checked":N=M;break;case"defaultChecked":D=M;break;case"value":o=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:M!==U&&be(e,t,O,M,l,U)}}Ku(e,o,h,g,N,D,s,a);return;case"select":M=o=h=O=null;for(s in n)if(g=n[s],n.hasOwnProperty(s)&&g!=null)switch(s){case"value":break;case"multiple":M=g;default:l.hasOwnProperty(s)||be(e,t,s,null,l,g)}for(a in l)if(s=l[a],g=n[a],l.hasOwnProperty(a)&&(s!=null||g!=null))switch(a){case"value":O=s;break;case"defaultValue":h=s;break;case"multiple":o=s;default:s!==g&&be(e,t,a,s,l,g)}t=h,n=o,l=M,O!=null?fl(e,!!n,O,!1):!!l!=!!n&&(t!=null?fl(e,!!n,t,!0):fl(e,!!n,n?[]:"",!1));return;case"textarea":M=O=null;for(h in n)if(a=n[h],n.hasOwnProperty(h)&&a!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:be(e,t,h,null,l,a)}for(o in l)if(a=l[o],s=n[o],l.hasOwnProperty(o)&&(a!=null||s!=null))switch(o){case"value":O=a;break;case"defaultValue":M=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==s&&be(e,t,o,a,l,s)}uo(e,O,M);return;case"option":for(var V in n)if(O=n[V],n.hasOwnProperty(V)&&O!=null&&!l.hasOwnProperty(V))switch(V){case"selected":e.selected=!1;break;default:be(e,t,V,null,l,O)}for(g in l)if(O=l[g],M=n[g],l.hasOwnProperty(g)&&O!==M&&(O!=null||M!=null))switch(g){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:be(e,t,g,O,l,M)}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 W in n)O=n[W],n.hasOwnProperty(W)&&O!=null&&!l.hasOwnProperty(W)&&be(e,t,W,null,l,O);for(N in l)if(O=l[N],M=n[N],l.hasOwnProperty(N)&&O!==M&&(O!=null||M!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:be(e,t,N,O,l,M)}return;default:if($u(t)){for(var Se in n)O=n[Se],n.hasOwnProperty(Se)&&O!==void 0&&!l.hasOwnProperty(Se)&&Uc(e,t,Se,void 0,l,O);for(D in l)O=l[D],M=n[D],!l.hasOwnProperty(D)||O===M||O===void 0&&M===void 0||Uc(e,t,D,O,l,M);return}}for(var A in n)O=n[A],n.hasOwnProperty(A)&&O!=null&&!l.hasOwnProperty(A)&&be(e,t,A,null,l,O);for(U in l)O=l[U],M=n[U],!l.hasOwnProperty(U)||O===M||O==null&&M==null||be(e,t,U,O,l,M)}function hd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Iy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],s=a.transferSize,o=a.initiatorType,h=a.duration;if(s&&h&&hd(o)){for(o=0,h=a.responseEnd,l+=1;l<n.length;l++){var g=n[l],N=g.startTime;if(N>h)break;var D=g.transferSize,U=g.initiatorType;D&&hd(U)&&(g=g.responseEnd,o+=D*(g<h?1:(h-N)/(g-N)))}if(--l,t+=8*(s+o)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Bc=null,Lc=null;function au(e){return e.nodeType===9?e:e.ownerDocument}function dd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function md(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Hc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qc=null;function e0(){var e=window.event;return e&&e.type==="popstate"?e===qc?!1:(qc=e,!0):(qc=null,!1)}var pd=typeof setTimeout=="function"?setTimeout:void 0,t0=typeof clearTimeout=="function"?clearTimeout:void 0,yd=typeof Promise=="function"?Promise:void 0,n0=typeof queueMicrotask=="function"?queueMicrotask:typeof yd<"u"?function(e){return yd.resolve(null).then(e).catch(l0)}:pd;function l0(e){setTimeout(function(){throw e})}function Mn(e){return e==="head"}function vd(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Gl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")ja(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ja(n);for(var s=n.firstChild;s;){var o=s.nextSibling,h=s.nodeName;s[Pl]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=o}}else n==="body"&&ja(e.ownerDocument.body);n=a}while(n);Gl(t)}function gd(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Yc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Yc(n),Qu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function a0(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Pl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=At(e.nextSibling),e===null)break}return null}function i0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=At(e.nextSibling),e===null))return null;return e}function bd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=At(e.nextSibling),e===null))return null;return e}function kc(e){return e.data==="$?"||e.data==="$~"}function Xc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function u0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function At(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Gc=null;function Sd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return At(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function xd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function _d(e,t,n){switch(t=au(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ja(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qu(e)}var Ct=new Map,Ed=new Set;function iu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var un=X.d;X.d={f:s0,r:c0,D:r0,C:o0,L:f0,m:h0,X:m0,S:d0,M:p0};function s0(){var e=un.f(),t=Wi();return e||t}function c0(e){var t=cl(e);t!==null&&t.tag===5&&t.type==="form"?Yf(t):un.r(e)}var Yl=typeof document>"u"?null:document;function Td(e,t,n){var l=Yl;if(l&&typeof t=="string"&&t){var a=gt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Ed.has(a)||(Ed.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function r0(e){un.D(e),Td("dns-prefetch",e,null)}function o0(e,t){un.C(e,t),Td("preconnect",e,t)}function f0(e,t,n){un.L(e,t,n);var l=Yl;if(l&&e&&t){var a='link[rel="preload"][as="'+gt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+gt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+gt(n.imageSizes)+'"]')):a+='[href="'+gt(e)+'"]';var s=a;switch(t){case"style":s=kl(e);break;case"script":s=Xl(e)}Ct.has(s)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ct.set(s,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Ua(s))||t==="script"&&l.querySelector(Ba(s))||(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function h0(e,t){un.m(e,t);var n=Yl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+gt(l)+'"][href="'+gt(e)+'"]',s=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Xl(e)}if(!Ct.has(s)&&(e=S({rel:"modulepreload",href:e},t),Ct.set(s,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ba(s)))return}l=n.createElement("link"),$e(l,"link",e),Ge(l),n.head.appendChild(l)}}}function d0(e,t,n){un.S(e,t,n);var l=Yl;if(l&&e){var a=rl(l).hoistableStyles,s=kl(e);t=t||"default";var o=a.get(s);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(Ua(s)))h.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ct.get(s))&&Vc(e,n);var g=o=l.createElement("link");Ge(g),$e(g,"link",e),g._p=new Promise(function(N,D){g.onload=N,g.onerror=D}),g.addEventListener("load",function(){h.loading|=1}),g.addEventListener("error",function(){h.loading|=2}),h.loading|=4,uu(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(s,o)}}}function m0(e,t){un.X(e,t);var n=Yl;if(n&&e){var l=rl(n).hoistableScripts,a=Xl(e),s=l.get(a);s||(s=n.querySelector(Ba(a)),s||(e=S({src:e,async:!0},t),(t=Ct.get(a))&&Qc(e,t),s=n.createElement("script"),Ge(s),$e(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function p0(e,t){un.M(e,t);var n=Yl;if(n&&e){var l=rl(n).hoistableScripts,a=Xl(e),s=l.get(a);s||(s=n.querySelector(Ba(a)),s||(e=S({src:e,async:!0,type:"module"},t),(t=Ct.get(a))&&Qc(e,t),s=n.createElement("script"),Ge(s),$e(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function Ad(e,t,n,l){var a=(a=le.current)?iu(a):null;if(!a)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=kl(n.href),n=rl(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=kl(n.href);var s=rl(a).hoistableStyles,o=s.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,o),(s=a.querySelector(Ua(e)))&&!s._p&&(o.instance=s,o.state.loading=5),Ct.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ct.set(e,n),s||y0(a,e,n,o.state))),t&&l===null)throw Error(r(528,""));return o}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xl(n),n=rl(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function kl(e){return'href="'+gt(e)+'"'}function Ua(e){return'link[rel="stylesheet"]['+e+"]"}function Cd(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function y0(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),$e(t,"link",n),Ge(t),e.head.appendChild(t))}function Xl(e){return'[src="'+gt(e)+'"]'}function Ba(e){return"script[async]"+e}function Rd(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+gt(n.href)+'"]');if(l)return t.instance=l,Ge(l),l;var a=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ge(l),$e(l,"style",a),uu(l,n.precedence,e),t.instance=l;case"stylesheet":a=kl(n.href);var s=e.querySelector(Ua(a));if(s)return t.state.loading|=4,t.instance=s,Ge(s),s;l=Cd(n),(a=Ct.get(a))&&Vc(l,a),s=(e.ownerDocument||e).createElement("link"),Ge(s);var o=s;return o._p=new Promise(function(h,g){o.onload=h,o.onerror=g}),$e(s,"link",l),t.state.loading|=4,uu(s,n.precedence,e),t.instance=s;case"script":return s=Xl(n.src),(a=e.querySelector(Ba(s)))?(t.instance=a,Ge(a),a):(l=n,(a=Ct.get(s))&&(l=S({},n),Qc(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ge(a),$e(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,uu(l,n.precedence,e));return t.instance}function uu(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,s=a,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)s=h;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var su=null;function Nd(e,t,n){if(su===null){var l=new Map,a=su=new Map;a.set(n,l)}else a=su,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var s=n[a];if(!(s[Pl]||s[Qe]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var o=s.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(s):l.set(o,[s])}}return l}function Od(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function v0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function zd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function g0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=kl(l.href),s=t.querySelector(Ua(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=cu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ge(s);return}s=t.ownerDocument||t,l=Cd(l),(a=Ct.get(a))&&Vc(l,a),s=s.createElement("link"),Ge(s);var o=s;o._p=new Promise(function(h,g){o.onload=h,o.onerror=g}),$e(s,"link",l),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=cu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Zc=0;function b0(e,t){return e.stylesheets&&e.count===0&&ou(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ou(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Zc===0&&(Zc=62500*Iy());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ou(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Zc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ou(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ru=null;function ou(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ru=new Map,t.forEach(S0,e),ru=null,cu.call(e))}function S0(e,t){if(!(t.state.loading&4)){var n=ru.get(e);if(n)var l=n.get(null);else{n=new Map,ru.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var o=a[s];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}a=t.instance,o=a.getAttribute("data-precedence"),s=n.get(o)||l,s===l&&n.set(null,a),n.set(o,a),this.count++,l=cu.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var La={$$typeof:Q,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function x0(e,t,n,l,a,s,o,h,g){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ku(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.hiddenUpdates=ku(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function Md(e,t,n,l,a,s,o,h,g,N,D,U){return e=new x0(e,t,n,o,g,N,D,U,h),t=1,s===!0&&(t|=24),s=ft(3,null,null,t),e.current=s,s.stateNode=e,t=As(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},Os(s),e}function Dd(e){return e?(e=bl,e):bl}function wd(e,t,n,l,a,s){a=Dd(a),l.context===null?l.context=a:l.pendingContext=a,l=Sn(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=xn(e,l,t),n!==null&&(ut(n,e,t),pa(n,e,t))}function jd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Kc(e,t){jd(e,t),(e=e.alternate)&&jd(e,t)}function Ud(e){if(e.tag===13||e.tag===31){var t=Qn(e,67108864);t!==null&&ut(t,e,67108864),Kc(e,67108864)}}function Bd(e){if(e.tag===13||e.tag===31){var t=yt();t=Xu(t);var n=Qn(e,t);n!==null&&ut(n,e,t),Kc(e,t)}}var fu=!0;function _0(e,t,n,l){var a=w.T;w.T=null;var s=X.p;try{X.p=2,Jc(e,t,n,l)}finally{X.p=s,w.T=a}}function E0(e,t,n,l){var a=w.T;w.T=null;var s=X.p;try{X.p=8,Jc(e,t,n,l)}finally{X.p=s,w.T=a}}function Jc(e,t,n,l){if(fu){var a=$c(l);if(a===null)jc(e,t,l,hu,n),Hd(e,l);else if(A0(a,e,t,n,l))l.stopPropagation();else if(Hd(e,l),t&4&&-1<T0.indexOf(e)){for(;a!==null;){var s=cl(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var o=Yn(s.pendingLanes);if(o!==0){var h=s;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var g=1<<31-rt(o);h.entanglements[1]|=g,o&=~g}Lt(s),(he&6)===0&&(Ji=st()+500,Ma(0))}}break;case 31:case 13:h=Qn(s,2),h!==null&&ut(h,s,2),Wi(),Kc(s,2)}if(s=$c(l),s===null&&jc(e,t,l,hu,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else jc(e,t,l,null,n)}}function $c(e){return e=Fu(e),Wc(e)}var hu=null;function Wc(e){if(hu=null,e=sl(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=b(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hu=e,null}function Ld(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(rp()){case Gr:return 2;case Vr:return 8;case ti:case op:return 32;case Qr:return 268435456;default:return 32}default:return 32}}var Fc=!1,Dn=null,wn=null,jn=null,Ha=new Map,qa=new Map,Un=[],T0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Hd(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":jn=null;break;case"pointerover":case"pointerout":Ha.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qa.delete(t.pointerId)}}function Ya(e,t,n,l,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:s,targetContainers:[a]},t!==null&&(t=cl(t),t!==null&&Ud(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function A0(e,t,n,l,a){switch(t){case"focusin":return Dn=Ya(Dn,e,t,n,l,a),!0;case"dragenter":return wn=Ya(wn,e,t,n,l,a),!0;case"mouseover":return jn=Ya(jn,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return Ha.set(s,Ya(Ha.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,qa.set(s,Ya(qa.get(s)||null,e,t,n,l,a)),!0}return!1}function qd(e){var t=sl(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,Fr(e.priority,function(){Bd(n)});return}}else if(t===31){if(t=b(n),t!==null){e.blockedOn=t,Fr(e.priority,function(){Bd(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function du(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=$c(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Wu=l,n.target.dispatchEvent(l),Wu=null}else return t=cl(n),t!==null&&Ud(t),e.blockedOn=n,!1;t.shift()}return!0}function Yd(e,t,n){du(e)&&n.delete(t)}function C0(){Fc=!1,Dn!==null&&du(Dn)&&(Dn=null),wn!==null&&du(wn)&&(wn=null),jn!==null&&du(jn)&&(jn=null),Ha.forEach(Yd),qa.forEach(Yd)}function mu(e,t){e.blockedOn===t&&(e.blockedOn=null,Fc||(Fc=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,C0)))}var pu=null;function kd(e){pu!==e&&(pu=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){pu===e&&(pu=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Wc(l||n)===null)continue;break}var s=cl(n);s!==null&&(e.splice(t,3),t-=3,$s(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Gl(e){function t(g){return mu(g,e)}Dn!==null&&mu(Dn,e),wn!==null&&mu(wn,e),jn!==null&&mu(jn,e),Ha.forEach(t),qa.forEach(t);for(var n=0;n<Un.length;n++){var l=Un[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)qd(n),n.blockedOn===null&&Un.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],s=n[l+1],o=a[et]||null;if(typeof s=="function")o||kd(n);else if(o){var h=null;if(s&&s.hasAttribute("formAction")){if(a=s,o=s[et]||null)h=o.formAction;else if(Wc(a)!==null)continue}else h=o.action;typeof h=="function"?n[l+1]=h:(n.splice(l,3),l-=3),kd(n)}}}function Xd(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Pc(e){this._internalRoot=e}yu.prototype.render=Pc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=yt();wd(n,l,e,t,null,null)},yu.prototype.unmount=Pc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wd(e.current,2,null,e,null,null),Wi(),t[ul]=null}};function yu(e){this._internalRoot=e}yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wr();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&qd(e)}};var Gd=i.version;if(Gd!=="19.2.0")throw Error(r(527,Gd,"19.2.0"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=y(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var R0={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vu.isDisabled&&vu.supportsFiber)try{$l=vu.inject(R0),ct=vu}catch{}}return Xa.createRoot=function(e,t){if(!f(e))throw Error(r(299));var n=!1,l="",a=Wf,s=Ff,o=Pf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Md(e,1,!1,null,null,n,l,null,a,s,o,Xd),e[ul]=t.current,wc(e),new Pc(t)},Xa.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var l=!1,a="",s=Wf,o=Ff,h=Pf,g=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=Md(e,1,!0,t,n??null,l,a,g,s,o,h,Xd),t.context=Dd(null),n=t.current,l=yt(),l=Xu(l),a=Sn(l),a.callback=null,xn(n,a,l),n=l,t.current.lanes=n,Fl(t,n),Lt(t),e[ul]=t.current,wc(e),new yu(t)},Xa.version="19.2.0",Xa}var Id;function L0(){if(Id)return tr.exports;Id=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),tr.exports=B0(),tr.exports}var H0=L0();var em="popstate";function q0(u={}){function i(r,f){let{pathname:d,search:m,hash:b}=r.location;return hr("",{pathname:d,search:m,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function c(r,f){return typeof f=="string"?f:Wa(f)}return k0(i,c,null,u)}function Oe(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function wt(u,i){if(!u){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function Y0(){return Math.random().toString(36).substring(2,10)}function tm(u,i){return{usr:u.state,key:u.key,idx:i}}function hr(u,i,c=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof i=="string"?Ql(i):i,state:c,key:i&&i.key||r||Y0()}}function Wa({pathname:u="/",search:i="",hash:c=""}){return i&&i!=="?"&&(u+=i.charAt(0)==="?"?i:"?"+i),c&&c!=="#"&&(u+=c.charAt(0)==="#"?c:"#"+c),u}function Ql(u){let i={};if(u){let c=u.indexOf("#");c>=0&&(i.hash=u.substring(c),u=u.substring(0,c));let r=u.indexOf("?");r>=0&&(i.search=u.substring(r),u=u.substring(0,r)),u&&(i.pathname=u)}return i}function k0(u,i,c,r={}){let{window:f=document.defaultView,v5Compat:d=!1}=r,m=f.history,b="POP",p=null,y=E();y==null&&(y=0,m.replaceState({...m.state,idx:y},""));function E(){return(m.state||{idx:null}).idx}function S(){b="POP";let Y=E(),L=Y==null?null:Y-y;y=Y,p&&p({action:b,location:k.location,delta:L})}function C(Y,L){b="PUSH";let q=hr(k.location,Y,L);y=E()+1;let Q=tm(q,y),P=k.createHref(q);try{m.pushState(Q,"",P)}catch(ye){if(ye instanceof DOMException&&ye.name==="DataCloneError")throw ye;f.location.assign(P)}d&&p&&p({action:b,location:k.location,delta:1})}function z(Y,L){b="REPLACE";let q=hr(k.location,Y,L);y=E();let Q=tm(q,y),P=k.createHref(q);m.replaceState(Q,"",P),d&&p&&p({action:b,location:k.location,delta:0})}function H(Y){return X0(Y)}let k={get action(){return b},get location(){return u(f,m)},listen(Y){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(em,S),p=Y,()=>{f.removeEventListener(em,S),p=null}},createHref(Y){return i(f,Y)},createURL:H,encodeLocation(Y){let L=H(Y);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:C,replace:z,go(Y){return m.go(Y)}};return k}function X0(u,i=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(c,"No window.location.(origin|href) available to create URL");let r=typeof u=="string"?u:Wa(u);return r=r.replace(/ $/,"%20"),!i&&r.startsWith("//")&&(r=c+r),new URL(r,c)}function Sm(u,i,c="/"){return G0(u,i,c,!1)}function G0(u,i,c,r){let f=typeof i=="string"?Ql(i):i,d=rn(f.pathname||"/",c);if(d==null)return null;let m=xm(u);V0(m);let b=null;for(let p=0;b==null&&p<m.length;++p){let y=tv(d);b=I0(m[p],y,r)}return b}function xm(u,i=[],c=[],r="",f=!1){let d=(m,b,p=f,y)=>{let E={relativePath:y===void 0?m.path||"":y,caseSensitive:m.caseSensitive===!0,childrenIndex:b,route:m};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(r)&&p)return;Oe(E.relativePath.startsWith(r),`Absolute route path "${E.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(r.length)}let S=cn([r,E.relativePath]),C=c.concat(E);m.children&&m.children.length>0&&(Oe(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),xm(m.children,i,C,S,p)),!(m.path==null&&!m.index)&&i.push({path:S,score:F0(S,m.index),routesMeta:C})};return u.forEach((m,b)=>{if(m.path===""||!m.path?.includes("?"))d(m,b);else for(let p of _m(m.path))d(m,b,!0,p)}),i}function _m(u){let i=u.split("/");if(i.length===0)return[];let[c,...r]=i,f=c.endsWith("?"),d=c.replace(/\?$/,"");if(r.length===0)return f?[d,""]:[d];let m=_m(r.join("/")),b=[];return b.push(...m.map(p=>p===""?d:[d,p].join("/"))),f&&b.push(...m),b.map(p=>u.startsWith("/")&&p===""?"/":p)}function V0(u){u.sort((i,c)=>i.score!==c.score?c.score-i.score:P0(i.routesMeta.map(r=>r.childrenIndex),c.routesMeta.map(r=>r.childrenIndex)))}var Q0=/^:[\w-]+$/,Z0=3,K0=2,J0=1,$0=10,W0=-2,nm=u=>u==="*";function F0(u,i){let c=u.split("/"),r=c.length;return c.some(nm)&&(r+=W0),i&&(r+=K0),c.filter(f=>!nm(f)).reduce((f,d)=>f+(Q0.test(d)?Z0:d===""?J0:$0),r)}function P0(u,i){return u.length===i.length&&u.slice(0,-1).every((r,f)=>r===i[f])?u[u.length-1]-i[i.length-1]:0}function I0(u,i,c=!1){let{routesMeta:r}=u,f={},d="/",m=[];for(let b=0;b<r.length;++b){let p=r[b],y=b===r.length-1,E=d==="/"?i:i.slice(d.length)||"/",S=Ru({path:p.relativePath,caseSensitive:p.caseSensitive,end:y},E),C=p.route;if(!S&&y&&c&&!r[r.length-1].route.index&&(S=Ru({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},E)),!S)return null;Object.assign(f,S.params),m.push({params:f,pathname:cn([d,S.pathname]),pathnameBase:uv(cn([d,S.pathnameBase])),route:C}),S.pathnameBase!=="/"&&(d=cn([d,S.pathnameBase]))}return m}function Ru(u,i){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[c,r]=ev(u.path,u.caseSensitive,u.end),f=i.match(c);if(!f)return null;let d=f[0],m=d.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:r.reduce((y,{paramName:E,isOptional:S},C)=>{if(E==="*"){let H=b[C]||"";m=d.slice(0,d.length-H.length).replace(/(.)\/+$/,"$1")}const z=b[C];return S&&!z?y[E]=void 0:y[E]=(z||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:m,pattern:u}}function ev(u,i=!1,c=!0){wt(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let r=[],f="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,b,p)=>(r.push({paramName:b,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(r.push({paramName:"*"}),f+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":u!==""&&u!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,i?void 0:"i"),r]}function tv(u){try{return u.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return wt(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),u}}function rn(u,i){if(i==="/")return u;if(!u.toLowerCase().startsWith(i.toLowerCase()))return null;let c=i.endsWith("/")?i.length-1:i.length,r=u.charAt(c);return r&&r!=="/"?null:u.slice(c)||"/"}var nv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lv=u=>nv.test(u);function av(u,i="/"){let{pathname:c,search:r="",hash:f=""}=typeof u=="string"?Ql(u):u,d;if(c)if(lv(c))d=c;else{if(c.includes("//")){let m=c;c=c.replace(/\/\/+/g,"/"),wt(!1,`Pathnames cannot have embedded double slashes - normalizing ${m} -> ${c}`)}c.startsWith("/")?d=lm(c.substring(1),"/"):d=lm(c,i)}else d=i;return{pathname:d,search:sv(r),hash:cv(f)}}function lm(u,i){let c=i.replace(/\/+$/,"").split("/");return u.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function ir(u,i,c,r){return`Cannot include a '${u}' character in a manually specified \`to.${i}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iv(u){return u.filter((i,c)=>c===0||i.route.path&&i.route.path.length>0)}function Em(u){let i=iv(u);return i.map((c,r)=>r===i.length-1?c.pathname:c.pathnameBase)}function Tm(u,i,c,r=!1){let f;typeof u=="string"?f=Ql(u):(f={...u},Oe(!f.pathname||!f.pathname.includes("?"),ir("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),ir("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),ir("#","search","hash",f)));let d=u===""||f.pathname==="",m=d?"/":f.pathname,b;if(m==null)b=c;else{let S=i.length-1;if(!r&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),S-=1;f.pathname=C.join("/")}b=S>=0?i[S]:"/"}let p=av(f,b),y=m&&m!=="/"&&m.endsWith("/"),E=(d||m===".")&&c.endsWith("/");return!p.pathname.endsWith("/")&&(y||E)&&(p.pathname+="/"),p}var cn=u=>u.join("/").replace(/\/\/+/g,"/"),uv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),sv=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,cv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u;function rv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Am=["POST","PUT","PATCH","DELETE"];new Set(Am);var ov=["GET",...Am];new Set(ov);var Zl=T.createContext(null);Zl.displayName="DataRouter";var Ou=T.createContext(null);Ou.displayName="DataRouterState";T.createContext(!1);var Cm=T.createContext({isTransitioning:!1});Cm.displayName="ViewTransition";var fv=T.createContext(new Map);fv.displayName="Fetchers";var hv=T.createContext(null);hv.displayName="Await";var Yt=T.createContext(null);Yt.displayName="Navigation";var Fa=T.createContext(null);Fa.displayName="Location";var on=T.createContext({outlet:null,matches:[],isDataRoute:!1});on.displayName="Route";var xr=T.createContext(null);xr.displayName="RouteError";function dv(u,{relative:i}={}){Oe(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:r}=T.useContext(Yt),{hash:f,pathname:d,search:m}=Ia(u,{relative:i}),b=d;return c!=="/"&&(b=d==="/"?c:cn([c,d])),r.createHref({pathname:b,search:m,hash:f})}function Pa(){return T.useContext(Fa)!=null}function il(){return Oe(Pa(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(Fa).location}var Rm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Nm(u){T.useContext(Yt).static||T.useLayoutEffect(u)}function mv(){let{isDataRoute:u}=T.useContext(on);return u?Rv():pv()}function pv(){Oe(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let u=T.useContext(Zl),{basename:i,navigator:c}=T.useContext(Yt),{matches:r}=T.useContext(on),{pathname:f}=il(),d=JSON.stringify(Em(r)),m=T.useRef(!1);return Nm(()=>{m.current=!0}),T.useCallback((p,y={})=>{if(wt(m.current,Rm),!m.current)return;if(typeof p=="number"){c.go(p);return}let E=Tm(p,JSON.parse(d),f,y.relative==="path");u==null&&i!=="/"&&(E.pathname=E.pathname==="/"?i:cn([i,E.pathname])),(y.replace?c.replace:c.push)(E,y.state,y)},[i,c,d,f,u])}T.createContext(null);function Ia(u,{relative:i}={}){let{matches:c}=T.useContext(on),{pathname:r}=il(),f=JSON.stringify(Em(c));return T.useMemo(()=>Tm(u,JSON.parse(f),r,i==="path"),[u,f,r,i])}function yv(u,i){return Om(u,i)}function Om(u,i,c,r,f){Oe(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=T.useContext(Yt),{matches:m}=T.useContext(on),b=m[m.length-1],p=b?b.params:{},y=b?b.pathname:"/",E=b?b.pathnameBase:"/",S=b&&b.route;{let q=S&&S.path||"";zm(y,!S||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${q}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
|
|
Please change the parent <Route path="${q}"> to <Route path="${q==="/"?"*":`${q}/*`}">.`)}let C=il(),z;if(i){let q=typeof i=="string"?Ql(i):i;Oe(E==="/"||q.pathname?.startsWith(E),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${q.pathname}" was given in the \`location\` prop.`),z=q}else z=C;let H=z.pathname||"/",k=H;if(E!=="/"){let q=E.replace(/^\//,"").split("/");k="/"+H.replace(/^\//,"").split("/").slice(q.length).join("/")}let Y=Sm(u,{pathname:k});wt(S||Y!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),wt(Y==null||Y[Y.length-1].route.element!==void 0||Y[Y.length-1].route.Component!==void 0||Y[Y.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let L=xv(Y&&Y.map(q=>Object.assign({},q,{params:Object.assign({},p,q.params),pathname:cn([E,d.encodeLocation?d.encodeLocation(q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?E:cn([E,d.encodeLocation?d.encodeLocation(q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),m,c,r,f);return i&&L?T.createElement(Fa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},L):L}function vv(){let u=Cv(),i=rv(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),c=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},m=null;return console.error("Error handled by React Router default ErrorBoundary:",u),m=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:d},"ErrorBoundary")," or"," ",T.createElement("code",{style:d},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},i),c?T.createElement("pre",{style:f},c):null,m)}var gv=T.createElement(vv,null),bv=class extends T.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,i){return i.location!==u.location||i.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:i.error,location:i.location,revalidation:u.revalidation||i.revalidation}}componentDidCatch(u,i){this.props.onError?this.props.onError(u,i):console.error("React Router caught the following error during render",u)}render(){return this.state.error!==void 0?T.createElement(on.Provider,{value:this.props.routeContext},T.createElement(xr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Sv({routeContext:u,match:i,children:c}){let r=T.useContext(Zl);return r&&r.static&&r.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=i.route.id),T.createElement(on.Provider,{value:u},c)}function xv(u,i=[],c=null,r=null,f=null){if(u==null){if(!c)return null;if(c.errors)u=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)u=c.matches;else return null}let d=u,m=c?.errors;if(m!=null){let E=d.findIndex(S=>S.route.id&&m?.[S.route.id]!==void 0);Oe(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),d=d.slice(0,Math.min(d.length,E+1))}let b=!1,p=-1;if(c)for(let E=0;E<d.length;E++){let S=d[E];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(p=E),S.route.id){let{loaderData:C,errors:z}=c,H=S.route.loader&&!C.hasOwnProperty(S.route.id)&&(!z||z[S.route.id]===void 0);if(S.route.lazy||H){b=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}let y=c&&r?(E,S)=>{r(E,{location:c.location,params:c.matches?.[0]?.params??{},errorInfo:S})}:void 0;return d.reduceRight((E,S,C)=>{let z,H=!1,k=null,Y=null;c&&(z=m&&S.route.id?m[S.route.id]:void 0,k=S.route.errorElement||gv,b&&(p<0&&C===0?(zm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,Y=null):p===C&&(H=!0,Y=S.route.hydrateFallbackElement||null)));let L=i.concat(d.slice(0,C+1)),q=()=>{let Q;return z?Q=k:H?Q=Y:S.route.Component?Q=T.createElement(S.route.Component,null):S.route.element?Q=S.route.element:Q=E,T.createElement(Sv,{match:S,routeContext:{outlet:E,matches:L,isDataRoute:c!=null},children:Q})};return c&&(S.route.ErrorBoundary||S.route.errorElement||C===0)?T.createElement(bv,{location:c.location,revalidation:c.revalidation,component:k,error:z,children:q(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:y}):q()},null)}function _r(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _v(u){let i=T.useContext(Zl);return Oe(i,_r(u)),i}function Ev(u){let i=T.useContext(Ou);return Oe(i,_r(u)),i}function Tv(u){let i=T.useContext(on);return Oe(i,_r(u)),i}function Er(u){let i=Tv(u),c=i.matches[i.matches.length-1];return Oe(c.route.id,`${u} can only be used on routes that contain a unique "id"`),c.route.id}function Av(){return Er("useRouteId")}function Cv(){let u=T.useContext(xr),i=Ev("useRouteError"),c=Er("useRouteError");return u!==void 0?u:i.errors?.[c]}function Rv(){let{router:u}=_v("useNavigate"),i=Er("useNavigate"),c=T.useRef(!1);return Nm(()=>{c.current=!0}),T.useCallback(async(f,d={})=>{wt(c.current,Rm),c.current&&(typeof f=="number"?u.navigate(f):await u.navigate(f,{fromRouteId:i,...d}))},[u,i])}var am={};function zm(u,i,c){!i&&!am[u]&&(am[u]=!0,wt(!1,c))}T.memo(Nv);function Nv({routes:u,future:i,state:c,unstable_onError:r}){return Om(u,void 0,c,r,i)}function dr(u){Oe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ov({basename:u="/",children:i=null,location:c,navigationType:r="POP",navigator:f,static:d=!1}){Oe(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=u.replace(/^\/*/,"/"),b=T.useMemo(()=>({basename:m,navigator:f,static:d,future:{}}),[m,f,d]);typeof c=="string"&&(c=Ql(c));let{pathname:p="/",search:y="",hash:E="",state:S=null,key:C="default"}=c,z=T.useMemo(()=>{let H=rn(p,m);return H==null?null:{location:{pathname:H,search:y,hash:E,state:S,key:C},navigationType:r}},[m,p,y,E,S,C,r]);return wt(z!=null,`<Router basename="${m}"> is not able to match the URL "${p}${y}${E}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:T.createElement(Yt.Provider,{value:b},T.createElement(Fa.Provider,{children:i,value:z}))}function zv({children:u,location:i}){return yv(mr(u),i)}function mr(u,i=[]){let c=[];return T.Children.forEach(u,(r,f)=>{if(!T.isValidElement(r))return;let d=[...i,f];if(r.type===T.Fragment){c.push.apply(c,mr(r.props.children,d));return}Oe(r.type===dr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let m={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(m.children=mr(r.props.children,d)),c.push(m)}),c}var xu="get",_u="application/x-www-form-urlencoded";function zu(u){return u!=null&&typeof u.tagName=="string"}function Mv(u){return zu(u)&&u.tagName.toLowerCase()==="button"}function Dv(u){return zu(u)&&u.tagName.toLowerCase()==="form"}function wv(u){return zu(u)&&u.tagName.toLowerCase()==="input"}function jv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Uv(u,i){return u.button===0&&(!i||i==="_self")&&!jv(u)}var gu=null;function Bv(){if(gu===null)try{new FormData(document.createElement("form"),0),gu=!1}catch{gu=!0}return gu}var Lv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ur(u){return u!=null&&!Lv.has(u)?(wt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_u}"`),null):u}function Hv(u,i){let c,r,f,d,m;if(Dv(u)){let b=u.getAttribute("action");r=b?rn(b,i):null,c=u.getAttribute("method")||xu,f=ur(u.getAttribute("enctype"))||_u,d=new FormData(u)}else if(Mv(u)||wv(u)&&(u.type==="submit"||u.type==="image")){let b=u.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=u.getAttribute("formaction")||b.getAttribute("action");if(r=p?rn(p,i):null,c=u.getAttribute("formmethod")||b.getAttribute("method")||xu,f=ur(u.getAttribute("formenctype"))||ur(b.getAttribute("enctype"))||_u,d=new FormData(b,u),!Bv()){let{name:y,type:E,value:S}=u;if(E==="image"){let C=y?`${y}.`:"";d.append(`${C}x`,"0"),d.append(`${C}y`,"0")}else y&&d.append(y,S)}}else{if(zu(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=xu,r=null,f=_u,m=u}return d&&f==="text/plain"&&(m=d,d=void 0),{action:r,method:c.toLowerCase(),encType:f,formData:d,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tr(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function qv(u,i,c){let r=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return r.pathname==="/"?r.pathname=`_root.${c}`:i&&rn(r.pathname,i)==="/"?r.pathname=`${i.replace(/\/$/,"")}/_root.${c}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${c}`,r}async function Yv(u,i){if(u.id in i)return i[u.id];try{let c=await import(u.module);return i[u.id]=c,c}catch(c){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function kv(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Xv(u,i,c){let r=await Promise.all(u.map(async f=>{let d=i.routes[f.route.id];if(d){let m=await Yv(d,c);return m.links?m.links():[]}return[]}));return Zv(r.flat(1).filter(kv).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function im(u,i,c,r,f,d){let m=(p,y)=>c[y]?p.route.id!==c[y].route.id:!0,b=(p,y)=>c[y].pathname!==p.pathname||c[y].route.path?.endsWith("*")&&c[y].params["*"]!==p.params["*"];return d==="assets"?i.filter((p,y)=>m(p,y)||b(p,y)):d==="data"?i.filter((p,y)=>{let E=r.routes[p.route.id];if(!E||!E.hasLoader)return!1;if(m(p,y)||b(p,y))return!0;if(p.route.shouldRevalidate){let S=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Gv(u,i,{includeHydrateFallback:c}={}){return Vv(u.map(r=>{let f=i.routes[r.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function Vv(u){return[...new Set(u)]}function Qv(u){let i={},c=Object.keys(u).sort();for(let r of c)i[r]=u[r];return i}function Zv(u,i){let c=new Set;return new Set(i),u.reduce((r,f)=>{let d=JSON.stringify(Qv(f));return c.has(d)||(c.add(d),r.push({key:d,link:f})),r},[])}function Mm(){let u=T.useContext(Zl);return Tr(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Kv(){let u=T.useContext(Ou);return Tr(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Ar=T.createContext(void 0);Ar.displayName="FrameworkContext";function Dm(){let u=T.useContext(Ar);return Tr(u,"You must render this element inside a <HydratedRouter> element"),u}function Jv(u,i){let c=T.useContext(Ar),[r,f]=T.useState(!1),[d,m]=T.useState(!1),{onFocus:b,onBlur:p,onMouseEnter:y,onMouseLeave:E,onTouchStart:S}=i,C=T.useRef(null);T.useEffect(()=>{if(u==="render"&&m(!0),u==="viewport"){let k=L=>{L.forEach(q=>{m(q.isIntersecting)})},Y=new IntersectionObserver(k,{threshold:.5});return C.current&&Y.observe(C.current),()=>{Y.disconnect()}}},[u]),T.useEffect(()=>{if(r){let k=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(k)}}},[r]);let z=()=>{f(!0)},H=()=>{f(!1),m(!1)};return c?u!=="intent"?[d,C,{}]:[d,C,{onFocus:Ga(b,z),onBlur:Ga(p,H),onMouseEnter:Ga(y,z),onMouseLeave:Ga(E,H),onTouchStart:Ga(S,z)}]:[!1,C,{}]}function Ga(u,i){return c=>{u&&u(c),c.defaultPrevented||i(c)}}function $v({page:u,...i}){let{router:c}=Mm(),r=T.useMemo(()=>Sm(c.routes,u,c.basename),[c.routes,u,c.basename]);return r?T.createElement(Fv,{page:u,matches:r,...i}):null}function Wv(u){let{manifest:i,routeModules:c}=Dm(),[r,f]=T.useState([]);return T.useEffect(()=>{let d=!1;return Xv(u,i,c).then(m=>{d||f(m)}),()=>{d=!0}},[u,i,c]),r}function Fv({page:u,matches:i,...c}){let r=il(),{manifest:f,routeModules:d}=Dm(),{basename:m}=Mm(),{loaderData:b,matches:p}=Kv(),y=T.useMemo(()=>im(u,i,p,f,r,"data"),[u,i,p,f,r]),E=T.useMemo(()=>im(u,i,p,f,r,"assets"),[u,i,p,f,r]),S=T.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let H=new Set,k=!1;if(i.forEach(L=>{let q=f.routes[L.route.id];!q||!q.hasLoader||(!y.some(Q=>Q.route.id===L.route.id)&&L.route.id in b&&d[L.route.id]?.shouldRevalidate||q.hasClientLoader?k=!0:H.add(L.route.id))}),H.size===0)return[];let Y=qv(u,m,"data");return k&&H.size>0&&Y.searchParams.set("_routes",i.filter(L=>H.has(L.route.id)).map(L=>L.route.id).join(",")),[Y.pathname+Y.search]},[m,b,r,f,y,i,u,d]),C=T.useMemo(()=>Gv(E,f),[E,f]),z=Wv(E);return T.createElement(T.Fragment,null,S.map(H=>T.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...c})),C.map(H=>T.createElement("link",{key:H,rel:"modulepreload",href:H,...c})),z.map(({key:H,link:k})=>T.createElement("link",{key:H,nonce:c.nonce,...k})))}function Pv(...u){return i=>{u.forEach(c=>{typeof c=="function"?c(i):c!=null&&(c.current=i)})}}var wm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wm&&(window.__reactRouterVersion="7.9.6")}catch{}function Iv({basename:u,children:i,window:c}){let r=T.useRef();r.current==null&&(r.current=q0({window:c,v5Compat:!0}));let f=r.current,[d,m]=T.useState({action:f.action,location:f.location}),b=T.useCallback(p=>{T.startTransition(()=>m(p))},[m]);return T.useLayoutEffect(()=>f.listen(b),[f,b]),T.createElement(Ov,{basename:u,children:i,location:d.location,navigationType:d.action,navigator:f})}var jm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Um=T.forwardRef(function({onClick:i,discover:c="render",prefetch:r="none",relative:f,reloadDocument:d,replace:m,state:b,target:p,to:y,preventScrollReset:E,viewTransition:S,...C},z){let{basename:H}=T.useContext(Yt),k=typeof y=="string"&&jm.test(y),Y,L=!1;if(typeof y=="string"&&k&&(Y=y,wm))try{let xe=new URL(window.location.href),Ue=y.startsWith("//")?new URL(xe.protocol+y):new URL(y),Xe=rn(Ue.pathname,H);Ue.origin===xe.origin&&Xe!=null?y=Xe+Ue.search+Ue.hash:L=!0}catch{wt(!1,`<Link to="${y}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let q=dv(y,{relative:f}),[Q,P,ye]=Jv(r,C),Re=lg(y,{replace:m,state:b,target:p,preventScrollReset:E,relative:f,viewTransition:S});function $(xe){i&&i(xe),xe.defaultPrevented||Re(xe)}let Te=T.createElement("a",{...C,...ye,href:Y||q,onClick:L||d?i:$,ref:Pv(z,P),target:p,"data-discover":!k&&c==="render"?"true":void 0});return Q&&!k?T.createElement(T.Fragment,null,Te,T.createElement($v,{page:q})):Te});Um.displayName="Link";var eg=T.forwardRef(function({"aria-current":i="page",caseSensitive:c=!1,className:r="",end:f=!1,style:d,to:m,viewTransition:b,children:p,...y},E){let S=Ia(m,{relative:y.relative}),C=il(),z=T.useContext(Ou),{navigator:H,basename:k}=T.useContext(Yt),Y=z!=null&&cg(S)&&b===!0,L=H.encodeLocation?H.encodeLocation(S).pathname:S.pathname,q=C.pathname,Q=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;c||(q=q.toLowerCase(),Q=Q?Q.toLowerCase():null,L=L.toLowerCase()),Q&&k&&(Q=rn(Q,k)||Q);const P=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let ye=q===L||!f&&q.startsWith(L)&&q.charAt(P)==="/",Re=Q!=null&&(Q===L||!f&&Q.startsWith(L)&&Q.charAt(L.length)==="/"),$={isActive:ye,isPending:Re,isTransitioning:Y},Te=ye?i:void 0,xe;typeof r=="function"?xe=r($):xe=[r,ye?"active":null,Re?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let Ue=typeof d=="function"?d($):d;return T.createElement(Um,{...y,"aria-current":Te,className:xe,ref:E,style:Ue,to:m,viewTransition:b},typeof p=="function"?p($):p)});eg.displayName="NavLink";var tg=T.forwardRef(({discover:u="render",fetcherKey:i,navigate:c,reloadDocument:r,replace:f,state:d,method:m=xu,action:b,onSubmit:p,relative:y,preventScrollReset:E,viewTransition:S,...C},z)=>{let H=ug(),k=sg(b,{relative:y}),Y=m.toLowerCase()==="get"?"get":"post",L=typeof b=="string"&&jm.test(b),q=Q=>{if(p&&p(Q),Q.defaultPrevented)return;Q.preventDefault();let P=Q.nativeEvent.submitter,ye=P?.getAttribute("formmethod")||m;H(P||Q.currentTarget,{fetcherKey:i,method:ye,navigate:c,replace:f,state:d,relative:y,preventScrollReset:E,viewTransition:S})};return T.createElement("form",{ref:z,method:Y,action:k,onSubmit:r?p:q,...C,"data-discover":!L&&u==="render"?"true":void 0})});tg.displayName="Form";function ng(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bm(u){let i=T.useContext(Zl);return Oe(i,ng(u)),i}function lg(u,{target:i,replace:c,state:r,preventScrollReset:f,relative:d,viewTransition:m}={}){let b=mv(),p=il(),y=Ia(u,{relative:d});return T.useCallback(E=>{if(Uv(E,i)){E.preventDefault();let S=c!==void 0?c:Wa(p)===Wa(y);b(u,{replace:S,state:r,preventScrollReset:f,relative:d,viewTransition:m})}},[p,b,y,c,r,i,u,f,d,m])}var ag=0,ig=()=>`__${String(++ag)}__`;function ug(){let{router:u}=Bm("useSubmit"),{basename:i}=T.useContext(Yt),c=Av();return T.useCallback(async(r,f={})=>{let{action:d,method:m,encType:b,formData:p,body:y}=Hv(r,i);if(f.navigate===!1){let E=f.fetcherKey||ig();await u.fetch(E,c,f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:y,formMethod:f.method||m,formEncType:f.encType||b,flushSync:f.flushSync})}else await u.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:y,formMethod:f.method||m,formEncType:f.encType||b,replace:f.replace,state:f.state,fromRouteId:c,flushSync:f.flushSync,viewTransition:f.viewTransition})},[u,i,c])}function sg(u,{relative:i}={}){let{basename:c}=T.useContext(Yt),r=T.useContext(on);Oe(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),d={...Ia(u||".",{relative:i})},m=il();if(u==null){d.search=m.search;let b=new URLSearchParams(d.search),p=b.getAll("index");if(p.some(E=>E==="")){b.delete("index"),p.filter(S=>S).forEach(S=>b.append("index",S));let E=b.toString();d.search=E?`?${E}`:""}}return(!u||u===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(d.pathname=d.pathname==="/"?c:cn([c,d.pathname])),Wa(d)}function cg(u,{relative:i}={}){let c=T.useContext(Cm);Oe(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Bm("useViewTransitionState"),f=Ia(u,{relative:i});if(!c.isTransitioning)return!1;let d=rn(c.currentLocation.pathname,r)||c.currentLocation.pathname,m=rn(c.nextLocation.pathname,r)||c.nextLocation.pathname;return Ru(f.pathname,m)!=null||Ru(f.pathname,d)!=null}const qt=Object.create(null);qt.open="0";qt.close="1";qt.ping="2";qt.pong="3";qt.message="4";qt.upgrade="5";qt.noop="6";const Eu=Object.create(null);Object.keys(qt).forEach(u=>{Eu[qt[u]]=u});const pr={type:"error",data:"parser error"},Lm=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Hm=typeof ArrayBuffer=="function",qm=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer,Cr=({type:u,data:i},c,r)=>Lm&&i instanceof Blob?c?r(i):um(i,r):Hm&&(i instanceof ArrayBuffer||qm(i))?c?r(i):um(new Blob([i]),r):r(qt[u]+(i||"")),um=(u,i)=>{const c=new FileReader;return c.onload=function(){const r=c.result.split(",")[1];i("b"+(r||""))},c.readAsDataURL(u)};function sm(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}let sr;function rg(u,i){if(Lm&&u.data instanceof Blob)return u.data.arrayBuffer().then(sm).then(i);if(Hm&&(u.data instanceof ArrayBuffer||qm(u.data)))return i(sm(u.data));Cr(u,!1,c=>{sr||(sr=new TextEncoder),i(sr.encode(c))})}const cm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let u=0;u<cm.length;u++)$a[cm.charCodeAt(u)]=u;const og=u=>{let i=u.length*.75,c=u.length,r,f=0,d,m,b,p;u[u.length-1]==="="&&(i--,u[u.length-2]==="="&&i--);const y=new ArrayBuffer(i),E=new Uint8Array(y);for(r=0;r<c;r+=4)d=$a[u.charCodeAt(r)],m=$a[u.charCodeAt(r+1)],b=$a[u.charCodeAt(r+2)],p=$a[u.charCodeAt(r+3)],E[f++]=d<<2|m>>4,E[f++]=(m&15)<<4|b>>2,E[f++]=(b&3)<<6|p&63;return y},fg=typeof ArrayBuffer=="function",Rr=(u,i)=>{if(typeof u!="string")return{type:"message",data:Ym(u,i)};const c=u.charAt(0);return c==="b"?{type:"message",data:hg(u.substring(1),i)}:Eu[c]?u.length>1?{type:Eu[c],data:u.substring(1)}:{type:Eu[c]}:pr},hg=(u,i)=>{if(fg){const c=og(u);return Ym(c,i)}else return{base64:!0,data:u}},Ym=(u,i)=>{switch(i){case"blob":return u instanceof Blob?u:new Blob([u]);case"arraybuffer":default:return u instanceof ArrayBuffer?u:u.buffer}},km="",dg=(u,i)=>{const c=u.length,r=new Array(c);let f=0;u.forEach((d,m)=>{Cr(d,!1,b=>{r[m]=b,++f===c&&i(r.join(km))})})},mg=(u,i)=>{const c=u.split(km),r=[];for(let f=0;f<c.length;f++){const d=Rr(c[f],i);if(r.push(d),d.type==="error")break}return r};function pg(){return new TransformStream({transform(u,i){rg(u,c=>{const r=c.length;let f;if(r<126)f=new Uint8Array(1),new DataView(f.buffer).setUint8(0,r);else if(r<65536){f=new Uint8Array(3);const d=new DataView(f.buffer);d.setUint8(0,126),d.setUint16(1,r)}else{f=new Uint8Array(9);const d=new DataView(f.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(r))}u.data&&typeof u.data!="string"&&(f[0]|=128),i.enqueue(f),i.enqueue(c)})}})}let cr;function bu(u){return u.reduce((i,c)=>i+c.length,0)}function Su(u,i){if(u[0].length===i)return u.shift();const c=new Uint8Array(i);let r=0;for(let f=0;f<i;f++)c[f]=u[0][r++],r===u[0].length&&(u.shift(),r=0);return u.length&&r<u[0].length&&(u[0]=u[0].slice(r)),c}function yg(u,i){cr||(cr=new TextDecoder);const c=[];let r=0,f=-1,d=!1;return new TransformStream({transform(m,b){for(c.push(m);;){if(r===0){if(bu(c)<1)break;const p=Su(c,1);d=(p[0]&128)===128,f=p[0]&127,f<126?r=3:f===126?r=1:r=2}else if(r===1){if(bu(c)<2)break;const p=Su(c,2);f=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),r=3}else if(r===2){if(bu(c)<8)break;const p=Su(c,8),y=new DataView(p.buffer,p.byteOffset,p.length),E=y.getUint32(0);if(E>Math.pow(2,21)-1){b.enqueue(pr);break}f=E*Math.pow(2,32)+y.getUint32(4),r=3}else{if(bu(c)<f)break;const p=Su(c,f);b.enqueue(Rr(d?p:cr.decode(p),i)),r=0}if(f===0||f>u){b.enqueue(pr);break}}}})}const Xm=4;function Ye(u){if(u)return vg(u)}function vg(u){for(var i in Ye.prototype)u[i]=Ye.prototype[i];return u}Ye.prototype.on=Ye.prototype.addEventListener=function(u,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(i),this};Ye.prototype.once=function(u,i){function c(){this.off(u,c),i.apply(this,arguments)}return c.fn=i,this.on(u,c),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(u,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var c=this._callbacks["$"+u];if(!c)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var r,f=0;f<c.length;f++)if(r=c[f],r===i||r.fn===i){c.splice(f,1);break}return c.length===0&&delete this._callbacks["$"+u],this};Ye.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),c=this._callbacks["$"+u],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(c){c=c.slice(0);for(var r=0,f=c.length;r<f;++r)c[r].apply(this,i)}return this};Ye.prototype.emitReserved=Ye.prototype.emit;Ye.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]};Ye.prototype.hasListeners=function(u){return!!this.listeners(u).length};const Mu=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,c)=>c(i,0),Rt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),gg="arraybuffer";function Gm(u,...i){return i.reduce((c,r)=>(u.hasOwnProperty(r)&&(c[r]=u[r]),c),{})}const bg=Rt.setTimeout,Sg=Rt.clearTimeout;function Du(u,i){i.useNativeTimers?(u.setTimeoutFn=bg.bind(Rt),u.clearTimeoutFn=Sg.bind(Rt)):(u.setTimeoutFn=Rt.setTimeout.bind(Rt),u.clearTimeoutFn=Rt.clearTimeout.bind(Rt))}const xg=1.33;function _g(u){return typeof u=="string"?Eg(u):Math.ceil((u.byteLength||u.size)*xg)}function Eg(u){let i=0,c=0;for(let r=0,f=u.length;r<f;r++)i=u.charCodeAt(r),i<128?c+=1:i<2048?c+=2:i<55296||i>=57344?c+=3:(r++,c+=4);return c}function Vm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Tg(u){let i="";for(let c in u)u.hasOwnProperty(c)&&(i.length&&(i+="&"),i+=encodeURIComponent(c)+"="+encodeURIComponent(u[c]));return i}function Ag(u){let i={},c=u.split("&");for(let r=0,f=c.length;r<f;r++){let d=c[r].split("=");i[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return i}class Cg extends Error{constructor(i,c,r){super(i),this.description=c,this.context=r,this.type="TransportError"}}class Nr extends Ye{constructor(i){super(),this.writable=!1,Du(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,c,r){return super.emitReserved("error",new Cg(i,c,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const c=Rr(i,this.socket.binaryType);this.onPacket(c)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,c={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(c)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const c=Tg(i);return c.length?"?"+c:""}}class Rg extends Nr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const c=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||c()})),this.writable||(r++,this.once("drain",function(){--r||c()}))}else c()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const c=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};mg(i,this.socket.binaryType).forEach(c),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,dg(i,c=>{this.doWrite(c,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",c=this.query||{};return this.opts.timestampRequests!==!1&&(c[this.opts.timestampParam]=Vm()),!this.supportsBinary&&!c.sid&&(c.b64=1),this.createUri(i,c)}}let Qm=!1;try{Qm=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ng=Qm;function Og(){}class zg extends Rg{constructor(i){if(super(i),typeof location<"u"){const c=location.protocol==="https:";let r=location.port;r||(r=c?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||r!==i.port}}doWrite(i,c){const r=this.request({method:"POST",data:i});r.on("success",c),r.on("error",(f,d)=>{this.onError("xhr post error",f,d)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(c,r)=>{this.onError("xhr poll error",c,r)}),this.pollXhr=i}}class Ht extends Ye{constructor(i,c,r){super(),this.createRequest=i,Du(this,r),this._opts=r,this._method=r.method||"GET",this._uri=c,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var i;const c=Gm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");c.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(c);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let f in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(f)&&r.setRequestHeader(f,this._opts.extraHeaders[f])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var f;r.readyState===3&&((f=this._opts.cookieJar)===null||f===void 0||f.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(f){this.setTimeoutFn(()=>{this._onError(f)},0);return}typeof document<"u"&&(this._index=Ht.requestsCount++,Ht.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Og,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ht.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ht.requestsCount=0;Ht.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rm);else if(typeof addEventListener=="function"){const u="onpagehide"in Rt?"pagehide":"unload";addEventListener(u,rm,!1)}}function rm(){for(let u in Ht.requests)Ht.requests.hasOwnProperty(u)&&Ht.requests[u].abort()}const Mg=(function(){const u=Zm({xdomain:!1});return u&&u.responseType!==null})();class Dg extends zg{constructor(i){super(i);const c=i&&i.forceBase64;this.supportsBinary=Mg&&!c}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Ht(Zm,this.uri(),i)}}function Zm(u){const i=u.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Ng))return new XMLHttpRequest}catch{}if(!i)try{return new Rt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Km=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class wg extends Nr{get name(){return"websocket"}doOpen(){const i=this.uri(),c=this.opts.protocols,r=Km?{}:Gm(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,c,r)}catch(f){return this.emitReserved("error",f)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let c=0;c<i.length;c++){const r=i[c],f=c===i.length-1;Cr(r,this.supportsBinary,d=>{try{this.doWrite(r,d)}catch{}f&&Mu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",c=this.query||{};return this.opts.timestampRequests&&(c[this.opts.timestampParam]=Vm()),this.supportsBinary||(c.b64=1),this.createUri(i,c)}}const rr=Rt.WebSocket||Rt.MozWebSocket;class jg extends wg{createSocket(i,c,r){return Km?new rr(i,c,r):c?new rr(i,c):new rr(i)}doWrite(i,c){this.ws.send(c)}}class Ug extends Nr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const c=yg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=i.readable.pipeThrough(c).getReader(),f=pg();f.readable.pipeTo(i.writable),this._writer=f.writable.getWriter();const d=()=>{r.read().then(({done:b,value:p})=>{b||(this.onPacket(p),d())}).catch(b=>{})};d();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this._writer.write(m).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let c=0;c<i.length;c++){const r=i[c],f=c===i.length-1;this._writer.write(r).then(()=>{f&&Mu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const Bg={websocket:jg,webtransport:Ug,polling:Dg},Lg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Hg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yr(u){if(u.length>8e3)throw"URI too long";const i=u,c=u.indexOf("["),r=u.indexOf("]");c!=-1&&r!=-1&&(u=u.substring(0,c)+u.substring(c,r).replace(/:/g,";")+u.substring(r,u.length));let f=Lg.exec(u||""),d={},m=14;for(;m--;)d[Hg[m]]=f[m]||"";return c!=-1&&r!=-1&&(d.source=i,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=qg(d,d.path),d.queryKey=Yg(d,d.query),d}function qg(u,i){const c=/\/{2,9}/g,r=i.replace(c,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&r.splice(0,1),i.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yg(u,i){const c={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,f,d){f&&(c[f]=d)}),c}const vr=typeof addEventListener=="function"&&typeof removeEventListener=="function",Tu=[];vr&&addEventListener("offline",()=>{Tu.forEach(u=>u())},!1);class Ln extends Ye{constructor(i,c){if(super(),this.binaryType=gg,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(c=i,i=null),i){const r=yr(i);c.hostname=r.host,c.secure=r.protocol==="https"||r.protocol==="wss",c.port=r.port,r.query&&(c.query=r.query)}else c.host&&(c.hostname=yr(c.host).host);Du(this,c),this.secure=c.secure!=null?c.secure:typeof location<"u"&&location.protocol==="https:",c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.hostname=c.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=c.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},c.transports.forEach(r=>{const f=r.prototype.name;this.transports.push(f),this._transportsByName[f]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},c),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ag(this.opts.query)),vr&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const c=Object.assign({},this.opts.query);c.EIO=Xm,c.transport=i,this.id&&(c.sid=this.id);const r=Object.assign({},this.opts,{query:c,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Ln.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const c=this.createTransport(i);c.open(),this.setTransport(c)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",c=>this._onClose("transport close",c))}onOpen(){this.readyState="open",Ln.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const c=new Error("server error");c.code=i.data,this._onError(c);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let c=1;for(let r=0;r<this.writeBuffer.length;r++){const f=this.writeBuffer[r].data;if(f&&(c+=_g(f)),r>0&&c>this._maxPayload)return this.writeBuffer.slice(0,r);c+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Mu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,c,r){return this._sendPacket("message",i,c,r),this}send(i,c,r){return this._sendPacket("message",i,c,r),this}_sendPacket(i,c,r,f){if(typeof c=="function"&&(f=c,c=void 0),typeof r=="function"&&(f=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const d={type:i,data:c,options:r};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),f&&this.once("flush",f),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),i()},r=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():i()}):this.upgrading?r():i()),this}_onError(i){if(Ln.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,c){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),vr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Tu.indexOf(this._offlineEventListener);r!==-1&&Tu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,c),this.writeBuffer=[],this._prevBufferLen=0}}}Ln.protocol=Xm;class kg extends Ln{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let c=this.createTransport(i),r=!1;Ln.priorWebsocketSuccess=!1;const f=()=>{r||(c.send([{type:"ping",data:"probe"}]),c.once("packet",S=>{if(!r)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;Ln.priorWebsocketSuccess=c.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(E(),this.setTransport(c),c.send([{type:"upgrade"}]),this.emitReserved("upgrade",c),c=null,this.upgrading=!1,this.flush())})}else{const C=new Error("probe error");C.transport=c.name,this.emitReserved("upgradeError",C)}}))};function d(){r||(r=!0,E(),c.close(),c=null)}const m=S=>{const C=new Error("probe error: "+S);C.transport=c.name,d(),this.emitReserved("upgradeError",C)};function b(){m("transport closed")}function p(){m("socket closed")}function y(S){c&&S.name!==c.name&&d()}const E=()=>{c.removeListener("open",f),c.removeListener("error",m),c.removeListener("close",b),this.off("close",p),this.off("upgrading",y)};c.once("open",f),c.once("error",m),c.once("close",b),this.once("close",p),this.once("upgrading",y),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{r||c.open()},200):c.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const c=[];for(let r=0;r<i.length;r++)~this.transports.indexOf(i[r])&&c.push(i[r]);return c}}let Xg=class extends kg{constructor(i,c={}){const r=typeof i=="object"?i:c;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(f=>Bg[f]).filter(f=>!!f)),super(i,r)}};function Gg(u,i="",c){let r=u;c=c||typeof location<"u"&&location,u==null&&(u=c.protocol+"//"+c.host),typeof u=="string"&&(u.charAt(0)==="/"&&(u.charAt(1)==="/"?u=c.protocol+u:u=c.host+u),/^(https?|wss?):\/\//.test(u)||(typeof c<"u"?u=c.protocol+"//"+u:u="https://"+u),r=yr(u)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const d=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+d+":"+r.port+i,r.href=r.protocol+"://"+d+(c&&c.port===r.port?"":":"+r.port),r}const Vg=typeof ArrayBuffer=="function",Qg=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,Jm=Object.prototype.toString,Zg=typeof Blob=="function"||typeof Blob<"u"&&Jm.call(Blob)==="[object BlobConstructor]",Kg=typeof File=="function"||typeof File<"u"&&Jm.call(File)==="[object FileConstructor]";function Or(u){return Vg&&(u instanceof ArrayBuffer||Qg(u))||Zg&&u instanceof Blob||Kg&&u instanceof File}function Au(u,i){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let c=0,r=u.length;c<r;c++)if(Au(u[c]))return!0;return!1}if(Or(u))return!0;if(u.toJSON&&typeof u.toJSON=="function"&&arguments.length===1)return Au(u.toJSON(),!0);for(const c in u)if(Object.prototype.hasOwnProperty.call(u,c)&&Au(u[c]))return!0;return!1}function Jg(u){const i=[],c=u.data,r=u;return r.data=gr(c,i),r.attachments=i.length,{packet:r,buffers:i}}function gr(u,i){if(!u)return u;if(Or(u)){const c={_placeholder:!0,num:i.length};return i.push(u),c}else if(Array.isArray(u)){const c=new Array(u.length);for(let r=0;r<u.length;r++)c[r]=gr(u[r],i);return c}else if(typeof u=="object"&&!(u instanceof Date)){const c={};for(const r in u)Object.prototype.hasOwnProperty.call(u,r)&&(c[r]=gr(u[r],i));return c}return u}function $g(u,i){return u.data=br(u.data,i),delete u.attachments,u}function br(u,i){if(!u)return u;if(u&&u._placeholder===!0){if(typeof u.num=="number"&&u.num>=0&&u.num<i.length)return i[u.num];throw new Error("illegal attachments")}else if(Array.isArray(u))for(let c=0;c<u.length;c++)u[c]=br(u[c],i);else if(typeof u=="object")for(const c in u)Object.prototype.hasOwnProperty.call(u,c)&&(u[c]=br(u[c],i));return u}const Wg=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Fg=5;var re;(function(u){u[u.CONNECT=0]="CONNECT",u[u.DISCONNECT=1]="DISCONNECT",u[u.EVENT=2]="EVENT",u[u.ACK=3]="ACK",u[u.CONNECT_ERROR=4]="CONNECT_ERROR",u[u.BINARY_EVENT=5]="BINARY_EVENT",u[u.BINARY_ACK=6]="BINARY_ACK"})(re||(re={}));class Pg{constructor(i){this.replacer=i}encode(i){return(i.type===re.EVENT||i.type===re.ACK)&&Au(i)?this.encodeAsBinary({type:i.type===re.EVENT?re.BINARY_EVENT:re.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let c=""+i.type;return(i.type===re.BINARY_EVENT||i.type===re.BINARY_ACK)&&(c+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(c+=i.nsp+","),i.id!=null&&(c+=i.id),i.data!=null&&(c+=JSON.stringify(i.data,this.replacer)),c}encodeAsBinary(i){const c=Jg(i),r=this.encodeAsString(c.packet),f=c.buffers;return f.unshift(r),f}}function om(u){return Object.prototype.toString.call(u)==="[object Object]"}class zr extends Ye{constructor(i){super(),this.reviver=i}add(i){let c;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");c=this.decodeString(i);const r=c.type===re.BINARY_EVENT;r||c.type===re.BINARY_ACK?(c.type=r?re.EVENT:re.ACK,this.reconstructor=new Ig(c),c.attachments===0&&super.emitReserved("decoded",c)):super.emitReserved("decoded",c)}else if(Or(i)||i.base64)if(this.reconstructor)c=this.reconstructor.takeBinaryData(i),c&&(this.reconstructor=null,super.emitReserved("decoded",c));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let c=0;const r={type:Number(i.charAt(0))};if(re[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===re.BINARY_EVENT||r.type===re.BINARY_ACK){const d=c+1;for(;i.charAt(++c)!=="-"&&c!=i.length;);const m=i.substring(d,c);if(m!=Number(m)||i.charAt(c)!=="-")throw new Error("Illegal attachments");r.attachments=Number(m)}if(i.charAt(c+1)==="/"){const d=c+1;for(;++c&&!(i.charAt(c)===","||c===i.length););r.nsp=i.substring(d,c)}else r.nsp="/";const f=i.charAt(c+1);if(f!==""&&Number(f)==f){const d=c+1;for(;++c;){const m=i.charAt(c);if(m==null||Number(m)!=m){--c;break}if(c===i.length)break}r.id=Number(i.substring(d,c+1))}if(i.charAt(++c)){const d=this.tryParse(i.substr(c));if(zr.isPayloadValid(r.type,d))r.data=d;else throw new Error("invalid payload")}return r}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,c){switch(i){case re.CONNECT:return om(c);case re.DISCONNECT:return c===void 0;case re.CONNECT_ERROR:return typeof c=="string"||om(c);case re.EVENT:case re.BINARY_EVENT:return Array.isArray(c)&&(typeof c[0]=="number"||typeof c[0]=="string"&&Wg.indexOf(c[0])===-1);case re.ACK:case re.BINARY_ACK:return Array.isArray(c)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ig{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const c=$g(this.reconPack,this.buffers);return this.finishedReconstruction(),c}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const eb=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zr,Encoder:Pg,get PacketType(){return re},protocol:Fg},Symbol.toStringTag,{value:"Module"}));function Dt(u,i,c){return u.on(i,c),function(){u.off(i,c)}}const tb=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $m extends Ye{constructor(i,c,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=c,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Dt(i,"open",this.onopen.bind(this)),Dt(i,"packet",this.onpacket.bind(this)),Dt(i,"error",this.onerror.bind(this)),Dt(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...c){var r,f,d;if(tb.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(c.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(c),this;const m={type:re.EVENT,data:c};if(m.options={},m.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const E=this.ids++,S=c.pop();this._registerAckCallback(E,S),m.id=E}const b=(f=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||f===void 0?void 0:f.writable,p=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!b||(p?(this.notifyOutgoingListeners(m),this.packet(m)):this.sendBuffer.push(m)),this.flags={},this}_registerAckCallback(i,c){var r;const f=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(f===void 0){this.acks[i]=c;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===i&&this.sendBuffer.splice(b,1);c.call(this,new Error("operation has timed out"))},f),m=(...b)=>{this.io.clearTimeoutFn(d),c.apply(this,b)};m.withError=!0,this.acks[i]=m}emitWithAck(i,...c){return new Promise((r,f)=>{const d=(m,b)=>m?f(m):r(b);d.withError=!0,c.push(d),this.emit(i,...c)})}_addToQueue(i){let c;typeof i[i.length-1]=="function"&&(c=i.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((f,...d)=>r!==this._queue[0]?void 0:(f!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),c&&c(f)):(this._queue.shift(),c&&c(null,...d)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const c=this._queue[0];c.pending&&!i||(c.pending=!0,c.tryCount++,this.flags=c.flags,this.emit.apply(this,c.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:re.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,c){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,c),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(r=>String(r.id)===i)){const r=this.acks[i];delete this.acks[i],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case re.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case re.EVENT:case re.BINARY_EVENT:this.onevent(i);break;case re.ACK:case re.BINARY_ACK:this.onack(i);break;case re.DISCONNECT:this.ondisconnect();break;case re.CONNECT_ERROR:this.destroy();const r=new Error(i.data.message);r.data=i.data.data,this.emitReserved("connect_error",r);break}}onevent(i){const c=i.data||[];i.id!=null&&c.push(this.ack(i.id)),this.connected?this.emitEvent(c):this.receiveBuffer.push(Object.freeze(c))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const c=this._anyListeners.slice();for(const r of c)r.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const c=this;let r=!1;return function(...f){r||(r=!0,c.packet({type:re.ACK,id:i,data:f}))}}onack(i){const c=this.acks[i.id];typeof c=="function"&&(delete this.acks[i.id],c.withError&&i.data.unshift(null),c.apply(this,i.data))}onconnect(i,c){this.id=i,this.recovered=c&&this._pid===c,this._pid=c,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:re.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const c=this._anyListeners;for(let r=0;r<c.length;r++)if(i===c[r])return c.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const c=this._anyOutgoingListeners;for(let r=0;r<c.length;r++)if(i===c[r])return c.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const c=this._anyOutgoingListeners.slice();for(const r of c)r.apply(this,i.data)}}}function Kl(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter>0&&u.jitter<=1?u.jitter:0,this.attempts=0}Kl.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),c=Math.floor(i*this.jitter*u);u=(Math.floor(i*10)&1)==0?u-c:u+c}return Math.min(u,this.max)|0};Kl.prototype.reset=function(){this.attempts=0};Kl.prototype.setMin=function(u){this.ms=u};Kl.prototype.setMax=function(u){this.max=u};Kl.prototype.setJitter=function(u){this.jitter=u};class Sr extends Ye{constructor(i,c){var r;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(c=i,i=void 0),c=c||{},c.path=c.path||"/socket.io",this.opts=c,Du(this,c),this.reconnection(c.reconnection!==!1),this.reconnectionAttempts(c.reconnectionAttempts||1/0),this.reconnectionDelay(c.reconnectionDelay||1e3),this.reconnectionDelayMax(c.reconnectionDelayMax||5e3),this.randomizationFactor((r=c.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Kl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(c.timeout==null?2e4:c.timeout),this._readyState="closed",this.uri=i;const f=c.parser||eb;this.encoder=new f.Encoder,this.decoder=new f.Decoder,this._autoConnect=c.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var c;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(c=this.backoff)===null||c===void 0||c.setMin(i),this)}randomizationFactor(i){var c;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(c=this.backoff)===null||c===void 0||c.setJitter(i),this)}reconnectionDelayMax(i){var c;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(c=this.backoff)===null||c===void 0||c.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new Xg(this.uri,this.opts);const c=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const f=Dt(c,"open",function(){r.onopen(),i&&i()}),d=b=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",b),i?i(b):this.maybeReconnectOnOpen()},m=Dt(c,"error",d);if(this._timeout!==!1){const b=this._timeout,p=this.setTimeoutFn(()=>{f(),d(new Error("timeout")),c.close()},b);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(f),this.subs.push(m),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Dt(i,"ping",this.onping.bind(this)),Dt(i,"data",this.ondata.bind(this)),Dt(i,"error",this.onerror.bind(this)),Dt(i,"close",this.onclose.bind(this)),Dt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(c){this.onclose("parse error",c)}}ondecoded(i){Mu(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,c){let r=this.nsps[i];return r?this._autoConnect&&!r.active&&r.connect():(r=new $m(this,i,c),this.nsps[i]=r),r}_destroy(i){const c=Object.keys(this.nsps);for(const r of c)if(this.nsps[r].active)return;this._close()}_packet(i){const c=this.encoder.encode(i);for(let r=0;r<c.length;r++)this.engine.write(c[r],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,c){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,c),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const c=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(f=>{f?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",f)):i.onreconnect()}))},c);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Va={};function Cu(u,i){typeof u=="object"&&(i=u,u=void 0),i=i||{};const c=Gg(u,i.path||"/socket.io"),r=c.source,f=c.id,d=c.path,m=Va[f]&&d in Va[f].nsps,b=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let p;return b?p=new Sr(r,i):(Va[f]||(Va[f]=new Sr(r,i)),p=Va[f]),c.query&&!i.query&&(i.query=c.queryKey),p.socket(c.path,i)}Object.assign(Cu,{Manager:Sr,Socket:$m,io:Cu,connect:Cu});const Wm=window.location.origin;console.info("[socket] connecting to",Wm);const Mr=Cu(Wm,{transports:["polling","websocket"],timeout:15e3});Mr.on("connect_error",u=>console.error("connect_error",u.code,u.message,u.data));const Fm=T.createContext(Mr),nb=({children:u})=>v.jsx(Fm.Provider,{value:Mr,children:u}),wu=()=>T.useContext(Fm),Pm=T.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function lb(u){return T.useCallback((i,c={})=>new Promise((r,f)=>{u.emit(i,c,(d={})=>{d.error?f(new Error(d.error)):r(d)})}),[u])}function ab({children:u}){const i=wu(),c=lb(i),[r,f]=T.useState(null),[d,m]=T.useState([]),[b,p]=T.useState([]),[y,E]=T.useState(i.connected);T.useEffect(()=>{const z=()=>E(!0),H=()=>E(!1);return i.on("connect",z),i.on("disconnect",H),()=>{i.off("connect",z),i.off("disconnect",H)}},[i]),T.useEffect(()=>{function z(Y){f(Y)}function H(Y=[]){m(Y)}function k(Y){m(L=>[...L.slice(-199),Y])}return i.on("session:sync",z),i.on("log:init",H),i.on("log:entry",k),i.on("alert:new",(Y={})=>{p(L=>[...L.slice(-49),{...Y,receivedAt:Date.now()}])}),()=>{i.off("session:sync",z),i.off("log:init",H),i.off("log:entry",k),i.off("alert:new")}},[i]);const S=T.useMemo(()=>({login:(z,H)=>c("auth:login",{username:z,password:H}),setRole:z=>c("session:setRole",{role:z}),requestControl:(z,H={})=>c("session:requestControl",{roverId:z,...H}),releaseControl:z=>c("session:releaseControl",{roverId:z}),subscribeAll:()=>c("session:subscribeAll"),lockRover:(z,H)=>c("session:lockRover",{roverId:z,locked:H}),setMode:z=>c("setMode",{mode:z})}),[c]),C=T.useMemo(()=>({connected:y,session:r,logs:d,alerts:b,...S}),[S,b,y,d,r]);return v.jsx(Pm.Provider,{value:C,children:u})}function fn(){return T.useContext(Pm)}const Im=T.createContext({frames:{}});function ib({children:u}){const i=wu(),[c,r]=T.useState({});T.useEffect(()=>{function d({roverId:m,sensors:b={},frame:p={}}){m&&r(y=>({...y,[m]:{roverId:m,sensors:b,raw:p?.data||null,receivedAt:Date.now()}}))}return i.on("sensorFrame",d),()=>{i.off("sensorFrame",d)}},[i]);const f=T.useMemo(()=>({frames:c}),[c]);return v.jsx(Im.Provider,{value:f,children:u})}function ep(){return T.useContext(Im).frames}function Dr(u){const i=ep();return u?i[u]??null:null}function Qa(u,i="--"){return u==null||u===""?i:u}function wr(){const{connected:u,session:i,requestControl:c}=fn(),r=i?.assignment?.roverId,f=Dr(r),d=f?.sensors||{},m=d.voltageMv!=null?`${(d.voltageMv/1e3).toFixed(2)} V`:null,b=d.currentMa!=null?`${d.currentMa} mA`:null,p=d.batteryChargeMah,y=d.batteryCapacityMah,E=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,S=f?.raw?f.raw.length>80?`${f.raw.slice(0,80)}…`:f.raw:null,C=i?.roster??[],z=T.useMemo(()=>i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",[i?.role]),[H,k]=T.useState({});async function Y(L){if(L){k(q=>({...q,[L]:!0}));try{await c(L)}catch(q){alert(q.message)}finally{k(q=>({...q,[L]:!1}))}}}return v.jsxs("section",{className:"rounded-sm bg-[#242a32] p-2 text-base text-slate-100",children:[v.jsxs("div",{className:"text-sm text-slate-400",children:[v.jsx("span",{children:u?"online":"offline"}),v.jsxs("span",{children:[" · role ",i?.role||"unknown"]}),v.jsxs("span",{children:[" · mode ",i?.mode||"--"]}),E&&v.jsxs("span",{children:[" · sensors ",E]})]}),r?f?v.jsxs("div",{className:"mt-2 space-y-1 text-base",children:[v.jsx(Za,{label:"Charge",value:Qa(p!=null&&y!=null?`${p}/${y} mAh`:null)}),v.jsx(Za,{label:"Charging",value:Qa(d.chargingState?.label)}),v.jsx(Za,{label:"OI mode",value:Qa(d.oiMode?.label)}),v.jsx(Za,{label:"Voltage",value:Qa(m)}),v.jsx(Za,{label:"Current",value:Qa(b)})]}):v.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):v.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),S&&v.jsx("pre",{className:"mt-2 overflow-hidden rounded-sm bg-black/60 p-2 text-sm text-lime-300",children:S}),v.jsxs("div",{className:"mt-2",children:[v.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),C.length===0?v.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):v.jsx("ul",{className:"mt-2 space-y-1 text-sm",children:C.map(L=>v.jsxs("li",{className:"flex items-center justify-between gap-1",children:[v.jsxs("div",{children:[v.jsx("p",{className:"text-slate-200",children:L.name}),v.jsxs("p",{className:"text-xs text-slate-500",children:[L.locked?"locked":"free"," · ",L.lastSeen?"seen":"unknown"]})]}),z&&v.jsx("button",{type:"button",onClick:()=>Y(L.id),disabled:H[L.id],className:"rounded-sm bg-black/40 px-2 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:H[L.id]?"...":"request"})]},L.id))})]})]})}function Za({label:u,value:i}){return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-slate-400",children:u}),v.jsx("span",{className:"text-slate-200",children:i})]})}const ub={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Vl={main:[-127,127],side:[-127,127],vacuum:[0,127]},sb=200,cb=u=>new Promise(i=>setTimeout(i,u));function al(u,i,c){return Math.max(i,Math.min(c,u))}function rb(u){const i=u.has("w"),c=u.has("s"),r=u.has("a"),f=u.has("d"),m=u.has("shift")?300:150;let b=0,p=0;return i&&!c?(b+=m,p+=m):c&&!i&&(b-=m,p-=m),r&&!f?(b-=m,p+=m):f&&!r&&(b+=m,p-=m),!i&&!c&&(r||f)&&(b=r?-m:m,p=r?m:-m),{left:al(b,-500,500),right:al(p,-500,500)}}function fm(u){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function ob(u){const i=u.target;if(!i)return!1;const c=i.tagName;return c==="INPUT"||c==="TEXTAREA"||i.isContentEditable||c==="SELECT"&&["w","a","s","d","Shift"].includes(u.key)}function fb(u){const i=String.fromCharCode(...u);if(typeof btoa=="function")return btoa(i);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function hb(){const u=wu(),{session:i}=fn(),c=i?.assignment?.roverId,r=T.useRef(new Set),f=T.useRef({left:0,right:0}),[d,m]=T.useState(()=>({left:0,right:0})),b=T.useCallback((L,q)=>{c&&u.emit("command",{roverId:c,...L},q)},[u,c]),p=T.useCallback(()=>{c&&b({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[b,c]),y=T.useCallback(()=>{if(!c)return;const L=rb(r.current),q=f.current;L.left===q.left&&L.right===q.right||(f.current=L,m(L),b({type:"drive",data:{driveDirect:L}}))},[b,c]),E=T.useCallback(({x:L=0,y:q=0,boost:Q=!1}={})=>{if(!c)return;const P=Q?400:250,ye=fm(q)*P,Re=fm(L)*P,$={left:al(Math.round(ye+Re),-500,500),right:al(Math.round(ye-Re),-500,500)};f.current=$,m($),b({type:"drive",data:{driveDirect:$}})},[b,c]),S=T.useCallback(({main:L=0,side:q=0,vacuum:Q=0}={})=>{if(!c)return;const P={main:al(L,Vl.main[0],Vl.main[1]),side:al(q,Vl.side[0],Vl.side[1]),vacuum:al(Q,Vl.vacuum[0],Vl.vacuum[1])};b({type:"motors",data:{motorPwm:P}})},[b,c]),C=T.useCallback(()=>{c&&(r.current.clear(),f.current={left:0,right:0},m(f.current),S({main:0,side:0,vacuum:0}))},[c,S]),z=T.useCallback(L=>{if(!c)return;const q=ub[L];q&&(b({type:"raw",data:{raw:fb(q)}}),p())},[b,p,c]),H=T.useCallback(async()=>{if(c)for(const L of["start","dock","full"])z(L),await cb(sb)},[c,z]),k=T.useCallback(()=>{z("dock")},[z]),Y=T.useCallback(L=>{c&&S(L)},[c,S]);return T.useEffect(()=>{if(!c){r.current.clear(),f.current={left:0,right:0},m(f.current);return}function L(Q){if(ob(Q))return;const P=Q.key.toLowerCase();["w","a","s","d","shift"].includes(P)&&(r.current.has(P)||(r.current.add(P),y()))}function q(Q){const P=Q.key.toLowerCase();r.current.has(P)&&(r.current.delete(P),y())}return window.addEventListener("keydown",L),window.addEventListener("keyup",q),p(),()=>{window.removeEventListener("keydown",L),window.removeEventListener("keyup",q)}},[c,y,p]),{roverId:c,speeds:d,stopMotors:C,sendOiCommand:z,runStartDockFull:H,seekDock:k,setAuxMotors:Y,driveWithVector:E}}const tp=T.createContext(null);function db({children:u}){const i=hb();return v.jsx(tp.Provider,{value:i,children:u})}function jr(){const u=T.useContext(tp);if(!u)throw new Error("useDriveControl must be used within DriveControlProvider");return u}const mb=[{key:"safe",label:"Safe"},{key:"passive",label:"Passive"},{key:"full",label:"Full"}];function Ur(){const{roverId:u,speeds:i,stopMotors:c,sendOiCommand:r,runStartDockFull:f,seekDock:d}=jr(),m=Dr(u),b=m?.sensors||{},p=(b.oiMode?.label||"").toLowerCase()==="full",y=!!b.chargingSources?.homeBase,E=!!(b.chargingState?.label&&b.chargingState.label.toLowerCase()!=="not charging"),S=m?.receivedAt?new Date(m.receivedAt).toLocaleTimeString():null;return v.jsxs("section",{className:"rounded-sm bg-[#242a32] p-2 text-base text-slate-100",children:[v.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[v.jsx("span",{children:"Drive control"}),v.jsx("span",{children:u?`Rover ${u}`:"unassigned"})]}),v.jsxs("div",{className:"mt-2 space-y-2",children:[v.jsx(hm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:p?"Ready!":"Not Ready!",active:p}],tone:"emerald",onClick:f,disabled:!u,footnote:S?`Sensor ping ${S}`:null}),v.jsx(hm,{title:"Dock and Charge",description:"Line the rover up about a foot from the dock, then trigger an automatic approach.",statuses:[{label:y?"Docked!":"Not Docked!",active:y},{label:E?"Charging!":"Not Charging!",active:E}],tone:"indigo",onClick:d,disabled:!u}),v.jsx(pb,{left:i.left,right:i.right}),v.jsxs("div",{children:[v.jsx("p",{className:"text-sm text-slate-300",children:"Manual OI"}),v.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:mb.map(C=>v.jsx("button",{type:"button",onClick:()=>r(C.key),disabled:!u,className:"rounded-sm bg-black/40 px-2 py-0.5 text-sm text-slate-200 disabled:opacity-30",children:C.label},C.key))})]}),v.jsx("div",{className:"flex flex-wrap gap-1",children:v.jsx("button",{type:"button",onClick:c,disabled:!u,className:"flex-1 rounded-sm bg-red-600/70 px-2 py-1 text-sm text-white disabled:opacity-40",children:"Stop motors"})})]}),v.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Sensor streaming auto-starts after each OI change."})]})}function hm({title:u,description:i,statuses:c,tone:r,onClick:f,disabled:d,footnote:m}){const b=r==="indigo"?"bg-indigo-600":"bg-emerald-600";return v.jsxs("button",{type:"button",onClick:f,disabled:d,className:`w-full rounded-lg ${b} px-3 py-2 text-left text-white disabled:opacity-40`,children:[v.jsx("p",{className:"text-base font-semibold",children:u}),v.jsx("p",{className:"text-sm text-white/90",children:i}),v.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:c.map(p=>v.jsx("span",{className:`rounded-full px-3 py-0.5 text-xs font-semibold ${p.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:p.label},p.label))}),m&&v.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:m})]})}function pb({left:u,right:i}){return v.jsxs("div",{className:"grid grid-cols-2 gap-1 rounded-sm bg-black/40 p-2 text-base",children:[v.jsxs("div",{children:[v.jsx("p",{className:"text-sm text-slate-300",children:"Left"}),v.jsx("p",{className:"font-semibold text-slate-100",children:u})]}),v.jsxs("div",{children:[v.jsx("p",{className:"text-sm text-slate-300",children:"Right"}),v.jsx("p",{className:"font-semibold text-slate-100",children:i})]})]})}const yb=5e3;function vb(u){return u.id?u.id:u.timestamp?`${u.timestamp}-${u.message}`:`${u.title||"alert"}-${u.message}`}function gb(){const{alerts:u}=fn(),[i,c]=T.useState(()=>Date.now()),r=T.useMemo(()=>u.slice(-5).map(d=>({alert:d,key:vb(d)})),[u]);T.useEffect(()=>{if(!r.length)return;const d=setInterval(()=>c(Date.now()),200);return()=>clearInterval(d)},[r.length]);const f=r.map(d=>({...d,age:i-(d.alert.receivedAt??d.alert.timestamp??0)})).filter(d=>d.age<=yb);return f.length?v.jsx("div",{className:"pointer-events-none fixed top-1 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-1",children:f.map(d=>v.jsx(bb,{alert:d.alert},d.key))}):null}function bb({alert:u}){const i=u.color==="error"?"bg-red-500/30 text-red-100":u.color==="warn"?"bg-amber-500/30 text-amber-100":"bg-emerald-500/30 text-emerald-100";return v.jsxs("div",{className:`pointer-events-auto rounded-sm px-2 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${i}`,children:[v.jsx("p",{className:"text-[0.65rem] text-slate-300",children:u.title||"Alert"}),v.jsx("p",{className:"text-sm text-white",children:u.message})]})}const Sb=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function Br(){const{session:u,lockRover:i,setMode:c,requestControl:r}=fn(),f=T.useMemo(()=>u?.roster??[],[u?.roster]),[d,m]=T.useState({}),b=u?.role==="admin"||u?.role==="lockdown"||u?.role==="lockdown-admin",p=u?.mode??"open",y=async(z,H)=>{try{await i(z,H),m(k=>({...k,[z]:H}))}catch(k){alert(k.message)}},E=async z=>{const H=z.target.value;try{await c(H)}catch(k){alert(k.message)}},S=async z=>{try{await r(z,{force:!0})}catch(H){alert(H.message)}},C=T.useMemo(()=>{const z={};return f.forEach(H=>{z[H.id]=d[H.id]??H.locked}),z},[f,d]);return b?v.jsxs("section",{className:"rounded-sm bg-[#242a32] p-2 text-base text-slate-100",children:[v.jsxs("div",{className:"flex items-center justify-between gap-2 text-sm",children:[v.jsx("span",{children:"Admin controls"}),v.jsx("select",{value:p,onChange:E,className:"rounded-sm bg-black/40 px-2 py-1 text-sm text-slate-100",children:Sb.map(z=>v.jsx("option",{value:z.key,children:z.label},z.key))})]}),v.jsx("div",{className:"mt-2 space-y-2 text-sm",children:f.map(z=>v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-sm bg-black/30 px-2 py-2",children:[v.jsxs("div",{children:[v.jsx("p",{className:"text-slate-100",children:z.name}),v.jsx("p",{className:"text-xs text-slate-400",children:C[z.id]?"locked":"unlocked"})]}),v.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[v.jsx("button",{type:"button",onClick:()=>y(z.id,!C[z.id]),className:"rounded-sm bg-black/50 px-2 py-1 text-slate-100",children:C[z.id]?"Unlock":"Lock"}),v.jsx("button",{type:"button",onClick:()=>S(z.id),className:"rounded-sm bg-black/50 px-2 py-1 text-slate-100",children:"Force"})]})]},z.id))})]}):null}var or={},sn={},fr={},dm;function ju(){return dm||(dm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=void 0,(function(i){i.Circle="circle",i.Square="square",i.AxisY="axisY",i.AxisX="axisX"})(u.JoystickShape||(u.JoystickShape={}))})(fr)),fr}var Ka={},mm;function xb(){if(mm)return Ka;mm=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.shapeFactory=void 0;var u=ju(),i=function(c,r){switch(c){case u.JoystickShape.Square:return{borderRadius:Math.sqrt(r)};case u.JoystickShape.Circle:default:return{borderRadius:r}}};return Ka.shapeFactory=i,Ka}var Ja={},pm;function _b(){if(pm)return Ja;pm=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.shapeBoundsFactory=void 0;var u=ju(),i=function(r,f,d,m,b,p,y,E,S){switch(r){case u.JoystickShape.Square:return m=c(f-S.left-E/2,E),b=c(d-S.top-E/2,E),{relativeX:m,relativeY:b};case u.JoystickShape.AxisX:return m=c(f-S.left-E/2,E),b=0,{relativeX:m,relativeY:b};case u.JoystickShape.AxisY:return m=0,b=c(d-S.top-E/2,E),{relativeX:m,relativeY:b};default:return p>y&&(m*=y/p,b*=y/p),{relativeX:m,relativeY:b}}};Ja.shapeBoundsFactory=i;var c=function(r,f){var d=f/2;return r>d?d:r<-d?d*-1:r};return Ja}var ym;function Eb(){if(ym)return sn;ym=1;var u=sn&&sn.__extends||(function(){var y=function(E,S){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,z){C.__proto__=z}||function(C,z){for(var H in z)Object.prototype.hasOwnProperty.call(z,H)&&(C[H]=z[H])},y(E,S)};return function(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");y(E,S);function C(){this.constructor=E}E.prototype=S===null?Object.create(S):(C.prototype=S.prototype,new C)}})(),i=sn&&sn.__assign||function(){return i=Object.assign||function(y){for(var E,S=1,C=arguments.length;S<C;S++){E=arguments[S];for(var z in E)Object.prototype.hasOwnProperty.call(E,z)&&(y[z]=E[z])}return y},i.apply(this,arguments)};Object.defineProperty(sn,"__esModule",{value:!0}),sn.Joystick=void 0;var c=Nu(),r=ju(),f=xb(),d=_b(),m;(function(y){y.PointerDown="pointerdown",y.PointerMove="pointermove",y.PointerUp="pointerup"})(m||(m={}));var b;(function(y){y[y.TopRight=2.35619449]="TopRight",y[y.TopLeft=-2.35619449]="TopLeft",y[y.BottomRight=.785398163]="BottomRight",y[y.BottomLeft=-.785398163]="BottomLeft"})(b||(b={}));var p=(function(y){u(E,y);function E(S){var C=y.call(this,S)||this;return C._stickRef=c.createRef(),C._baseRef=c.createRef(),C.frameId=null,C._pointerId=null,C._mounted=!1,C._pointerMove=function(z){if(z.preventDefault(),C.state.dragging){if(!C.props.followCursor&&z.pointerId!==C._pointerId)return;var H=z.clientX,k=z.clientY,Y=H-C._parentRect.left-C._radius,L=k-C._parentRect.top-C._radius,q=C._distance(Y,L),Q=(0,d.shapeBoundsFactory)(C.props.controlPlaneShape||C.props.baseShape,H,k,Y,L,q,C._radius,C._baseSize,C._parentRect);Y=Q.relativeX,L=Q.relativeY;var P=Math.atan2(Y,L);C._updatePos({relativeX:Y,relativeY:L,distance:C._distanceToPercentile(q),direction:C._getDirection(P),axisX:H-C._parentRect.left,axisY:k-C._parentRect.top})}},C._pointerUp=function(z){if(z.pointerId===C._pointerId){var H={dragging:!1};C.props.sticky||(H.coordinates=void 0),C.frameId=window.requestAnimationFrame(function(){C._mounted&&C.setState(H)}),window.removeEventListener(m.PointerUp,C._pointerUp),window.removeEventListener(m.PointerMove,C._pointerMove),C._pointerId=null,C.props.stop&&C.props.stop({type:"stop",x:C.props.sticky?C.state.coordinates.relativeX*2/C._baseSize:null,y:C.props.sticky?C.state.coordinates.relativeY*2/C._baseSize:null,direction:C.props.sticky?C.state.coordinates.direction:null,distance:C.props.sticky?C.state.coordinates.distance:null})}},C.state={dragging:!1},C._throttleMoveCallback=(function(){var z=0;return function(H){var k=new Date().getTime(),Y=C.props.throttle||0;if(!(k-z<Y)&&(z=k,C.props.move))return C.props.move(H)}})(),C}return E.prototype.componentWillUnmount=function(){var S=this;this._mounted=!1,this.props.followCursor&&window.removeEventListener(m.PointerMove,function(C){return S._pointerMove(C)}),this.frameId!==null&&window.cancelAnimationFrame(this.frameId)},E.prototype.componentDidMount=function(){var S=this;this._mounted=!0,this.props.followCursor&&(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerMove,function(C){return S._pointerMove(C)}),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},E.prototype._updatePos=function(S){var C=this;this.frameId=window.requestAnimationFrame(function(){C._mounted&&C.setState({coordinates:S})}),!(typeof this.props.minDistance=="number"&&S.distance<this.props.minDistance)&&this._throttleMoveCallback({type:"move",x:S.relativeX*2/this._baseSize,y:-(S.relativeY*2/this._baseSize),direction:S.direction,distance:S.distance})},E.prototype._pointerDown=function(S){this.props.disabled||this.props.followCursor||(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerUp,this._pointerUp),window.addEventListener(m.PointerMove,this._pointerMove),this._pointerId=S.pointerId,this._stickRef.current.setPointerCapture(S.pointerId),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},E.prototype._getDirection=function(S){return S>b.TopRight||S<b.TopLeft?"FORWARD":S<b.TopRight&&S>b.BottomRight?"RIGHT":S<b.BottomLeft?"LEFT":"BACKWARD"},E.prototype._distance=function(S,C){return Math.hypot(S,C)},E.prototype._distanceToPercentile=function(S){var C=S/(this._baseSize/2)*100;return C>100?100:C},E.prototype.getBaseShapeStyle=function(){var S=this.props.baseShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},E.prototype.getStickShapeStyle=function(){var S=this.props.stickShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},E.prototype._getBaseStyle=function(){var S=this.props.baseColor!==void 0?this.props.baseColor:"#000033",C="".concat(this._baseSize,"px"),z=i(i({},this.getBaseShapeStyle()),{height:C,width:C,background:S,display:"flex",justifyContent:"center",alignItems:"center"});return this.props.baseImage&&(z.background="url(".concat(this.props.baseImage,")"),z.backgroundSize="100%"),z},E.prototype._getStickStyle=function(){var S=this.props.stickColor!==void 0?this.props.stickColor:"#3D59AB",C=this._stickSize?"".concat(this._stickSize,"px"):"".concat(this._baseSize/1.5,"px"),z=i(i({},this.getStickShapeStyle()),{background:S,cursor:"move",height:C,width:C,border:"none",flexShrink:0,touchAction:"none"});return this.props.stickImage&&(z.background="url(".concat(this.props.stickImage,")"),z.backgroundSize="100%"),this.props.pos&&(z=Object.assign({},z,{position:"absolute",transform:"translate3d(".concat(this.props.pos.x*this._baseSize/2,"px, ").concat(-(this.props.pos.y*this._baseSize)/2,"px, 0)")})),this.state.coordinates!==void 0&&(z=Object.assign({},z,{position:"absolute",transform:"translate3d(".concat(this.state.coordinates.relativeX,"px, ").concat(this.state.coordinates.relativeY,"px, 0)")})),z},E.prototype.render=function(){var S=this;this._baseSize=this.props.size||100,this._stickSize=this.props.stickSize,this._radius=this._baseSize/2;var C=this._getBaseStyle(),z=this._getStickStyle();return c.createElement("div",{"data-testid":"joystick-base",className:this.props.disabled?"joystick-base-disabled":"",ref:this._baseRef,style:C},c.createElement("button",{ref:this._stickRef,disabled:this.props.disabled,onPointerDown:function(H){return S._pointerDown(H)},className:this.props.disabled?"joystick-disabled":"",style:z}))},E})(c.Component);return sn.Joystick=p,sn}var vm;function Tb(){return vm||(vm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=u.Joystick=void 0;var i=Eb();Object.defineProperty(u,"Joystick",{enumerable:!0,get:function(){return i.Joystick}});var c=ju();Object.defineProperty(u,"JoystickShape",{enumerable:!0,get:function(){return c.JoystickShape}})})(or)),or}var Ab=Tb();function gm(u=0){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function np(){const{roverId:u,driveWithVector:i,stopMotors:c}=jr(),r=!u,f=T.useCallback((m={})=>{if(r)return;const b=gm(m.x??0),p=gm(m.y??0);i({x:b,y:p})},[r,i]),d=T.useCallback(()=>{r||i({x:0,y:0})},[r,i]);return v.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[v.jsx("div",{className:"text-xs text-slate-400",children:"Joystick"}),v.jsx("div",{className:"mt-1 flex items-center justify-center",children:v.jsx(Ab.Joystick,{size:120,baseColor:"#0f172a",stickColor:"#38bdf8",throttle:75,move:f,stop:d,disabled:r})}),v.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Drag to drive. Release to stop sending drive commands."}),v.jsx("button",{type:"button",onClick:c,disabled:r,className:"mt-1 w-full rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"Panic Stop"})]})}function lp(){const{roverId:u,setAuxMotors:i}=jr(),c=!u,r=()=>{c||i({main:127,side:127,vacuum:127})},f=()=>{c||i({main:0,side:0,vacuum:0})},d=[{label:"Main +",values:{main:127}},{label:"Main -",values:{main:-127}},{label:"Side +",values:{side:127}},{label:"Side -",values:{side:-127}},{label:"Vacuum Max",values:{vacuum:127}},{label:"Vacuum Off",values:{vacuum:0}}];return v.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[v.jsx("div",{className:"text-xs text-slate-400",children:"Aux motors"}),v.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[v.jsx("button",{type:"button",onClick:r,disabled:c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"All forward"}),v.jsx("button",{type:"button",onClick:f,disabled:c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"Stop all"})]}),v.jsx("div",{className:"mt-1 grid grid-cols-2 gap-1 text-[0.75rem]",children:d.map(m=>v.jsx("button",{type:"button",onClick:()=>!c&&i(m.values),disabled:c,className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200 disabled:opacity-30",children:m.label},m.label))})]})}function Cb(){return v.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row",children:[v.jsx("div",{className:"flex-1",children:v.jsx(np,{})}),v.jsx("div",{className:"flex-1",children:v.jsx(lp,{})})]})}function Lr(){return v.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-2 text-base text-slate-100",children:[v.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),v.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function Hr(){const{logs:u}=fn();return v.jsxs("div",{className:"rounded-sm bg-[#242a32] p-2 text-base text-slate-100",children:[v.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[v.jsx("span",{children:"Server logs"}),v.jsx("span",{children:u.length})]}),v.jsx("div",{className:"mt-2 h-48 overflow-y-auto rounded-sm bg-black/40 p-2 font-mono text-sm text-slate-300",children:u.length===0?v.jsx("p",{children:"No logs yet."}):u.slice().reverse().map(i=>v.jsxs("div",{className:"mb-1",children:[v.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",v.jsxs("span",{className:"text-slate-300",children:["[",i.level,"]"]})," ",i.label&&v.jsxs("span",{className:"text-slate-400",children:["[",i.label,"]"]})," ",v.jsx("span",{children:i.message})]},i.id))})]})}function qr(){const{login:u,setRole:i}=fn(),[c,r]=T.useState(""),[f,d]=T.useState(""),[m,b]=T.useState(!1);async function p(y){y.preventDefault(),b(!0);try{await u(c,f),r(""),d("")}catch(E){alert(E.message)}finally{b(!1)}}return v.jsxs("div",{className:"rounded-sm bg-[#242a32] p-2 text-base text-slate-100",children:[v.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),v.jsxs("form",{className:"mt-2 flex flex-col gap-2",onSubmit:p,children:[v.jsx("input",{className:"rounded-sm bg-black/50 px-2 py-1 text-slate-100",placeholder:"Username",value:c,onChange:y=>r(y.target.value)}),v.jsx("input",{className:"rounded-sm bg-black/50 px-2 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:y=>d(y.target.value)}),v.jsx("button",{type:"submit",disabled:m,className:"rounded-sm bg-slate-200 px-2 py-1 text-sm font-semibold text-black disabled:opacity-50",children:m?"Logging in…":"Login"})]}),v.jsxs("div",{className:"mt-2 flex gap-2 text-sm",children:[v.jsx("button",{type:"button",onClick:()=>i("user"),className:"flex-1 rounded-sm bg-black/40 px-2 py-1 text-slate-200",children:"Driver"}),v.jsx("button",{type:"button",onClick:()=>i("spectator"),className:"flex-1 rounded-sm bg-black/40 px-2 py-1 text-slate-200",children:"Spectator"})]})]})}function ap(u=[]){const i=wu(),[c,r]=T.useState({}),f=Array.isArray(u)?u.filter(Boolean).join("|"):"";return T.useEffect(()=>{if(!f)return;const m=f.split("|");let b=!1;return m.forEach(p=>{i.emit("video:request",{roverId:p},(y={})=>{b||r(E=>({...E,[p]:y}))})}),()=>{b=!0}},[i,f]),T.useMemo(()=>{if(!f)return{};const m=f.split("|"),b={};return m.forEach(p=>{c[p]&&(b[p]=c[p])}),b},[f,c])}const Rb={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function Nb(u){if(typeof btoa=="function")return btoa(u);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function Ob(u){if(!u)return{};const i=`${u}:${u}`;return{Authorization:`Basic ${Nb(i)}`}}class zb{constructor({url:i,token:c,video:r,onStatus:f}){this.url=i,this.token=c,this.video=r,this.pc=null,this.abortController=null,this.onStatus=f}notify(i,c){typeof this.onStatus=="function"&&this.onStatus(i,c)}configureVideoElement(){this.video&&(this.video.playsInline=!0,this.video.autoplay=!0,this.video.disableRemotePlayback=!0,"latencyHint"in HTMLMediaElement.prototype&&(this.video.latencyHint="interactive"))}async start(){if(!this.url||!this.video)throw new Error("Video target missing");this.stop(),this.notify("connecting"),this.configureVideoElement(),this.abortController=new AbortController;const i=new RTCPeerConnection(Rb);this.pc=i;const c=new MediaStream;i.ontrack=r=>{r.streams[0]?.getTracks().forEach(f=>c.addTrack(f)),this.video.srcObject=c,r.track?.kind==="video"&&"playoutDelayHint"in r.receiver&&(r.receiver.playoutDelayHint=0)},i.addTransceiver("video",{direction:"recvonly"}),i.addTransceiver("audio",{direction:"recvonly"}),i.onconnectionstatechange=()=>{const r=i.connectionState;this.notify(r)},i.oniceconnectionstatechange=()=>{const r=i.iceConnectionState;(r==="failed"||r==="disconnected")&&this.notify(r)};try{const r=await i.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});await i.setLocalDescription(r);const f=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...Ob(this.token)},body:r.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const d=await f.text();await i.setRemoteDescription({type:"answer",sdp:d}),i.getReceivers().forEach(m=>{"playoutDelayHint"in m&&(m.playoutDelayHint=0)}),await this.video.play().catch(()=>{}),this.notify("playing")}catch(r){throw this.notify("error",r.message),this.stop(),r}}stop(){this.abortController&&(this.abortController.abort(),this.abortController=null),this.pc&&(this.pc.getSenders().forEach(i=>i.track?.stop()),this.pc.getReceivers().forEach(i=>i.track?.stop()),this.pc.close(),this.pc=null),this.video&&(this.video.srcObject=null),this.notify("stopped")}}const Mb=2e3,Db=3e3;function ip({sessionInfo:u,label:i,forceMute:c=!1,telemetryFrame:r,batteryConfig:f}){const d=T.useRef(null),m=T.useRef(null),b=T.useRef(null),[p,y]=T.useState("idle"),[E,S]=T.useState(null),[C,z]=T.useState(0),[H,k]=T.useState(!0),Y=r?.sensors,L=Y?.batteryChargeMah??null,q=Y?.wheelOvercurrents||null,Q=!!(q&&Object.values(q).some($=>!!$)),P=T.useCallback(()=>{clearTimeout(m.current),m.current=setTimeout(()=>z(Date.now()),Mb)},[]),ye=T.useCallback(($=0)=>{if(c)return;clearTimeout(b.current);const Te=()=>{clearTimeout(b.current),b.current=setTimeout(()=>{c||xe()},Db)},xe=async()=>{const Ue=d.current;if(Ue)try{Ue.muted=!1,await Ue.play(),k(!1)}catch{Ue.muted=!0,k(!0),Te()}};b.current=setTimeout(xe,$)},[c]);T.useEffect(()=>()=>{clearTimeout(m.current),clearTimeout(b.current)},[]),T.useEffect(()=>{p==="playing"&&ye(0)},[p,ye]),T.useEffect(()=>{if(!u?.url||!d.current)return;let $=!0,Te;const xe=setTimeout(()=>k(!0),0),Ue=(Xe,We)=>{$&&(y(Xe),S(We||null),["error","failed","disconnected","closed"].includes(Xe)&&P())};return Te=new zb({url:u.url,token:u.token,video:d.current,onStatus:Ue}),Te.start().catch(Xe=>{$&&(y("error"),S(Xe.message),P())}),()=>{$=!1,clearTimeout(xe),Te?.stop()}},[u?.url,u?.token,C,P]),T.useEffect(()=>{p==="stopped"&&u?.url&&P()},[p,u?.url,P]);const Re=u?.url?p==="error"?`Error: ${E||"unknown"}`:E?`${p} (${E})`:p:"waiting";return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black",children:[v.jsx("video",{ref:d,muted:c||H,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),v.jsx(jb,{frame:r}),v.jsx(Ub,{active:Q})]}),v.jsx(wb,{charge:L,config:f,label:i,status:Re})]})}function wb({charge:u,config:i,label:c,status:r}){const f=i?.Full,d=i?.Warn,m=i?.Urgent??null;if(u==null||f==null||d==null)return v.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-2 py-1 text-sm text-slate-200",children:[v.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[v.jsx("span",{children:c}),v.jsx("span",{children:r})]}),v.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const b=f-d;if(b<=0)return null;const p=(u-d)/b,y=Math.min(1,Math.max(0,p)),E=Math.round(y*100),S=`${E}%`,C=p<=0,z=m!=null&&u<=m,H=C?"bg-red-500 animate-pulse":z?"bg-amber-400":"bg-emerald-500";return v.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-2 py-2 text-sm text-slate-200",children:[v.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[v.jsx("span",{children:c}),v.jsx("span",{children:r})]}),v.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[v.jsx("div",{className:`h-full rounded-full transition-[width] ${H}`,style:{width:`${E}%`}}),v.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:S})]})]})}function jb({frame:u}){const c=u?.sensors?.bumpsAndWheelDrops||{},[r,f]=T.useState(()=>Date.now());T.useEffect(()=>{const p=setInterval(()=>f(Date.now()),150);return()=>clearInterval(p)},[]);const d=u?.receivedAt?r-u.receivedAt<200:!1,m=[{label:"B-L",active:c.bumpLeft},{label:"B-R",active:c.bumpRight}],b=[{label:"Drop L",active:c.wheelDropLeft},{label:"Drop R",active:c.wheelDropRight}];return v.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[v.jsxs("div",{className:"flex items-center justify-between gap-1",children:[v.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[v.jsx("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),v.jsx("span",{children:"sensor"})]}),v.jsx("div",{className:"flex gap-1",children:m.map(p=>v.jsx(bm,{label:p.label,active:p.active},p.label))})]}),v.jsx("div",{className:"flex justify-end gap-1",children:b.map(p=>v.jsx(bm,{label:p.label,active:p.active},p.label))})]})}function bm({label:u,active:i}){return v.jsx("span",{className:`rounded-sm px-1 py-0.5 text-[0.55rem] ${i?"bg-emerald-500/30 text-emerald-100":"bg-black/40 text-slate-500"}`,children:u})}function Ub({active:u}){return u?v.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:v.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function Yr(){const{session:u}=fn(),i=u?.assignment?.roverId,c=ap(i?[i]:[]),r=i?c[i]:null,f=Dr(i),m=(i&&u?.roster?u.roster.find(b=>String(b.id)===String(i)):null)?.battery??null;return v.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:i?v.jsx("div",{className:"",children:v.jsx(ip,{sessionInfo:r,label:i,muted:!1,telemetryFrame:f,batteryConfig:m})}):v.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}function Bb(){const[u,i]=T.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return T.useEffect(()=>{function c(){if(typeof window>"u")return;const{innerWidth:r,innerHeight:f}=window;r>=1024?i("desktop"):r>f?i("mobile-landscape"):i("mobile-portrait")}return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),u}function Lb(){return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("section",{className:"grid grid-cols-[minmax(0,0.6fr)_minmax(0,2.2fr)_minmax(0,0.6fr)] gap-1",children:[v.jsx(wr,{}),v.jsx(Yr,{}),v.jsx(Ur,{})]}),v.jsxs("section",{className:"grid grid-cols-[repeat(3,minmax(0,1fr))] gap-1",children:[v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(qr,{}),v.jsx(Br,{})]}),v.jsx(Lr,{}),v.jsx(Hr,{})]})]})}function Hb(){return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(Yr,{}),v.jsx(Cb,{}),v.jsx(Ur,{}),v.jsx(wr,{}),v.jsx(qr,{}),v.jsx(Br,{}),v.jsx(Lr,{}),v.jsx(Hr,{})]})}function qb(){return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("section",{className:"grid grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(Ur,{}),v.jsx(lp,{})]}),v.jsx(Yr,{}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(np,{}),v.jsx(wr,{})]})]}),v.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(qr,{}),v.jsx(Br,{})]}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(Lr,{}),v.jsx(Hr,{})]})]})]})}function Yb(){const u=Bb(),i=u==="desktop"?v.jsx(Lb,{}):u==="mobile-landscape"?v.jsx(qb,{}):v.jsx(Hb,{});return v.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:v.jsxs(db,{children:[v.jsx("main",{className:"flex w-full flex-col gap-1 px-1 py-1 text-base",children:i}),v.jsx(gb,{})]})})}function kb(){const{session:u,setRole:i,subscribeAll:c}=fn(),[r,f]=T.useState(!1);return T.useEffect(()=>{let d=!1;async function m(){try{u?.role!=="spectator"&&await i("spectator"),await c(),d||f(!0)}catch(b){console.error("Failed to enter spectator mode",b)}}return m(),()=>{d=!0}},[u?.role,i,c]),r}function Xb({connected:u,ready:i,rosterCount:c}){return v.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[v.jsx("span",{className:`rounded-full px-3 py-1 font-semibold ${u?"bg-emerald-500/20 text-emerald-200":"bg-red-500/20 text-red-200"}`,children:u?"Connected":"Disconnected"}),v.jsxs("span",{className:`rounded-full px-3 py-1 ${i?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",i?"active":"pending…"]}),v.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",c]})]})}function Gb({logs:u}){return v.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[v.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[v.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),v.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",u.length]})]}),v.jsx("div",{className:"h-60 overflow-y-auto rounded-2xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:u.length===0?v.jsx("p",{children:"No log entries yet."}):u.slice().reverse().map(i=>v.jsxs("div",{className:"mb-2",children:[v.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",v.jsxs("span",{className:"text-cyan-300",children:["[",i.level,"]"]})," ",i.label&&v.jsxs("span",{className:"text-pink-300",children:["[",i.label,"]"]})," ",v.jsx("span",{children:i.message})]},i.id))})]})}function Vb(u={}){return Object.entries(u).map(([i,c])=>({key:i,value:typeof c=="object"?JSON.stringify(c):c}))}function Qb({rover:u,frame:i,videoInfo:c}){const r=Vb(i?.sensors);return v.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[v.jsxs("header",{className:"flex flex-col gap-1",children:[v.jsx("h3",{className:"text-2xl font-semibold text-white",children:u.name}),v.jsx("p",{className:"text-sm text-slate-400",children:i?.receivedAt?`Updated ${new Date(i.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),v.jsx(ip,{sessionInfo:c,label:u.name,forceMute:!0}),v.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[v.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),r.length===0?v.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):v.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:r.map(({key:f,value:d})=>v.jsxs("div",{className:"flex justify-between gap-4",children:[v.jsx("dt",{className:"text-slate-500",children:f}),v.jsx("dd",{className:"text-right font-semibold text-white",children:d})]},f))})]})]})}function Zb(){const{connected:u,session:i,logs:c}=fn(),r=kb(),f=ep(),d=i?.roster??[],m=ap(d.map(p=>p.id)),b=T.useMemo(()=>({connected:u,ready:r,rosterCount:d.length}),[u,r,d.length]);return v.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:v.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[v.jsxs("header",{className:"space-y-3",children:[v.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),v.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),v.jsx(Xb,{...b})]}),v.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:d.length===0?v.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):d.map(p=>v.jsx(Qb,{rover:p,frame:f[p.id],videoInfo:m[p.id]},p.id))}),v.jsx(Gb,{logs:c})]})})}H0.createRoot(document.getElementById("root")).render(v.jsx(T.StrictMode,{children:v.jsx(nb,{children:v.jsx(ab,{children:v.jsx(ib,{children:v.jsx(Iv,{children:v.jsxs(zv,{children:[v.jsx(dr,{path:"/",element:v.jsx(Yb,{})}),v.jsx(dr,{path:"/spectate",element:v.jsx(Zb,{})})]})})})})})}));
|