-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
108 lines (107 loc) · 386 KB
/
main.html
File metadata and controls
108 lines (107 loc) · 386 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=block" rel="stylesheet" />
<title>Blackbox Server Admin</title>
<script type="module" crossorigin>(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const g of m.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function c(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(d){if(d.ep)return;d.ep=!0;const m=c(d);fetch(d.href,m)}})();var ic={exports:{}},ci={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Um;function yv(){if(Um)return ci;Um=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function c(o,d,m){var g=null;if(m!==void 0&&(g=""+m),d.key!==void 0&&(g=""+d.key),"key"in d){m={};for(var y in d)y!=="key"&&(m[y]=d[y])}else m=d;return d=m.ref,{$$typeof:n,type:o,key:g,ref:d!==void 0?d:null,props:m}}return ci.Fragment=s,ci.jsx=c,ci.jsxs=c,ci}var Lm;function bv(){return Lm||(Lm=1,ic.exports=yv()),ic.exports}var r=bv(),uc={exports:{}},Se={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Hm;function xv(){if(Hm)return Se;Hm=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),A=Symbol.iterator;function D(S){return S===null||typeof S!="object"?null:(S=A&&S[A]||S["@@iterator"],typeof S=="function"?S:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,O={};function C(S,U,G){this.props=S,this.context=U,this.refs=O,this.updater=G||_}C.prototype.isReactComponent={},C.prototype.setState=function(S,U){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,U,"setState")},C.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function Y(){}Y.prototype=C.prototype;function X(S,U,G){this.props=S,this.context=U,this.refs=O,this.updater=G||_}var $=X.prototype=new Y;$.constructor=X,H($,C.prototype),$.isPureReactComponent=!0;var I=Array.isArray;function le(){}var P={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function re(S,U,G){var K=G.ref;return{$$typeof:n,type:S,key:U,ref:K!==void 0?K:null,props:G}}function ge(S,U){return re(S.type,U,S.props)}function _e(S){return typeof S=="object"&&S!==null&&S.$$typeof===n}function je(S){var U={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(G){return U[G]})}var Oe=/\/+/g;function Re(S,U){return typeof S=="object"&&S!==null&&S.key!=null?je(""+S.key):U.toString(36)}function be(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(le,le):(S.status="pending",S.then(function(U){S.status==="pending"&&(S.status="fulfilled",S.value=U)},function(U){S.status==="pending"&&(S.status="rejected",S.reason=U)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function w(S,U,G,K,pe){var ve=typeof S;(ve==="undefined"||ve==="boolean")&&(S=null);var Ee=!1;if(S===null)Ee=!0;else switch(ve){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(S.$$typeof){case n:case s:Ee=!0;break;case T:return Ee=S._init,w(Ee(S._payload),U,G,K,pe)}}if(Ee)return pe=pe(S),Ee=K===""?"."+Re(S,0):K,I(pe)?(G="",Ee!=null&&(G=Ee.replace(Oe,"$&/")+"/"),w(pe,U,G,"",function(wt){return wt})):pe!=null&&(_e(pe)&&(pe=ge(pe,G+(pe.key==null||S&&S.key===pe.key?"":(""+pe.key).replace(Oe,"$&/")+"/")+Ee)),U.push(pe)),1;Ee=0;var Ie=K===""?".":K+":";if(I(S))for(var Qe=0;Qe<S.length;Qe++)K=S[Qe],ve=Ie+Re(K,Qe),Ee+=w(K,U,G,ve,pe);else if(Qe=D(S),typeof Qe=="function")for(S=Qe.call(S),Qe=0;!(K=S.next()).done;)K=K.value,ve=Ie+Re(K,Qe++),Ee+=w(K,U,G,ve,pe);else if(ve==="object"){if(typeof S.then=="function")return w(be(S),U,G,K,pe);throw U=String(S),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Q(S,U,G){if(S==null)return S;var K=[],pe=0;return w(S,K,"","",function(ve){return U.call(G,ve,pe++)}),K}function ne(S){if(S._status===-1){var U=S._result;U=U(),U.then(function(G){(S._status===0||S._status===-1)&&(S._status=1,S._result=G)},function(G){(S._status===0||S._status===-1)&&(S._status=2,S._result=G)}),S._status===-1&&(S._status=0,S._result=U)}if(S._status===1)return S._result.default;throw S._result}var F=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},V={map:Q,forEach:function(S,U,G){Q(S,function(){U.apply(this,arguments)},G)},count:function(S){var U=0;return Q(S,function(){U++}),U},toArray:function(S){return Q(S,function(U){return U})||[]},only:function(S){if(!_e(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Se.Activity=x,Se.Children=V,Se.Component=C,Se.Fragment=c,Se.Profiler=d,Se.PureComponent=X,Se.StrictMode=o,Se.Suspense=b,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Se.__COMPILER_RUNTIME={__proto__:null,c:function(S){return P.H.useMemoCache(S)}},Se.cache=function(S){return function(){return S.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(S,U,G){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var K=H({},S.props),pe=S.key;if(U!=null)for(ve in U.key!==void 0&&(pe=""+U.key),U)!Z.call(U,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&U.ref===void 0||(K[ve]=U[ve]);var ve=arguments.length-2;if(ve===1)K.children=G;else if(1<ve){for(var Ee=Array(ve),Ie=0;Ie<ve;Ie++)Ee[Ie]=arguments[Ie+2];K.children=Ee}return re(S.type,pe,K)},Se.createContext=function(S){return S={$$typeof:g,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:m,_context:S},S},Se.createElement=function(S,U,G){var K,pe={},ve=null;if(U!=null)for(K in U.key!==void 0&&(ve=""+U.key),U)Z.call(U,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(pe[K]=U[K]);var Ee=arguments.length-2;if(Ee===1)pe.children=G;else if(1<Ee){for(var Ie=Array(Ee),Qe=0;Qe<Ee;Qe++)Ie[Qe]=arguments[Qe+2];pe.children=Ie}if(S&&S.defaultProps)for(K in Ee=S.defaultProps,Ee)pe[K]===void 0&&(pe[K]=Ee[K]);return re(S,ve,pe)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(S){return{$$typeof:y,render:S}},Se.isValidElement=_e,Se.lazy=function(S){return{$$typeof:T,_payload:{_status:-1,_result:S},_init:ne}},Se.memo=function(S,U){return{$$typeof:v,type:S,compare:U===void 0?null:U}},Se.startTransition=function(S){var U=P.T,G={};P.T=G;try{var K=S(),pe=P.S;pe!==null&&pe(G,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(le,F)}catch(ve){F(ve)}finally{U!==null&&G.types!==null&&(U.types=G.types),P.T=U}},Se.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Se.use=function(S){return P.H.use(S)},Se.useActionState=function(S,U,G){return P.H.useActionState(S,U,G)},Se.useCallback=function(S,U){return P.H.useCallback(S,U)},Se.useContext=function(S){return P.H.useContext(S)},Se.useDebugValue=function(){},Se.useDeferredValue=function(S,U){return P.H.useDeferredValue(S,U)},Se.useEffect=function(S,U){return P.H.useEffect(S,U)},Se.useEffectEvent=function(S){return P.H.useEffectEvent(S)},Se.useId=function(){return P.H.useId()},Se.useImperativeHandle=function(S,U,G){return P.H.useImperativeHandle(S,U,G)},Se.useInsertionEffect=function(S,U){return P.H.useInsertionEffect(S,U)},Se.useLayoutEffect=function(S,U){return P.H.useLayoutEffect(S,U)},Se.useMemo=function(S,U){return P.H.useMemo(S,U)},Se.useOptimistic=function(S,U){return P.H.useOptimistic(S,U)},Se.useReducer=function(S,U,G){return P.H.useReducer(S,U,G)},Se.useRef=function(S){return P.H.useRef(S)},Se.useState=function(S){return P.H.useState(S)},Se.useSyncExternalStore=function(S,U,G){return P.H.useSyncExternalStore(S,U,G)},Se.useTransition=function(){return P.H.useTransition()},Se.version="19.2.4",Se}var Bm;function Rc(){return Bm||(Bm=1,uc.exports=xv()),uc.exports}var h=Rc(),sc={exports:{}},oi={},rc={exports:{}},cc={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var km;function Sv(){return km||(km=1,(function(n){function s(w,Q){var ne=w.length;w.push(Q);e:for(;0<ne;){var F=ne-1>>>1,V=w[F];if(0<d(V,Q))w[F]=Q,w[ne]=V,ne=F;else break e}}function c(w){return w.length===0?null:w[0]}function o(w){if(w.length===0)return null;var Q=w[0],ne=w.pop();if(ne!==Q){w[0]=ne;e:for(var F=0,V=w.length,S=V>>>1;F<S;){var U=2*(F+1)-1,G=w[U],K=U+1,pe=w[K];if(0>d(G,ne))K<V&&0>d(pe,G)?(w[F]=pe,w[K]=ne,F=K):(w[F]=G,w[U]=ne,F=U);else if(K<V&&0>d(pe,ne))w[F]=pe,w[K]=ne,F=K;else break e}}return Q}function d(w,Q){var ne=w.sortIndex-Q.sortIndex;return ne!==0?ne:w.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;n.unstable_now=function(){return m.now()}}else{var g=Date,y=g.now();n.unstable_now=function(){return g.now()-y}}var b=[],v=[],T=1,x=null,A=3,D=!1,_=!1,H=!1,O=!1,C=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function $(w){for(var Q=c(v);Q!==null;){if(Q.callback===null)o(v);else if(Q.startTime<=w)o(v),Q.sortIndex=Q.expirationTime,s(b,Q);else break;Q=c(v)}}function I(w){if(H=!1,$(w),!_)if(c(b)!==null)_=!0,le||(le=!0,je());else{var Q=c(v);Q!==null&&be(I,Q.startTime-w)}}var le=!1,P=-1,Z=5,re=-1;function ge(){return O?!0:!(n.unstable_now()-re<Z)}function _e(){if(O=!1,le){var w=n.unstable_now();re=w;var Q=!0;try{e:{_=!1,H&&(H=!1,Y(P),P=-1),D=!0;var ne=A;try{t:{for($(w),x=c(b);x!==null&&!(x.expirationTime>w&&ge());){var F=x.callback;if(typeof F=="function"){x.callback=null,A=x.priorityLevel;var V=F(x.expirationTime<=w);if(w=n.unstable_now(),typeof V=="function"){x.callback=V,$(w),Q=!0;break t}x===c(b)&&o(b),$(w)}else o(b);x=c(b)}if(x!==null)Q=!0;else{var S=c(v);S!==null&&be(I,S.startTime-w),Q=!1}}break e}finally{x=null,A=ne,D=!1}Q=void 0}}finally{Q?je():le=!1}}}var je;if(typeof X=="function")je=function(){X(_e)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,Re=Oe.port2;Oe.port1.onmessage=_e,je=function(){Re.postMessage(null)}}else je=function(){C(_e,0)};function be(w,Q){P=C(function(){w(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(w){w.callback=null},n.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"):Z=0<w?Math.floor(1e3/w):5},n.unstable_getCurrentPriorityLevel=function(){return A},n.unstable_next=function(w){switch(A){case 1:case 2:case 3:var Q=3;break;default:Q=A}var ne=A;A=Q;try{return w()}finally{A=ne}},n.unstable_requestPaint=function(){O=!0},n.unstable_runWithPriority=function(w,Q){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var ne=A;A=w;try{return Q()}finally{A=ne}},n.unstable_scheduleCallback=function(w,Q,ne){var F=n.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?F+ne:F):ne=F,w){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=ne+V,w={id:T++,callback:Q,priorityLevel:w,startTime:ne,expirationTime:V,sortIndex:-1},ne>F?(w.sortIndex=ne,s(v,w),c(b)===null&&w===c(v)&&(H?(Y(P),P=-1):H=!0,be(I,ne-F))):(w.sortIndex=V,s(b,w),_||D||(_=!0,le||(le=!0,je()))),w},n.unstable_shouldYield=ge,n.unstable_wrapCallback=function(w){var Q=A;return function(){var ne=A;A=Q;try{return w.apply(this,arguments)}finally{A=ne}}}})(cc)),cc}var qm;function jv(){return qm||(qm=1,rc.exports=Sv()),rc.exports}var oc={exports:{}},Et={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ym;function Tv(){if(Ym)return Et;Ym=1;var n=Rc();function s(b){var v="https://react.dev/errors/"+b;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)v+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+b+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(s(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},d=Symbol.for("react.portal");function m(b,v,T){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:x==null?null:""+x,children:b,containerInfo:v,implementation:T}}var g=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(b,v){if(b==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Et.createPortal=function(b,v){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(s(299));return m(b,v,null,T)},Et.flushSync=function(b){var v=g.T,T=o.p;try{if(g.T=null,o.p=2,b)return b()}finally{g.T=v,o.p=T,o.d.f()}},Et.preconnect=function(b,v){typeof b=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,o.d.C(b,v))},Et.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},Et.preinit=function(b,v){if(typeof b=="string"&&v&&typeof v.as=="string"){var T=v.as,x=y(T,v.crossOrigin),A=typeof v.integrity=="string"?v.integrity:void 0,D=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;T==="style"?o.d.S(b,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:x,integrity:A,fetchPriority:D}):T==="script"&&o.d.X(b,{crossOrigin:x,integrity:A,fetchPriority:D,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Et.preinitModule=function(b,v){if(typeof b=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var T=y(v.as,v.crossOrigin);o.d.M(b,{crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&o.d.M(b)},Et.preload=function(b,v){if(typeof b=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var T=v.as,x=y(T,v.crossOrigin);o.d.L(b,T,{crossOrigin:x,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Et.preloadModule=function(b,v){if(typeof b=="string")if(v){var T=y(v.as,v.crossOrigin);o.d.m(b,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else o.d.m(b)},Et.requestFormReset=function(b){o.d.r(b)},Et.unstable_batchedUpdates=function(b,v){return b(v)},Et.useFormState=function(b,v,T){return g.H.useFormState(b,v,T)},Et.useFormStatus=function(){return g.H.useHostTransitionStatus()},Et.version="19.2.4",Et}var Gm;function Ev(){if(Gm)return oc.exports;Gm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),oc.exports=Tv(),oc.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Xm;function Nv(){if(Xm)return oi;Xm=1;var n=jv(),s=Rc(),c=Ev();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function g(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 y(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 b(e){if(m(e)!==e)throw Error(o(188))}function v(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var i=a.return;if(i===null)break;var u=i.alternate;if(u===null){if(l=i.return,l!==null){a=l;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===a)return b(i),e;if(u===l)return b(i),t;u=u.sibling}throw Error(o(188))}if(a.return!==l.return)a=i,l=u;else{for(var f=!1,p=i.child;p;){if(p===a){f=!0,a=i,l=u;break}if(p===l){f=!0,l=i,a=u;break}p=p.sibling}if(!f){for(p=u.child;p;){if(p===a){f=!0,a=u,l=i;break}if(p===l){f=!0,l=u,a=i;break}p=p.sibling}if(!f)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,A=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),X=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),_e=Symbol.iterator;function je(e){return e===null||typeof e!="object"?null:(e=_e&&e[_e]||e["@@iterator"],typeof e=="function"?e:null)}var Oe=Symbol.for("react.client.reference");function Re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case C:return"Profiler";case O:return"StrictMode";case I:return"Suspense";case le:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case X:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Re(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return Re(e(t))}catch{}}return null}var be=Array.isArray,w=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},F=[],V=-1;function S(e){return{current:e}}function U(e){0>V||(e.current=F[V],F[V]=null,V--)}function G(e,t){V++,F[V]=e.current,e.current=t}var K=S(null),pe=S(null),ve=S(null),Ee=S(null);function Ie(e,t){switch(G(ve,t),G(pe,e),G(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nm(t),e=im(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(K),G(K,e)}function Qe(){U(K),U(pe),U(ve)}function wt(e){e.memoizedState!==null&&G(Ee,e);var t=K.current,a=im(t,e.type);t!==a&&(G(pe,e),G(K,a))}function ee(e){pe.current===e&&(U(K),U(pe)),Ee.current===e&&(U(Ee),ii._currentValue=ne)}var Tt,W;function te(e){if(Tt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Tt=t&&t[1]||"",W=-1<a.stack.indexOf(`
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Tt+e+W}var ie=!1;function ce(e,t){if(!e||ie)return"";ie=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(L){var M=L}Reflect.construct(e,[],q)}else{try{q.call()}catch(L){M=L}e.call(q.prototype)}}else{try{throw Error()}catch(L){M=L}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(L){if(L&&M&&typeof L.stack=="string")return[L.stack,M.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),f=u[0],p=u[1];if(f&&p){var j=f.split(`
`),z=p.split(`
`);for(i=l=0;l<j.length&&!j[l].includes("DetermineComponentFrameRoot");)l++;for(;i<z.length&&!z[i].includes("DetermineComponentFrameRoot");)i++;if(l===j.length||i===z.length)for(l=j.length-1,i=z.length-1;1<=l&&0<=i&&j[l]!==z[i];)i--;for(;1<=l&&0<=i;l--,i--)if(j[l]!==z[i]){if(l!==1||i!==1)do if(l--,i--,0>i||j[l]!==z[i]){var B=`
`+j[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=i);break}}}finally{ie=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?te(a):""}function de(e,t){switch(e.tag){case 26:case 27:case 5:return te(e.type);case 16:return te("Lazy");case 13:return e.child!==t&&t!==null?te("Suspense Fallback"):te("Suspense");case 19:return te("SuspenseList");case 0:case 15:return ce(e.type,!1);case 11:return ce(e.type.render,!1);case 1:return ce(e.type,!0);case 31:return te("Activity");default:return""}}function Te(e){try{var t="",a=null;do t+=de(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
Error generating stack: `+l.message+`
`+l.stack}}var Ue=Object.prototype.hasOwnProperty,Pe=n.unstable_scheduleCallback,Ke=n.unstable_cancelCallback,it=n.unstable_shouldYield,ua=n.unstable_requestPaint,at=n.unstable_now,vt=n.unstable_getCurrentPriorityLevel,ft=n.unstable_ImmediatePriority,ae=n.unstable_UserBlockingPriority,se=n.unstable_NormalPriority,Je=n.unstable_LowPriority,Gt=n.unstable_IdlePriority,Zu=n.log,xi=n.unstable_setDisableYieldValue,ul=null,J=null;function fe(e){if(typeof Zu=="function"&&xi(e),J&&typeof J.setStrictMode=="function")try{J.setStrictMode(ul,e)}catch{}}var xe=Math.clz32?Math.clz32:sa,dt=Math.log,Xt=Math.LN2;function sa(e){return e>>>=0,e===0?32:31-(dt(e)/Xt|0)|0}var ha=256,_l=262144,Rl=4194304;function sl(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 Si(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var i=0,u=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var p=l&134217727;return p!==0?(l=p&~u,l!==0?i=sl(l):(f&=p,f!==0?i=sl(f):a||(a=p&~e,a!==0&&(i=sl(a))))):(p=l&~u,p!==0?i=sl(p):f!==0?i=sl(f):a||(a=l&~e,a!==0&&(i=sl(a)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:i}function yn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ip(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 Hc(){var e=Rl;return Rl<<=1,(Rl&62914560)===0&&(Rl=4194304),e}function $u(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function bn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function up(e,t,a,l,i,u){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var p=e.entanglements,j=e.expirationTimes,z=e.hiddenUpdates;for(a=f&~a;0<a;){var B=31-xe(a),q=1<<B;p[B]=0,j[B]=-1;var M=z[B];if(M!==null)for(z[B]=null,B=0;B<M.length;B++){var L=M[B];L!==null&&(L.lane&=-536870913)}a&=~q}l!==0&&Bc(e,l,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(f&~t))}function Bc(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-xe(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function kc(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-xe(a),i=1<<l;i&t|e[l]&t&&(e[l]|=t),a&=~i}}function qc(e,t){var a=t&-t;return a=(a&42)!==0?1:Ku(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ku(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 Ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yc(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Rm(e.type))}function Gc(e,t){var a=Q.p;try{return Q.p=e,t()}finally{Q.p=a}}var Ua=Math.random().toString(36).slice(2),yt="__reactFiber$"+Ua,Ct="__reactProps$"+Ua,zl="__reactContainer$"+Ua,Fu="__reactEvents$"+Ua,sp="__reactListeners$"+Ua,rp="__reactHandles$"+Ua,Xc="__reactResources$"+Ua,xn="__reactMarker$"+Ua;function Wu(e){delete e[yt],delete e[Ct],delete e[Fu],delete e[sp],delete e[rp]}function Al(e){var t=e[yt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[zl]||a[yt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=dm(e);e!==null;){if(a=e[yt])return a;e=dm(e)}return t}e=a,a=e.parentNode}return null}function Dl(e){if(e=e[yt]||e[zl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Sn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ml(e){var t=e[Xc];return t||(t=e[Xc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[xn]=!0}var Qc=new Set,Vc={};function rl(e,t){wl(e,t),wl(e+"Capture",t)}function wl(e,t){for(Vc[e]=t,e=0;e<t.length;e++)Qc.add(t[e])}var cp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Zc={},$c={};function op(e){return Ue.call($c,e)?!0:Ue.call(Zc,e)?!1:cp.test(e)?$c[e]=!0:(Zc[e]=!0,!1)}function ji(e,t,a){if(op(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){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,""+a)}}function Ti(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function pa(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fp(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){a=""+f,u.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(f){a=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Iu(e){if(!e._valueTracker){var t=Kc(e)?"checked":"value";e._valueTracker=fp(e,t,""+e[t])}}function Jc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Kc(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Ei(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 dp=/[\n"\\]/g;function Vt(e){return e.replace(dp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Pu(e,t,a,l,i,u,f,p){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Qt(t)):e.value!==""+Qt(t)&&(e.value=""+Qt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?es(e,f,Qt(t)):a!=null?es(e,f,Qt(a)):l!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Qt(p):e.removeAttribute("name")}function Fc(e,t,a,l,i,u,f,p){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Iu(e);return}a=a!=null?""+Qt(a):"",t=t!=null?""+Qt(t):a,p||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=p?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Iu(e)}function es(e,t,a){t==="number"&&Ei(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ol(e,t,a,l){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Qt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wc(e,t,a){if(t!=null&&(t=""+Qt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Qt(a):""}function Ic(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(be(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Qt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Iu(e)}function Ul(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var mp=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 Pc(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||mp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function eo(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var i in t)l=t[i],t.hasOwnProperty(i)&&a[i]!==l&&Pc(e,i,l)}else for(var u in t)t.hasOwnProperty(u)&&Pc(e,u,t[u])}function ts(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 hp=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"]]),pp=/^[\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 Ni(e){return pp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ga(){}var as=null;function ls(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ll=null,Hl=null;function to(e){var t=Dl(e);if(t&&(e=t.stateNode)){var a=e[Ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(Pu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var i=l[Ct]||null;if(!i)throw Error(o(90));Pu(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Jc(l)}break e;case"textarea":Wc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Ol(e,!!a.multiple,t,!1)}}}var ns=!1;function ao(e,t,a){if(ns)return e(t,a);ns=!0;try{var l=e(t);return l}finally{if(ns=!1,(Ll!==null||Hl!==null)&&(du(),Ll&&(t=Ll,e=Hl,Hl=Ll=null,to(t),e)))for(t=0;t<e.length;t++)to(e[t])}}function jn(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Ct]||null;if(l===null)return null;a=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(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),is=!1;if(va)try{var Tn={};Object.defineProperty(Tn,"passive",{get:function(){is=!0}}),window.addEventListener("test",Tn,Tn),window.removeEventListener("test",Tn,Tn)}catch{is=!1}var La=null,us=null,Ci=null;function lo(){if(Ci)return Ci;var e,t=us,a=t.length,l,i="value"in La?La.value:La.textContent,u=i.length;for(e=0;e<a&&t[e]===i[e];e++);var f=a-e;for(l=1;l<=f&&t[a-l]===i[u-l];l++);return Ci=i.slice(e,1<l?1-l:void 0)}function _i(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 Ri(){return!0}function no(){return!1}function _t(e){function t(a,l,i,u,f){this._reactName=a,this._targetInst=i,this.type=l,this.nativeEvent=u,this.target=f,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(a=e[p],this[p]=a?a(u):u[p]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ri:no,this.isPropagationStopped=no,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ri)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ri)},persist:function(){},isPersistent:Ri}),t}var cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zi=_t(cl),En=x({},cl,{view:0,detail:0}),gp=_t(En),ss,rs,Nn,Ai=x({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:os,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!==Nn&&(Nn&&e.type==="mousemove"?(ss=e.screenX-Nn.screenX,rs=e.screenY-Nn.screenY):rs=ss=0,Nn=e),ss)},movementY:function(e){return"movementY"in e?e.movementY:rs}}),io=_t(Ai),vp=x({},Ai,{dataTransfer:0}),yp=_t(vp),bp=x({},En,{relatedTarget:0}),cs=_t(bp),xp=x({},cl,{animationName:0,elapsedTime:0,pseudoElement:0}),Sp=_t(xp),jp=x({},cl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tp=_t(jp),Ep=x({},cl,{data:0}),uo=_t(Ep),Np={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cp={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"},_p={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_p[e])?!!t[e]:!1}function os(){return Rp}var zp=x({},En,{key:function(e){if(e.key){var t=Np[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_i(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:os,charCode:function(e){return e.type==="keypress"?_i(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_i(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ap=_t(zp),Dp=x({},Ai,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),so=_t(Dp),Mp=x({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:os}),wp=_t(Mp),Op=x({},cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Up=_t(Op),Lp=x({},Ai,{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}),Hp=_t(Lp),Bp=x({},cl,{newState:0,oldState:0}),kp=_t(Bp),qp=[9,13,27,32],fs=va&&"CompositionEvent"in window,Cn=null;va&&"documentMode"in document&&(Cn=document.documentMode);var Yp=va&&"TextEvent"in window&&!Cn,ro=va&&(!fs||Cn&&8<Cn&&11>=Cn),co=" ",oo=!1;function fo(e,t){switch(e){case"keyup":return qp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bl=!1;function Gp(e,t){switch(e){case"compositionend":return mo(t);case"keypress":return t.which!==32?null:(oo=!0,co);case"textInput":return e=t.data,e===co&&oo?null:e;default:return null}}function Xp(e,t){if(Bl)return e==="compositionend"||!fs&&fo(e,t)?(e=lo(),Ci=us=La=null,Bl=!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 ro&&t.locale!=="ko"?null:t.data;default:return null}}var Qp={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 ho(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qp[e.type]:t==="textarea"}function po(e,t,a,l){Ll?Hl?Hl.push(l):Hl=[l]:Ll=l,t=bu(t,"onChange"),0<t.length&&(a=new zi("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var _n=null,Rn=null;function Vp(e){Id(e,0)}function Di(e){var t=Sn(e);if(Jc(t))return e}function go(e,t){if(e==="change")return t}var vo=!1;if(va){var ds;if(va){var ms="oninput"in document;if(!ms){var yo=document.createElement("div");yo.setAttribute("oninput","return;"),ms=typeof yo.oninput=="function"}ds=ms}else ds=!1;vo=ds&&(!document.documentMode||9<document.documentMode)}function bo(){_n&&(_n.detachEvent("onpropertychange",xo),Rn=_n=null)}function xo(e){if(e.propertyName==="value"&&Di(Rn)){var t=[];po(t,Rn,e,ls(e)),ao(Vp,t)}}function Zp(e,t,a){e==="focusin"?(bo(),_n=t,Rn=a,_n.attachEvent("onpropertychange",xo)):e==="focusout"&&bo()}function $p(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Di(Rn)}function Kp(e,t){if(e==="click")return Di(t)}function Jp(e,t){if(e==="input"||e==="change")return Di(t)}function Fp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:Fp;function zn(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var i=a[l];if(!Ue.call(t,i)||!Ot(e[i],t[i]))return!1}return!0}function So(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jo(e,t){var a=So(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=So(a)}}function To(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?To(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Eo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ei(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Ei(e.document)}return t}function hs(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 Wp=va&&"documentMode"in document&&11>=document.documentMode,kl=null,ps=null,An=null,gs=!1;function No(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;gs||kl==null||kl!==Ei(l)||(l=kl,"selectionStart"in l&&hs(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}),An&&zn(An,l)||(An=l,l=bu(ps,"onSelect"),0<l.length&&(t=new zi("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=kl)))}function ol(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ql={animationend:ol("Animation","AnimationEnd"),animationiteration:ol("Animation","AnimationIteration"),animationstart:ol("Animation","AnimationStart"),transitionrun:ol("Transition","TransitionRun"),transitionstart:ol("Transition","TransitionStart"),transitioncancel:ol("Transition","TransitionCancel"),transitionend:ol("Transition","TransitionEnd")},vs={},Co={};va&&(Co=document.createElement("div").style,"AnimationEvent"in window||(delete ql.animationend.animation,delete ql.animationiteration.animation,delete ql.animationstart.animation),"TransitionEvent"in window||delete ql.transitionend.transition);function fl(e){if(vs[e])return vs[e];if(!ql[e])return e;var t=ql[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Co)return vs[e]=t[a];return e}var _o=fl("animationend"),Ro=fl("animationiteration"),zo=fl("animationstart"),Ip=fl("transitionrun"),Pp=fl("transitionstart"),eg=fl("transitioncancel"),Ao=fl("transitionend"),Do=new Map,ys="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(" ");ys.push("scrollEnd");function aa(e,t){Do.set(e,t),rl(t,[e])}var Mi=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)},Zt=[],Yl=0,bs=0;function wi(){for(var e=Yl,t=bs=Yl=0;t<e;){var a=Zt[t];Zt[t++]=null;var l=Zt[t];Zt[t++]=null;var i=Zt[t];Zt[t++]=null;var u=Zt[t];if(Zt[t++]=null,l!==null&&i!==null){var f=l.pending;f===null?i.next=i:(i.next=f.next,f.next=i),l.pending=i}u!==0&&Mo(a,i,u)}}function Oi(e,t,a,l){Zt[Yl++]=e,Zt[Yl++]=t,Zt[Yl++]=a,Zt[Yl++]=l,bs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function xs(e,t,a,l){return Oi(e,t,a,l),Ui(e)}function dl(e,t){return Oi(e,null,null,t),Ui(e)}function Mo(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var i=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-xe(a),e=u.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=a|536870912),u):null}function Ui(e){if(50<In)throw In=0,zr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Gl={};function tg(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=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 Ut(e,t,a,l){return new tg(e,t,a,l)}function Ss(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ya(e,t){var a=e.alternate;return a===null?(a=Ut(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function wo(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,a,l,i,u){var f=0;if(l=e,typeof e=="function")Ss(e)&&(f=1);else if(typeof e=="string")f=uv(e,a,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=Ut(31,a,t,i),e.elementType=re,e.lanes=u,e;case H:return ml(a.children,i,u,t);case O:f=8,i|=24;break;case C:return e=Ut(12,a,t,i|2),e.elementType=C,e.lanes=u,e;case I:return e=Ut(13,a,t,i),e.elementType=I,e.lanes=u,e;case le:return e=Ut(19,a,t,i),e.elementType=le,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case X:f=10;break e;case Y:f=9;break e;case $:f=11;break e;case P:f=14;break e;case Z:f=16,l=null;break e}f=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=Ut(f,a,t,i),t.elementType=e,t.type=l,t.lanes=u,t}function ml(e,t,a,l){return e=Ut(7,e,l,t),e.lanes=a,e}function js(e,t,a){return e=Ut(6,e,null,t),e.lanes=a,e}function Oo(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function Ts(e,t,a){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uo=new WeakMap;function $t(e,t){if(typeof e=="object"&&e!==null){var a=Uo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Te(t)},Uo.set(e,t),t)}return{value:e,source:t,stack:Te(t)}}var Xl=[],Ql=0,Hi=null,Dn=0,Kt=[],Jt=0,Ha=null,ra=1,ca="";function ba(e,t){Xl[Ql++]=Dn,Xl[Ql++]=Hi,Hi=e,Dn=t}function Lo(e,t,a){Kt[Jt++]=ra,Kt[Jt++]=ca,Kt[Jt++]=Ha,Ha=e;var l=ra;e=ca;var i=32-xe(l)-1;l&=~(1<<i),a+=1;var u=32-xe(t)+i;if(30<u){var f=i-i%5;u=(l&(1<<f)-1).toString(32),l>>=f,i-=f,ra=1<<32-xe(t)+i|a<<i|l,ca=u+e}else ra=1<<u|a<<i|l,ca=e}function Es(e){e.return!==null&&(ba(e,1),Lo(e,1,0))}function Ns(e){for(;e===Hi;)Hi=Xl[--Ql],Xl[Ql]=null,Dn=Xl[--Ql],Xl[Ql]=null;for(;e===Ha;)Ha=Kt[--Jt],Kt[Jt]=null,ca=Kt[--Jt],Kt[Jt]=null,ra=Kt[--Jt],Kt[Jt]=null}function Ho(e,t){Kt[Jt++]=ra,Kt[Jt++]=ca,Kt[Jt++]=Ha,ra=t.id,ca=t.overflow,Ha=e}var bt=null,Ze=null,we=!1,Ba=null,Ft=!1,Cs=Error(o(519));function ka(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mn($t(t,e)),Cs}function Bo(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[yt]=e,t[Ct]=l,a){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(a=0;a<ei.length;a++)Ae(ei[a],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Fc(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Ic(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||am(t.textContent,a)?(l.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),l.onScroll!=null&&Ae("scroll",t),l.onScrollEnd!=null&&Ae("scrollend",t),l.onClick!=null&&(t.onclick=ga),t=!0):t=!1,t||ka(e,!0)}function ko(e){for(bt=e.return;bt;)switch(bt.tag){case 5:case 31:case 13:Ft=!1;return;case 27:case 3:Ft=!0;return;default:bt=bt.return}}function Vl(e){if(e!==bt)return!1;if(!we)return ko(e),we=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Qr(e.type,e.memoizedProps)),a=!a),a&&Ze&&ka(e),ko(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ze=fm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ze=fm(e)}else t===27?(t=Ze,Pa(e.type)?(e=Jr,Jr=null,Ze=e):Ze=t):Ze=bt?It(e.stateNode.nextSibling):null;return!0}function hl(){Ze=bt=null,we=!1}function _s(){var e=Ba;return e!==null&&(Dt===null?Dt=e:Dt.push.apply(Dt,e),Ba=null),e}function Mn(e){Ba===null?Ba=[e]:Ba.push(e)}var Rs=S(null),pl=null,xa=null;function qa(e,t,a){G(Rs,t._currentValue),t._currentValue=a}function Sa(e){e._currentValue=Rs.current,U(Rs)}function zs(e,t,a){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===a)break;e=e.return}}function As(e,t,a,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var f=i.child;u=u.firstContext;e:for(;u!==null;){var p=u;u=i;for(var j=0;j<t.length;j++)if(p.context===t[j]){u.lanes|=a,p=u.alternate,p!==null&&(p.lanes|=a),zs(u.return,a,e),l||(f=null);break e}u=p.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(o(341));f.lanes|=a,u=f.alternate,u!==null&&(u.lanes|=a),zs(f,a,e),f=null}else f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function Zl(e,t,a,l){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(o(387));if(f=f.memoizedProps,f!==null){var p=i.type;Ot(i.pendingProps.value,f.value)||(e!==null?e.push(p):e=[p])}}else if(i===Ee.current){if(f=i.alternate,f===null)throw Error(o(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(ii):e=[ii])}i=i.return}e!==null&&As(t,e,a,l),t.flags|=262144}function Bi(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gl(e){pl=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return qo(pl,e)}function ki(e,t){return pl===null&&gl(e),qo(e,t)}function qo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},xa===null){if(e===null)throw Error(o(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return a}var ag=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},lg=n.unstable_scheduleCallback,ng=n.unstable_NormalPriority,ut={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ds(){return{controller:new ag,data:new Map,refCount:0}}function wn(e){e.refCount--,e.refCount===0&&lg(ng,function(){e.controller.abort()})}var On=null,Ms=0,$l=0,Kl=null;function ig(e,t){if(On===null){var a=On=[];Ms=0,$l=Ur(),Kl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ms++,t.then(Yo,Yo),t}function Yo(){if(--Ms===0&&On!==null){Kl!==null&&(Kl.status="fulfilled");var e=On;On=null,$l=0,Kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ug(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),l}var Go=w.S;w.S=function(e,t){Cd=at(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ig(e,t),Go!==null&&Go(e,t)};var vl=S(null);function ws(){var e=vl.current;return e!==null?e:Ve.pooledCache}function qi(e,t){t===null?G(vl,vl.current):G(vl,t.pool)}function Xo(){var e=ws();return e===null?null:{parent:ut._currentValue,pool:e}}var Jl=Error(o(460)),Os=Error(o(474)),Yi=Error(o(542)),Gi={then:function(){}};function Qo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ga,ga),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$o(e),e;default:if(typeof t.status=="string")t.then(ga,ga);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$o(e),e}throw bl=t,Jl}}function yl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(bl=a,Jl):a}}var bl=null;function Zo(){if(bl===null)throw Error(o(459));var e=bl;return bl=null,e}function $o(e){if(e===Jl||e===Yi)throw Error(o(483))}var Fl=null,Un=0;function Xi(e){var t=Un;return Un+=1,Fl===null&&(Fl=[]),Vo(Fl,e,t)}function Ln(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qi(e,t){throw t.$$typeof===A?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ko(e){function t(N,E){if(e){var R=N.deletions;R===null?(N.deletions=[E],N.flags|=16):R.push(E)}}function a(N,E){if(!e)return null;for(;E!==null;)t(N,E),E=E.sibling;return null}function l(N){for(var E=new Map;N!==null;)N.key!==null?E.set(N.key,N):E.set(N.index,N),N=N.sibling;return E}function i(N,E){return N=ya(N,E),N.index=0,N.sibling=null,N}function u(N,E,R){return N.index=R,e?(R=N.alternate,R!==null?(R=R.index,R<E?(N.flags|=67108866,E):R):(N.flags|=67108866,E)):(N.flags|=1048576,E)}function f(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function p(N,E,R,k){return E===null||E.tag!==6?(E=js(R,N.mode,k),E.return=N,E):(E=i(E,R),E.return=N,E)}function j(N,E,R,k){var me=R.type;return me===H?B(N,E,R.props.children,k,R.key):E!==null&&(E.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Z&&yl(me)===E.type)?(E=i(E,R.props),Ln(E,R),E.return=N,E):(E=Li(R.type,R.key,R.props,null,N.mode,k),Ln(E,R),E.return=N,E)}function z(N,E,R,k){return E===null||E.tag!==4||E.stateNode.containerInfo!==R.containerInfo||E.stateNode.implementation!==R.implementation?(E=Ts(R,N.mode,k),E.return=N,E):(E=i(E,R.children||[]),E.return=N,E)}function B(N,E,R,k,me){return E===null||E.tag!==7?(E=ml(R,N.mode,k,me),E.return=N,E):(E=i(E,R),E.return=N,E)}function q(N,E,R){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=js(""+E,N.mode,R),E.return=N,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case D:return R=Li(E.type,E.key,E.props,null,N.mode,R),Ln(R,E),R.return=N,R;case _:return E=Ts(E,N.mode,R),E.return=N,E;case Z:return E=yl(E),q(N,E,R)}if(be(E)||je(E))return E=ml(E,N.mode,R,null),E.return=N,E;if(typeof E.then=="function")return q(N,Xi(E),R);if(E.$$typeof===X)return q(N,ki(N,E),R);Qi(N,E)}return null}function M(N,E,R,k){var me=E!==null?E.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return me!==null?null:p(N,E,""+R,k);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case D:return R.key===me?j(N,E,R,k):null;case _:return R.key===me?z(N,E,R,k):null;case Z:return R=yl(R),M(N,E,R,k)}if(be(R)||je(R))return me!==null?null:B(N,E,R,k,null);if(typeof R.then=="function")return M(N,E,Xi(R),k);if(R.$$typeof===X)return M(N,E,ki(N,R),k);Qi(N,R)}return null}function L(N,E,R,k,me){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return N=N.get(R)||null,p(E,N,""+k,me);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case D:return N=N.get(k.key===null?R:k.key)||null,j(E,N,k,me);case _:return N=N.get(k.key===null?R:k.key)||null,z(E,N,k,me);case Z:return k=yl(k),L(N,E,R,k,me)}if(be(k)||je(k))return N=N.get(R)||null,B(E,N,k,me,null);if(typeof k.then=="function")return L(N,E,R,Xi(k),me);if(k.$$typeof===X)return L(N,E,R,ki(E,k),me);Qi(E,k)}return null}function ue(N,E,R,k){for(var me=null,Le=null,oe=E,Ce=E=0,Me=null;oe!==null&&Ce<R.length;Ce++){oe.index>Ce?(Me=oe,oe=null):Me=oe.sibling;var He=M(N,oe,R[Ce],k);if(He===null){oe===null&&(oe=Me);break}e&&oe&&He.alternate===null&&t(N,oe),E=u(He,E,Ce),Le===null?me=He:Le.sibling=He,Le=He,oe=Me}if(Ce===R.length)return a(N,oe),we&&ba(N,Ce),me;if(oe===null){for(;Ce<R.length;Ce++)oe=q(N,R[Ce],k),oe!==null&&(E=u(oe,E,Ce),Le===null?me=oe:Le.sibling=oe,Le=oe);return we&&ba(N,Ce),me}for(oe=l(oe);Ce<R.length;Ce++)Me=L(oe,N,Ce,R[Ce],k),Me!==null&&(e&&Me.alternate!==null&&oe.delete(Me.key===null?Ce:Me.key),E=u(Me,E,Ce),Le===null?me=Me:Le.sibling=Me,Le=Me);return e&&oe.forEach(function(nl){return t(N,nl)}),we&&ba(N,Ce),me}function he(N,E,R,k){if(R==null)throw Error(o(151));for(var me=null,Le=null,oe=E,Ce=E=0,Me=null,He=R.next();oe!==null&&!He.done;Ce++,He=R.next()){oe.index>Ce?(Me=oe,oe=null):Me=oe.sibling;var nl=M(N,oe,He.value,k);if(nl===null){oe===null&&(oe=Me);break}e&&oe&&nl.alternate===null&&t(N,oe),E=u(nl,E,Ce),Le===null?me=nl:Le.sibling=nl,Le=nl,oe=Me}if(He.done)return a(N,oe),we&&ba(N,Ce),me;if(oe===null){for(;!He.done;Ce++,He=R.next())He=q(N,He.value,k),He!==null&&(E=u(He,E,Ce),Le===null?me=He:Le.sibling=He,Le=He);return we&&ba(N,Ce),me}for(oe=l(oe);!He.done;Ce++,He=R.next())He=L(oe,N,Ce,He.value,k),He!==null&&(e&&He.alternate!==null&&oe.delete(He.key===null?Ce:He.key),E=u(He,E,Ce),Le===null?me=He:Le.sibling=He,Le=He);return e&&oe.forEach(function(vv){return t(N,vv)}),we&&ba(N,Ce),me}function Xe(N,E,R,k){if(typeof R=="object"&&R!==null&&R.type===H&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case D:e:{for(var me=R.key;E!==null;){if(E.key===me){if(me=R.type,me===H){if(E.tag===7){a(N,E.sibling),k=i(E,R.props.children),k.return=N,N=k;break e}}else if(E.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Z&&yl(me)===E.type){a(N,E.sibling),k=i(E,R.props),Ln(k,R),k.return=N,N=k;break e}a(N,E);break}else t(N,E);E=E.sibling}R.type===H?(k=ml(R.props.children,N.mode,k,R.key),k.return=N,N=k):(k=Li(R.type,R.key,R.props,null,N.mode,k),Ln(k,R),k.return=N,N=k)}return f(N);case _:e:{for(me=R.key;E!==null;){if(E.key===me)if(E.tag===4&&E.stateNode.containerInfo===R.containerInfo&&E.stateNode.implementation===R.implementation){a(N,E.sibling),k=i(E,R.children||[]),k.return=N,N=k;break e}else{a(N,E);break}else t(N,E);E=E.sibling}k=Ts(R,N.mode,k),k.return=N,N=k}return f(N);case Z:return R=yl(R),Xe(N,E,R,k)}if(be(R))return ue(N,E,R,k);if(je(R)){if(me=je(R),typeof me!="function")throw Error(o(150));return R=me.call(R),he(N,E,R,k)}if(typeof R.then=="function")return Xe(N,E,Xi(R),k);if(R.$$typeof===X)return Xe(N,E,ki(N,R),k);Qi(N,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,E!==null&&E.tag===6?(a(N,E.sibling),k=i(E,R),k.return=N,N=k):(a(N,E),k=js(R,N.mode,k),k.return=N,N=k),f(N)):a(N,E)}return function(N,E,R,k){try{Un=0;var me=Xe(N,E,R,k);return Fl=null,me}catch(oe){if(oe===Jl||oe===Yi)throw oe;var Le=Ut(29,oe,null,N.mode);return Le.lanes=k,Le.return=N,Le}finally{}}}var xl=Ko(!0),Jo=Ko(!1),Ya=!1;function Us(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ls(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Be&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=Ui(e),Mo(e,null,a),t}return Oi(e,l,t,a),Ui(e)}function Hn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kc(e,a)}}function Hs(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var i=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?i=u=f:u=u.next=f,a=a.next}while(a!==null);u===null?i=u=t:u=u.next=t}else i=u=t;a={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Bs=!1;function Bn(){if(Bs){var e=Kl;if(e!==null)throw e}}function kn(e,t,a,l){Bs=!1;var i=e.updateQueue;Ya=!1;var u=i.firstBaseUpdate,f=i.lastBaseUpdate,p=i.shared.pending;if(p!==null){i.shared.pending=null;var j=p,z=j.next;j.next=null,f===null?u=z:f.next=z,f=j;var B=e.alternate;B!==null&&(B=B.updateQueue,p=B.lastBaseUpdate,p!==f&&(p===null?B.firstBaseUpdate=z:p.next=z,B.lastBaseUpdate=j))}if(u!==null){var q=i.baseState;f=0,B=z=j=null,p=u;do{var M=p.lane&-536870913,L=M!==p.lane;if(L?(De&M)===M:(l&M)===M){M!==0&&M===$l&&(Bs=!0),B!==null&&(B=B.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ue=e,he=p;M=t;var Xe=a;switch(he.tag){case 1:if(ue=he.payload,typeof ue=="function"){q=ue.call(Xe,q,M);break e}q=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=he.payload,M=typeof ue=="function"?ue.call(Xe,q,M):ue,M==null)break e;q=x({},q,M);break e;case 2:Ya=!0}}M=p.callback,M!==null&&(e.flags|=64,L&&(e.flags|=8192),L=i.callbacks,L===null?i.callbacks=[M]:L.push(M))}else L={lane:M,tag:p.tag,payload:p.payload,callback:p.callback,next:null},B===null?(z=B=L,j=q):B=B.next=L,f|=M;if(p=p.next,p===null){if(p=i.shared.pending,p===null)break;L=p,p=L.next,L.next=null,i.lastBaseUpdate=L,i.shared.pending=null}}while(!0);B===null&&(j=q),i.baseState=j,i.firstBaseUpdate=z,i.lastBaseUpdate=B,u===null&&(i.shared.lanes=0),Ka|=f,e.lanes=f,e.memoizedState=q}}function Fo(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Wo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Fo(a[e],t)}var Wl=S(null),Vi=S(0);function Io(e,t){e=Aa,G(Vi,e),G(Wl,t),Aa=e|t.baseLanes}function ks(){G(Vi,Aa),G(Wl,Wl.current)}function qs(){Aa=Vi.current,U(Wl),U(Vi)}var Lt=S(null),Wt=null;function Qa(e){var t=e.alternate;G(lt,lt.current&1),G(Lt,e),Wt===null&&(t===null||Wl.current!==null||t.memoizedState!==null)&&(Wt=e)}function Ys(e){G(lt,lt.current),G(Lt,e),Wt===null&&(Wt=e)}function Po(e){e.tag===22?(G(lt,lt.current),G(Lt,e),Wt===null&&(Wt=e)):Va()}function Va(){G(lt,lt.current),G(Lt,Lt.current)}function Ht(e){U(Lt),Wt===e&&(Wt=null),U(lt)}var lt=S(0);function Zi(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||$r(a)||Kr(a)))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 ja=0,Ne=null,Ye=null,st=null,$i=!1,Il=!1,Sl=!1,Ki=0,qn=0,Pl=null,sg=0;function et(){throw Error(o(321))}function Gs(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ot(e[a],t[a]))return!1;return!0}function Xs(e,t,a,l,i,u){return ja=u,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?Hf:nr,Sl=!1,u=a(l,i),Sl=!1,Il&&(u=tf(t,a,l,i)),ef(e),u}function ef(e){w.H=Xn;var t=Ye!==null&&Ye.next!==null;if(ja=0,st=Ye=Ne=null,$i=!1,qn=0,Pl=null,t)throw Error(o(300));e===null||rt||(e=e.dependencies,e!==null&&Bi(e)&&(rt=!0))}function tf(e,t,a,l){Ne=e;var i=0;do{if(Il&&(Pl=null),qn=0,Il=!1,25<=i)throw Error(o(301));if(i+=1,st=Ye=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}w.H=Bf,u=t(a,l)}while(Il);return u}function rg(){var e=w.H,t=e.useState()[0];return t=typeof t.then=="function"?Yn(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Qs(){var e=Ki!==0;return Ki=0,e}function Vs(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Zs(e){if($i){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$i=!1}ja=0,st=Ye=Ne=null,Il=!1,qn=Ki=0,Pl=null}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Ne.memoizedState=st=e:st=st.next=e,st}function nt(){if(Ye===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=st===null?Ne.memoizedState:st.next;if(t!==null)st=t,Ye=e;else{if(e===null)throw Ne.alternate===null?Error(o(467)):Error(o(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},st===null?Ne.memoizedState=st=e:st=st.next=e}return st}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yn(e){var t=qn;return qn+=1,Pl===null&&(Pl=[]),e=Vo(Pl,e,t),t=Ne,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?Hf:nr),e}function Fi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Yn(e);if(e.$$typeof===X)return xt(e)}throw Error(o(438,String(e)))}function $s(e){var t=null,a=Ne.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ne.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ji(),Ne.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ge;return t.index++,a}function Ta(e,t){return typeof t=="function"?t(e):t}function Wi(e){var t=nt();return Ks(t,Ye,e)}function Ks(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var i=e.baseQueue,u=l.pending;if(u!==null){if(i!==null){var f=i.next;i.next=u.next,u.next=f}t.baseQueue=i=u,l.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var p=f=null,j=null,z=t,B=!1;do{var q=z.lane&-536870913;if(q!==z.lane?(De&q)===q:(ja&q)===q){var M=z.revertLane;if(M===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),q===$l&&(B=!0);else if((ja&M)===M){z=z.next,M===$l&&(B=!0);continue}else q={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},j===null?(p=j=q,f=u):j=j.next=q,Ne.lanes|=M,Ka|=M;q=z.action,Sl&&a(u,q),u=z.hasEagerState?z.eagerState:a(u,q)}else M={lane:q,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},j===null?(p=j=M,f=u):j=j.next=M,Ne.lanes|=q,Ka|=q;z=z.next}while(z!==null&&z!==t);if(j===null?f=u:j.next=p,!Ot(u,e.memoizedState)&&(rt=!0,B&&(a=Kl,a!==null)))throw a;e.memoizedState=u,e.baseState=f,e.baseQueue=j,l.lastRenderedState=u}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Js(e){var t=nt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,i=a.pending,u=t.memoizedState;if(i!==null){a.pending=null;var f=i=i.next;do u=e(u,f.action),f=f.next;while(f!==i);Ot(u,t.memoizedState)||(rt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function af(e,t,a){var l=Ne,i=nt(),u=we;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var f=!Ot((Ye||i).memoizedState,a);if(f&&(i.memoizedState=a,rt=!0),i=i.queue,Is(uf.bind(null,l,i,e),[e]),i.getSnapshot!==t||f||st!==null&&st.memoizedState.tag&1){if(l.flags|=2048,en(9,{destroy:void 0},nf.bind(null,l,i,a,t),null),Ve===null)throw Error(o(349));u||(ja&127)!==0||lf(l,t,a)}return a}function lf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ne.updateQueue,t===null?(t=Ji(),Ne.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function nf(e,t,a,l){t.value=a,t.getSnapshot=l,sf(t)&&rf(e)}function uf(e,t,a){return a(function(){sf(t)&&rf(e)})}function sf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ot(e,a)}catch{return!0}}function rf(e){var t=dl(e,2);t!==null&&Mt(t,e,2)}function Fs(e){var t=Nt();if(typeof e=="function"){var a=e;if(e=a(),Sl){fe(!0);try{a()}finally{fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t}function cf(e,t,a,l){return e.baseState=a,Ks(e,Ye,typeof l=="function"?l:Ta)}function cg(e,t,a,l,i){if(eu(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){u.listeners.push(f)}};w.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,of(t,u)):(u.next=a.next,t.pending=a.next=u)}}function of(e,t){var a=t.action,l=t.payload,i=e.state;if(t.isTransition){var u=w.T,f={};w.T=f;try{var p=a(i,l),j=w.S;j!==null&&j(f,p),ff(e,t,p)}catch(z){Ws(e,t,z)}finally{u!==null&&f.types!==null&&(u.types=f.types),w.T=u}}else try{u=a(i,l),ff(e,t,u)}catch(z){Ws(e,t,z)}}function ff(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){df(e,t,l)},function(l){return Ws(e,t,l)}):df(e,t,a)}function df(e,t,a){t.status="fulfilled",t.value=a,mf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,of(e,a)))}function Ws(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,mf(t),t=t.next;while(t!==l)}e.action=null}function mf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function hf(e,t){return t}function pf(e,t){if(we){var a=Ve.formState;if(a!==null){e:{var l=Ne;if(we){if(Ze){t:{for(var i=Ze,u=Ft;i.nodeType!==8;){if(!u){i=null;break t}if(i=It(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Ze=It(i.nextSibling),l=i.data==="F!";break e}}ka(l)}l=!1}l&&(t=a[0])}}return a=Nt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hf,lastRenderedState:t},a.queue=l,a=Of.bind(null,Ne,l),l.dispatch=a,l=Fs(!1),u=lr.bind(null,Ne,!1,l.queue),l=Nt(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,a=cg.bind(null,Ne,i,u,a),i.dispatch=a,l.memoizedState=e,[t,a,!1]}function gf(e){var t=nt();return vf(t,Ye,e)}function vf(e,t,a){if(t=Ks(e,t,hf)[0],e=Wi(Ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Yn(t)}catch(f){throw f===Jl?Yi:f}else l=t;t=nt();var i=t.queue,u=i.dispatch;return a!==t.memoizedState&&(Ne.flags|=2048,en(9,{destroy:void 0},og.bind(null,i,a),null)),[l,u,e]}function og(e,t){e.action=t}function yf(e){var t=nt(),a=Ye;if(a!==null)return vf(t,a,e);nt(),t=t.memoizedState,a=nt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function en(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Ji(),Ne.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function bf(){return nt().memoizedState}function Ii(e,t,a,l){var i=Nt();Ne.flags|=e,i.memoizedState=en(1|t,{destroy:void 0},a,l===void 0?null:l)}function Pi(e,t,a,l){var i=nt();l=l===void 0?null:l;var u=i.memoizedState.inst;Ye!==null&&l!==null&&Gs(l,Ye.memoizedState.deps)?i.memoizedState=en(t,u,a,l):(Ne.flags|=e,i.memoizedState=en(1|t,u,a,l))}function xf(e,t){Ii(8390656,8,e,t)}function Is(e,t){Pi(2048,8,e,t)}function fg(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Ji(),Ne.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Sf(e){var t=nt().memoizedState;return fg({ref:t,nextImpl:e}),function(){if((Be&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function jf(e,t){return Pi(4,2,e,t)}function Tf(e,t){return Pi(4,4,e,t)}function Ef(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Nf(e,t,a){a=a!=null?a.concat([e]):null,Pi(4,4,Ef.bind(null,t,e),a)}function Ps(){}function Cf(e,t){var a=nt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Gs(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function _f(e,t){var a=nt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Gs(t,l[1]))return l[0];if(l=e(),Sl){fe(!0);try{e()}finally{fe(!1)}}return a.memoizedState=[l,t],l}function er(e,t,a){return a===void 0||(ja&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Rd(),Ne.lanes|=e,Ka|=e,a)}function Rf(e,t,a,l){return Ot(a,t)?a:Wl.current!==null?(e=er(e,a,l),Ot(e,t)||(rt=!0),e):(ja&42)===0||(ja&1073741824)!==0&&(De&261930)===0?(rt=!0,e.memoizedState=a):(e=Rd(),Ne.lanes|=e,Ka|=e,t)}function zf(e,t,a,l,i){var u=Q.p;Q.p=u!==0&&8>u?u:8;var f=w.T,p={};w.T=p,lr(e,!1,t,a);try{var j=i(),z=w.S;if(z!==null&&z(p,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var B=ug(j,l);Gn(e,t,B,qt(e))}else Gn(e,t,l,qt(e))}catch(q){Gn(e,t,{then:function(){},status:"rejected",reason:q},qt())}finally{Q.p=u,f!==null&&p.types!==null&&(f.types=p.types),w.T=f}}function dg(){}function tr(e,t,a,l){if(e.tag!==5)throw Error(o(476));var i=Af(e).queue;zf(e,i,t,ne,a===null?dg:function(){return Df(e),a(l)})}function Af(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:ne},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Df(e){var t=Af(e);t.next===null&&(t=e.alternate.memoizedState),Gn(e,t.next.queue,{},qt())}function ar(){return xt(ii)}function Mf(){return nt().memoizedState}function wf(){return nt().memoizedState}function mg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=qt();e=Ga(a);var l=Xa(t,e,a);l!==null&&(Mt(l,t,a),Hn(l,t,a)),t={cache:Ds()},e.payload=t;return}t=t.return}}function hg(e,t,a){var l=qt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},eu(e)?Uf(t,a):(a=xs(e,t,a,l),a!==null&&(Mt(a,e,l),Lf(a,t,l)))}function Of(e,t,a){var l=qt();Gn(e,t,a,l)}function Gn(e,t,a,l){var i={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(eu(e))Uf(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var f=t.lastRenderedState,p=u(f,a);if(i.hasEagerState=!0,i.eagerState=p,Ot(p,f))return Oi(e,t,i,0),Ve===null&&wi(),!1}catch{}finally{}if(a=xs(e,t,i,l),a!==null)return Mt(a,e,l),Lf(a,t,l),!0}return!1}function lr(e,t,a,l){if(l={lane:2,revertLane:Ur(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},eu(e)){if(t)throw Error(o(479))}else t=xs(e,a,l,2),t!==null&&Mt(t,e,2)}function eu(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Uf(e,t){Il=$i=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Lf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kc(e,a)}}var Xn={readContext:xt,use:Fi,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Xn.useEffectEvent=et;var Hf={readContext:xt,use:Fi,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:xf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ii(4194308,4,Ef.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ii(4194308,4,e,t)},useInsertionEffect:function(e,t){Ii(4,2,e,t)},useMemo:function(e,t){var a=Nt();t=t===void 0?null:t;var l=e();if(Sl){fe(!0);try{e()}finally{fe(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Nt();if(a!==void 0){var i=a(t);if(Sl){fe(!0);try{a(t)}finally{fe(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=hg.bind(null,Ne,e),[l.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:function(e){e=Fs(e);var t=e.queue,a=Of.bind(null,Ne,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ps,useDeferredValue:function(e,t){var a=Nt();return er(a,e,t)},useTransition:function(){var e=Fs(!1);return e=zf.bind(null,Ne,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ne,i=Nt();if(we){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Ve===null)throw Error(o(349));(De&127)!==0||lf(l,t,a)}i.memoizedState=a;var u={value:a,getSnapshot:t};return i.queue=u,xf(uf.bind(null,l,u,e),[e]),l.flags|=2048,en(9,{destroy:void 0},nf.bind(null,l,u,a,t),null),a},useId:function(){var e=Nt(),t=Ve.identifierPrefix;if(we){var a=ca,l=ra;a=(l&~(1<<32-xe(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ki++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=sg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ar,useFormState:pf,useActionState:pf,useOptimistic:function(e){var t=Nt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=lr.bind(null,Ne,!0,a),a.dispatch=t,[e,t]},useMemoCache:$s,useCacheRefresh:function(){return Nt().memoizedState=mg.bind(null,Ne)},useEffectEvent:function(e){var t=Nt(),a={impl:e};return t.memoizedState=a,function(){if((Be&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},nr={readContext:xt,use:Fi,useCallback:Cf,useContext:xt,useEffect:Is,useImperativeHandle:Nf,useInsertionEffect:jf,useLayoutEffect:Tf,useMemo:_f,useReducer:Wi,useRef:bf,useState:function(){return Wi(Ta)},useDebugValue:Ps,useDeferredValue:function(e,t){var a=nt();return Rf(a,Ye.memoizedState,e,t)},useTransition:function(){var e=Wi(Ta)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:Yn(e),t]},useSyncExternalStore:af,useId:Mf,useHostTransitionStatus:ar,useFormState:gf,useActionState:gf,useOptimistic:function(e,t){var a=nt();return cf(a,Ye,e,t)},useMemoCache:$s,useCacheRefresh:wf};nr.useEffectEvent=Sf;var Bf={readContext:xt,use:Fi,useCallback:Cf,useContext:xt,useEffect:Is,useImperativeHandle:Nf,useInsertionEffect:jf,useLayoutEffect:Tf,useMemo:_f,useReducer:Js,useRef:bf,useState:function(){return Js(Ta)},useDebugValue:Ps,useDeferredValue:function(e,t){var a=nt();return Ye===null?er(a,e,t):Rf(a,Ye.memoizedState,e,t)},useTransition:function(){var e=Js(Ta)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:Yn(e),t]},useSyncExternalStore:af,useId:Mf,useHostTransitionStatus:ar,useFormState:yf,useActionState:yf,useOptimistic:function(e,t){var a=nt();return Ye!==null?cf(a,Ye,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:$s,useCacheRefresh:wf};Bf.useEffectEvent=Sf;function ir(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ur={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=qt(),i=Ga(l);i.payload=t,a!=null&&(i.callback=a),t=Xa(e,i,l),t!==null&&(Mt(t,e,l),Hn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=qt(),i=Ga(l);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Xa(e,i,l),t!==null&&(Mt(t,e,l),Hn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=qt(),l=Ga(a);l.tag=2,t!=null&&(l.callback=t),t=Xa(e,l,a),t!==null&&(Mt(t,e,a),Hn(t,e,a))}};function kf(e,t,a,l,i,u,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,f):t.prototype&&t.prototype.isPureReactComponent?!zn(a,l)||!zn(i,u):!0}function qf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&ur.enqueueReplaceState(t,t.state,null)}function jl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Yf(e){Mi(e)}function Gf(e){console.error(e)}function Xf(e){Mi(e)}function tu(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Qf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function sr(e,t,a){return a=Ga(a),a.tag=3,a.payload={element:null},a.callback=function(){tu(e,t)},a}function Vf(e){return e=Ga(e),e.tag=3,e}function Zf(e,t,a,l){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var u=l.value;e.payload=function(){return i(u)},e.callback=function(){Qf(t,a,l)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Qf(t,a,l),typeof i!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var p=l.stack;this.componentDidCatch(l.value,{componentStack:p!==null?p:""})})}function pg(e,t,a,l,i){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Zl(t,a,i,!0),a=Lt.current,a!==null){switch(a.tag){case 31:case 13:return Wt===null?mu():a.alternate===null&&tt===0&&(tt=3),a.flags&=-257,a.flags|=65536,a.lanes=i,l===Gi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Mr(e,l,i)),!1;case 22:return a.flags|=65536,l===Gi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Mr(e,l,i)),!1}throw Error(o(435,a.tag))}return Mr(e,l,i),mu(),!1}if(we)return t=Lt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==Cs&&(e=Error(o(422),{cause:l}),Mn($t(e,a)))):(l!==Cs&&(t=Error(o(423),{cause:l}),Mn($t(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=$t(l,a),i=sr(e.stateNode,l,i),Hs(e,i),tt!==4&&(tt=2)),!1;var u=Error(o(520),{cause:l});if(u=$t(u,a),Wn===null?Wn=[u]:Wn.push(u),tt!==4&&(tt=2),t===null)return!0;l=$t(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=sr(a.stateNode,l,e),Hs(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ja===null||!Ja.has(u))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Vf(i),Zf(i,e,a,l),Hs(a,i),!1}a=a.return}while(a!==null);return!1}var rr=Error(o(461)),rt=!1;function St(e,t,a,l){t.child=e===null?Jo(t,null,a,l):xl(t,e.child,a,l)}function $f(e,t,a,l,i){a=a.render;var u=t.ref;if("ref"in l){var f={};for(var p in l)p!=="ref"&&(f[p]=l[p])}else f=l;return gl(t),l=Xs(e,t,a,f,u,i),p=Qs(),e!==null&&!rt?(Vs(e,t,i),Ea(e,t,i)):(we&&p&&Es(t),t.flags|=1,St(e,t,l,i),t.child)}function Kf(e,t,a,l,i){if(e===null){var u=a.type;return typeof u=="function"&&!Ss(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Jf(e,t,u,l,i)):(e=Li(a.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!gr(e,i)){var f=u.memoizedProps;if(a=a.compare,a=a!==null?a:zn,a(f,l)&&e.ref===t.ref)return Ea(e,t,i)}return t.flags|=1,e=ya(u,l),e.ref=t.ref,e.return=t,t.child=e}function Jf(e,t,a,l,i){if(e!==null){var u=e.memoizedProps;if(zn(u,l)&&e.ref===t.ref)if(rt=!1,t.pendingProps=l=u,gr(e,i))(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,Ea(e,t,i)}return cr(e,t,a,l,i)}function Ff(e,t,a,l){var i=l.children,u=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(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~u}else l=0,t.child=null;return Wf(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&qi(t,u!==null?u.cachePool:null),u!==null?Io(t,u):ks(),Po(t);else return l=t.lanes=536870912,Wf(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(qi(t,u.cachePool),Io(t,u),Va(),t.memoizedState=null):(e!==null&&qi(t,null),ks(),Va());return St(e,t,i,a),t.child}function Qn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Wf(e,t,a,l,i){var u=ws();return u=u===null?null:{parent:ut._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&qi(t,null),ks(),Po(t),e!==null&&Zl(e,t,l,!0),t.childLanes=i,null}function au(e,t){return t=nu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function If(e,t,a){return xl(t,e.child,null,a),e=au(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function gg(e,t,a){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(l.mode==="hidden")return e=au(t,l),t.lanes=536870912,Qn(null,e);if(Ys(t),(e=Ze)?(e=om(e,Ft),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:ra,overflow:ca}:null,retryLane:536870912,hydrationErrors:null},a=Oo(e),a.return=t,t.child=a,bt=t,Ze=null)):e=null,e===null)throw ka(t);return t.lanes=536870912,null}return au(t,l)}var u=e.memoizedState;if(u!==null){var f=u.dehydrated;if(Ys(t),i)if(t.flags&256)t.flags&=-257,t=If(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(rt||Zl(e,t,a,!1),i=(a&e.childLanes)!==0,rt||i){if(l=Ve,l!==null&&(f=qc(l,a),f!==0&&f!==u.retryLane))throw u.retryLane=f,dl(e,f),Mt(l,e,f),rr;mu(),t=If(e,t,a)}else e=u.treeContext,Ze=It(f.nextSibling),bt=t,we=!0,Ba=null,Ft=!1,e!==null&&Ho(t,e),t=au(t,l),t.flags|=4096;return t}return e=ya(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lu(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function cr(e,t,a,l,i){return gl(t),a=Xs(e,t,a,l,void 0,i),l=Qs(),e!==null&&!rt?(Vs(e,t,i),Ea(e,t,i)):(we&&l&&Es(t),t.flags|=1,St(e,t,a,i),t.child)}function Pf(e,t,a,l,i,u){return gl(t),t.updateQueue=null,a=tf(t,l,a,i),ef(e),l=Qs(),e!==null&&!rt?(Vs(e,t,u),Ea(e,t,u)):(we&&l&&Es(t),t.flags|=1,St(e,t,a,u),t.child)}function ed(e,t,a,l,i){if(gl(t),t.stateNode===null){var u=Gl,f=a.contextType;typeof f=="object"&&f!==null&&(u=xt(f)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=ur,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Us(t),f=a.contextType,u.context=typeof f=="object"&&f!==null?xt(f):Gl,u.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(ir(t,a,f,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(f=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),f!==u.state&&ur.enqueueReplaceState(u,u.state,null),kn(t,l,u,i),Bn(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var p=t.memoizedProps,j=jl(a,p);u.props=j;var z=u.context,B=a.contextType;f=Gl,typeof B=="object"&&B!==null&&(f=xt(B));var q=a.getDerivedStateFromProps;B=typeof q=="function"||typeof u.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,B||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p||z!==f)&&qf(t,u,l,f),Ya=!1;var M=t.memoizedState;u.state=M,kn(t,l,u,i),Bn(),z=t.memoizedState,p||M!==z||Ya?(typeof q=="function"&&(ir(t,a,q,l),z=t.memoizedState),(j=Ya||kf(t,a,j,l,M,z,f))?(B||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=z),u.props=l,u.state=z,u.context=f,l=j):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,Ls(e,t),f=t.memoizedProps,B=jl(a,f),u.props=B,q=t.pendingProps,M=u.context,z=a.contextType,j=Gl,typeof z=="object"&&z!==null&&(j=xt(z)),p=a.getDerivedStateFromProps,(z=typeof p=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==q||M!==j)&&qf(t,u,l,j),Ya=!1,M=t.memoizedState,u.state=M,kn(t,l,u,i),Bn();var L=t.memoizedState;f!==q||M!==L||Ya||e!==null&&e.dependencies!==null&&Bi(e.dependencies)?(typeof p=="function"&&(ir(t,a,p,l),L=t.memoizedState),(B=Ya||kf(t,a,B,l,M,L,j)||e!==null&&e.dependencies!==null&&Bi(e.dependencies))?(z||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,L,j),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,L,j)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=L),u.props=l,u.state=L,u.context=j,l=B):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,lu(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=xl(t,e.child,null,i),t.child=xl(t,null,a,i)):St(e,t,a,i),t.memoizedState=u.state,e=t.child):e=Ea(e,t,i),e}function td(e,t,a,l){return hl(),t.flags|=256,St(e,t,a,l),t.child}var or={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fr(e){return{baseLanes:e,cachePool:Xo()}}function dr(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=kt),e}function ad(e,t,a){var l=t.pendingProps,i=!1,u=(t.flags&128)!==0,f;if((f=u)||(f=e!==null&&e.memoizedState===null?!1:(lt.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(i?Qa(t):Va(),(e=Ze)?(e=om(e,Ft),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:ra,overflow:ca}:null,retryLane:536870912,hydrationErrors:null},a=Oo(e),a.return=t,t.child=a,bt=t,Ze=null)):e=null,e===null)throw ka(t);return Kr(e)?t.lanes=32:t.lanes=536870912,null}var p=l.children;return l=l.fallback,i?(Va(),i=t.mode,p=nu({mode:"hidden",children:p},i),l=ml(l,i,a,null),p.return=t,l.return=t,p.sibling=l,t.child=p,l=t.child,l.memoizedState=fr(a),l.childLanes=dr(e,f,a),t.memoizedState=or,Qn(null,l)):(Qa(t),mr(t,p))}var j=e.memoizedState;if(j!==null&&(p=j.dehydrated,p!==null)){if(u)t.flags&256?(Qa(t),t.flags&=-257,t=hr(e,t,a)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),p=l.fallback,i=t.mode,l=nu({mode:"visible",children:l.children},i),p=ml(p,i,a,null),p.flags|=2,l.return=t,p.return=t,l.sibling=p,t.child=l,xl(t,e.child,null,a),l=t.child,l.memoizedState=fr(a),l.childLanes=dr(e,f,a),t.memoizedState=or,t=Qn(null,l));else if(Qa(t),Kr(p)){if(f=p.nextSibling&&p.nextSibling.dataset,f)var z=f.dgst;f=z,l=Error(o(419)),l.stack="",l.digest=f,Mn({value:l,source:null,stack:null}),t=hr(e,t,a)}else if(rt||Zl(e,t,a,!1),f=(a&e.childLanes)!==0,rt||f){if(f=Ve,f!==null&&(l=qc(f,a),l!==0&&l!==j.retryLane))throw j.retryLane=l,dl(e,l),Mt(f,e,l),rr;$r(p)||mu(),t=hr(e,t,a)}else $r(p)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Ze=It(p.nextSibling),bt=t,we=!0,Ba=null,Ft=!1,e!==null&&Ho(t,e),t=mr(t,l.children),t.flags|=4096);return t}return i?(Va(),p=l.fallback,i=t.mode,j=e.child,z=j.sibling,l=ya(j,{mode:"hidden",children:l.children}),l.subtreeFlags=j.subtreeFlags&65011712,z!==null?p=ya(z,p):(p=ml(p,i,a,null),p.flags|=2),p.return=t,l.return=t,l.sibling=p,t.child=l,Qn(null,l),l=t.child,p=e.child.memoizedState,p===null?p=fr(a):(i=p.cachePool,i!==null?(j=ut._currentValue,i=i.parent!==j?{parent:j,pool:j}:i):i=Xo(),p={baseLanes:p.baseLanes|a,cachePool:i}),l.memoizedState=p,l.childLanes=dr(e,f,a),t.memoizedState=or,Qn(e.child,l)):(Qa(t),a=e.child,e=a.sibling,a=ya(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=a,t.memoizedState=null,a)}function mr(e,t){return t=nu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function nu(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function hr(e,t,a){return xl(t,e.child,null,a),e=mr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ld(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),zs(e.return,t,a)}function pr(e,t,a,l,i,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:i,treeForkCount:u}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=i,f.treeForkCount=u)}function nd(e,t,a){var l=t.pendingProps,i=l.revealOrder,u=l.tail;l=l.children;var f=lt.current,p=(f&2)!==0;if(p?(f=f&1|2,t.flags|=128):f&=1,G(lt,f),St(e,t,l,a),l=we?Dn:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ld(e,a,t);else if(e.tag===19)ld(e,a,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(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Zi(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),pr(t,!1,i,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Zi(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}pr(t,!0,a,null,u,l);break;case"together":pr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Ea(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Zl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=ya(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ya(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function gr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bi(e)))}function vg(e,t,a){switch(t.tag){case 3:Ie(t,t.stateNode.containerInfo),qa(t,ut,e.memoizedState.cache),hl();break;case 27:case 5:wt(t);break;case 4:Ie(t,t.stateNode.containerInfo);break;case 10:qa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ys(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Qa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ad(e,t,a):(Qa(t),e=Ea(e,t,a),e!==null?e.sibling:null);Qa(t);break;case 19:var i=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Zl(e,t,a,!1),l=(a&t.childLanes)!==0),i){if(l)return nd(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),G(lt,lt.current),l)break;return null;case 22:return t.lanes=0,Ff(e,t,a,t.pendingProps);case 24:qa(t,ut,e.memoizedState.cache)}return Ea(e,t,a)}function id(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!gr(e,a)&&(t.flags&128)===0)return rt=!1,vg(e,t,a);rt=(e.flags&131072)!==0}else rt=!1,we&&(t.flags&1048576)!==0&&Lo(t,Dn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=yl(t.elementType),t.type=e,typeof e=="function")Ss(e)?(l=jl(e,l),t.tag=1,t=ed(null,t,e,l,a)):(t.tag=0,t=cr(null,t,e,l,a));else{if(e!=null){var i=e.$$typeof;if(i===$){t.tag=11,t=$f(null,t,e,l,a);break e}else if(i===P){t.tag=14,t=Kf(null,t,e,l,a);break e}}throw t=Re(e)||e,Error(o(306,t,""))}}return t;case 0:return cr(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,i=jl(l,t.pendingProps),ed(e,t,l,i,a);case 3:e:{if(Ie(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var u=t.memoizedState;i=u.element,Ls(e,t),kn(t,l,null,a);var f=t.memoizedState;if(l=f.cache,qa(t,ut,l),l!==u.cache&&As(t,[ut],a,!0),Bn(),l=f.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=td(e,t,l,a);break e}else if(l!==i){i=$t(Error(o(424)),t),Mn(i),t=td(e,t,l,a);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(Ze=It(e.firstChild),bt=t,we=!0,Ba=null,Ft=!0,a=Jo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(hl(),l===i){t=Ea(e,t,a);break e}St(e,t,l,a)}t=t.child}return t;case 26:return lu(e,t),e===null?(a=gm(t.type,null,t.pendingProps,null))?t.memoizedState=a:we||(a=t.type,e=t.pendingProps,l=xu(ve.current).createElement(a),l[yt]=t,l[Ct]=e,jt(l,a,e),mt(l),t.stateNode=l):t.memoizedState=gm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wt(t),e===null&&we&&(l=t.stateNode=mm(t.type,t.pendingProps,ve.current),bt=t,Ft=!0,i=Ze,Pa(t.type)?(Jr=i,Ze=It(l.firstChild)):Ze=i),St(e,t,t.pendingProps.children,a),lu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((i=l=Ze)&&(l=$g(l,t.type,t.pendingProps,Ft),l!==null?(t.stateNode=l,bt=t,Ze=It(l.firstChild),Ft=!1,i=!0):i=!1),i||ka(t)),wt(t),i=t.type,u=t.pendingProps,f=e!==null?e.memoizedProps:null,l=u.children,Qr(i,u)?l=null:f!==null&&Qr(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=Xs(e,t,rg,null,null,a),ii._currentValue=i),lu(e,t),St(e,t,l,a),t.child;case 6:return e===null&&we&&((e=a=Ze)&&(a=Kg(a,t.pendingProps,Ft),a!==null?(t.stateNode=a,bt=t,Ze=null,e=!0):e=!1),e||ka(t)),null;case 13:return ad(e,t,a);case 4:return Ie(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=xl(t,null,l,a):St(e,t,l,a),t.child;case 11:return $f(e,t,t.type,t.pendingProps,a);case 7:return St(e,t,t.pendingProps,a),t.child;case 8:return St(e,t,t.pendingProps.children,a),t.child;case 12:return St(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,qa(t,t.type,l.value),St(e,t,l.children,a),t.child;case 9:return i=t.type._context,l=t.pendingProps.children,gl(t),i=xt(i),l=l(i),t.flags|=1,St(e,t,l,a),t.child;case 14:return Kf(e,t,t.type,t.pendingProps,a);case 15:return Jf(e,t,t.type,t.pendingProps,a);case 19:return nd(e,t,a);case 31:return gg(e,t,a);case 22:return Ff(e,t,a,t.pendingProps);case 24:return gl(t),l=xt(ut),e===null?(i=ws(),i===null&&(i=Ve,u=Ds(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=a),i=u),t.memoizedState={parent:l,cache:i},Us(t),qa(t,ut,i)):((e.lanes&a)!==0&&(Ls(e,t),kn(t,null,null,a),Bn()),i=e.memoizedState,u=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),qa(t,ut,l)):(l=u.cache,qa(t,ut,l),l!==i.cache&&As(t,[ut],a,!0))),St(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Na(e){e.flags|=4}function vr(e,t,a,l,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Md())e.flags|=8192;else throw bl=Gi,Os}else e.flags&=-16777217}function ud(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sm(t))if(Md())e.flags|=8192;else throw bl=Gi,Os}function iu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hc():536870912,e.lanes|=t,nn|=t)}function Vn(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function yg(e,t,a){var l=t.pendingProps;switch(Ns(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Sa(ut),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Vl(t)?Na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_s())),$e(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(Na(t),u!==null?($e(t),ud(t,u)):($e(t),vr(t,i,null,l,a))):u?u!==e.memoizedState?(Na(t),$e(t),ud(t,u)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Na(t),$e(t),vr(t,i,e,l,a)),null;case 27:if(ee(t),a=ve.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Na(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return $e(t),null}e=K.current,Vl(t)?Bo(t):(e=mm(i,l,a),t.stateNode=e,Na(t))}return $e(t),null;case 5:if(ee(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Na(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return $e(t),null}if(u=K.current,Vl(t))Bo(t);else{var f=xu(ve.current);switch(u){case 1:u=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=f.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?f.createElement(i,{is:l.is}):f.createElement(i)}}u[yt]=t,u[Ct]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)u.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=u;e:switch(jt(u,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Na(t)}}return $e(t),vr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Na(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ve.current,Vl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,i=bt,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[yt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||am(e.nodeValue,a)),e||ka(t,!0)}else e=xu(e).createTextNode(l),e[yt]=t,t.stateNode=e}return $e(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Vl(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[yt]=t}else hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else a=_s(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(o(558))}return $e(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Vl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[yt]=t}else hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else i=_s(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==i&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),iu(t,t.updateQueue),$e(t),null);case 4:return Qe(),e===null&&kr(t.stateNode.containerInfo),$e(t),null;case 10:return Sa(t.type),$e(t),null;case 19:if(U(lt),l=t.memoizedState,l===null)return $e(t),null;if(i=(t.flags&128)!==0,u=l.rendering,u===null)if(i)Vn(l,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Zi(e),u!==null){for(t.flags|=128,Vn(l,!1),e=u.updateQueue,t.updateQueue=e,iu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)wo(a,e),a=a.sibling;return G(lt,lt.current&1|2),we&&ba(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&at()>ou&&(t.flags|=128,i=!0,Vn(l,!1),t.lanes=4194304)}else{if(!i)if(e=Zi(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,iu(t,e),Vn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!we)return $e(t),null}else 2*at()-l.renderingStartTime>ou&&a!==536870912&&(t.flags|=128,i=!0,Vn(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=at(),e.sibling=null,a=lt.current,G(lt,i?a&1|2:a&1),we&&ba(t,l.treeForkCount),e):($e(t),null);case 22:case 23:return Ht(t),qs(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),a=t.updateQueue,a!==null&&iu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&U(vl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Sa(ut),$e(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function bg(e,t){switch(Ns(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(ut),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ee(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(o(340));hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(lt),null;case 4:return Qe(),null;case 10:return Sa(t.type),null;case 22:case 23:return Ht(t),qs(),e!==null&&U(vl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(ut),null;case 25:return null;default:return null}}function sd(e,t){switch(Ns(t),t.tag){case 3:Sa(ut),Qe();break;case 26:case 27:case 5:ee(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:U(lt);break;case 10:Sa(t.type);break;case 22:case 23:Ht(t),qs(),e!==null&&U(vl);break;case 24:Sa(ut)}}function Zn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){l=void 0;var u=a.create,f=a.inst;l=u(),f.destroy=l}a=a.next}while(a!==i)}}catch(p){qe(t,t.return,p)}}function Za(e,t,a){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var u=i.next;l=u;do{if((l.tag&e)===e){var f=l.inst,p=f.destroy;if(p!==void 0){f.destroy=void 0,i=t;var j=a,z=p;try{z()}catch(B){qe(i,j,B)}}}l=l.next}while(l!==u)}}catch(B){qe(t,t.return,B)}}function rd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Wo(t,a)}catch(l){qe(e,e.return,l)}}}function cd(e,t,a){a.props=jl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){qe(e,t,l)}}function $n(e,t){try{var a=e.ref;if(a!==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 a=="function"?e.refCleanup=a(l):a.current=l}}catch(i){qe(e,t,i)}}function oa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(i){qe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){qe(e,t,i)}else a.current=null}function od(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(i){qe(e,e.return,i)}}function yr(e,t,a){try{var l=e.stateNode;Yg(l,e.type,a,t),l[Ct]=t}catch(i){qe(e,e.return,i)}}function fd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pa(e.type)||e.tag===4}function br(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fd(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&&Pa(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 xr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ga));else if(l!==4&&(l===27&&Pa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(xr(e,t,a),e=e.sibling;e!==null;)xr(e,t,a),e=e.sibling}function uu(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Pa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(uu(e,t,a),e=e.sibling;e!==null;)uu(e,t,a),e=e.sibling}function dd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);jt(t,l,a),t[yt]=e,t[Ct]=a}catch(u){qe(e,e.return,u)}}var Ca=!1,ct=!1,Sr=!1,md=typeof WeakSet=="function"?WeakSet:Set,ht=null;function xg(e,t){if(e=e.containerInfo,Gr=_u,e=Eo(e),hs(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var i=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var f=0,p=-1,j=-1,z=0,B=0,q=e,M=null;t:for(;;){for(var L;q!==a||i!==0&&q.nodeType!==3||(p=f+i),q!==u||l!==0&&q.nodeType!==3||(j=f+l),q.nodeType===3&&(f+=q.nodeValue.length),(L=q.firstChild)!==null;)M=q,q=L;for(;;){if(q===e)break t;if(M===a&&++z===i&&(p=f),M===u&&++B===l&&(j=f),(L=q.nextSibling)!==null)break;q=M,M=q.parentNode}q=L}a=p===-1||j===-1?null:{start:p,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xr={focusedElem:e,selectionRange:a},_u=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,u=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(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,i=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var ue=jl(a.type,i);e=l.getSnapshotBeforeUpdate(ue,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(he){qe(a,a.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Zr(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zr(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}}function hd(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ra(e,a),l&4&&Zn(5,a);break;case 1:if(Ra(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){qe(a,a.return,f)}else{var i=jl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){qe(a,a.return,f)}}l&64&&rd(a),l&512&&$n(a,a.return);break;case 3:if(Ra(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Wo(e,t)}catch(f){qe(a,a.return,f)}}break;case 27:t===null&&l&4&&dd(a);case 26:case 5:Ra(e,a),t===null&&l&4&&od(a),l&512&&$n(a,a.return);break;case 12:Ra(e,a);break;case 31:Ra(e,a),l&4&&vd(e,a);break;case 13:Ra(e,a),l&4&&yd(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=zg.bind(null,a),Jg(e,a))));break;case 22:if(l=a.memoizedState!==null||Ca,!l){t=t!==null&&t.memoizedState!==null||ct,i=Ca;var u=ct;Ca=l,(ct=t)&&!u?za(e,a,(a.subtreeFlags&8772)!==0):Ra(e,a),Ca=i,ct=u}break;case 30:break;default:Ra(e,a)}}function pd(e){var t=e.alternate;t!==null&&(e.alternate=null,pd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Wu(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 Fe=null,Rt=!1;function _a(e,t,a){for(a=a.child;a!==null;)gd(e,t,a),a=a.sibling}function gd(e,t,a){if(J&&typeof J.onCommitFiberUnmount=="function")try{J.onCommitFiberUnmount(ul,a)}catch{}switch(a.tag){case 26:ct||oa(a,t),_a(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ct||oa(a,t);var l=Fe,i=Rt;Pa(a.type)&&(Fe=a.stateNode,Rt=!1),_a(e,t,a),ai(a.stateNode),Fe=l,Rt=i;break;case 5:ct||oa(a,t);case 6:if(l=Fe,i=Rt,Fe=null,_a(e,t,a),Fe=l,Rt=i,Fe!==null)if(Rt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(a.stateNode)}catch(u){qe(a,t,u)}else try{Fe.removeChild(a.stateNode)}catch(u){qe(a,t,u)}break;case 18:Fe!==null&&(Rt?(e=Fe,rm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),mn(e)):rm(Fe,a.stateNode));break;case 4:l=Fe,i=Rt,Fe=a.stateNode.containerInfo,Rt=!0,_a(e,t,a),Fe=l,Rt=i;break;case 0:case 11:case 14:case 15:Za(2,a,t),ct||Za(4,a,t),_a(e,t,a);break;case 1:ct||(oa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&cd(a,t,l)),_a(e,t,a);break;case 21:_a(e,t,a);break;case 22:ct=(l=ct)||a.memoizedState!==null,_a(e,t,a),ct=l;break;default:_a(e,t,a)}}function vd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{mn(e)}catch(a){qe(t,t.return,a)}}}function yd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{mn(e)}catch(a){qe(t,t.return,a)}}function Sg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new md),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new md),t;default:throw Error(o(435,e.tag))}}function su(e,t){var a=Sg(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var i=Ag.bind(null,e,l);l.then(i,i)}})}function zt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var i=a[l],u=e,f=t,p=f;e:for(;p!==null;){switch(p.tag){case 27:if(Pa(p.type)){Fe=p.stateNode,Rt=!1;break e}break;case 5:Fe=p.stateNode,Rt=!1;break e;case 3:case 4:Fe=p.stateNode.containerInfo,Rt=!0;break e}p=p.return}if(Fe===null)throw Error(o(160));gd(u,f,i),Fe=null,Rt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bd(t,e),t=t.sibling}var la=null;function bd(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:zt(t,e),At(e),l&4&&(Za(3,e,e.return),Zn(3,e),Za(5,e,e.return));break;case 1:zt(t,e),At(e),l&512&&(ct||a===null||oa(a,a.return)),l&64&&Ca&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var i=la;if(zt(t,e),At(e),l&512&&(ct||a===null||oa(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(l){case"title":u=i.getElementsByTagName("title")[0],(!u||u[xn]||u[yt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(l),i.head.insertBefore(u,i.querySelector("head > title"))),jt(u,l,a),u[yt]=e,mt(u),l=u;break e;case"link":var f=bm("link","href",i).get(l+(a.href||""));if(f){for(var p=0;p<f.length;p++)if(u=f[p],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(p,1);break t}}u=i.createElement(l),jt(u,l,a),i.head.appendChild(u);break;case"meta":if(f=bm("meta","content",i).get(l+(a.content||""))){for(p=0;p<f.length;p++)if(u=f[p],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(p,1);break t}}u=i.createElement(l),jt(u,l,a),i.head.appendChild(u);break;default:throw Error(o(468,l))}u[yt]=e,mt(u),l=u}e.stateNode=l}else xm(i,e.type,e.stateNode);else e.stateNode=ym(i,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?xm(i,e.type,e.stateNode):ym(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&yr(e,e.memoizedProps,a.memoizedProps)}break;case 27:zt(t,e),At(e),l&512&&(ct||a===null||oa(a,a.return)),a!==null&&l&4&&yr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(zt(t,e),At(e),l&512&&(ct||a===null||oa(a,a.return)),e.flags&32){i=e.stateNode;try{Ul(i,"")}catch(ue){qe(e,e.return,ue)}}l&4&&e.stateNode!=null&&(i=e.memoizedProps,yr(e,i,a!==null?a.memoizedProps:i)),l&1024&&(Sr=!0);break;case 6:if(zt(t,e),At(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ue){qe(e,e.return,ue)}}break;case 3:if(Tu=null,i=la,la=Su(t.containerInfo),zt(t,e),la=i,At(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{mn(t.containerInfo)}catch(ue){qe(e,e.return,ue)}Sr&&(Sr=!1,xd(e));break;case 4:l=la,la=Su(e.stateNode.containerInfo),zt(t,e),At(e),la=l;break;case 12:zt(t,e),At(e);break;case 31:zt(t,e),At(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,su(e,l)));break;case 13:zt(t,e),At(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(cu=at()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,su(e,l)));break;case 22:i=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,z=Ca,B=ct;if(Ca=z||i,ct=B||j,zt(t,e),ct=B,Ca=z,At(e),l&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||j||Ca||ct||Tl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(u=j.stateNode,i)f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{p=j.stateNode;var q=j.memoizedProps.style,M=q!=null&&q.hasOwnProperty("display")?q.display:null;p.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ue){qe(j,j.return,ue)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=i?"":j.memoizedProps}catch(ue){qe(j,j.return,ue)}}}else if(t.tag===18){if(a===null){j=t;try{var L=j.stateNode;i?cm(L,!0):cm(j.stateNode,!1)}catch(ue){qe(j,j.return,ue)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,su(e,a))));break;case 19:zt(t,e),At(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,su(e,l)));break;case 30:break;case 21:break;default:zt(t,e),At(e)}}function At(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(fd(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,u=br(e);uu(e,u,i);break;case 5:var f=a.stateNode;a.flags&32&&(Ul(f,""),a.flags&=-33);var p=br(e);uu(e,p,f);break;case 3:case 4:var j=a.stateNode.containerInfo,z=br(e);xr(e,z,j);break;default:throw Error(o(161))}}catch(B){qe(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ra(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hd(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Za(4,t,t.return),Tl(t);break;case 1:oa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&cd(t,t.return,a),Tl(t);break;case 27:ai(t.stateNode);case 26:case 5:oa(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function za(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,i=e,u=t,f=u.flags;switch(u.tag){case 0:case 11:case 15:za(i,u,a),Zn(4,u);break;case 1:if(za(i,u,a),l=u,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(z){qe(l,l.return,z)}if(l=u,i=l.updateQueue,i!==null){var p=l.stateNode;try{var j=i.shared.hiddenCallbacks;if(j!==null)for(i.shared.hiddenCallbacks=null,i=0;i<j.length;i++)Fo(j[i],p)}catch(z){qe(l,l.return,z)}}a&&f&64&&rd(u),$n(u,u.return);break;case 27:dd(u);case 26:case 5:za(i,u,a),a&&l===null&&f&4&&od(u),$n(u,u.return);break;case 12:za(i,u,a);break;case 31:za(i,u,a),a&&f&4&&vd(i,u);break;case 13:za(i,u,a),a&&f&4&&yd(i,u);break;case 22:u.memoizedState===null&&za(i,u,a),$n(u,u.return);break;case 30:break;default:za(i,u,a)}t=t.sibling}}function jr(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&wn(a))}function Tr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wn(e))}function na(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sd(e,t,a,l),t=t.sibling}function Sd(e,t,a,l){var i=t.flags;switch(t.tag){case 0:case 11:case 15:na(e,t,a,l),i&2048&&Zn(9,t);break;case 1:na(e,t,a,l);break;case 3:na(e,t,a,l),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wn(e)));break;case 12:if(i&2048){na(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,f=u.id,p=u.onPostCommit;typeof p=="function"&&p(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){qe(t,t.return,j)}}else na(e,t,a,l);break;case 31:na(e,t,a,l);break;case 13:na(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,f=t.alternate,t.memoizedState!==null?u._visibility&2?na(e,t,a,l):Kn(e,t):u._visibility&2?na(e,t,a,l):(u._visibility|=2,tn(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),i&2048&&jr(f,t);break;case 24:na(e,t,a,l),i&2048&&Tr(t.alternate,t);break;default:na(e,t,a,l)}}function tn(e,t,a,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,f=t,p=a,j=l,z=f.flags;switch(f.tag){case 0:case 11:case 15:tn(u,f,p,j,i),Zn(8,f);break;case 23:break;case 22:var B=f.stateNode;f.memoizedState!==null?B._visibility&2?tn(u,f,p,j,i):Kn(u,f):(B._visibility|=2,tn(u,f,p,j,i)),i&&z&2048&&jr(f.alternate,f);break;case 24:tn(u,f,p,j,i),i&&z&2048&&Tr(f.alternate,f);break;default:tn(u,f,p,j,i)}t=t.sibling}}function Kn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,i=l.flags;switch(l.tag){case 22:Kn(a,l),i&2048&&jr(l.alternate,l);break;case 24:Kn(a,l),i&2048&&Tr(l.alternate,l);break;default:Kn(a,l)}t=t.sibling}}var Jn=8192;function an(e,t,a){if(e.subtreeFlags&Jn)for(e=e.child;e!==null;)jd(e,t,a),e=e.sibling}function jd(e,t,a){switch(e.tag){case 26:an(e,t,a),e.flags&Jn&&e.memoizedState!==null&&sv(a,la,e.memoizedState,e.memoizedProps);break;case 5:an(e,t,a);break;case 3:case 4:var l=la;la=Su(e.stateNode.containerInfo),an(e,t,a),la=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Jn,Jn=16777216,an(e,t,a),Jn=l):an(e,t,a));break;default:an(e,t,a)}}function Td(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 Fn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,Nd(l,e)}Td(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ed(e),e=e.sibling}function Ed(e){switch(e.tag){case 0:case 11:case 15:Fn(e),e.flags&2048&&Za(9,e,e.return);break;case 3:Fn(e);break;case 12:Fn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ru(e)):Fn(e);break;default:Fn(e)}}function ru(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,Nd(l,e)}Td(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Za(8,t,t.return),ru(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ru(t));break;default:ru(t)}e=e.sibling}}function Nd(e,t){for(;ht!==null;){var a=ht;switch(a.tag){case 0:case 11:case 15:Za(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:wn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ht=l;else e:for(a=e;ht!==null;){l=ht;var i=l.sibling,u=l.return;if(pd(l),l===a){ht=null;break e}if(i!==null){i.return=u,ht=i;break e}ht=u}}}var jg={getCacheForType:function(e){var t=xt(ut),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return xt(ut).controller.signal}},Tg=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ve=null,ze=null,De=0,ke=0,Bt=null,$a=!1,ln=!1,Er=!1,Aa=0,tt=0,Ka=0,El=0,Nr=0,kt=0,nn=0,Wn=null,Dt=null,Cr=!1,cu=0,Cd=0,ou=1/0,fu=null,Ja=null,ot=0,Fa=null,un=null,Da=0,_r=0,Rr=null,_d=null,In=0,zr=null;function qt(){return(Be&2)!==0&&De!==0?De&-De:w.T!==null?Ur():Yc()}function Rd(){if(kt===0)if((De&536870912)===0||we){var e=_l;_l<<=1,(_l&3932160)===0&&(_l=262144),kt=e}else kt=536870912;return e=Lt.current,e!==null&&(e.flags|=32),kt}function Mt(e,t,a){(e===Ve&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(sn(e,0),Wa(e,De,kt,!1)),bn(e,a),((Be&2)===0||e!==Ve)&&(e===Ve&&((Be&2)===0&&(El|=a),tt===4&&Wa(e,De,kt,!1)),fa(e))}function zd(e,t,a){if((Be&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||yn(e,t),i=l?Cg(e,t):Dr(e,t,!0),u=l;do{if(i===0){ln&&!l&&Wa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Eg(a)){i=Dr(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var p=e;i=Wn;var j=p.current.memoizedState.isDehydrated;if(j&&(sn(p,f).flags|=256),f=Dr(p,f,!1),f!==2){if(Er&&!j){p.errorRecoveryDisabledLanes|=u,El|=u,i=4;break e}u=Dt,Dt=i,u!==null&&(Dt===null?Dt=u:Dt.push.apply(Dt,u))}i=f}if(u=!1,i!==2)continue}}if(i===1){sn(e,0),Wa(e,t,0,!0);break}e:{switch(l=e,u=i,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Wa(l,t,kt,!$a);break e;case 2:Dt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=cu+300-at(),10<i)){if(Wa(l,t,kt,!$a),Si(l,0,!0)!==0)break e;Da=t,l.timeoutHandle=um(Ad.bind(null,l,a,Dt,fu,Cr,t,kt,El,nn,$a,u,"Throttled",-0,0),i);break e}Ad(l,a,Dt,fu,Cr,t,kt,El,nn,$a,u,null,-0,0)}}break}while(!0);fa(e)}function Ad(e,t,a,l,i,u,f,p,j,z,B,q,M,L){if(e.timeoutHandle=-1,q=t.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ga},jd(t,u,q);var ue=(u&62914560)===u?cu-at():(u&4194048)===u?Cd-at():0;if(ue=rv(q,ue),ue!==null){Da=u,e.cancelPendingCommit=ue(Bd.bind(null,e,t,u,a,l,i,f,p,j,B,q,null,M,L)),Wa(e,u,f,!z);return}}Bd(e,t,u,a,l,i,f,p,j)}function Eg(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var i=a[l],u=i.getSnapshot;i=i.value;try{if(!Ot(u(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Wa(e,t,a,l){t&=~Nr,t&=~El,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var u=31-xe(i),f=1<<u;l[u]=-1,i&=~f}a!==0&&Bc(e,a,t)}function du(){return(Be&6)===0?(Pn(0),!1):!0}function Ar(){if(ze!==null){if(ke===0)var e=ze.return;else e=ze,xa=pl=null,Zs(e),Fl=null,Un=0,e=ze;for(;e!==null;)sd(e.alternate,e),e=e.return;ze=null}}function sn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Qg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Da=0,Ar(),Ve=e,ze=a=ya(e.current,null),De=t,ke=0,Bt=null,$a=!1,ln=yn(e,t),Er=!1,nn=kt=Nr=El=Ka=tt=0,Dt=Wn=null,Cr=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var i=31-xe(l),u=1<<i;t|=e[i],l&=~u}return Aa=t,wi(),a}function Dd(e,t){Ne=null,w.H=Xn,t===Jl||t===Yi?(t=Zo(),ke=3):t===Os?(t=Zo(),ke=4):ke=t===rr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bt=t,ze===null&&(tt=1,tu(e,$t(t,e.current)))}function Md(){var e=Lt.current;return e===null?!0:(De&4194048)===De?Wt===null:(De&62914560)===De||(De&536870912)!==0?e===Wt:!1}function wd(){var e=w.H;return w.H=Xn,e===null?Xn:e}function Od(){var e=w.A;return w.A=jg,e}function mu(){tt=4,$a||(De&4194048)!==De&&Lt.current!==null||(ln=!0),(Ka&134217727)===0&&(El&134217727)===0||Ve===null||Wa(Ve,De,kt,!1)}function Dr(e,t,a){var l=Be;Be|=2;var i=wd(),u=Od();(Ve!==e||De!==t)&&(fu=null,sn(e,t)),t=!1;var f=tt;e:do try{if(ke!==0&&ze!==null){var p=ze,j=Bt;switch(ke){case 8:Ar(),f=6;break e;case 3:case 2:case 9:case 6:Lt.current===null&&(t=!0);var z=ke;if(ke=0,Bt=null,rn(e,p,j,z),a&&ln){f=0;break e}break;default:z=ke,ke=0,Bt=null,rn(e,p,j,z)}}Ng(),f=tt;break}catch(B){Dd(e,B)}while(!0);return t&&e.shellSuspendCounter++,xa=pl=null,Be=l,w.H=i,w.A=u,ze===null&&(Ve=null,De=0,wi()),f}function Ng(){for(;ze!==null;)Ud(ze)}function Cg(e,t){var a=Be;Be|=2;var l=wd(),i=Od();Ve!==e||De!==t?(fu=null,ou=at()+500,sn(e,t)):ln=yn(e,t);e:do try{if(ke!==0&&ze!==null){t=ze;var u=Bt;t:switch(ke){case 1:ke=0,Bt=null,rn(e,t,u,1);break;case 2:case 9:if(Qo(u)){ke=0,Bt=null,Ld(t);break}t=function(){ke!==2&&ke!==9||Ve!==e||(ke=7),fa(e)},u.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:Qo(u)?(ke=0,Bt=null,Ld(t)):(ke=0,Bt=null,rn(e,t,u,7));break;case 5:var f=null;switch(ze.tag){case 26:f=ze.memoizedState;case 5:case 27:var p=ze;if(f?Sm(f):p.stateNode.complete){ke=0,Bt=null;var j=p.sibling;if(j!==null)ze=j;else{var z=p.return;z!==null?(ze=z,hu(z)):ze=null}break t}}ke=0,Bt=null,rn(e,t,u,5);break;case 6:ke=0,Bt=null,rn(e,t,u,6);break;case 8:Ar(),tt=6;break e;default:throw Error(o(462))}}_g();break}catch(B){Dd(e,B)}while(!0);return xa=pl=null,w.H=l,w.A=i,Be=a,ze!==null?0:(Ve=null,De=0,wi(),tt)}function _g(){for(;ze!==null&&!it();)Ud(ze)}function Ud(e){var t=id(e.alternate,e,Aa);e.memoizedProps=e.pendingProps,t===null?hu(e):ze=t}function Ld(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Pf(a,t,t.pendingProps,t.type,void 0,De);break;case 11:t=Pf(a,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:Zs(t);default:sd(a,t),t=ze=wo(t,Aa),t=id(a,t,Aa)}e.memoizedProps=e.pendingProps,t===null?hu(e):ze=t}function rn(e,t,a,l){xa=pl=null,Zs(t),Fl=null,Un=0;var i=t.return;try{if(pg(e,i,t,a,De)){tt=1,tu(e,$t(a,e.current)),ze=null;return}}catch(u){if(i!==null)throw ze=i,u;tt=1,tu(e,$t(a,e.current)),ze=null;return}t.flags&32768?(we||l===1?e=!0:ln||(De&536870912)!==0?e=!1:($a=e=!0,(l===2||l===9||l===3||l===6)&&(l=Lt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Hd(t,e)):hu(t)}function hu(e){var t=e;do{if((t.flags&32768)!==0){Hd(t,$a);return}e=t.return;var a=yg(t.alternate,t,Aa);if(a!==null){ze=a;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);tt===0&&(tt=5)}function Hd(e,t){do{var a=bg(e.alternate,e);if(a!==null){a.flags&=32767,ze=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=a}while(e!==null);tt=6,ze=null}function Bd(e,t,a,l,i,u,f,p,j){e.cancelPendingCommit=null;do pu();while(ot!==0);if((Be&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=bs,up(e,a,u,f,p,j),e===Ve&&(ze=Ve=null,De=0),un=t,Fa=e,Da=a,_r=u,Rr=i,_d=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Dg(se,function(){return Xd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=w.T,w.T=null,i=Q.p,Q.p=2,f=Be,Be|=4;try{xg(e,t,a)}finally{Be=f,Q.p=i,w.T=l}}ot=1,kd(),qd(),Yd()}}function kd(){if(ot===1){ot=0;var e=Fa,t=un,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=w.T,w.T=null;var l=Q.p;Q.p=2;var i=Be;Be|=4;try{bd(t,e);var u=Xr,f=Eo(e.containerInfo),p=u.focusedElem,j=u.selectionRange;if(f!==p&&p&&p.ownerDocument&&To(p.ownerDocument.documentElement,p)){if(j!==null&&hs(p)){var z=j.start,B=j.end;if(B===void 0&&(B=z),"selectionStart"in p)p.selectionStart=z,p.selectionEnd=Math.min(B,p.value.length);else{var q=p.ownerDocument||document,M=q&&q.defaultView||window;if(M.getSelection){var L=M.getSelection(),ue=p.textContent.length,he=Math.min(j.start,ue),Xe=j.end===void 0?he:Math.min(j.end,ue);!L.extend&&he>Xe&&(f=Xe,Xe=he,he=f);var N=jo(p,he),E=jo(p,Xe);if(N&&E&&(L.rangeCount!==1||L.anchorNode!==N.node||L.anchorOffset!==N.offset||L.focusNode!==E.node||L.focusOffset!==E.offset)){var R=q.createRange();R.setStart(N.node,N.offset),L.removeAllRanges(),he>Xe?(L.addRange(R),L.extend(E.node,E.offset)):(R.setEnd(E.node,E.offset),L.addRange(R))}}}}for(q=[],L=p;L=L.parentNode;)L.nodeType===1&&q.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<q.length;p++){var k=q[p];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}_u=!!Gr,Xr=Gr=null}finally{Be=i,Q.p=l,w.T=a}}e.current=t,ot=2}}function qd(){if(ot===2){ot=0;var e=Fa,t=un,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=w.T,w.T=null;var l=Q.p;Q.p=2;var i=Be;Be|=4;try{hd(e,t.alternate,t)}finally{Be=i,Q.p=l,w.T=a}}ot=3}}function Yd(){if(ot===4||ot===3){ot=0,ua();var e=Fa,t=un,a=Da,l=_d;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ot=5:(ot=0,un=Fa=null,Gd(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ja=null),Ju(a),t=t.stateNode,J&&typeof J.onCommitFiberRoot=="function")try{J.onCommitFiberRoot(ul,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=w.T,i=Q.p,Q.p=2,w.T=null;try{for(var u=e.onRecoverableError,f=0;f<l.length;f++){var p=l[f];u(p.value,{componentStack:p.stack})}}finally{w.T=t,Q.p=i}}(Da&3)!==0&&pu(),fa(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===zr?In++:(In=0,zr=e):In=0,Pn(0)}}function Gd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wn(t)))}function pu(){return kd(),qd(),Yd(),Xd()}function Xd(){if(ot!==5)return!1;var e=Fa,t=_r;_r=0;var a=Ju(Da),l=w.T,i=Q.p;try{Q.p=32>a?32:a,w.T=null,a=Rr,Rr=null;var u=Fa,f=Da;if(ot=0,un=Fa=null,Da=0,(Be&6)!==0)throw Error(o(331));var p=Be;if(Be|=4,Ed(u.current),Sd(u,u.current,f,a),Be=p,Pn(0,!1),J&&typeof J.onPostCommitFiberRoot=="function")try{J.onPostCommitFiberRoot(ul,u)}catch{}return!0}finally{Q.p=i,w.T=l,Gd(e,t)}}function Qd(e,t,a){t=$t(a,t),t=sr(e.stateNode,t,2),e=Xa(e,t,2),e!==null&&(bn(e,2),fa(e))}function qe(e,t,a){if(e.tag===3)Qd(e,e,a);else for(;t!==null;){if(t.tag===3){Qd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ja===null||!Ja.has(l))){e=$t(a,e),a=Vf(2),l=Xa(t,a,2),l!==null&&(Zf(a,l,t,e),bn(l,2),fa(l));break}}t=t.return}}function Mr(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Tg;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(a)||(Er=!0,i.add(a),e=Rg.bind(null,e,t,a),t.then(e,e))}function Rg(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ve===e&&(De&a)===a&&(tt===4||tt===3&&(De&62914560)===De&&300>at()-cu?(Be&2)===0&&sn(e,0):Nr|=a,nn===De&&(nn=0)),fa(e)}function Vd(e,t){t===0&&(t=Hc()),e=dl(e,t),e!==null&&(bn(e,t),fa(e))}function zg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Vd(e,a)}function Ag(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Vd(e,a)}function Dg(e,t){return Pe(e,t)}var gu=null,cn=null,wr=!1,vu=!1,Or=!1,Ia=0;function fa(e){e!==cn&&e.next===null&&(cn===null?gu=cn=e:cn=cn.next=e),vu=!0,wr||(wr=!0,wg())}function Pn(e,t){if(!Or&&vu){Or=!0;do for(var a=!1,l=gu;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var u=0;else{var f=l.suspendedLanes,p=l.pingedLanes;u=(1<<31-xe(42|e)+1)-1,u&=i&~(f&~p),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,Jd(l,u))}else u=De,u=Si(l,l===Ve?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||yn(l,u)||(a=!0,Jd(l,u));l=l.next}while(a);Or=!1}}function Mg(){Zd()}function Zd(){vu=wr=!1;var e=0;Ia!==0&&Xg()&&(e=Ia);for(var t=at(),a=null,l=gu;l!==null;){var i=l.next,u=$d(l,t);u===0?(l.next=null,a===null?gu=i:a.next=i,i===null&&(cn=a)):(a=l,(e!==0||(u&3)!==0)&&(vu=!0)),l=i}ot!==0&&ot!==5||Pn(e),Ia!==0&&(Ia=0)}function $d(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var f=31-xe(u),p=1<<f,j=i[f];j===-1?((p&a)===0||(p&l)!==0)&&(i[f]=ip(p,t)):j<=t&&(e.expiredLanes|=p),u&=~p}if(t=Ve,a=De,a=Si(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ke(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||yn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Ke(l),Ju(a)){case 2:case 8:a=ae;break;case 32:a=se;break;case 268435456:a=Gt;break;default:a=se}return l=Kd.bind(null,e),a=Pe(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Ke(l),e.callbackPriority=2,e.callbackNode=null,2}function Kd(e,t){if(ot!==0&&ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(pu()&&e.callbackNode!==a)return null;var l=De;return l=Si(e,e===Ve?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(zd(e,l,t),$d(e,at()),e.callbackNode!=null&&e.callbackNode===a?Kd.bind(null,e):null)}function Jd(e,t){if(pu())return null;zd(e,t,!0)}function wg(){Vg(function(){(Be&6)!==0?Pe(ft,Mg):Zd()})}function Ur(){if(Ia===0){var e=$l;e===0&&(e=ha,ha<<=1,(ha&261888)===0&&(ha=256)),Ia=e}return Ia}function Fd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ni(""+e)}function Wd(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Og(e,t,a,l,i){if(t==="submit"&&a&&a.stateNode===i){var u=Fd((i[Ct]||null).action),f=l.submitter;f&&(t=(t=f[Ct]||null)?Fd(t.formAction):f.getAttribute("formAction"),t!==null&&(u=t,f=null));var p=new zi("action","action",null,l,i);e.push({event:p,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ia!==0){var j=f?Wd(i,f):new FormData(i);tr(a,{pending:!0,data:j,method:i.method,action:u},null,j)}}else typeof u=="function"&&(p.preventDefault(),j=f?Wd(i,f):new FormData(i),tr(a,{pending:!0,data:j,method:i.method,action:u},u,j))},currentTarget:i}]})}}for(var Lr=0;Lr<ys.length;Lr++){var Hr=ys[Lr],Ug=Hr.toLowerCase(),Lg=Hr[0].toUpperCase()+Hr.slice(1);aa(Ug,"on"+Lg)}aa(_o,"onAnimationEnd"),aa(Ro,"onAnimationIteration"),aa(zo,"onAnimationStart"),aa("dblclick","onDoubleClick"),aa("focusin","onFocus"),aa("focusout","onBlur"),aa(Ip,"onTransitionRun"),aa(Pp,"onTransitionStart"),aa(eg,"onTransitionCancel"),aa(Ao,"onTransitionEnd"),wl("onMouseEnter",["mouseout","mouseover"]),wl("onMouseLeave",["mouseout","mouseover"]),wl("onPointerEnter",["pointerout","pointerover"]),wl("onPointerLeave",["pointerout","pointerover"]),rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rl("onBeforeInput",["compositionend","keypress","textInput","paste"]),rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ei="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(" "),Hg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ei));function Id(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],i=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var f=l.length-1;0<=f;f--){var p=l[f],j=p.instance,z=p.currentTarget;if(p=p.listener,j!==u&&i.isPropagationStopped())break e;u=p,i.currentTarget=z;try{u(i)}catch(B){Mi(B)}i.currentTarget=null,u=j}else for(f=0;f<l.length;f++){if(p=l[f],j=p.instance,z=p.currentTarget,p=p.listener,j!==u&&i.isPropagationStopped())break e;u=p,i.currentTarget=z;try{u(i)}catch(B){Mi(B)}i.currentTarget=null,u=j}}}}function Ae(e,t){var a=t[Fu];a===void 0&&(a=t[Fu]=new Set);var l=e+"__bubble";a.has(l)||(Pd(t,e,2,!1),a.add(l))}function Br(e,t,a){var l=0;t&&(l|=4),Pd(a,e,l,t)}var yu="_reactListening"+Math.random().toString(36).slice(2);function kr(e){if(!e[yu]){e[yu]=!0,Qc.forEach(function(a){a!=="selectionchange"&&(Hg.has(a)||Br(a,!1,e),Br(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yu]||(t[yu]=!0,Br("selectionchange",!1,t))}}function Pd(e,t,a,l){switch(Rm(t)){case 2:var i=fv;break;case 8:i=dv;break;default:i=ec}a=i.bind(null,t,a,e),i=void 0,!is||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function qr(e,t,a,l,i){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var p=l.stateNode.containerInfo;if(p===i)break;if(f===4)for(f=l.return;f!==null;){var j=f.tag;if((j===3||j===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;p!==null;){if(f=Al(p),f===null)return;if(j=f.tag,j===5||j===6||j===26||j===27){l=u=f;continue e}p=p.parentNode}}l=l.return}ao(function(){var z=u,B=ls(a),q=[];e:{var M=Do.get(e);if(M!==void 0){var L=zi,ue=e;switch(e){case"keypress":if(_i(a)===0)break e;case"keydown":case"keyup":L=Ap;break;case"focusin":ue="focus",L=cs;break;case"focusout":ue="blur",L=cs;break;case"beforeblur":case"afterblur":L=cs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=io;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=yp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=wp;break;case _o:case Ro:case zo:L=Sp;break;case Ao:L=Up;break;case"scroll":case"scrollend":L=gp;break;case"wheel":L=Hp;break;case"copy":case"cut":case"paste":L=Tp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=so;break;case"toggle":case"beforetoggle":L=kp}var he=(t&4)!==0,Xe=!he&&(e==="scroll"||e==="scrollend"),N=he?M!==null?M+"Capture":null:M;he=[];for(var E=z,R;E!==null;){var k=E;if(R=k.stateNode,k=k.tag,k!==5&&k!==26&&k!==27||R===null||N===null||(k=jn(E,N),k!=null&&he.push(ti(E,k,R))),Xe)break;E=E.return}0<he.length&&(M=new L(M,ue,null,a,B),q.push({event:M,listeners:he}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",M&&a!==as&&(ue=a.relatedTarget||a.fromElement)&&(Al(ue)||ue[zl]))break e;if((L||M)&&(M=B.window===B?B:(M=B.ownerDocument)?M.defaultView||M.parentWindow:window,L?(ue=a.relatedTarget||a.toElement,L=z,ue=ue?Al(ue):null,ue!==null&&(Xe=m(ue),he=ue.tag,ue!==Xe||he!==5&&he!==27&&he!==6)&&(ue=null)):(L=null,ue=z),L!==ue)){if(he=io,k="onMouseLeave",N="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(he=so,k="onPointerLeave",N="onPointerEnter",E="pointer"),Xe=L==null?M:Sn(L),R=ue==null?M:Sn(ue),M=new he(k,E+"leave",L,a,B),M.target=Xe,M.relatedTarget=R,k=null,Al(B)===z&&(he=new he(N,E+"enter",ue,a,B),he.target=R,he.relatedTarget=Xe,k=he),Xe=k,L&&ue)t:{for(he=Bg,N=L,E=ue,R=0,k=N;k;k=he(k))R++;k=0;for(var me=E;me;me=he(me))k++;for(;0<R-k;)N=he(N),R--;for(;0<k-R;)E=he(E),k--;for(;R--;){if(N===E||E!==null&&N===E.alternate){he=N;break t}N=he(N),E=he(E)}he=null}else he=null;L!==null&&em(q,M,L,he,!1),ue!==null&&Xe!==null&&em(q,Xe,ue,he,!0)}}e:{if(M=z?Sn(z):window,L=M.nodeName&&M.nodeName.toLowerCase(),L==="select"||L==="input"&&M.type==="file")var Le=go;else if(ho(M))if(vo)Le=Jp;else{Le=$p;var oe=Zp}else L=M.nodeName,!L||L.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?z&&ts(z.elementType)&&(Le=go):Le=Kp;if(Le&&(Le=Le(e,z))){po(q,Le,a,B);break e}oe&&oe(e,M,z),e==="focusout"&&z&&M.type==="number"&&z.memoizedProps.value!=null&&es(M,"number",M.value)}switch(oe=z?Sn(z):window,e){case"focusin":(ho(oe)||oe.contentEditable==="true")&&(kl=oe,ps=z,An=null);break;case"focusout":An=ps=kl=null;break;case"mousedown":gs=!0;break;case"contextmenu":case"mouseup":case"dragend":gs=!1,No(q,a,B);break;case"selectionchange":if(Wp)break;case"keydown":case"keyup":No(q,a,B)}var Ce;if(fs)e:{switch(e){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Bl?fo(e,a)&&(Me="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Me="onCompositionStart");Me&&(ro&&a.locale!=="ko"&&(Bl||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Bl&&(Ce=lo()):(La=B,us="value"in La?La.value:La.textContent,Bl=!0)),oe=bu(z,Me),0<oe.length&&(Me=new uo(Me,e,null,a,B),q.push({event:Me,listeners:oe}),Ce?Me.data=Ce:(Ce=mo(a),Ce!==null&&(Me.data=Ce)))),(Ce=Yp?Gp(e,a):Xp(e,a))&&(Me=bu(z,"onBeforeInput"),0<Me.length&&(oe=new uo("onBeforeInput","beforeinput",null,a,B),q.push({event:oe,listeners:Me}),oe.data=Ce)),Og(q,e,z,a,B)}Id(q,t)})}function ti(e,t,a){return{instance:e,listener:t,currentTarget:a}}function bu(e,t){for(var a=t+"Capture",l=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=jn(e,a),i!=null&&l.unshift(ti(e,i,u)),i=jn(e,t),i!=null&&l.push(ti(e,i,u))),e.tag===3)return l;e=e.return}return[]}function Bg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function em(e,t,a,l,i){for(var u=t._reactName,f=[];a!==null&&a!==l;){var p=a,j=p.alternate,z=p.stateNode;if(p=p.tag,j!==null&&j===l)break;p!==5&&p!==26&&p!==27||z===null||(j=z,i?(z=jn(a,u),z!=null&&f.unshift(ti(a,z,j))):i||(z=jn(a,u),z!=null&&f.push(ti(a,z,j)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var kg=/\r\n?/g,qg=/\u0000|\uFFFD/g;function tm(e){return(typeof e=="string"?e:""+e).replace(kg,`
`).replace(qg,"")}function am(e,t){return t=tm(t),tm(e)===t}function Ge(e,t,a,l,i,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ul(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ul(e,""+l);break;case"className":Ti(e,"class",l);break;case"tabIndex":Ti(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ti(e,a,l);break;case"style":eo(e,l,u);break;case"data":if(t!=="object"){Ti(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Ni(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&Ge(e,t,"name",i.name,i,null),Ge(e,t,"formEncType",i.formEncType,i,null),Ge(e,t,"formMethod",i.formMethod,i,null),Ge(e,t,"formTarget",i.formTarget,i,null)):(Ge(e,t,"encType",i.encType,i,null),Ge(e,t,"method",i.method,i,null),Ge(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Ni(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=ga);break;case"onScroll":l!=null&&Ae("scroll",e);break;case"onScrollEnd":l!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}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}a=Ni(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);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(a,""+l):e.removeAttribute(a);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(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),ji(e,"popover",l);break;case"xlinkActuate":pa(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":pa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":pa(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":pa(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":pa(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":pa(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":pa(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":pa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":pa(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ji(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hp.get(a)||a,ji(e,a,l))}}function Yr(e,t,a,l,i,u){switch(a){case"style":eo(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Ul(e,l):(typeof l=="number"||typeof l=="bigint")&&Ul(e,""+l);break;case"onScroll":l!=null&&Ae("scroll",e);break;case"onScrollEnd":l!=null&&Ae("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),u=e[Ct]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,i);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ji(e,a,l)}}}function jt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var l=!1,i=!1,u;for(u in a)if(a.hasOwnProperty(u)){var f=a[u];if(f!=null)switch(u){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ge(e,t,u,f,a,null)}}i&&Ge(e,t,"srcSet",a.srcSet,a,null),l&&Ge(e,t,"src",a.src,a,null);return;case"input":Ae("invalid",e);var p=u=f=i=null,j=null,z=null;for(l in a)if(a.hasOwnProperty(l)){var B=a[l];if(B!=null)switch(l){case"name":i=B;break;case"type":f=B;break;case"checked":j=B;break;case"defaultChecked":z=B;break;case"value":u=B;break;case"defaultValue":p=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:Ge(e,t,l,B,a,null)}}Fc(e,u,p,j,z,f,i,!1);return;case"select":Ae("invalid",e),l=f=u=null;for(i in a)if(a.hasOwnProperty(i)&&(p=a[i],p!=null))switch(i){case"value":u=p;break;case"defaultValue":f=p;break;case"multiple":l=p;default:Ge(e,t,i,p,a,null)}t=u,a=f,e.multiple=!!l,t!=null?Ol(e,!!l,t,!1):a!=null&&Ol(e,!!l,a,!0);return;case"textarea":Ae("invalid",e),u=i=l=null;for(f in a)if(a.hasOwnProperty(f)&&(p=a[f],p!=null))switch(f){case"value":l=p;break;case"defaultValue":i=p;break;case"children":u=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:Ge(e,t,f,p,a,null)}Ic(e,l,i,u);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(l=a[j],l!=null))switch(j){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ge(e,t,j,l,a,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(l=0;l<ei.length;l++)Ae(ei[l],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(z in a)if(a.hasOwnProperty(z)&&(l=a[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ge(e,t,z,l,a,null)}return;default:if(ts(t)){for(B in a)a.hasOwnProperty(B)&&(l=a[B],l!==void 0&&Yr(e,t,B,l,a,void 0));return}}for(p in a)a.hasOwnProperty(p)&&(l=a[p],l!=null&&Ge(e,t,p,l,a,null))}function Yg(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,f=null,p=null,j=null,z=null,B=null;for(L in a){var q=a[L];if(a.hasOwnProperty(L)&&q!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":j=q;default:l.hasOwnProperty(L)||Ge(e,t,L,null,l,q)}}for(var M in l){var L=l[M];if(q=a[M],l.hasOwnProperty(M)&&(L!=null||q!=null))switch(M){case"type":u=L;break;case"name":i=L;break;case"checked":z=L;break;case"defaultChecked":B=L;break;case"value":f=L;break;case"defaultValue":p=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:L!==q&&Ge(e,t,M,L,l,q)}}Pu(e,f,p,j,z,B,u,i);return;case"select":L=f=p=M=null;for(u in a)if(j=a[u],a.hasOwnProperty(u)&&j!=null)switch(u){case"value":break;case"multiple":L=j;default:l.hasOwnProperty(u)||Ge(e,t,u,null,l,j)}for(i in l)if(u=l[i],j=a[i],l.hasOwnProperty(i)&&(u!=null||j!=null))switch(i){case"value":M=u;break;case"defaultValue":p=u;break;case"multiple":f=u;default:u!==j&&Ge(e,t,i,u,l,j)}t=p,a=f,l=L,M!=null?Ol(e,!!a,M,!1):!!l!=!!a&&(t!=null?Ol(e,!!a,t,!0):Ol(e,!!a,a?[]:"",!1));return;case"textarea":L=M=null;for(p in a)if(i=a[p],a.hasOwnProperty(p)&&i!=null&&!l.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Ge(e,t,p,null,l,i)}for(f in l)if(i=l[f],u=a[f],l.hasOwnProperty(f)&&(i!=null||u!=null))switch(f){case"value":M=i;break;case"defaultValue":L=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&Ge(e,t,f,i,l,u)}Wc(e,M,L);return;case"option":for(var ue in a)if(M=a[ue],a.hasOwnProperty(ue)&&M!=null&&!l.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:Ge(e,t,ue,null,l,M)}for(j in l)if(M=l[j],L=a[j],l.hasOwnProperty(j)&&M!==L&&(M!=null||L!=null))switch(j){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Ge(e,t,j,M,l,L)}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 he in a)M=a[he],a.hasOwnProperty(he)&&M!=null&&!l.hasOwnProperty(he)&&Ge(e,t,he,null,l,M);for(z in l)if(M=l[z],L=a[z],l.hasOwnProperty(z)&&M!==L&&(M!=null||L!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:Ge(e,t,z,M,l,L)}return;default:if(ts(t)){for(var Xe in a)M=a[Xe],a.hasOwnProperty(Xe)&&M!==void 0&&!l.hasOwnProperty(Xe)&&Yr(e,t,Xe,void 0,l,M);for(B in l)M=l[B],L=a[B],!l.hasOwnProperty(B)||M===L||M===void 0&&L===void 0||Yr(e,t,B,M,l,L);return}}for(var N in a)M=a[N],a.hasOwnProperty(N)&&M!=null&&!l.hasOwnProperty(N)&&Ge(e,t,N,null,l,M);for(q in l)M=l[q],L=a[q],!l.hasOwnProperty(q)||M===L||M==null&&L==null||Ge(e,t,q,M,l,L)}function lm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var i=a[l],u=i.transferSize,f=i.initiatorType,p=i.duration;if(u&&p&&lm(f)){for(f=0,p=i.responseEnd,l+=1;l<a.length;l++){var j=a[l],z=j.startTime;if(z>p)break;var B=j.transferSize,q=j.initiatorType;B&&lm(q)&&(j=j.responseEnd,f+=B*(j<p?1:(p-z)/(j-z)))}if(--l,t+=8*(u+f)/(i.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 Gr=null,Xr=null;function xu(e){return e.nodeType===9?e:e.ownerDocument}function nm(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 im(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 Qr(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 Vr=null;function Xg(){var e=window.event;return e&&e.type==="popstate"?e===Vr?!1:(Vr=e,!0):(Vr=null,!1)}var um=typeof setTimeout=="function"?setTimeout:void 0,Qg=typeof clearTimeout=="function"?clearTimeout:void 0,sm=typeof Promise=="function"?Promise:void 0,Vg=typeof queueMicrotask=="function"?queueMicrotask:typeof sm<"u"?function(e){return sm.resolve(null).then(e).catch(Zg)}:um;function Zg(e){setTimeout(function(){throw e})}function Pa(e){return e==="head"}function rm(e,t){var a=t,l=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(i),mn(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ai(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ai(a);for(var u=a.firstChild;u;){var f=u.nextSibling,p=u.nodeName;u[xn]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=f}}else a==="body"&&ai(e.ownerDocument.body);a=i}while(a);mn(t)}function cm(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Zr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Zr(a),Wu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function $g(e,t,a,l){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[xn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=It(e.nextSibling),e===null)break}return null}function Kg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=It(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=It(e.nextSibling),e===null))return null;return e}function $r(e){return e.data==="$?"||e.data==="$~"}function Kr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Jg(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function It(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 Jr=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return It(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function dm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function mm(e,t,a){switch(t=xu(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ai(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Wu(e)}var Pt=new Map,hm=new Set;function Su(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ma=Q.d;Q.d={f:Fg,r:Wg,D:Ig,C:Pg,L:ev,m:tv,X:lv,S:av,M:nv};function Fg(){var e=Ma.f(),t=du();return e||t}function Wg(e){var t=Dl(e);t!==null&&t.tag===5&&t.type==="form"?Df(t):Ma.r(e)}var on=typeof document>"u"?null:document;function pm(e,t,a){var l=on;if(l&&typeof t=="string"&&t){var i=Vt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),hm.has(i)||(hm.add(i),e={rel:e,crossOrigin:a,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),jt(t,"link",e),mt(t),l.head.appendChild(t)))}}function Ig(e){Ma.D(e),pm("dns-prefetch",e,null)}function Pg(e,t){Ma.C(e,t),pm("preconnect",e,t)}function ev(e,t,a){Ma.L(e,t,a);var l=on;if(l&&e&&t){var i='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Vt(a.imageSizes)+'"]')):i+='[href="'+Vt(e)+'"]';var u=i;switch(t){case"style":u=fn(e);break;case"script":u=dn(e)}Pt.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Pt.set(u,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(li(u))||t==="script"&&l.querySelector(ni(u))||(t=l.createElement("link"),jt(t,"link",e),mt(t),l.head.appendChild(t)))}}function tv(e,t){Ma.m(e,t);var a=on;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Vt(l)+'"][href="'+Vt(e)+'"]',u=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=dn(e)}if(!Pt.has(u)&&(e=x({rel:"modulepreload",href:e},t),Pt.set(u,e),a.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ni(u)))return}l=a.createElement("link"),jt(l,"link",e),mt(l),a.head.appendChild(l)}}}function av(e,t,a){Ma.S(e,t,a);var l=on;if(l&&e){var i=Ml(l).hoistableStyles,u=fn(e);t=t||"default";var f=i.get(u);if(!f){var p={loading:0,preload:null};if(f=l.querySelector(li(u)))p.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Pt.get(u))&&Fr(e,a);var j=f=l.createElement("link");mt(j),jt(j,"link",e),j._p=new Promise(function(z,B){j.onload=z,j.onerror=B}),j.addEventListener("load",function(){p.loading|=1}),j.addEventListener("error",function(){p.loading|=2}),p.loading|=4,ju(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:p},i.set(u,f)}}}function lv(e,t){Ma.X(e,t);var a=on;if(a&&e){var l=Ml(a).hoistableScripts,i=dn(e),u=l.get(i);u||(u=a.querySelector(ni(i)),u||(e=x({src:e,async:!0},t),(t=Pt.get(i))&&Wr(e,t),u=a.createElement("script"),mt(u),jt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(i,u))}}function nv(e,t){Ma.M(e,t);var a=on;if(a&&e){var l=Ml(a).hoistableScripts,i=dn(e),u=l.get(i);u||(u=a.querySelector(ni(i)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Pt.get(i))&&Wr(e,t),u=a.createElement("script"),mt(u),jt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(i,u))}}function gm(e,t,a,l){var i=(i=ve.current)?Su(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=fn(a.href),a=Ml(i).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=fn(a.href);var u=Ml(i).hoistableStyles,f=u.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,f),(u=i.querySelector(li(e)))&&!u._p&&(f.instance=u,f.state.loading=5),Pt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Pt.set(e,a),u||iv(i,e,a,f.state))),t&&l===null)throw Error(o(528,""));return f}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=dn(a),a=Ml(i).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function fn(e){return'href="'+Vt(e)+'"'}function li(e){return'link[rel="stylesheet"]['+e+"]"}function vm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function iv(e,t,a,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}),jt(t,"link",a),mt(t),e.head.appendChild(t))}function dn(e){return'[src="'+Vt(e)+'"]'}function ni(e){return"script[async]"+e}function ym(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(l)return t.instance=l,mt(l),l;var i=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),mt(l),jt(l,"style",i),ju(l,a.precedence,e),t.instance=l;case"stylesheet":i=fn(a.href);var u=e.querySelector(li(i));if(u)return t.state.loading|=4,t.instance=u,mt(u),u;l=vm(a),(i=Pt.get(i))&&Fr(l,i),u=(e.ownerDocument||e).createElement("link"),mt(u);var f=u;return f._p=new Promise(function(p,j){f.onload=p,f.onerror=j}),jt(u,"link",l),t.state.loading|=4,ju(u,a.precedence,e),t.instance=u;case"script":return u=dn(a.src),(i=e.querySelector(ni(u)))?(t.instance=i,mt(i),i):(l=a,(i=Pt.get(u))&&(l=x({},a),Wr(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),mt(i),jt(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ju(l,a.precedence,e));return t.instance}function ju(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,u=i,f=0;f<l.length;f++){var p=l[f];if(p.dataset.precedence===t)u=p;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Fr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Wr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tu=null;function bm(e,t,a){if(Tu===null){var l=new Map,i=Tu=new Map;i.set(a,l)}else i=Tu,l=i.get(a),l||(l=new Map,i.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var u=a[i];if(!(u[xn]||u[yt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var f=u.getAttribute(t)||"";f=e+f;var p=l.get(f);p?p.push(u):l.set(f,[u])}}return l}function xm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function uv(e,t,a){if(a===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 Sm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function sv(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=fn(l.href),u=t.querySelector(li(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Eu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,mt(u);return}u=t.ownerDocument||t,l=vm(l),(i=Pt.get(i))&&Fr(l,i),u=u.createElement("link"),mt(u);var f=u;f._p=new Promise(function(p,j){f.onload=p,f.onerror=j}),jt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Eu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ir=0;function rv(e,t){return e.stylesheets&&e.count===0&&Cu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Cu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Ir===0&&(Ir=62500*Gg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Ir?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function Eu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Nu=null;function Cu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Nu=new Map,t.forEach(cv,e),Nu=null,Eu.call(e))}function cv(e,t){if(!(t.state.loading&4)){var a=Nu.get(e);if(a)var l=a.get(null);else{a=new Map,Nu.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var f=i[u];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),l=f)}l&&a.set(null,l)}i=t.instance,f=i.getAttribute("data-precedence"),u=a.get(f)||l,u===l&&a.set(null,i),a.set(f,i),this.count++,l=Eu.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ii={$$typeof:X,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ov(e,t,a,l,i,u,f,p,j){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=$u(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$u(0),this.hiddenUpdates=$u(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function jm(e,t,a,l,i,u,f,p,j,z,B,q){return e=new ov(e,t,a,f,j,z,B,q,p),t=1,u===!0&&(t|=24),u=Ut(3,null,null,t),e.current=u,u.stateNode=e,t=Ds(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},Us(u),e}function Tm(e){return e?(e=Gl,e):Gl}function Em(e,t,a,l,i,u){i=Tm(i),l.context===null?l.context=i:l.pendingContext=i,l=Ga(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=Xa(e,l,t),a!==null&&(Mt(a,e,t),Hn(a,e,t))}function Nm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Pr(e,t){Nm(e,t),(e=e.alternate)&&Nm(e,t)}function Cm(e){if(e.tag===13||e.tag===31){var t=dl(e,67108864);t!==null&&Mt(t,e,67108864),Pr(e,67108864)}}function _m(e){if(e.tag===13||e.tag===31){var t=qt();t=Ku(t);var a=dl(e,t);a!==null&&Mt(a,e,t),Pr(e,t)}}var _u=!0;function fv(e,t,a,l){var i=w.T;w.T=null;var u=Q.p;try{Q.p=2,ec(e,t,a,l)}finally{Q.p=u,w.T=i}}function dv(e,t,a,l){var i=w.T;w.T=null;var u=Q.p;try{Q.p=8,ec(e,t,a,l)}finally{Q.p=u,w.T=i}}function ec(e,t,a,l){if(_u){var i=tc(l);if(i===null)qr(e,t,l,Ru,a),zm(e,l);else if(hv(i,e,t,a,l))l.stopPropagation();else if(zm(e,l),t&4&&-1<mv.indexOf(e)){for(;i!==null;){var u=Dl(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var f=sl(u.pendingLanes);if(f!==0){var p=u;for(p.pendingLanes|=2,p.entangledLanes|=2;f;){var j=1<<31-xe(f);p.entanglements[1]|=j,f&=~j}fa(u),(Be&6)===0&&(ou=at()+500,Pn(0))}}break;case 31:case 13:p=dl(u,2),p!==null&&Mt(p,u,2),du(),Pr(u,2)}if(u=tc(l),u===null&&qr(e,t,l,Ru,a),u===i)break;i=u}i!==null&&l.stopPropagation()}else qr(e,t,l,null,a)}}function tc(e){return e=ls(e),ac(e)}var Ru=null;function ac(e){if(Ru=null,e=Al(e),e!==null){var t=m(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ru=e,null}function Rm(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(vt()){case ft:return 2;case ae:return 8;case se:case Je:return 32;case Gt:return 268435456;default:return 32}default:return 32}}var lc=!1,el=null,tl=null,al=null,ui=new Map,si=new Map,ll=[],mv="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 zm(e,t){switch(e){case"focusin":case"focusout":el=null;break;case"dragenter":case"dragleave":tl=null;break;case"mouseover":case"mouseout":al=null;break;case"pointerover":case"pointerout":ui.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":si.delete(t.pointerId)}}function ri(e,t,a,l,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[i]},t!==null&&(t=Dl(t),t!==null&&Cm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function hv(e,t,a,l,i){switch(t){case"focusin":return el=ri(el,e,t,a,l,i),!0;case"dragenter":return tl=ri(tl,e,t,a,l,i),!0;case"mouseover":return al=ri(al,e,t,a,l,i),!0;case"pointerover":var u=i.pointerId;return ui.set(u,ri(ui.get(u)||null,e,t,a,l,i)),!0;case"gotpointercapture":return u=i.pointerId,si.set(u,ri(si.get(u)||null,e,t,a,l,i)),!0}return!1}function Am(e){var t=Al(e.target);if(t!==null){var a=m(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Gc(e.priority,function(){_m(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Gc(e.priority,function(){_m(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=tc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);as=l,a.target.dispatchEvent(l),as=null}else return t=Dl(a),t!==null&&Cm(t),e.blockedOn=a,!1;t.shift()}return!0}function Dm(e,t,a){zu(e)&&a.delete(t)}function pv(){lc=!1,el!==null&&zu(el)&&(el=null),tl!==null&&zu(tl)&&(tl=null),al!==null&&zu(al)&&(al=null),ui.forEach(Dm),si.forEach(Dm)}function Au(e,t){e.blockedOn===t&&(e.blockedOn=null,lc||(lc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,pv)))}var Du=null;function Mm(e){Du!==e&&(Du=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Du===e&&(Du=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(ac(l||a)===null)continue;break}var u=Dl(a);u!==null&&(e.splice(t,3),t-=3,tr(u,{pending:!0,data:i,method:a.method,action:l},l,i))}}))}function mn(e){function t(j){return Au(j,e)}el!==null&&Au(el,e),tl!==null&&Au(tl,e),al!==null&&Au(al,e),ui.forEach(t),si.forEach(t);for(var a=0;a<ll.length;a++){var l=ll[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ll.length&&(a=ll[0],a.blockedOn===null);)Am(a),a.blockedOn===null&&ll.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var i=a[l],u=a[l+1],f=i[Ct]||null;if(typeof u=="function")f||Mm(a);else if(f){var p=null;if(u&&u.hasAttribute("formAction")){if(i=u,f=u[Ct]||null)p=f.formAction;else if(ac(i)!==null)continue}else p=f.action;typeof p=="function"?a[l+1]=p:(a.splice(l,3),l-=3),Mm(a)}}}function wm(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(f){return i=f})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function nc(e){this._internalRoot=e}Mu.prototype.render=nc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=qt();Em(a,l,e,t,null,null)},Mu.prototype.unmount=nc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Em(e.current,2,null,e,null,null),du(),t[zl]=null}};function Mu(e){this._internalRoot=e}Mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ll.length&&t!==0&&t<ll[a].priority;a++);ll.splice(a,0,e),a===0&&Am(e)}};var Om=s.version;if(Om!=="19.2.4")throw Error(o(527,Om,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=v(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var gv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{ul=wu.inject(gv),J=wu}catch{}}return oi.createRoot=function(e,t){if(!d(e))throw Error(o(299));var a=!1,l="",i=Yf,u=Gf,f=Xf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=jm(e,1,!1,null,null,a,l,null,i,u,f,wm),e[zl]=t.current,kr(e),new nc(t)},oi.hydrateRoot=function(e,t,a){if(!d(e))throw Error(o(299));var l=!1,i="",u=Yf,f=Gf,p=Xf,j=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(p=a.onRecoverableError),a.formState!==void 0&&(j=a.formState)),t=jm(e,1,!0,t,a??null,l,i,j,u,f,p,wm),t.context=Tm(null),a=t.current,l=qt(),l=Ku(l),i=Ga(l),i.callback=null,Xa(a,i,l),a=l,t.current.lanes=a,bn(t,a),fa(t),e[zl]=t.current,kr(e),new Mu(t)},oi.version="19.2.4",oi}var Qm;function Cv(){if(Qm)return sc.exports;Qm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),sc.exports=Nv(),sc.exports}var _v=Cv();/**
* react-router v7.13.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var Vm="popstate";function Zm(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Rv(n={}){function s(d,m){let{pathname:g="/",search:y="",hash:b=""}=Cl(d.location.hash.substring(1));return!g.startsWith("/")&&!g.startsWith(".")&&(g="/"+g),jc("",{pathname:g,search:y,hash:b},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function c(d,m){let g=d.document.querySelector("base"),y="";if(g&&g.getAttribute("href")){let b=d.location.href,v=b.indexOf("#");y=v===-1?b:b.slice(0,v)}return y+"#"+(typeof m=="string"?m:gi(m))}function o(d,m){ta(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return Av(s,c,o,n)}function We(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function ta(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function zv(){return Math.random().toString(36).substring(2,10)}function $m(n,s){return{usr:n.state,key:n.key,idx:s,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function jc(n,s,c=null,o,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof s=="string"?Cl(s):s,state:c,key:s&&s.key||o||zv(),unstable_mask:d}}function gi({pathname:n="/",search:s="",hash:c=""}){return s&&s!=="?"&&(n+=s.charAt(0)==="?"?s:"?"+s),c&&c!=="#"&&(n+=c.charAt(0)==="#"?c:"#"+c),n}function Cl(n){let s={};if(n){let c=n.indexOf("#");c>=0&&(s.hash=n.substring(c),n=n.substring(0,c));let o=n.indexOf("?");o>=0&&(s.search=n.substring(o),n=n.substring(0,o)),n&&(s.pathname=n)}return s}function Av(n,s,c,o={}){let{window:d=document.defaultView,v5Compat:m=!1}=o,g=d.history,y="POP",b=null,v=T();v==null&&(v=0,g.replaceState({...g.state,idx:v},""));function T(){return(g.state||{idx:null}).idx}function x(){y="POP";let O=T(),C=O==null?null:O-v;v=O,b&&b({action:y,location:H.location,delta:C})}function A(O,C){y="PUSH";let Y=Zm(O)?O:jc(H.location,O,C);c&&c(Y,O),v=T()+1;let X=$m(Y,v),$=H.createHref(Y.unstable_mask||Y);try{g.pushState(X,"",$)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;d.location.assign($)}m&&b&&b({action:y,location:H.location,delta:1})}function D(O,C){y="REPLACE";let Y=Zm(O)?O:jc(H.location,O,C);c&&c(Y,O),v=T();let X=$m(Y,v),$=H.createHref(Y.unstable_mask||Y);g.replaceState(X,"",$),m&&b&&b({action:y,location:H.location,delta:0})}function _(O){return Dv(O)}let H={get action(){return y},get location(){return n(d,g)},listen(O){if(b)throw new Error("A history only accepts one active listener");return d.addEventListener(Vm,x),b=O,()=>{d.removeEventListener(Vm,x),b=null}},createHref(O){return s(d,O)},createURL:_,encodeLocation(O){let C=_(O);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:A,replace:D,go(O){return g.go(O)}};return H}function Dv(n,s=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),We(c,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:gi(n);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function yh(n,s,c="/"){return Mv(n,s,c,!1)}function Mv(n,s,c,o){let d=typeof s=="string"?Cl(s):s,m=wa(d.pathname||"/",c);if(m==null)return null;let g=bh(n);wv(g);let y=null;for(let b=0;y==null&&b<g.length;++b){let v=Qv(m);y=Gv(g[b],v,o)}return y}function bh(n,s=[],c=[],o="",d=!1){let m=(g,y,b=d,v)=>{let T={relativePath:v===void 0?g.path||"":v,caseSensitive:g.caseSensitive===!0,childrenIndex:y,route:g};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(o)&&b)return;We(T.relativePath.startsWith(o),`Absolute route path "${T.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(o.length)}let x=ma([o,T.relativePath]),A=c.concat(T);g.children&&g.children.length>0&&(We(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),bh(g.children,s,A,x,b)),!(g.path==null&&!g.index)&&s.push({path:x,score:qv(x,g.index),routesMeta:A})};return n.forEach((g,y)=>{var b;if(g.path===""||!((b=g.path)!=null&&b.includes("?")))m(g,y);else for(let v of xh(g.path))m(g,y,!0,v)}),s}function xh(n){let s=n.split("/");if(s.length===0)return[];let[c,...o]=s,d=c.endsWith("?"),m=c.replace(/\?$/,"");if(o.length===0)return d?[m,""]:[m];let g=xh(o.join("/")),y=[];return y.push(...g.map(b=>b===""?m:[m,b].join("/"))),d&&y.push(...g),y.map(b=>n.startsWith("/")&&b===""?"/":b)}function wv(n){n.sort((s,c)=>s.score!==c.score?c.score-s.score:Yv(s.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var Ov=/^:[\w-]+$/,Uv=3,Lv=2,Hv=1,Bv=10,kv=-2,Km=n=>n==="*";function qv(n,s){let c=n.split("/"),o=c.length;return c.some(Km)&&(o+=kv),s&&(o+=Lv),c.filter(d=>!Km(d)).reduce((d,m)=>d+(Ov.test(m)?Uv:m===""?Hv:Bv),o)}function Yv(n,s){return n.length===s.length&&n.slice(0,-1).every((o,d)=>o===s[d])?n[n.length-1]-s[s.length-1]:0}function Gv(n,s,c=!1){let{routesMeta:o}=n,d={},m="/",g=[];for(let y=0;y<o.length;++y){let b=o[y],v=y===o.length-1,T=m==="/"?s:s.slice(m.length)||"/",x=Bu({path:b.relativePath,caseSensitive:b.caseSensitive,end:v},T),A=b.route;if(!x&&v&&c&&!o[o.length-1].route.index&&(x=Bu({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},T)),!x)return null;Object.assign(d,x.params),g.push({params:d,pathname:ma([m,x.pathname]),pathnameBase:Kv(ma([m,x.pathnameBase])),route:A}),x.pathnameBase!=="/"&&(m=ma([m,x.pathnameBase]))}return g}function Bu(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[c,o]=Xv(n.path,n.caseSensitive,n.end),d=s.match(c);if(!d)return null;let m=d[0],g=m.replace(/(.)\/+$/,"$1"),y=d.slice(1);return{params:o.reduce((v,{paramName:T,isOptional:x},A)=>{if(T==="*"){let _=y[A]||"";g=m.slice(0,m.length-_.length).replace(/(.)\/+$/,"$1")}const D=y[A];return x&&!D?v[T]=void 0:v[T]=(D||"").replace(/%2F/g,"/"),v},{}),pathname:m,pathnameBase:g,pattern:n}}function Xv(n,s=!1,c=!0){ta(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,y,b,v,T)=>{if(o.push({paramName:y,isOptional:b!=null}),b){let x=T.charAt(v+g.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,s?void 0:"i"),o]}function Qv(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return ta(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),n}}function wa(n,s){if(s==="/")return n;if(!n.toLowerCase().startsWith(s.toLowerCase()))return null;let c=s.endsWith("/")?s.length-1:s.length,o=n.charAt(c);return o&&o!=="/"?null:n.slice(c)||"/"}var Vv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Zv(n,s="/"){let{pathname:c,search:o="",hash:d=""}=typeof n=="string"?Cl(n):n,m;return c?(c=c.replace(/\/\/+/g,"/"),c.startsWith("/")?m=Jm(c.substring(1),"/"):m=Jm(c,s)):m=s,{pathname:m,search:Jv(o),hash:Fv(d)}}function Jm(n,s){let c=s.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?c.length>1&&c.pop():d!=="."&&c.push(d)}),c.length>1?c.join("/"):"/"}function fc(n,s,c,o){return`Cannot include a '${n}' character in a manually specified \`to.${s}\` field [${JSON.stringify(o)}]. 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 $v(n){return n.filter((s,c)=>c===0||s.route.path&&s.route.path.length>0)}function zc(n){let s=$v(n);return s.map((c,o)=>o===s.length-1?c.pathname:c.pathnameBase)}function qu(n,s,c,o=!1){let d;typeof n=="string"?d=Cl(n):(d={...n},We(!d.pathname||!d.pathname.includes("?"),fc("?","pathname","search",d)),We(!d.pathname||!d.pathname.includes("#"),fc("#","pathname","hash",d)),We(!d.search||!d.search.includes("#"),fc("#","search","hash",d)));let m=n===""||d.pathname==="",g=m?"/":d.pathname,y;if(g==null)y=c;else{let x=s.length-1;if(!o&&g.startsWith("..")){let A=g.split("/");for(;A[0]==="..";)A.shift(),x-=1;d.pathname=A.join("/")}y=x>=0?s[x]:"/"}let b=Zv(d,y),v=g&&g!=="/"&&g.endsWith("/"),T=(m||g===".")&&c.endsWith("/");return!b.pathname.endsWith("/")&&(v||T)&&(b.pathname+="/"),b}var ma=n=>n.join("/").replace(/\/\/+/g,"/"),Kv=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Jv=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Fv=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Wv=class{constructor(n,s,c,o=!1){this.status=n,this.statusText=s||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function Iv(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Pv(n){return n.map(s=>s.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Sh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jh(n,s){let c=n;if(typeof c!="string"||!Vv.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,d=!1;if(Sh)try{let m=new URL(window.location.href),g=c.startsWith("//")?new URL(m.protocol+c):new URL(c),y=wa(g.pathname,s);g.origin===m.origin&&y!=null?c=y+g.search+g.hash:d=!0}catch{ta(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:d,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Th=["POST","PUT","PATCH","DELETE"];new Set(Th);var ey=["GET",...Th];new Set(ey);var gn=h.createContext(null);gn.displayName="DataRouter";var Yu=h.createContext(null);Yu.displayName="DataRouterState";var ty=h.createContext(!1),Eh=h.createContext({isTransitioning:!1});Eh.displayName="ViewTransition";var ay=h.createContext(new Map);ay.displayName="Fetchers";var ly=h.createContext(null);ly.displayName="Await";var Yt=h.createContext(null);Yt.displayName="Navigation";var vi=h.createContext(null);vi.displayName="Location";var ia=h.createContext({outlet:null,matches:[],isDataRoute:!1});ia.displayName="Route";var Ac=h.createContext(null);Ac.displayName="RouteError";var Nh="REACT_ROUTER_ERROR",ny="REDIRECT",iy="ROUTE_ERROR_RESPONSE";function uy(n){if(n.startsWith(`${Nh}:${ny}:{`))try{let s=JSON.parse(n.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function sy(n){if(n.startsWith(`${Nh}:${iy}:{`))try{let s=JSON.parse(n.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new Wv(s.status,s.statusText,s.data)}catch{}}function ry(n,{relative:s}={}){We(vn(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=h.useContext(Yt),{hash:d,pathname:m,search:g}=yi(n,{relative:s}),y=m;return c!=="/"&&(y=m==="/"?c:ma([c,m])),o.createHref({pathname:y,search:g,hash:d})}function vn(){return h.useContext(vi)!=null}function Oa(){return We(vn(),"useLocation() may be used only in the context of a <Router> component."),h.useContext(vi).location}var Ch="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _h(n){h.useContext(Yt).static||h.useLayoutEffect(n)}function Gu(){let{isDataRoute:n}=h.useContext(ia);return n?Sy():cy()}function cy(){We(vn(),"useNavigate() may be used only in the context of a <Router> component.");let n=h.useContext(gn),{basename:s,navigator:c}=h.useContext(Yt),{matches:o}=h.useContext(ia),{pathname:d}=Oa(),m=JSON.stringify(zc(o)),g=h.useRef(!1);return _h(()=>{g.current=!0}),h.useCallback((b,v={})=>{if(ta(g.current,Ch),!g.current)return;if(typeof b=="number"){c.go(b);return}let T=qu(b,JSON.parse(m),d,v.relative==="path");n==null&&s!=="/"&&(T.pathname=T.pathname==="/"?s:ma([s,T.pathname])),(v.replace?c.replace:c.push)(T,v.state,v)},[s,c,m,d,n])}h.createContext(null);function Rh(){let{matches:n}=h.useContext(ia),s=n[n.length-1];return s?s.params:{}}function yi(n,{relative:s}={}){let{matches:c}=h.useContext(ia),{pathname:o}=Oa(),d=JSON.stringify(zc(c));return h.useMemo(()=>qu(n,JSON.parse(d),o,s==="path"),[n,d,o,s])}function oy(n,s){return zh(n,s)}function zh(n,s,c){var O;We(vn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=h.useContext(Yt),{matches:d}=h.useContext(ia),m=d[d.length-1],g=m?m.params:{},y=m?m.pathname:"/",b=m?m.pathnameBase:"/",v=m&&m.route;{let C=v&&v.path||"";Dh(y,!v||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${C}">) 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="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let T=Oa(),x;if(s){let C=typeof s=="string"?Cl(s):s;We(b==="/"||((O=C.pathname)==null?void 0:O.startsWith(b)),`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 "${b}" but pathname "${C.pathname}" was given in the \`location\` prop.`),x=C}else x=T;let A=x.pathname||"/",D=A;if(b!=="/"){let C=b.replace(/^\//,"").split("/");D="/"+A.replace(/^\//,"").split("/").slice(C.length).join("/")}let _=yh(n,{pathname:D});ta(v||_!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),ta(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let H=py(_&&_.map(C=>Object.assign({},C,{params:Object.assign({},g,C.params),pathname:ma([b,o.encodeLocation?o.encodeLocation(C.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?b:ma([b,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),d,c);return s&&H?h.createElement(vi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},H):H}function fy(){let n=xy(),s=Iv(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),c=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:o},m={padding:"2px 4px",backgroundColor:o},g=null;return console.error("Error handled by React Router default ErrorBoundary:",n),g=h.createElement(h.Fragment,null,h.createElement("p",null,"💿 Hey developer 👋"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:m},"ErrorBoundary")," or"," ",h.createElement("code",{style:m},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},s),c?h.createElement("pre",{style:d},c):null,g)}var dy=h.createElement(fy,null),Ah=class extends h.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,s){return s.location!==n.location||s.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:s.error,location:s.location,revalidation:n.revalidation||s.revalidation}}componentDidCatch(n,s){this.props.onError?this.props.onError(n,s):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const c=sy(n.digest);c&&(n=c)}let s=n!==void 0?h.createElement(ia.Provider,{value:this.props.routeContext},h.createElement(Ac.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?h.createElement(my,{error:n},s):s}};Ah.contextType=ty;var dc=new WeakMap;function my({children:n,error:s}){let{basename:c}=h.useContext(Yt);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let o=uy(s.digest);if(o){let d=dc.get(s);if(d)throw d;let m=jh(o.location,c);if(Sh&&!dc.get(s))if(m.isExternal||o.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:o.replace}));throw dc.set(s,g),g}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return n}function hy({routeContext:n,match:s,children:c}){let o=h.useContext(gn);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),h.createElement(ia.Provider,{value:n},c)}function py(n,s=[],c){let o=c==null?void 0:c.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(s.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let d=n,m=o==null?void 0:o.errors;if(m!=null){let T=d.findIndex(x=>x.route.id&&(m==null?void 0:m[x.route.id])!==void 0);We(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),d=d.slice(0,Math.min(d.length,T+1))}let g=!1,y=-1;if(c&&o){g=o.renderFallback;for(let T=0;T<d.length;T++){let x=d[T];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(y=T),x.route.id){let{loaderData:A,errors:D}=o,_=x.route.loader&&!A.hasOwnProperty(x.route.id)&&(!D||D[x.route.id]===void 0);if(x.route.lazy||_){c.isStatic&&(g=!0),y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}}let b=c==null?void 0:c.onError,v=o&&b?(T,x)=>{var A,D;b(T,{location:o.location,params:((D=(A=o.matches)==null?void 0:A[0])==null?void 0:D.params)??{},unstable_pattern:Pv(o.matches),errorInfo:x})}:void 0;return d.reduceRight((T,x,A)=>{let D,_=!1,H=null,O=null;o&&(D=m&&x.route.id?m[x.route.id]:void 0,H=x.route.errorElement||dy,g&&(y<0&&A===0?(Dh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,O=null):y===A&&(_=!0,O=x.route.hydrateFallbackElement||null)));let C=s.concat(d.slice(0,A+1)),Y=()=>{let X;return D?X=H:_?X=O:x.route.Component?X=h.createElement(x.route.Component,null):x.route.element?X=x.route.element:X=T,h.createElement(hy,{match:x,routeContext:{outlet:T,matches:C,isDataRoute:o!=null},children:X})};return o&&(x.route.ErrorBoundary||x.route.errorElement||A===0)?h.createElement(Ah,{location:o.location,revalidation:o.revalidation,component:H,error:D,children:Y(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:v}):Y()},null)}function Dc(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gy(n){let s=h.useContext(gn);return We(s,Dc(n)),s}function vy(n){let s=h.useContext(Yu);return We(s,Dc(n)),s}function yy(n){let s=h.useContext(ia);return We(s,Dc(n)),s}function Mc(n){let s=yy(n),c=s.matches[s.matches.length-1];return We(c.route.id,`${n} can only be used on routes that contain a unique "id"`),c.route.id}function by(){return Mc("useRouteId")}function xy(){var o;let n=h.useContext(Ac),s=vy("useRouteError"),c=Mc("useRouteError");return n!==void 0?n:(o=s.errors)==null?void 0:o[c]}function Sy(){let{router:n}=gy("useNavigate"),s=Mc("useNavigate"),c=h.useRef(!1);return _h(()=>{c.current=!0}),h.useCallback(async(d,m={})=>{ta(c.current,Ch),c.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:s,...m}))},[n,s])}var Fm={};function Dh(n,s,c){!s&&!Fm[n]&&(Fm[n]=!0,ta(!1,c))}h.memo(jy);function jy({routes:n,future:s,state:c,isStatic:o,onError:d}){return zh(n,void 0,{state:c,isStatic:o,onError:d})}function Mh({to:n,replace:s,state:c,relative:o}){We(vn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=h.useContext(Yt);ta(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=h.useContext(ia),{pathname:g}=Oa(),y=Gu(),b=qu(n,zc(m),g,o==="path"),v=JSON.stringify(b);return h.useEffect(()=>{y(JSON.parse(v),{replace:s,state:c,relative:o})},[y,v,o,s,c]),null}function da(n){We(!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 Ty({basename:n="/",children:s=null,location:c,navigationType:o="POP",navigator:d,static:m=!1,unstable_useTransitions:g}){We(!vn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),b=h.useMemo(()=>({basename:y,navigator:d,static:m,unstable_useTransitions:g,future:{}}),[y,d,m,g]);typeof c=="string"&&(c=Cl(c));let{pathname:v="/",search:T="",hash:x="",state:A=null,key:D="default",unstable_mask:_}=c,H=h.useMemo(()=>{let O=wa(v,y);return O==null?null:{location:{pathname:O,search:T,hash:x,state:A,key:D,unstable_mask:_},navigationType:o}},[y,v,T,x,A,D,o,_]);return ta(H!=null,`<Router basename="${y}"> is not able to match the URL "${v}${T}${x}" because it does not start with the basename, so the <Router> won't render anything.`),H==null?null:h.createElement(Yt.Provider,{value:b},h.createElement(vi.Provider,{children:s,value:H}))}function wh({children:n,location:s}){return oy(Tc(n),s)}function Tc(n,s=[]){let c=[];return h.Children.forEach(n,(o,d)=>{if(!h.isValidElement(o))return;let m=[...s,d];if(o.type===h.Fragment){c.push.apply(c,Tc(o.props.children,m));return}We(o.type===da,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),We(!o.props.index||!o.props.children,"An index route cannot have child routes.");let g={id:o.props.id||m.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(g.children=Tc(o.props.children,m)),c.push(g)}),c}var Lu="get",Hu="application/x-www-form-urlencoded";function Xu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Ey(n){return Xu(n)&&n.tagName.toLowerCase()==="button"}function Ny(n){return Xu(n)&&n.tagName.toLowerCase()==="form"}function Cy(n){return Xu(n)&&n.tagName.toLowerCase()==="input"}function _y(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Ry(n,s){return n.button===0&&(!s||s==="_self")&&!_y(n)}var Ou=null;function zy(){if(Ou===null)try{new FormData(document.createElement("form"),0),Ou=!1}catch{Ou=!0}return Ou}var Ay=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mc(n){return n!=null&&!Ay.has(n)?(ta(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hu}"`),null):n}function Dy(n,s){let c,o,d,m,g;if(Ny(n)){let y=n.getAttribute("action");o=y?wa(y,s):null,c=n.getAttribute("method")||Lu,d=mc(n.getAttribute("enctype"))||Hu,m=new FormData(n)}else if(Ey(n)||Cy(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=n.getAttribute("formaction")||y.getAttribute("action");if(o=b?wa(b,s):null,c=n.getAttribute("formmethod")||y.getAttribute("method")||Lu,d=mc(n.getAttribute("formenctype"))||mc(y.getAttribute("enctype"))||Hu,m=new FormData(y,n),!zy()){let{name:v,type:T,value:x}=n;if(T==="image"){let A=v?`${v}.`:"";m.append(`${A}x`,"0"),m.append(`${A}y`,"0")}else v&&m.append(v,x)}}else{if(Xu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Lu,o=null,d=Hu,g=n}return m&&d==="text/plain"&&(g=m,m=void 0),{action:o,method:c.toLowerCase(),encType:d,formData:m,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function wc(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function My(n,s,c,o){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return c?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${o}`:d.pathname=`${d.pathname}.${o}`:d.pathname==="/"?d.pathname=`_root.${o}`:s&&wa(d.pathname,s)==="/"?d.pathname=`${s.replace(/\/$/,"")}/_root.${o}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${o}`,d}async function wy(n,s){if(n.id in s)return s[n.id];try{let c=await import(n.module);return s[n.id]=c,c}catch(c){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Oy(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Uy(n,s,c){let o=await Promise.all(n.map(async d=>{let m=s.routes[d.route.id];if(m){let g=await wy(m,c);return g.links?g.links():[]}return[]}));return ky(o.flat(1).filter(Oy).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wm(n,s,c,o,d,m){let g=(b,v)=>c[v]?b.route.id!==c[v].route.id:!0,y=(b,v)=>{var T;return c[v].pathname!==b.pathname||((T=c[v].route.path)==null?void 0:T.endsWith("*"))&&c[v].params["*"]!==b.params["*"]};return m==="assets"?s.filter((b,v)=>g(b,v)||y(b,v)):m==="data"?s.filter((b,v)=>{var x;let T=o.routes[b.route.id];if(!T||!T.hasLoader)return!1;if(g(b,v)||y(b,v))return!0;if(b.route.shouldRevalidate){let A=b.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((x=c[0])==null?void 0:x.params)||{},nextUrl:new URL(n,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof A=="boolean")return A}return!0}):[]}function Ly(n,s,{includeHydrateFallback:c}={}){return Hy(n.map(o=>{let d=s.routes[o.route.id];if(!d)return[];let m=[d.module];return d.clientActionModule&&(m=m.concat(d.clientActionModule)),d.clientLoaderModule&&(m=m.concat(d.clientLoaderModule)),c&&d.hydrateFallbackModule&&(m=m.concat(d.hydrateFallbackModule)),d.imports&&(m=m.concat(d.imports)),m}).flat(1))}function Hy(n){return[...new Set(n)]}function By(n){let s={},c=Object.keys(n).sort();for(let o of c)s[o]=n[o];return s}function ky(n,s){let c=new Set;return new Set(s),n.reduce((o,d)=>{let m=JSON.stringify(By(d));return c.has(m)||(c.add(m),o.push({key:m,link:d})),o},[])}function Oh(){let n=h.useContext(gn);return wc(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function qy(){let n=h.useContext(Yu);return wc(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Oc=h.createContext(void 0);Oc.displayName="FrameworkContext";function Uh(){let n=h.useContext(Oc);return wc(n,"You must render this element inside a <HydratedRouter> element"),n}function Yy(n,s){let c=h.useContext(Oc),[o,d]=h.useState(!1),[m,g]=h.useState(!1),{onFocus:y,onBlur:b,onMouseEnter:v,onMouseLeave:T,onTouchStart:x}=s,A=h.useRef(null);h.useEffect(()=>{if(n==="render"&&g(!0),n==="viewport"){let H=C=>{C.forEach(Y=>{g(Y.isIntersecting)})},O=new IntersectionObserver(H,{threshold:.5});return A.current&&O.observe(A.current),()=>{O.disconnect()}}},[n]),h.useEffect(()=>{if(o){let H=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(H)}}},[o]);let D=()=>{d(!0)},_=()=>{d(!1),g(!1)};return c?n!=="intent"?[m,A,{}]:[m,A,{onFocus:fi(y,D),onBlur:fi(b,_),onMouseEnter:fi(v,D),onMouseLeave:fi(T,_),onTouchStart:fi(x,D)}]:[!1,A,{}]}function fi(n,s){return c=>{n&&n(c),c.defaultPrevented||s(c)}}function Gy({page:n,...s}){let{router:c}=Oh(),o=h.useMemo(()=>yh(c.routes,n,c.basename),[c.routes,n,c.basename]);return o?h.createElement(Qy,{page:n,matches:o,...s}):null}function Xy(n){let{manifest:s,routeModules:c}=Uh(),[o,d]=h.useState([]);return h.useEffect(()=>{let m=!1;return Uy(n,s,c).then(g=>{m||d(g)}),()=>{m=!0}},[n,s,c]),o}function Qy({page:n,matches:s,...c}){let o=Oa(),{future:d,manifest:m,routeModules:g}=Uh(),{basename:y}=Oh(),{loaderData:b,matches:v}=qy(),T=h.useMemo(()=>Wm(n,s,v,m,o,"data"),[n,s,v,m,o]),x=h.useMemo(()=>Wm(n,s,v,m,o,"assets"),[n,s,v,m,o]),A=h.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let H=new Set,O=!1;if(s.forEach(Y=>{var $;let X=m.routes[Y.route.id];!X||!X.hasLoader||(!T.some(I=>I.route.id===Y.route.id)&&Y.route.id in b&&(($=g[Y.route.id])!=null&&$.shouldRevalidate)||X.hasClientLoader?O=!0:H.add(Y.route.id))}),H.size===0)return[];let C=My(n,y,d.unstable_trailingSlashAwareDataRequests,"data");return O&&H.size>0&&C.searchParams.set("_routes",s.filter(Y=>H.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[C.pathname+C.search]},[y,d.unstable_trailingSlashAwareDataRequests,b,o,m,T,s,n,g]),D=h.useMemo(()=>Ly(x,m),[x,m]),_=Xy(x);return h.createElement(h.Fragment,null,A.map(H=>h.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...c})),D.map(H=>h.createElement("link",{key:H,rel:"modulepreload",href:H,...c})),_.map(({key:H,link:O})=>h.createElement("link",{key:H,nonce:c.nonce,...O,crossOrigin:O.crossOrigin??c.crossOrigin})))}function Vy(...n){return s=>{n.forEach(c=>{typeof c=="function"?c(s):c!=null&&(c.current=s)})}}var Zy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Zy&&(window.__reactRouterVersion="7.13.2")}catch{}function $y({basename:n,children:s,unstable_useTransitions:c,window:o}){let d=h.useRef();d.current==null&&(d.current=Rv({window:o,v5Compat:!0}));let m=d.current,[g,y]=h.useState({action:m.action,location:m.location}),b=h.useCallback(v=>{c===!1?y(v):h.startTransition(()=>y(v))},[c]);return h.useLayoutEffect(()=>m.listen(b),[m,b]),h.createElement(Ty,{basename:n,children:s,location:g.location,navigationType:g.action,navigator:m,unstable_useTransitions:c})}var Lh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hh=h.forwardRef(function({onClick:s,discover:c="render",prefetch:o="none",relative:d,reloadDocument:m,replace:g,unstable_mask:y,state:b,target:v,to:T,preventScrollReset:x,viewTransition:A,unstable_defaultShouldRevalidate:D,..._},H){let{basename:O,navigator:C,unstable_useTransitions:Y}=h.useContext(Yt),X=typeof T=="string"&&Lh.test(T),$=jh(T,O);T=$.to;let I=ry(T,{relative:d}),le=Oa(),P=null;if(y){let be=qu(y,[],le.unstable_mask?le.unstable_mask.pathname:"/",!0);O!=="/"&&(be.pathname=be.pathname==="/"?O:ma([O,be.pathname])),P=C.createHref(be)}let[Z,re,ge]=Yy(o,_),_e=Fy(T,{replace:g,unstable_mask:y,state:b,target:v,preventScrollReset:x,relative:d,viewTransition:A,unstable_defaultShouldRevalidate:D,unstable_useTransitions:Y});function je(be){s&&s(be),be.defaultPrevented||_e(be)}let Oe=!($.isExternal||m),Re=h.createElement("a",{..._,...ge,href:(Oe?P:void 0)||$.absoluteURL||I,onClick:Oe?je:s,ref:Vy(H,re),target:v,"data-discover":!X&&c==="render"?"true":void 0});return Z&&!X?h.createElement(h.Fragment,null,Re,h.createElement(Gy,{page:I})):Re});Hh.displayName="Link";var Bh=h.forwardRef(function({"aria-current":s="page",caseSensitive:c=!1,className:o="",end:d=!1,style:m,to:g,viewTransition:y,children:b,...v},T){let x=yi(g,{relative:v.relative}),A=Oa(),D=h.useContext(Yu),{navigator:_,basename:H}=h.useContext(Yt),O=D!=null&&tb(x)&&y===!0,C=_.encodeLocation?_.encodeLocation(x).pathname:x.pathname,Y=A.pathname,X=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;c||(Y=Y.toLowerCase(),X=X?X.toLowerCase():null,C=C.toLowerCase()),X&&H&&(X=wa(X,H)||X);const $=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let I=Y===C||!d&&Y.startsWith(C)&&Y.charAt($)==="/",le=X!=null&&(X===C||!d&&X.startsWith(C)&&X.charAt(C.length)==="/"),P={isActive:I,isPending:le,isTransitioning:O},Z=I?s:void 0,re;typeof o=="function"?re=o(P):re=[o,I?"active":null,le?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let ge=typeof m=="function"?m(P):m;return h.createElement(Hh,{...v,"aria-current":Z,className:re,ref:T,style:ge,to:g,viewTransition:y},typeof b=="function"?b(P):b)});Bh.displayName="NavLink";var Ky=h.forwardRef(({discover:n="render",fetcherKey:s,navigate:c,reloadDocument:o,replace:d,state:m,method:g=Lu,action:y,onSubmit:b,relative:v,preventScrollReset:T,viewTransition:x,unstable_defaultShouldRevalidate:A,...D},_)=>{let{unstable_useTransitions:H}=h.useContext(Yt),O=Py(),C=eb(y,{relative:v}),Y=g.toLowerCase()==="get"?"get":"post",X=typeof y=="string"&&Lh.test(y),$=I=>{if(b&&b(I),I.defaultPrevented)return;I.preventDefault();let le=I.nativeEvent.submitter,P=(le==null?void 0:le.getAttribute("formmethod"))||g,Z=()=>O(le||I.currentTarget,{fetcherKey:s,method:P,navigate:c,replace:d,state:m,relative:v,preventScrollReset:T,viewTransition:x,unstable_defaultShouldRevalidate:A});H&&c!==!1?h.startTransition(()=>Z()):Z()};return h.createElement("form",{ref:_,method:Y,action:C,onSubmit:o?b:$,...D,"data-discover":!X&&n==="render"?"true":void 0})});Ky.displayName="Form";function Jy(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kh(n){let s=h.useContext(gn);return We(s,Jy(n)),s}function Fy(n,{target:s,replace:c,unstable_mask:o,state:d,preventScrollReset:m,relative:g,viewTransition:y,unstable_defaultShouldRevalidate:b,unstable_useTransitions:v}={}){let T=Gu(),x=Oa(),A=yi(n,{relative:g});return h.useCallback(D=>{if(Ry(D,s)){D.preventDefault();let _=c!==void 0?c:gi(x)===gi(A),H=()=>T(n,{replace:_,unstable_mask:o,state:d,preventScrollReset:m,relative:g,viewTransition:y,unstable_defaultShouldRevalidate:b});v?h.startTransition(()=>H()):H()}},[x,T,A,c,o,d,s,n,m,g,y,b,v])}var Wy=0,Iy=()=>`__${String(++Wy)}__`;function Py(){let{router:n}=kh("useSubmit"),{basename:s}=h.useContext(Yt),c=by(),o=n.fetch,d=n.navigate;return h.useCallback(async(m,g={})=>{let{action:y,method:b,encType:v,formData:T,body:x}=Dy(m,s);if(g.navigate===!1){let A=g.fetcherKey||Iy();await o(A,c,g.action||y,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:T,body:x,formMethod:g.method||b,formEncType:g.encType||v,flushSync:g.flushSync})}else await d(g.action||y,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:T,body:x,formMethod:g.method||b,formEncType:g.encType||v,replace:g.replace,state:g.state,fromRouteId:c,flushSync:g.flushSync,viewTransition:g.viewTransition})},[o,d,s,c])}function eb(n,{relative:s}={}){let{basename:c}=h.useContext(Yt),o=h.useContext(ia);We(o,"useFormAction must be used inside a RouteContext");let[d]=o.matches.slice(-1),m={...yi(n||".",{relative:s})},g=Oa();if(n==null){m.search=g.search;let y=new URLSearchParams(m.search),b=y.getAll("index");if(b.some(T=>T==="")){y.delete("index"),b.filter(x=>x).forEach(x=>y.append("index",x));let T=y.toString();m.search=T?`?${T}`:""}}return(!n||n===".")&&d.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(m.pathname=m.pathname==="/"?c:ma([c,m.pathname])),gi(m)}function tb(n,{relative:s}={}){let c=h.useContext(Eh);We(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=kh("useViewTransitionState"),d=yi(n,{relative:s});if(!c.isTransitioning)return!1;let m=wa(c.currentLocation.pathname,o)||c.currentLocation.pathname,g=wa(c.nextLocation.pathname,o)||c.nextLocation.pathname;return Bu(d.pathname,g)!=null||Bu(d.pathname,m)!=null}const qh=h.createContext(null);let ab=0;function lb({children:n}){const[s,c]=h.useState([]),[o,d]=h.useState(null),m=h.useCallback((y,b="info")=>{const v=++ab;c(T=>[...T,{id:v,message:y,type:b}]),setTimeout(()=>{c(T=>T.filter(x=>x.id!==v))},4e3)},[]),g=h.useCallback(y=>{c(b=>b.filter(v=>v.id!==y))},[]);return r.jsx(qh.Provider,{value:{notifications:s,notify:m,dismissNotification:g,activeItem:o,setActiveItem:d},children:n})}function il(){const n=h.useContext(qh);if(!n)throw new Error("useApp must be used within AppProvider");return n}const Yh=h.createContext(null);function nb({children:n}){const[s,c]=h.useState(null),o=h.useCallback(g=>new Promise(y=>{c({...g,resolve:y})}),[]),d=()=>{s==null||s.resolve(!0),c(null)},m=()=>{s==null||s.resolve(!1),c(null)};return r.jsxs(Yh.Provider,{value:{confirm:o},children:[n,s&&r.jsx("div",{className:"modal-overlay",onClick:m,children:r.jsxs("div",{className:"modal modal-sm",onClick:g=>g.stopPropagation(),children:[r.jsx("div",{className:"modal-title",children:s.title}),r.jsx("div",{className:"modal-body",children:s.message}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{className:"btn btn-ghost",onClick:m,children:"Cancel"}),r.jsx("button",{className:`btn ${s.confirmVariant==="primary"?"btn-primary":"btn-danger"}`,onClick:d,children:s.confirmText||"Confirm"})]})]})})]})}function Gh(){const n=h.useContext(Yh);if(!n)throw new Error("useConfirm must be used within ConfirmProvider");return n.confirm}function Xh(){return"/public/neo-pkg-blackbox/cgi-bin"}function Uc(n){if(!n||typeof n!="object")throw new Error("Invalid API response");const s=n,c=typeof s.success=="boolean"?s.success:typeof s.ok=="boolean"?s.ok:null;if(c===null)throw new Error("Invalid API response: missing success/ok");return{success:c,reason:typeof s.reason=="string"?s.reason:"",elapse:typeof s.elapse=="string"?s.elapse:void 0,data:s.data}}async function Qu(n){const s=await n.json(),c=Uc(s);if(!n.ok)throw new Error(c.reason||`HTTP ${n.status}`);if(!c.success)throw new Error(c.reason||"Request failed");return c}async function Qh(){var c;const n=await fetch(`${Xh()}/api/info`,{method:"GET"}),s=await Qu(n);return{port:Number((c=s.data)==null?void 0:c.port)||8e3}}let Uu=null;function Vu(){return Uu||(Uu=Qh().then(n=>`${window.location.protocol}//${window.location.hostname}:${n.port}`).catch(n=>{throw Uu=null,n})),Uu}async function ib(){const n=await Vu(),s=await fetch(`${n}/api/config`,{method:"GET"});return s.status===404?null:(await Qu(s)).data}async function ub(n){const s=await Vu(),c=await fetch(`${s}/api/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),o=await Qu(c);return{success:o.success,reason:o.reason||""}}function Vh(n){if(!n)return null;if(n instanceof Date)return new Date(n.getTime());const s=typeof n=="string"?n.trim():String(n);if(!s)return null;const c=s.includes("T")?s:s.replace(" ","T"),o=new Date(c);return Number.isNaN(o.getTime())?null:o}function Im(n){if(!(n instanceof Date)||Number.isNaN(n.getTime()))return"";const s=n.getFullYear(),c=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),d=String(n.getHours()).padStart(2,"0"),m=String(n.getMinutes()).padStart(2,"0"),g=String(n.getSeconds()).padStart(2,"0"),y=String(n.getMilliseconds()).padStart(3,"0");return`${s}-${c}-${o}T${d}:${m}:${g}.${y}`}function Pm(n){if(!(n instanceof Date)||Number.isNaN(n.getTime()))return"--:--:--";const s=String(n.getHours()).padStart(2,"0"),c=String(n.getMinutes()).padStart(2,"0"),o=String(n.getSeconds()).padStart(2,"0");return`${s}:${c}:${o}`}const sb=/^\d{1,2}:\d{2}(:\d{2})?$/;function Zh(n){if(typeof n!="string")return null;const s=n.trim();if(!sb.test(s))return null;const c=s.split(":"),o=Number.parseInt(c[0]??"",10),d=Number.parseInt(c[1]??"",10);return!Number.isFinite(o)||!Number.isFinite(d)||o<0||o>23||d<0||d>59?null:[o,d]}function $h(n,s){return`${String(n).padStart(2,"0")}:${String(s).padStart(2,"0")}`}function rb(n){const s=Zh(n);if(!s)return"00:00";const[c,o]=s,d=new Date(Date.UTC(1970,0,1,c,o,0));return $h(d.getHours(),d.getMinutes())}function cb(n){const s=Zh(n);if(!s)return"00:00";const[c,o]=s,d=new Date(1970,0,1,c,o,0);return $h(d.getUTCHours(),d.getUTCMinutes())}function Kh(n){if(!n)return"-";const s=new Date(n);if(Number.isNaN(s.getTime()))return n;const c=d=>String(d).padStart(2,"0"),o=String(s.getMilliseconds()).padStart(3,"0");return`${s.getFullYear()}-${c(s.getMonth()+1)}-${c(s.getDate())} ${c(s.getHours())}:${c(s.getMinutes())}:${c(s.getSeconds())}.${o}`}function Jh(n){if(!Number.isFinite(n)||n<=0)return{value:1,unit:"s"};const s=Math.floor(n);return s%3600===0?{value:s/3600,unit:"h"}:s%60===0?{value:s/60,unit:"m"}:{value:s,unit:"s"}}function eh(n,s){switch(s){case"h":return n*3600;case"m":return n*60;case"s":default:return n}}function hc(n){return Number.isInteger(n)&&n>0}function ob(){const n=-new Date().getTimezoneOffset();if(n===0)return"UTC";const s=n>=0?"+":"-",c=Math.abs(n),o=Math.floor(c/60),d=c%60;return`UTC${s}${String(o).padStart(2,"0")}:${String(d).padStart(2,"0")}`}function Fh(n){return JSON.parse(JSON.stringify(n))}function fb(n){return`probe-${n}-${Math.random().toString(16).slice(2,8)}`}function db(n){return n==="debug"||n==="info"||n==="warn"||n==="error"}function mb(n){return n==="json"||n==="text"}function hb(n){return n==="stdout"||n==="file"||n==="both"}function pb(n){const s=n.lastIndexOf(".");return s<=0||s>=n.length-1?{prefix:n||"blackbox",extension:"log"}:{prefix:n.slice(0,s),extension:n.slice(s+1)}}function gb(n){return n.flag??n.Flag??""}function vb(n){return n.value??n.Value??""}function yb(n){return n.some(s=>"Flag"in s||"Value"in s)}function Wh(){return{server:{addr:"0.0.0.0:8000",camera_dir:"../bin/cameras",mvs_dir:"../ai/mvs",data_dir:"../bin/data"},machbase:{scheme:"http",host:"127.0.0.1",port:5654,timeout_seconds:30,api_token:""},ffmpeg:{binary:"../tools/ffmpeg",defaults:{probe_binary:"../tools/ffprobe",probe_args:[{flag:"v",value:"error"},{flag:"select_streams",value:"v:0"},{flag:"show_entries",value:"packet=pts_time,duration_time"},{flag:"of",value:"csv=p=0"}]}},mediamtx:{binary:"../tools/mediamtx",config_file:"../tools/mediamtx.yml",host:"127.0.0.1",webrtc_host:"",port:9997,webrtc_port:0,rtsp_server_port:0},log:{dir:"../logs",level:"info",format:"json",output:"both",file:{filename:"blackbox.log",max_size:100,max_backups:10,max_age:30,compress:!0}},ai:{binary:"../ai/blackbox-ai-manager",config_file:"../ai/config.json"},retention:{enabled:!1,keep_hours:720,start_at_utc:"18:00",interval_hours:24,consistency_cleanup:!0,targets:{database:!0,files:!0}}}}function Ih(n){var b,v;const s=pb(n.log.file.filename),c=n.machbase.api_token||"",o=n.retention??Wh().retention,d=Number.isFinite(o.keep_hours)?o.keep_hours:0,m=d!==0&&d%24===0,g={general:{server:{address:n.server.addr,cameraDirectory:n.server.camera_dir,mvsDirectory:n.server.mvs_dir,dataDirectory:n.server.data_dir},machbase:{host:n.machbase.host,port:n.machbase.port,timeoutSeconds:n.machbase.timeout_seconds,useToken:c.trim()!=="",apiToken:c},mediaMtx:{host:n.mediamtx.host,port:n.mediamtx.port,binary:n.mediamtx.binary},ffmpeg:{binary:n.ffmpeg.binary,probeBinary:n.ffmpeg.defaults.probe_binary}},ffmpeg:{probeArgs:n.ffmpeg.defaults.probe_args.map((T,x)=>({id:fb(x),flag:gb(T),value:vb(T)}))},log:{logDirectory:n.log.dir,logLevel:db(n.log.level)?n.log.level:"info",logFormat:mb(n.log.format)?n.log.format:"json",outputDestination:hb(n.log.output)?n.log.output:"both",filenamePrefix:s.prefix,filenameExtension:s.extension,maxFileSizeMb:n.log.file.max_size,maxBackups:n.log.file.max_backups,maxAgeDays:n.log.file.max_age,compressOldLogs:n.log.file.compress},retention:{enabled:!!o.enabled,keepValue:m?d/24:d,keepUnit:m?"days":"hours",startAtLocal:rb(o.start_at_utc),intervalHours:Number.isFinite(o.interval_hours)?o.interval_hours:24,consistencyCleanup:!!o.consistency_cleanup,deleteDatabase:!!((b=o.targets)!=null&&b.database),deleteFiles:!!((v=o.targets)!=null&&v.files)}},y=Fh(n);return y.retention||(y.retention={...o,targets:{...o.targets}}),{draft:g,shadow:y}}function bb(n,s){const c=Fh(s),o=yb(s.ffmpeg.defaults.probe_args);c.server.addr=n.general.server.address,c.server.camera_dir=n.general.server.cameraDirectory,c.server.mvs_dir=n.general.server.mvsDirectory,c.server.data_dir=n.general.server.dataDirectory,c.machbase.host=n.general.machbase.host,c.machbase.port=n.general.machbase.port,c.machbase.timeout_seconds=n.general.machbase.timeoutSeconds,c.machbase.api_token=n.general.machbase.useToken?n.general.machbase.apiToken:"",c.ffmpeg.binary=n.general.ffmpeg.binary,c.ffmpeg.defaults.probe_binary=n.general.ffmpeg.probeBinary,c.ffmpeg.defaults.probe_args=n.ffmpeg.probeArgs.map(v=>o?{Flag:v.flag,Value:v.value}:{flag:v.flag,value:v.value}),c.mediamtx.host=n.general.mediaMtx.host,c.mediamtx.port=n.general.mediaMtx.port,c.mediamtx.binary=n.general.mediaMtx.binary,c.log.dir=n.log.logDirectory,c.log.level=n.log.logLevel,c.log.format=n.log.logFormat,c.log.output=n.log.outputDestination,c.log.file.filename=`${n.log.filenamePrefix}.log`,c.log.file.max_size=n.log.maxFileSizeMb,c.log.file.max_backups=n.log.maxBackups,c.log.file.max_age=n.log.maxAgeDays,c.log.file.compress=n.log.compressOldLogs;const d=n.retention,m=Number.isFinite(d.keepValue)?d.keepValue:0,g=d.keepUnit==="days"?m*24:m,y=Number(d.intervalHours),b=!Number.isFinite(y)||y<=0?24:y;return c.retention={enabled:!!d.enabled,keep_hours:g,start_at_utc:cb(d.startAtLocal),interval_hours:b,consistency_cleanup:!0,targets:{database:!0,files:!0}},c}const xb=/^\d{1,2}:\d{2}(:\d{2})?$/;function Sb(n){const s=n.retention;if(!Number.isFinite(s.keepValue)||s.keepValue<=0)return"보존 기간은 1 이상이어야 합니다.";if(!Number.isFinite(s.intervalHours)||s.intervalHours<0)return"반복 주기는 0 이상이어야 합니다.";const c=typeof s.startAtLocal=="string"?s.startAtLocal.trim():"";if(!xb.test(c))return"시작 시각 형식이 올바르지 않습니다 (HH:mm).";const[o,d]=c.split(":"),m=Number.parseInt(o??"",10),g=Number.parseInt(d??"",10);return!Number.isFinite(m)||!Number.isFinite(g)||m<0||m>23||g<0||g>59?"시작 시각 형식이 올바르지 않습니다 (HH:mm).":null}function jb(){return Ih(Wh())}const th=jb();function ah(n,s){return n instanceof Error&&n.message?n.message:s}function Tb(){const{notify:n}=il(),[s,c]=h.useState(th.draft),[o,d]=h.useState(th.shadow),[m,g]=h.useState(!0),[y,b]=h.useState(!1);return h.useEffect(()=>{let _=!1;async function H(){try{const O=await ib();if(_)return;if(O){const C=Ih(O);c(C.draft),d(C.shadow)}}catch(O){if(_)return;n(`Failed to load config: ${ah(O,"unknown error")}. Using fallback values.`,"error")}finally{_||g(!1)}}return H(),()=>{_=!0}},[n]),{draft:s,loading:m,saving:y,save:async()=>{if(y)return;const _=Sb(s);if(_){n(_,"error");return}b(!0);try{const H=bb(s,o),O=await ub(H);n(O.reason||"Settings saved successfully.","success")}catch(H){n(`Failed to save settings: ${ah(H,"unknown error")}`,"error")}finally{b(!1)}},updateGeneral:_=>{c(H=>({...H,general:_}))},updateFFmpeg:_=>{c(H=>({...H,ffmpeg:_}))},updateLog:_=>{c(H=>({...H,log:_}))},updateRetention:_=>{c(H=>({...H,retention:_}))}}}function ye({name:n,className:s=""}){return r.jsx("span",{className:`material-symbols-outlined ${s}`,children:n})}function ea({id:n,label:s,value:c,onChange:o,type:d="text",disabled:m=!1}){return r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:n,className:"form-label",children:s}),r.jsx("input",{id:n,name:n,type:d,value:c,disabled:m,onChange:g=>o(g.target.value),className:"w-full"})]})}function pc(n,s){const c=Number(n);return Number.isNaN(c)?s:c}function Eb({settings:n,onChange:s}){const[c,o]=h.useState(!1);return r.jsxs("section",{className:"flex flex-col gap-6",children:[r.jsxs("div",{className:"page-title-group",children:[r.jsx("h1",{className:"page-title",children:"General Settings"}),r.jsx("p",{className:"page-desc",children:"Configure core server paths and third-party integrations."})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"dns",className:"icon-sm"}),"Server"]}),r.jsx(ea,{id:"server-address",label:"Address",value:n.server.address,disabled:!0,onChange:d=>s({...n,server:{...n.server,address:d}})}),r.jsx(ea,{id:"server-camera-dir",label:"Camera Directory",value:n.server.cameraDirectory,onChange:d=>s({...n,server:{...n.server,cameraDirectory:d}})}),r.jsx(ea,{id:"server-mvs-dir",label:"MVS Directory",value:n.server.mvsDirectory,onChange:d=>s({...n,server:{...n.server,mvsDirectory:d}})}),r.jsx(ea,{id:"server-data-dir",label:"Data Directory",value:n.server.dataDirectory,onChange:d=>s({...n,server:{...n.server,dataDirectory:d}})})]}),r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"database",className:"icon-sm"}),"Machbase"]}),r.jsx(ea,{id:"machbase-host",label:"Host",value:n.machbase.host,onChange:d=>s({...n,machbase:{...n.machbase,host:d}})}),r.jsx(ea,{id:"machbase-port",label:"Port",type:"number",value:n.machbase.port,onChange:d=>s({...n,machbase:{...n.machbase,port:pc(d,n.machbase.port)}})}),r.jsx(ea,{id:"machbase-timeout",label:"Timeout Seconds",type:"number",value:n.machbase.timeoutSeconds,onChange:d=>s({...n,machbase:{...n.machbase,timeoutSeconds:pc(d,n.machbase.timeoutSeconds)}})}),r.jsxs("div",{className:"flex items-center justify-between gap-2 mt-4 p-3 rounded-base border border-border bg-surface",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-on-surface",children:"Use Token"}),r.jsx("p",{className:"text-xs text-on-surface-hint mt-1",children:"Enable token-based authentication for Machbase requests."})]}),r.jsx("div",{className:`switch ${n.machbase.useToken?"active":""}`,onClick:()=>{const d=!n.machbase.useToken;d||o(!1),s({...n,machbase:{...n.machbase,useToken:d}})},children:r.jsx("div",{className:"switch-thumb"})})]}),n.machbase.useToken&&r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"machbase-api-token",className:"form-label",children:"Token"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("input",{id:"machbase-api-token",name:"machbase-api-token",type:c?"text":"password",value:n.machbase.apiToken,className:"flex-1",onChange:d=>s({...n,machbase:{...n.machbase,apiToken:d.target.value}})}),r.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>o(d=>!d),children:c?"Hide":"Show"})]})]})]}),r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"videocam",className:"icon-sm"}),"MediaMTX"]}),r.jsx(ea,{id:"mediamtx-host",label:"Host",value:n.mediaMtx.host,onChange:d=>s({...n,mediaMtx:{...n.mediaMtx,host:d}})}),r.jsx(ea,{id:"mediamtx-port",label:"Port",type:"number",value:n.mediaMtx.port,onChange:d=>s({...n,mediaMtx:{...n.mediaMtx,port:pc(d,n.mediaMtx.port)}})}),r.jsx(ea,{id:"mediamtx-binary",label:"Binary",value:n.mediaMtx.binary,onChange:d=>s({...n,mediaMtx:{...n.mediaMtx,binary:d}})})]}),r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"movie",className:"icon-sm"}),"FFmpeg"]}),r.jsx(ea,{id:"ffmpeg-binary",label:"Binary",value:n.ffmpeg.binary,onChange:d=>s({...n,ffmpeg:{...n.ffmpeg,binary:d}})}),r.jsx(ea,{id:"ffmpeg-probe-binary",label:"FFprobe Binary",value:n.ffmpeg.probeBinary,onChange:d=>s({...n,ffmpeg:{...n.ffmpeg,probeBinary:d}})})]})]})]})}function Nb(){return`arg-${Date.now()}-${Math.random().toString(16).slice(2,6)}`}function Cb({settings:n,onChange:s}){const c=(m,g,y)=>{s({...n,probeArgs:n.probeArgs.map(b=>b.id===m?{...b,[g]:y}:b)})},o=()=>{s({...n,probeArgs:[...n.probeArgs,{id:Nb(),flag:"",value:""}]})},d=m=>{s({...n,probeArgs:n.probeArgs.filter(g=>g.id!==m)})};return r.jsxs("section",{className:"flex flex-col gap-6",children:[r.jsxs("div",{className:"page-title-group",children:[r.jsx("h1",{className:"page-title",children:"FFmpeg Default Settings"}),r.jsx("p",{className:"page-desc",children:"Configure default probe arguments for optimized media processing."})]}),r.jsxs("article",{className:"card",children:[r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsxs("h3",{className:"card-title mb-0",children:[r.jsx(ye,{name:"terminal",className:"icon-sm"}),"probe_args"]}),r.jsxs("button",{type:"button",className:"btn btn-primary",onClick:o,children:[r.jsx(ye,{name:"add",className:"icon-sm"}),"Add Argument"]})]}),r.jsx("p",{className:"text-xs text-on-surface-hint mt-2",children:"Default command line flags used when analyzing media streams."}),r.jsx("div",{className:"flex flex-col gap-3 mt-4",children:n.probeArgs.map(m=>r.jsxs("div",{className:"grid grid-cols-[1fr_32px] gap-3 items-end p-3 rounded-base border border-border bg-surface",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx("label",{htmlFor:`flag-${m.id}`,className:"form-label",children:"FLAG"}),r.jsx("input",{id:`flag-${m.id}`,name:`flag-${m.id}`,value:m.flag,className:"w-full font-mono",onChange:g=>c(m.id,"flag",g.target.value)})]}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx("label",{htmlFor:`value-${m.id}`,className:"form-label",children:"VALUE"}),r.jsx("input",{id:`value-${m.id}`,name:`value-${m.id}`,value:m.value,className:"w-full font-mono",onChange:g=>c(m.id,"value",g.target.value)})]})]}),r.jsx("button",{type:"button",className:"btn btn-ghost p-0 w-8","aria-label":`delete-${m.id}`,onClick:()=>d(m.id),children:r.jsx(ye,{name:"delete",className:"icon-sm text-error"})})]},m.id))}),r.jsx("div",{className:"mt-4 p-3 rounded-base border border-primary/30 bg-primary/10 text-sm text-on-surface-secondary",children:"Probing arguments directly affect metadata extraction performance. Using JSON output format is recommended for programmatic parsing."})]})]})}function gc(n,s){const c=Number(n);return Number.isNaN(c)?s:c}function _b({settings:n,onChange:s}){return r.jsxs("section",{className:"flex flex-col gap-6",children:[r.jsxs("div",{className:"page-title-group",children:[r.jsx("h1",{className:"page-title",children:"Log Configuration"}),r.jsx("p",{className:"page-desc",children:"Manage how the server generates, stores, and rotates system log files."})]}),r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"description",className:"icon-sm"}),"General Logging"]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-x-4 gap-y-1",children:[r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"log-directory",className:"form-label",children:"Log Directory"}),r.jsx("input",{id:"log-directory",name:"log-directory",value:n.logDirectory,className:"w-full",onChange:c=>s({...n,logDirectory:c.target.value})})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"log-level",className:"form-label",children:"Log Level"}),r.jsxs("select",{id:"log-level",name:"log-level",value:n.logLevel,className:"w-full",onChange:c=>s({...n,logLevel:c.target.value}),children:[r.jsx("option",{value:"debug",children:"debug"}),r.jsx("option",{value:"info",children:"info"}),r.jsx("option",{value:"warn",children:"warn"}),r.jsx("option",{value:"error",children:"error"})]})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"log-format",className:"form-label",children:"Log Format"}),r.jsxs("select",{id:"log-format",name:"log-format",value:n.logFormat,className:"w-full",onChange:c=>s({...n,logFormat:c.target.value}),children:[r.jsx("option",{value:"json",children:"JSON"}),r.jsx("option",{value:"text",children:"Text"})]})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"output-destination",className:"form-label",children:"Output Destination"}),r.jsxs("select",{id:"output-destination",name:"output-destination",value:n.outputDestination,className:"w-full",onChange:c=>s({...n,outputDestination:c.target.value}),children:[r.jsx("option",{value:"stdout",children:"Stdout"}),r.jsx("option",{value:"file",children:"File"}),r.jsx("option",{value:"both",children:"Both"})]})]})]})]}),r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"folder",className:"icon-sm"}),"File Retention & Rotation"]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-x-4 gap-y-1",children:[r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"filename-prefix",className:"form-label",children:"Filename Pattern"}),r.jsxs("div",{className:"flex items-center w-full",children:[r.jsx("input",{id:"filename-prefix",name:"filename-prefix",value:n.filenamePrefix,className:"flex-1 min-w-0",style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderRight:"none"},onChange:c=>s({...n,filenamePrefix:c.target.value})}),r.jsx("span",{className:"inline-flex items-center justify-center shrink-0",style:{height:"var(--size-control-height)",padding:"0 12px",fontSize:"var(--font-size-base)",color:"var(--color-on-surface-tertiary)",backgroundColor:"var(--color-surface-input)",border:"1px solid var(--color-border)",borderLeft:"none",borderRadius:"0 var(--radius-base) var(--radius-base) 0"},children:".log"})]})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"max-file-size",className:"form-label",children:"Max File Size (MB)"}),r.jsx("input",{id:"max-file-size",name:"max-file-size",type:"number",value:n.maxFileSizeMb,className:"w-full",onChange:c=>s({...n,maxFileSizeMb:gc(c.target.value,n.maxFileSizeMb)})})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"max-backups",className:"form-label",children:"Max Backups"}),r.jsx("input",{id:"max-backups",name:"max-backups",type:"number",value:n.maxBackups,className:"w-full",onChange:c=>s({...n,maxBackups:gc(c.target.value,n.maxBackups)})})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"max-age-days",className:"form-label",children:"Max Age (Days)"}),r.jsx("input",{id:"max-age-days",name:"max-age-days",type:"number",value:n.maxAgeDays,className:"w-full",onChange:c=>s({...n,maxAgeDays:gc(c.target.value,n.maxAgeDays)})})]})]}),r.jsxs("div",{className:"flex items-center justify-between gap-2 mt-4 p-3 rounded-base border border-border bg-surface",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-on-surface",children:"Compress Old Logs"}),r.jsx("p",{className:"text-xs text-on-surface-hint mt-1",children:"Automatically compress old log files to save disk space."})]}),r.jsx("div",{className:`switch ${n.compressOldLogs?"active":""}`,onClick:()=>s({...n,compressOldLogs:!n.compressOldLogs}),children:r.jsx("div",{className:"switch-thumb"})})]})]})]})}class Ph extends Error{constructor(s="Retention is already running"){super(s),this.name="RetentionConflictError"}}async function Rb(){const n=await Vu(),s=await fetch(`${n}/api/retention/status`),c=await s.json(),o=Uc(c);if(!s.ok||!o.success)throw new Error(o.reason||`HTTP ${s.status}`);return o.data}async function zb(n){const s=await Vu(),c=await fetch(`${s}/api/retention/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dry_run:n})});if(c.status===409)throw new Ph;const o=await c.json(),d=Uc(o);if(!c.ok||!d.success)throw new Error(d.reason||`HTTP ${c.status}`);return d.data}function Ab(){const{notify:n}=il(),[s,c]=h.useState(null),[o,d]=h.useState(!1),[m,g]=h.useState(null),[y,b]=h.useState(!1),[v,T]=h.useState(null),x=h.useRef(!1),A=h.useCallback(async()=>{d(!0),g(null);try{const _=await Rb();x.current||c(_)}catch(_){x.current||g(_ instanceof Error?_.message:"Failed to load status")}finally{x.current||d(!1)}},[]),D=h.useCallback(async _=>{b(!0);let H=!1;try{const O=await zb(_);if(x.current)return;T(O),n(_?"Dry-run finished — see preview":"Retention run finished","success"),H=!0}catch(O){if(x.current)return;O instanceof Ph?(n("Retention is already running — see Status card for progress","info"),H=!0):n(O instanceof Error?O.message:"Run failed","error")}finally{x.current||b(!1)}H&&!x.current&&A()},[n,A]);return h.useEffect(()=>{x.current=!1,A();const _=setInterval(()=>{x.current||typeof document<"u"&&document.visibilityState==="hidden"||A()},5e3);return()=>{x.current=!0,clearInterval(_)}},[A]),{status:s,statusLoading:o,statusError:m,fetchStatus:A,runManual:D,running:y,lastRunResult:v}}function ku(n){if(!n)return"-";const s=new Date(n);if(Number.isNaN(s.getTime()))return"-";const c=s.getFullYear(),o=String(s.getMonth()+1).padStart(2,"0"),d=String(s.getDate()).padStart(2,"0"),m=String(s.getHours()).padStart(2,"0"),g=String(s.getMinutes()).padStart(2,"0"),y=String(s.getSeconds()).padStart(2,"0");return`${c}-${o}-${d} ${m}:${g}:${y}`}const Db={main:"border-info/40 bg-info/10 text-info",log:"border-success/40 bg-success/10 text-success"};function Mb({kind:n}){const s=Db[n]??"border-border bg-surface-elevated text-on-surface-secondary";return r.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded-base text-[10px] font-medium uppercase tracking-wide border ${s}`,children:n})}function wb({status:n,statusLoading:s,statusError:c,manualRunning:o}){if(c)return r.jsxs("div",{className:"relative group",children:[r.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-base border border-error/30 bg-error/10 text-error text-xs font-medium uppercase tracking-wide cursor-help",children:[r.jsx(ye,{name:"error",className:"icon-sm"}),"Status error"]}),r.jsx("div",{className:"hidden group-hover:block absolute left-0 top-full mt-2 z-20 min-w-72 max-w-md w-max p-3 rounded-base border border-border bg-surface-elevated shadow-lg text-xs text-error break-words",children:c})]});if(s&&!n)return r.jsx("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-base border border-border bg-surface-elevated text-on-surface-disabled text-xs font-medium uppercase tracking-wide",children:"Loading"});if(!n)return null;const d=n.last_run,m=n.running||o;return r.jsxs("div",{className:"relative group",children:[m?r.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-base border border-warning/30 bg-warning/10 text-warning text-xs font-medium uppercase tracking-wide cursor-help",children:[r.jsx("span",{className:"block w-1.5 h-1.5 rounded-full shrink-0 bg-warning"}),"Running"]}):r.jsx("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-base border border-border bg-surface-elevated text-on-surface-disabled text-xs font-medium uppercase tracking-wide cursor-help",children:"Idle"}),r.jsxs("div",{className:"hidden group-hover:flex flex-col gap-2.5 absolute left-0 top-full mt-2 z-20 min-w-72 max-w-md w-max p-3 rounded-base border border-border bg-surface-elevated shadow-lg text-xs",children:[r.jsxs("div",{children:[r.jsx("div",{className:"font-medium text-on-surface mb-0.5",children:"Next run"}),n.next_run_at?r.jsx("div",{className:"text-on-surface-secondary whitespace-nowrap",children:ku(n.next_run_at)}):r.jsx("div",{className:"text-on-surface-hint",children:"Not scheduled."})]}),r.jsxs("div",{children:[r.jsx("div",{className:"font-medium text-on-surface mb-0.5",children:"Last result"}),d?r.jsxs("div",{className:"text-on-surface-secondary flex flex-col gap-0.5",children:[r.jsxs("span",{className:"whitespace-nowrap",children:["Finished: ",ku(d.finished_at)]}),r.jsxs("span",{children:[d.dry_run?"Dry-run":"Actual run"," · rows ",d.candidate_rows??0," · files ",d.deleted_files??0," · skipped ",d.skipped_files??0]})]}):r.jsx("div",{className:"text-on-surface-hint",children:"No previous run."})]})]})]})}function Ob({settings:n,onChange:s}){const[c,o]=h.useState(!0),{status:d,statusLoading:m,statusError:g,runManual:y,running:b,lastRunResult:v}=Ab(),T=ob(),x=n.enabled,A=Z=>s({...n,enabled:Z}),D=Z=>s({...n,keepValue:Z}),_=Z=>s({...n,keepUnit:Z}),H=Z=>s({...n,startAtLocal:Z}),O=Z=>s({...n,intervalHours:Z}),[C,Y]=h.useState(String(n.keepValue)),[X,$]=h.useState(String(n.intervalHours));h.useEffect(()=>{Y(String(n.keepValue))},[n.keepValue]),h.useEffect(()=>{$(String(n.intervalHours))},[n.intervalHours]);const I=b?"Running...":"Run Now",le=v,P=le?[{label:"Rows",value:le.candidate_rows??0},{label:"Files",value:le.deleted_files??0},{label:"Missing",value:le.missing_files??0},{label:"Skipped",value:le.skipped_files??0},{label:"Metadata",value:le.deleted_metadata??0}]:[];return r.jsxs("section",{className:"flex flex-col gap-6",children:[r.jsxs("div",{className:"page-title-group",children:[r.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[r.jsx("h1",{className:"page-title",children:"Retention"}),r.jsx(wb,{status:d,statusLoading:m,statusError:g,manualRunning:b})]}),r.jsx("p",{className:"page-desc",children:"Automatically remove old recordings on a recurring schedule, or run a one-off cleanup manually."})]}),r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"timer",className:"icon-sm"}),"Schedule"]}),r.jsxs("div",{className:"flex items-center justify-between gap-2 mt-3 p-3 rounded-base border border-border bg-surface",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-on-surface",children:"Enable scheduled retention"}),r.jsx("p",{className:"text-xs text-on-surface-hint mt-1",children:"Run cleanup automatically based on the schedule below."})]}),r.jsx("div",{className:`switch ${x?"active":""}`,onClick:()=>A(!x),children:r.jsx("div",{className:"switch-thumb"})})]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[1fr_120px] gap-3 mt-3 items-end",children:[r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx("label",{htmlFor:"retention-keep-value",className:"form-label",children:"Keep duration"}),r.jsx("input",{id:"retention-keep-value",name:"retention-keep-value",type:"number",min:0,value:C,disabled:!x,className:"w-full",onChange:Z=>{const re=Z.target.value;if(Y(re),re==="")return;const ge=Number(re);Number.isNaN(ge)||D(ge)},onBlur:()=>{C===""&&Y(String(n.keepValue))}})]}),r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx("label",{htmlFor:"retention-keep-unit",className:"form-label",children:"Unit"}),r.jsxs("select",{id:"retention-keep-unit",name:"retention-keep-unit",value:n.keepUnit,disabled:!x,className:"w-full",onChange:Z=>_(Z.target.value),children:[r.jsx("option",{value:"hours",children:"hours"}),r.jsx("option",{value:"days",children:"days"})]})]})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"retention-start-at",className:"form-label",children:"Start time (local)"}),r.jsx("input",{id:"retention-start-at",name:"retention-start-at",type:"time",value:n.startAtLocal,disabled:!x,className:"w-full",onChange:Z=>H(Z.target.value)}),r.jsxs("p",{className:"text-xs text-on-surface-hint",children:["Stored in UTC (",T,")"]})]}),r.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[r.jsx("label",{htmlFor:"retention-interval-hours",className:"form-label",children:"Interval (hours, 0 = 24h)"}),r.jsx("input",{id:"retention-interval-hours",name:"retention-interval-hours",type:"number",min:0,value:X,disabled:!x,className:"w-full",onChange:Z=>{const re=Z.target.value;if($(re),re==="")return;const ge=Number(re);Number.isNaN(ge)||O(ge)},onBlur:()=>{X===""&&$(String(n.intervalHours))}})]})]}),r.jsxs("article",{className:`card ${x?"":"opacity-60"}`,"aria-disabled":!x,children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"play_circle",className:"icon-sm"}),"Manual Run"]}),r.jsx("p",{className:"text-xs text-on-surface-hint mt-2",children:"Trigger a one-off retention pass against the currently saved configuration. Dry-run previews candidate deletions without modifying data."}),!x&&r.jsxs("div",{className:"mt-3 p-3 rounded-base border border-warning/30 bg-warning/10 text-warning text-xs flex items-start gap-2",children:[r.jsx(ye,{name:"info",className:"icon-sm shrink-0 mt-0.5"}),r.jsx("span",{children:"Enable scheduled retention above to use Manual Run — it executes against the saved schedule configuration."})]}),r.jsxs("div",{className:"flex items-center justify-between gap-2 mt-3 p-3 rounded-base border border-border bg-surface",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-on-surface",children:"Dry run"}),r.jsx("p",{className:"text-xs text-on-surface-hint mt-1",children:"Preview candidates without deleting anything."})]}),r.jsx("div",{className:`switch ${c?"active":""} ${x?"":"pointer-events-none opacity-60"}`,onClick:()=>x&&o(Z=>!Z),children:r.jsx("div",{className:"switch-thumb"})})]}),r.jsx("div",{className:"flex items-center gap-2 mt-3",children:r.jsxs("button",{type:"button",className:"btn btn-primary",disabled:b||!x,onClick:()=>void y(c),children:[r.jsx(ye,{name:"play_circle",className:"icon-sm"}),I]})}),le&&r.jsxs("div",{className:"mt-4 p-3 rounded-base border border-border bg-surface flex flex-col gap-3",children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[r.jsx("p",{className:"text-sm font-medium text-on-surface",children:le.dry_run?"Dry-run preview":"Run result"}),r.jsx("span",{className:"text-xs text-on-surface-hint",children:ku(le.finished_at)})]}),r.jsxs("div",{className:"text-xs",children:[r.jsx("span",{className:"text-on-surface-hint",children:"Cutoff "}),r.jsx("span",{className:"text-on-surface-secondary",children:ku(le.cutoff)}),r.jsx("span",{className:"text-on-surface-hint",children:" — older data is targeted"})]}),r.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-5 gap-2",children:P.map(Z=>{const re=Z.value===0;return r.jsxs("div",{className:"flex flex-col gap-0.5 px-2.5 py-2 rounded-base border border-border bg-surface-elevated",children:[r.jsx("span",{className:"text-[11px] uppercase tracking-wide text-on-surface-hint whitespace-nowrap",children:Z.label}),r.jsx("span",{className:`font-mono text-xl font-semibold leading-none ${re?"text-on-surface-disabled":"text-on-surface"}`,children:Z.value})]},Z.label)})}),(()=>{const Z=le.tables??[];return Z.length===0?null:r.jsxs("div",{className:"text-xs",children:[r.jsxs("p",{className:"text-on-surface-hint mb-2",children:["Per-table breakdown (",Z.length,")"]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-on-surface-hint border-b border-border",children:[r.jsx("th",{className:"text-left py-1.5 pr-3 font-normal",children:"Table"}),r.jsx("th",{className:"text-left py-1.5 pr-3 font-normal",children:"Kind"}),r.jsx("th",{className:"text-right py-1.5 pr-3 font-normal",children:"Rows"}),r.jsx("th",{className:"text-right py-1.5 pr-3 font-normal",children:"Files"}),r.jsx("th",{className:"text-right py-1.5 pr-3 font-normal",children:"Missing"}),r.jsx("th",{className:"text-right py-1.5 pr-3 font-normal",children:"Skipped"}),r.jsx("th",{className:"text-right py-1.5 pr-3 font-normal",children:"Meta"}),r.jsx("th",{className:"text-left py-1.5 font-normal",children:"Cameras"})]})}),r.jsx("tbody",{children:Z.map(re=>{const ge=re.candidate_rows??0,_e=re.deleted_files??0,je=re.missing_files??0,Oe=re.skipped_files??0,Re=re.deleted_metadata??0,be=re.cameras??[];return r.jsxs("tr",{className:"border-b border-border last:border-0",children:[r.jsx("td",{className:"py-1.5 pr-3 font-medium text-on-surface font-mono",children:re.table}),r.jsx("td",{className:"py-1.5 pr-3",children:r.jsx(Mb,{kind:re.kind})}),r.jsx("td",{className:`text-right py-1.5 pr-3 font-mono ${ge===0?"text-on-surface-hint":"text-on-surface"}`,children:ge}),r.jsx("td",{className:`text-right py-1.5 pr-3 font-mono ${_e===0?"text-on-surface-hint":"text-on-surface"}`,children:_e}),r.jsx("td",{className:`text-right py-1.5 pr-3 font-mono ${je===0?"text-on-surface-hint":"text-on-surface"}`,children:je}),r.jsx("td",{className:`text-right py-1.5 pr-3 font-mono ${Oe===0?"text-on-surface-hint":"text-on-surface"}`,children:Oe}),r.jsx("td",{className:`text-right py-1.5 pr-3 font-mono ${Re===0?"text-on-surface-hint":"text-on-surface"}`,children:Re}),r.jsx("td",{className:"py-1.5",children:be.length>0?r.jsx("div",{className:"flex flex-wrap gap-1",children:be.map(w=>r.jsx("span",{className:"px-1.5 py-0.5 rounded-base bg-surface-elevated text-on-surface-secondary border border-border font-mono text-[11px]",children:w.camera_id},w.camera_id))}):r.jsx("span",{className:"text-on-surface-hint",children:"—"})})]},`${re.table}-${re.kind}`)})})]})})]})})()]})]})]})]})}const Ub=[{path:"/settings/general",label:"General",icon:"tune"},{path:"/settings/ffmpeg",label:"FFmpeg Default",icon:"movie"},{path:"/settings/log",label:"Log Configuration",icon:"description"},{path:"/settings/retention",label:"Retention",icon:"timer"}];function Lb(){const{draft:n,loading:s,saving:c,save:o,updateGeneral:d,updateFFmpeg:m,updateLog:g,updateRetention:y}=Tb();return s?r.jsx("div",{className:"flex items-center justify-center h-64 text-on-surface-disabled",children:"Loading..."}):r.jsxs("div",{className:"page",children:[r.jsxs("div",{className:"page-header",children:[r.jsx("nav",{className:"tab-bar",children:Ub.map(b=>r.jsxs(Bh,{to:b.path,className:({isActive:v})=>`tab-item${v?" active":""}`,children:[r.jsx(ye,{name:b.icon,className:"icon-sm"}),b.label]},b.path))}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>void o(),disabled:c,children:c?"Saving...":"Save"})]}),r.jsx("div",{className:"page-body",children:r.jsx("div",{className:"page-body-inner",children:r.jsxs(wh,{children:[r.jsx(da,{index:!0,element:r.jsx(Mh,{to:"/settings/general",replace:!0})}),r.jsx(da,{path:"general",element:r.jsx(Eb,{settings:n.general,onChange:d})}),r.jsx(da,{path:"ffmpeg",element:r.jsx(Cb,{settings:n.ffmpeg,onChange:m})}),r.jsx(da,{path:"log",element:r.jsx(_b,{settings:n.log,onChange:g})}),r.jsx(da,{path:"retention",element:r.jsx(Ob,{settings:n.retention,onChange:y})})]})})})]})}function pt(n,s){return`${window.location.protocol}//${n}:${s}`}async function gt(n,s){const c=await fetch(n,s);if(!c.ok)throw new Error(`HTTP ${c.status}`);const o=await c.json();if(o.success===!1)throw new Error(o.reason||"Request failed");return o.data??o}async function Hb(n,s){const c=pt(n,s),o=await gt(`${c}/api/cameras`);return Array.isArray(o)?o:o&&Array.isArray(o.cameras)?o.cameras:[]}async function ep(n,s,c){const o=pt(s,c);return gt(`${o}/api/camera/${encodeURIComponent(n)}`)}async function Bb(n,s,c){const o=pt(s,c);return gt(`${o}/api/camera`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}async function kb(n,s,c,o){const d=pt(c,o);await gt(`${d}/api/camera/${encodeURIComponent(n)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function qb(n,s,c){const o=pt(s,c);await gt(`${o}/api/camera/${encodeURIComponent(n)}`,{method:"DELETE"})}async function Yb(n,s,c){const o=pt(s,c);await gt(`${o}/api/camera/${encodeURIComponent(n)}/enable`,{method:"POST"})}async function Gb(n,s,c){const o=pt(s,c);await gt(`${o}/api/camera/${encodeURIComponent(n)}/disable`,{method:"POST"})}async function tp(n,s){const c=pt(n,s);return(await gt(`${c}/api/detect_objects`)).detect_objects??[]}async function Xb(n,s,c){const o=pt(s,c);return(await gt(`${o}/api/camera/${encodeURIComponent(n)}/detect_objects`)).detect_objects??[]}async function Ec(n,s,c,o){const d=pt(c,o);await gt(`${d}/api/camera/${encodeURIComponent(n)}/detect_objects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({detect_objects:s})})}async function Qb(n,s){const c=pt(n,s);return(await gt(`${c}/api/tables`)).tables??[]}async function Vb(n,s,c){const o=pt(s,c);await gt(`${o}/api/table`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n})})}async function Zb(n,s,c){const o=pt(s,c),d=new URLSearchParams;for(const[g,y]of Object.entries(n))y!==void 0&&y!==""&&d.set(g,String(y));const m=await gt(`${o}/api/camera_events?${d.toString()}`);return Array.isArray(m)?{events:m,total_count:m.length,total_pages:1}:{events:Array.isArray(m.events)?m.events:[],total_count:m.total_count??0,total_pages:m.total_pages??1}}async function $b(n,s,c){const o=pt(s,c),d=await gt(`${o}/api/event_rule/${encodeURIComponent(n)}`);return Array.isArray(d)?d:d&&Array.isArray(d.event_rules)?d.event_rules:d&&Array.isArray(d.rules)?d.rules:[]}async function Kb(n,s,c){const o=pt(s,c);await gt(`${o}/api/event_rule`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}async function Jb(n,s,c,o,d){const m=pt(o,d);await gt(`${m}/api/event_rule/${encodeURIComponent(n)}/${encodeURIComponent(s)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})}async function Fb(n,s,c,o){const d=pt(c,o);await gt(`${d}/api/event_rule/${encodeURIComponent(n)}/${encodeURIComponent(s)}`,{method:"DELETE"})}async function Wb(n,s,c){const o=pt(s,c);return await gt(`${o}/api/camera/ping?ip=${encodeURIComponent(n)}`)}async function Lc(n){const s=await fetch(`${Xh()}/servers?alias=${encodeURIComponent(n)}`,{method:"GET"});return(await Qu(s)).data}const Ib=["tcp","udp","udp_multicast","http"],Pb=["prefer_tcp","filter_src","listen","latm","rfc2190","skip_rtcp"],Nc={rtspTransport:"tcp",rtspFlags:"prefer_tcp",bufferSize:1024e3,maxDelay:5e5,probesize:5e6,analyzeduration:5e6,useWallclockAsTimestamps:"1",videoCodec:"copy",format:"dash",segDuration:5,useTemplate:!0,useTimeline:!0,ffmpegCommand:"",outputDir:"",archiveDir:""};function lh(n){return[{k:"rtsp_transport",v:n.rtspTransport},{k:"rtsp_flags",v:n.rtspFlags},{k:"buffer_size",v:String(n.bufferSize)},{k:"max_delay",v:String(n.maxDelay)},{k:"probesize",v:String(n.probesize)},{k:"analyzeduration",v:String(n.analyzeduration)},{k:"use_wallclock_as_timestamps",v:n.useWallclockAsTimestamps},{k:"c:v",v:n.videoCodec},{k:"f",v:n.format},{k:"seg_duration",v:String(n.segDuration)},{k:"use_template",v:n.useTemplate?"1":"0"},{k:"use_timeline",v:n.useTimeline?"1":"0"}]}function e0(n,s){const c={...Nc};for(const o of n)switch(o.k){case"rtsp_transport":c.rtspTransport=String(o.v);break;case"rtsp_flags":c.rtspFlags=String(o.v);break;case"buffer_size":c.bufferSize=Number(o.v)||0;break;case"max_delay":c.maxDelay=Number(o.v)||0;break;case"probesize":c.probesize=Number(o.v)||0;break;case"analyzeduration":c.analyzeduration=Number(o.v)||0;break;case"use_wallclock_as_timestamps":c.useWallclockAsTimestamps=String(o.v);break;case"c:v":c.videoCodec=String(o.v);break;case"f":c.format=String(o.v);break;case"seg_duration":c.segDuration=Number(o.v)||0;break;case"use_template":c.useTemplate=o.v==="1"||o.v===1;break;case"use_timeline":c.useTimeline=o.v==="1"||o.v===1;break}return s!=null&&s.ffmpeg_command&&(c.ffmpegCommand=s.ffmpeg_command),s!=null&&s.output_dir&&(c.outputDir=s.output_dir),s!=null&&s.archive_dir&&(c.archiveDir=s.archive_dir),c}function nh({value:n,onChange:s,readOnly:c=!1}){const[o,d]=h.useState(!0),m=(g,y)=>{s({...n,[g]:y})};return r.jsxs("article",{className:"card",children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer"},onClick:()=>d(g=>!g),children:[r.jsx("h3",{className:"card-title",style:{marginBottom:0},children:"FFmpeg Configuration"}),r.jsx("span",{style:{display:"inline-flex",justifyContent:"center",color:"var(--color-on-surface-tertiary)",transition:"transform 0.15s",transform:o?"rotate(0deg)":"rotate(90deg)"},children:r.jsx(ye,{name:"chevron_right",className:"icon-sm"})})]}),!o&&r.jsxs("div",{style:{marginTop:16,display:"flex",flexDirection:"column",gap:12},children:[r.jsx(vc,{children:"Input & Network"}),r.jsxs(hn,{children:[r.jsx(ih,{label:"RTSP Transport",value:n.rtspTransport,options:Ib,onChange:g=>m("rtspTransport",g),disabled:c}),r.jsx(ih,{label:"RTSP Flags",value:n.rtspFlags,options:Pb,onChange:g=>m("rtspFlags",g),disabled:c})]}),r.jsxs(hn,{children:[r.jsx(mi,{label:"Buffer Size",value:n.bufferSize,onChange:g=>m("bufferSize",g),disabled:c}),r.jsx(mi,{label:"Max Delay",value:n.maxDelay,onChange:g=>m("maxDelay",g),disabled:c})]}),r.jsxs(hn,{children:[r.jsx(mi,{label:"Probe Size",value:n.probesize,onChange:g=>m("probesize",g),disabled:c}),r.jsx(mi,{label:"Analyze Duration",value:n.analyzeduration,onChange:g=>m("analyzeduration",g),disabled:c})]}),r.jsx(vc,{children:"Output & DASH"}),r.jsxs(hn,{children:[r.jsx(di,{label:"Video Codec",value:n.videoCodec,onChange:g=>m("videoCodec",g),disabled:c}),r.jsx(di,{label:"Format",value:n.format,onChange:g=>m("format",g),disabled:c})]}),r.jsxs(hn,{children:[r.jsx(mi,{label:"Segment Duration (s)",value:n.segDuration,onChange:g=>m("segDuration",g),disabled:c}),r.jsxs("div",{style:{display:"flex",gap:16},children:[r.jsx(uh,{label:"Use Template",checked:n.useTemplate,onChange:g=>m("useTemplate",g),disabled:c}),r.jsx(uh,{label:"Use Timeline",checked:n.useTimeline,onChange:g=>m("useTimeline",g),disabled:c})]})]}),r.jsx(vc,{children:"Paths"}),r.jsx(di,{label:"FFmpeg Command",value:n.ffmpegCommand,onChange:g=>m("ffmpegCommand",g),disabled:c}),r.jsxs(hn,{children:[r.jsx(di,{label:"Output Directory",value:n.outputDir,onChange:g=>m("outputDir",g),disabled:c}),r.jsx(di,{label:"Archive Directory",value:n.archiveDir,onChange:g=>m("archiveDir",g),disabled:c})]})]})]})}function vc({children:n}){return r.jsx("div",{style:{fontSize:11,fontWeight:700,color:"var(--color-on-surface-secondary)",textTransform:"uppercase",letterSpacing:"0.08em",marginTop:4},children:n})}function hn({children:n}){return r.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2",style:{gap:"12px 16px"},children:n})}function di({label:n,value:s,onChange:c,disabled:o}){return r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:n}),r.jsx("input",{value:s,onChange:d=>c(d.target.value),disabled:o,style:{width:"100%"}})]})}function mi({label:n,value:s,onChange:c,disabled:o}){return r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:n}),r.jsx("input",{type:"number",value:s,onChange:d=>c(Number(d.target.value)||0),disabled:o,style:{width:"100%"}})]})}function ih({label:n,value:s,options:c,onChange:o,disabled:d}){return r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:n}),r.jsx("select",{value:s,onChange:m=>o(m.target.value),disabled:d,style:{width:"100%"},children:c.map(m=>r.jsx("option",{value:m,children:m},m))})]})}function uh({label:n,checked:s,onChange:c,disabled:o}){return r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:"var(--font-size-sm)",cursor:o?"default":"pointer"},children:[r.jsx("input",{type:"checkbox",checked:s,onChange:d=>c(d.target.checked),disabled:o}),n]})}function Cc({items:n,options:s,onAdd:c,onRemove:o,onItemClick:d,readonly:m=!1}){const[g,y]=h.useState(!1),[b,v]=h.useState(""),[T,x]=h.useState(0),A=h.useRef(null),D=h.useRef(null),_=s.filter(C=>!n.includes(C)&&C.toLowerCase().includes(b.toLowerCase()));h.useEffect(()=>{if(!g)return;const C=Y=>{D.current&&!D.current.contains(Y.target)&&y(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[g]);const H=C=>{C.key==="ArrowDown"?(C.preventDefault(),x(Y=>Math.min(Y+1,_.length-1))):C.key==="ArrowUp"?(C.preventDefault(),x(Y=>Math.max(Y-1,0))):C.key==="Enter"&&_[T]?(c(_[T]),v(""),x(0)):C.key==="Escape"&&(y(!1),v(""))},O=()=>{m||(y(!0),requestAnimationFrame(()=>{var C;return(C=A.current)==null?void 0:C.focus()}))};return r.jsxs("div",{ref:D,style:{position:"relative"},children:[r.jsxs("div",{onClick:()=>{g||O()},style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:6,minHeight:44,padding:"8px 12px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-base)",backgroundColor:"var(--color-surface-input)",cursor:m?"default":"text"},children:[n.map(C=>r.jsxs("span",{className:"badge badge-primary",onClick:Y=>{d&&(Y.stopPropagation(),d(C))},style:{display:"inline-flex",alignItems:"center",gap:4,cursor:d?"pointer":"default"},children:[C,!m&&r.jsx("button",{type:"button",onClick:Y=>{Y.stopPropagation(),o(C)},style:{background:"none",border:"none",cursor:"pointer",padding:0,lineHeight:1,color:"inherit",fontSize:14},children:"×"})]},C)),!m&&!g&&r.jsx("span",{style:{fontSize:13,color:"var(--color-on-surface-muted)"},children:n.length>0?"+ Add more...":"Select detect objects"}),!m&&g&&r.jsx("input",{ref:A,placeholder:"Search...",value:b,onChange:C=>{v(C.target.value),x(0)},onKeyDown:H,style:{flex:1,minWidth:120,height:"auto",border:"none",background:"transparent",padding:0,outline:"none",fontSize:13}})]}),g&&_.length>0&&r.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:50,maxHeight:200,overflowY:"auto",backgroundColor:"var(--color-dropdown)",border:"1px solid var(--color-dropdown-border)",borderRadius:"var(--radius-base)",boxShadow:"var(--shadow-dropdown)",marginTop:4},children:_.map((C,Y)=>r.jsx("div",{onClick:()=>{c(C),v(""),x(0)},style:{padding:"6px 12px",cursor:"pointer",fontSize:"var(--font-size-sm)",backgroundColor:Y===T?"var(--color-dropdown-option-hover)":"transparent"},onMouseEnter:()=>x(Y),children:C},C))})]})}const sh=200;function t0({isOpen:n,onClose:s,cameraId:c,config:o,editRule:d,ruleCount:m=0,onDetectObjectsChange:g}){const{notify:y}=il(),b=d!==null,[v,T]=h.useState(""),[x,A]=h.useState(""),[D,_]=h.useState(""),[H,O]=h.useState("EDGE_ONLY"),[C,Y]=h.useState(""),[X,$]=h.useState([]),[I,le]=h.useState([]),[P,Z]=h.useState(!1),[re,ge]=h.useState(""),_e=h.useRef(null),je=h.useRef(!1);h.useEffect(()=>{n&&(d?(T(d.rule_id),A(d.name),_(d.expression_text??""),O(d.record_mode??"EDGE_ONLY")):(T(`R_${Date.now()}`),A(`RULE_${m}`),_(""),O("EDGE_ONLY")),Y(""),ge(""))},[n,d,m]),h.useEffect(()=>{if(!n||!c){$([]),le([]);return}let V=!1;return Promise.all([tp(o.ip,o.port).catch(()=>[]),Xb(c,o.ip,o.port).catch(()=>[])]).then(([S,U])=>{V||(le(S),$(U))}),()=>{V=!0}},[n,c,o.ip,o.port]),h.useEffect(()=>{if(!n)return;const V=S=>{S.key==="Escape"&&s()};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[n,s]);const Oe=async V=>{try{await Ec(c,V,o.ip,o.port),$(V),g==null||g()}catch(S){y(`Failed to update detect objects: ${S instanceof Error?S.message:"unknown"}`,"error")}},Re=V=>{!V||X.includes(V)||Oe([...X,V])},be=V=>{Oe(X.filter(S=>S!==V))},w=h.useCallback(V=>{const S=_e.current,U=(S==null?void 0:S.selectionStart)??D.length,G=D.slice(0,U),K=D.slice(U),pe=`${G}${V}${K}`,ve=U+V.length;_(pe),requestAnimationFrame(()=>{S&&(S.focus(),S.selectionStart=ve,S.selectionEnd=ve)})},[D]),Q=V=>{_(V),V.length>sh?Y(`Expression must be ${sh} characters or less (current: ${V.length})`):Y("")},ne=!!v.trim()&&!!x.trim()&&!!D.trim()&&!C,F=async()=>{if(ge(""),!ne){if(!v.trim()){ge("Rule ID is required");return}if(!x.trim()){ge("Rule name is required");return}if(!D.trim()){ge("Expression is required");return}return}Z(!0);try{b?(await Jb(c,d.rule_id,{name:x.trim(),expression_text:D.trim(),record_mode:H,enabled:d.enabled??!0},o.ip,o.port),y(`Event rule '${x}' updated successfully.`,"success")):(await Kb({camera_id:c,rule:{rule_id:v.trim(),name:x.trim(),expression_text:D.trim(),record_mode:H,enabled:!0}},o.ip,o.port),y(`Event rule '${x}' created successfully.`,"success")),s(!0)}catch(V){ge(`Failed: ${V instanceof Error?V.message:"unknown"}`)}finally{Z(!1)}};return n?r.jsx("div",{className:"modal-overlay",onMouseDown:V=>{je.current=V.target===V.currentTarget},onClick:V=>{je.current&&V.target===V.currentTarget&&s(),je.current=!1},children:r.jsxs("div",{className:"modal modal-lg",onClick:V=>V.stopPropagation(),children:[r.jsx("div",{className:"modal-header",children:r.jsxs("div",{className:"modal-title",children:[r.jsx(ye,{name:"video_library",className:"icon-sm"}),b?"Edit Event Rule":"Create Event Rule"]})}),r.jsxs("div",{className:"modal-body",style:{display:"flex",flexDirection:"column",gap:20},children:[r.jsxs("section",{children:[r.jsx(bc,{icon:"settings",text:"Configuration Details"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:12,marginTop:8},children:[r.jsxs("div",{children:[r.jsx("div",{style:yc,children:"Rule ID"}),r.jsx("input",{value:v,onChange:V=>T(V.target.value),placeholder:"e.g. safety_check_01",disabled:b,style:{width:"100%"}})]}),r.jsxs("div",{children:[r.jsx("div",{style:yc,children:"Rule Name"}),r.jsx("input",{value:x,onChange:V=>A(V.target.value),placeholder:"e.g. PPE Safety Alert",style:{width:"100%"}})]}),r.jsxs("div",{children:[r.jsx("div",{style:yc,children:"Record Mode"}),r.jsxs("select",{value:H,onChange:V=>O(V.target.value),style:{width:"100%"},children:[r.jsx("option",{value:"EDGE_ONLY",children:"Trigger on change (EDGE)"}),r.jsx("option",{value:"ALL_MATCHES",children:"Record all matches (ALL)"})]})]})]})]}),r.jsxs("section",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[r.jsx(bc,{icon:"settings",text:"Idents"}),r.jsx("span",{style:{fontSize:12,color:"var(--color-primary)"},children:"Click a label to insert it, or 'x' to remove it."})]}),r.jsx("div",{style:{marginTop:8},children:r.jsx(Cc,{items:X,options:I,onAdd:Re,onRemove:be,onItemClick:w})})]}),r.jsxs("section",{children:[r.jsx(bc,{icon:"code",text:"Rule Logic"}),r.jsx("input",{ref:_e,value:D,onChange:V=>Q(V.target.value),spellCheck:!1,style:{width:"100%",marginTop:8,fontFamily:"var(--font-family-mono)"}}),C&&r.jsx("div",{style:{marginTop:6,padding:"6px 10px",borderRadius:"var(--radius-base)",backgroundColor:"var(--color-error-muted)",color:"var(--color-error)",fontSize:"var(--font-size-sm)"},children:C})]}),re&&r.jsx("div",{style:{padding:"8px 12px",borderRadius:"var(--radius-base)",backgroundColor:"var(--color-error-muted)",color:"var(--color-error)",fontSize:"var(--font-size-sm)"},children:re})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{className:"btn btn-primary",onClick:F,disabled:P||!ne,children:P?"Saving...":b?"Update Event Rule":"Register Event Rule"}),r.jsx("button",{className:"btn btn-ghost",onClick:()=>s(),children:"Cancel"})]})]})}):null}const yc={fontSize:"var(--font-size-sm)",color:"var(--color-on-surface-secondary)",marginBottom:4};function bc({icon:n,text:s}){return r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:11,fontWeight:700,color:"var(--color-on-surface-secondary)",textTransform:"uppercase",letterSpacing:"0.08em"},children:[r.jsx(ye,{name:n,className:"icon-sm"}),s]})}function a0({cameraId:n,config:s,readOnly:c=!1}){const{notify:o}=il(),d=Gh(),[m,g]=h.useState([]),[y,b]=h.useState(!0),[v,T]=h.useState(!1),[x,A]=h.useState(null),D=h.useCallback(async()=>{try{const C=await $b(n,s.ip,s.port);g(C)}catch{}finally{b(!1)}},[n,s.ip,s.port]);h.useEffect(()=>{D()},[D]);const _=async C=>{if(await d({title:"Delete Rule",message:`Delete rule "${C.name}"?`,confirmText:"Delete"}))try{await Fb(n,C.rule_id,s.ip,s.port),g(X=>X.filter($=>$.rule_id!==C.rule_id)),o(`Rule "${C.name}" deleted`,"success")}catch(X){o(`Failed to delete: ${X instanceof Error?X.message:"unknown"}`,"error")}},H=()=>{A(null),T(!0)},O=C=>{T(!1),A(null),C&&D()};return r.jsxs("article",{className:"card",children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[r.jsxs("h3",{className:"card-title",style:{marginBottom:0},children:[r.jsx(ye,{name:"rule",className:"icon-sm"})," Event Rules"]}),!c&&r.jsxs("button",{className:"btn btn-primary btn-sm",onClick:H,children:[r.jsx(ye,{name:"add",className:"icon-sm"})," Add Rule"]})]}),y?r.jsx("p",{style:{marginTop:12,color:"var(--color-on-surface-disabled)",fontSize:"var(--font-size-sm)"},children:"Loading rules..."}):m.length===0?r.jsx("p",{style:{marginTop:12,color:"var(--color-on-surface-disabled)",fontSize:"var(--font-size-sm)"},children:"No event rules configured."}):r.jsx("div",{style:{marginTop:12,display:"flex",flexDirection:"column",gap:8},children:m.map(C=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 12px",borderRadius:"var(--radius-base)",border:"1px solid var(--color-border)",backgroundColor:"var(--color-surface)"},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontWeight:600,fontSize:"var(--font-size-base)"},children:C.name}),r.jsx("div",{style:{fontSize:"var(--font-size-sm)",color:"var(--color-on-surface-tertiary)",fontFamily:"var(--font-family-mono)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C.expression_text||"-"}),r.jsx("div",{style:{fontSize:10,color:"var(--color-on-surface-disabled)",marginTop:2},children:C.record_mode})]}),!c&&r.jsx("div",{style:{display:"flex",gap:4,flexShrink:0},children:r.jsx("button",{className:"btn btn-ghost btn-sm",onClick:()=>_(C),style:{padding:"0 6px"},children:r.jsx(ye,{name:"delete",className:"icon-sm"})})})]},C.rule_id))}),r.jsx(t0,{isOpen:v,onClose:O,cameraId:n,config:s,editRule:x,ruleCount:m.length})]})}function l0({isOpen:n,onClose:s,onCreated:c,ip:o,port:d}){const{notify:m}=il(),[g,y]=h.useState(""),[b,v]=h.useState(!1),[T,x]=h.useState("");h.useEffect(()=>{n&&(y(""),x(""))},[n]),h.useEffect(()=>{if(!n)return;const D=_=>{_.key==="Escape"&&s()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[n,s]);const A=async()=>{if(x(""),!g.trim()){x("Table name is required");return}v(!0);try{await Vb(g.trim(),o,d),m(`Table "${g}" created`,"success"),c(g.trim()),s(!0)}catch(D){x(`Failed: ${D instanceof Error?D.message:"unknown"}`)}finally{v(!1)}};return n?r.jsx("div",{className:"modal-overlay",onClick:()=>s(),children:r.jsxs("div",{className:"modal",onClick:D=>D.stopPropagation(),style:{maxWidth:400},children:[r.jsx("div",{className:"modal-title",children:"Create Table"}),r.jsxs("div",{className:"modal-body",style:{display:"flex",flexDirection:"column",gap:16},children:[r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"Table Name"}),r.jsx("input",{value:g,onChange:D=>y(D.target.value),placeholder:"my_camera_table",style:{width:"100%"}})]}),T&&r.jsx("div",{style:{padding:"8px 12px",borderRadius:"var(--radius-base)",backgroundColor:"var(--color-error-muted)",color:"var(--color-error)",fontSize:"var(--font-size-sm)"},children:T})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{className:"btn btn-ghost",onClick:()=>s(),children:"Cancel"}),r.jsx("button",{className:"btn btn-primary",onClick:A,disabled:b,children:b?"Creating...":"Create"})]})]})}):null}function n0({webrtcUrl:n}){const s=h.useRef(null),c=h.useRef(null),[o,d]=h.useState("idle");h.useEffect(()=>{let g=!1;const y=()=>{c.current&&(c.current.close(),c.current=null),s.current&&(s.current.srcObject=null)};return!n||!s.current?(y(),g||d("idle"),y):(y(),(async()=>{var v;g||d("connecting");try{const T=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]});c.current=T,T.addTransceiver("video",{direction:"recvonly"}),T.addTransceiver("audio",{direction:"recvonly"}),T.ontrack=_=>{if(_.track.kind==="video"&&s.current){const H=s.current;H.srcObject=_.streams[0];const O=()=>{H.play().then(()=>{g||d("live")}).catch(()=>{g||d("error")})};H.readyState>=3?O():H.addEventListener("canplay",O,{once:!0})}},T.oniceconnectionstatechange=()=>{(T.iceConnectionState==="failed"||T.iceConnectionState==="disconnected")&&(g||d("error"))};const x=await T.createOffer();if(g||(await T.setLocalDescription(x),await new Promise(_=>{if(T.iceGatheringState==="complete"){_();return}const H=()=>{T.iceGatheringState==="complete"&&(T.removeEventListener("icegatheringstatechange",H),_())};T.addEventListener("icegatheringstatechange",H)}),g))return;const A=await fetch(n,{method:"POST",headers:{"Content-Type":"application/sdp"},body:(v=T.localDescription)==null?void 0:v.sdp});if(!A.ok)throw new Error(`WHEP failed: ${A.status}`);const D=await A.text();if(g)return;await T.setRemoteDescription({type:"answer",sdp:D})}catch{g||d("error")}})(),()=>{g=!0,y()})},[n]);const m={position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.7)",fontSize:"var(--font-size-sm)",color:"var(--color-on-surface-disabled)"};return r.jsxs("div",{style:{position:"relative",width:"100%",aspectRatio:"16/9",backgroundColor:"#000",borderRadius:"var(--radius-base)",overflow:"hidden"},children:[r.jsx("video",{ref:s,autoPlay:!0,muted:!0,playsInline:!0,style:{width:"100%",height:"100%",objectFit:"contain"}}),!n&&r.jsx("div",{style:m,children:"No stream available"}),n&&o==="connecting"&&r.jsx("div",{style:m,children:"Connecting..."}),n&&o==="error"&&r.jsx("div",{style:m,children:"Connection failed"})]})}function i0({webrtcUrl:n}){const[s,c]=h.useState(!1);return h.useEffect(()=>{if(!s)return;const o=d=>{d.key==="Escape"&&c(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[s]),r.jsxs(r.Fragment,{children:[r.jsxs("button",{className:"btn btn-ghost",onClick:()=>c(!0),disabled:!n,children:[r.jsx(ye,{name:"play_circle",className:"icon-sm"})," Preview"]}),s&&r.jsx("div",{className:"modal-overlay",onClick:()=>c(!1),children:r.jsxs("div",{className:"modal",onClick:o=>o.stopPropagation(),style:{maxWidth:720,width:"100%"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[r.jsxs("div",{className:"modal-title",style:{margin:0,display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:"var(--radius-base)",backgroundColor:"var(--color-error)",color:"#fff",fontSize:10,fontWeight:700},children:"LIVE"}),"Preview"]}),r.jsx("button",{className:"btn btn-ghost btn-sm",onClick:()=>c(!1),style:{padding:"0 4px"},children:r.jsx(ye,{name:"close",className:"icon-sm"})})]}),r.jsx(n0,{webrtcUrl:n})]})})]})}const u0=["r","R","s","e","E","f","a","q","Q","t","T","d","w","W","c","z","x","v","g"],s0=["k","o","i","O","j","p","u","P","h","hk","ho","hl","y","n","nj","np","nl","b","m","ml","l"],r0=["","r","R","rt","s","sw","sg","e","f","fr","fa","fq","ft","fx","fv","fg","a","q","qt","t","T","d","w","c","z","x","v","g"],rh={ㄱ:"r",ㄲ:"R",ㄴ:"s",ㄷ:"e",ㄸ:"E",ㄹ:"f",ㅁ:"a",ㅂ:"q",ㅃ:"Q",ㅅ:"t",ㅆ:"T",ㅇ:"d",ㅈ:"w",ㅉ:"W",ㅊ:"c",ㅋ:"z",ㅌ:"x",ㅍ:"v",ㅎ:"g",ㅏ:"k",ㅐ:"o",ㅑ:"i",ㅒ:"O",ㅓ:"j",ㅔ:"p",ㅕ:"u",ㅖ:"P",ㅗ:"h",ㅘ:"hk",ㅙ:"ho",ㅚ:"hl",ㅛ:"y",ㅜ:"n",ㅝ:"nj",ㅞ:"np",ㅟ:"nl",ㅠ:"b",ㅡ:"m",ㅢ:"ml",ㅣ:"l",ㄳ:"rt",ㄵ:"sw",ㄶ:"sg",ㄺ:"fr",ㄻ:"fa",ㄼ:"fq",ㄽ:"ft",ㄾ:"fx",ㄿ:"fv",ㅀ:"fg",ㅄ:"qt"};function ap(n){let s="";for(const c of n){const o=c.charCodeAt(0);if(o>=44032&&o<=55203){const d=o-44032;s+=u0[Math.floor(d/588)]+s0[Math.floor(d%588/28)]+r0[d%28]}else rh[c]?s+=rh[c]:s+=c}return s}const c0="app:neo-blackbox";function xc(){try{const n=new BroadcastChannel(c0);n.postMessage({type:"cameraChanged"}),n.close()}catch{}}function o0(){const{alias:n,id:s}=Rh(),c=Gu(),{notify:o,setActiveItem:d}=il(),m=Gh(),g=s==="new",[y,b]=h.useState(null),[v,T]=h.useState(null),[x,A]=h.useState(!g),[D,_]=h.useState(!1),[H,O]=h.useState(!1),[C,Y]=h.useState("stopped"),[X,$]=h.useState(""),[I,le]=h.useState(""),[P,Z]=h.useState(""),[re,ge]=h.useState(""),[_e,je]=h.useState([]),[Oe,Re]=h.useState(!1),[be,w]=h.useState("1"),[Q,ne]=h.useState("s"),[F,V]=h.useState(""),[S,U]=h.useState(""),[G,K]=h.useState(Nc),[pe,ve]=h.useState([]),[Ee,Ie]=h.useState([]),[Qe,wt]=h.useState(!1),[ee,Tt]=h.useState(null),[W,te]=h.useState(!1),ie=h.useRef(null),ce=h.useRef(null);h.useLayoutEffect(()=>{const ae=ce.current,se=ie.current;if(!ae||!se)return;const Je=se.value.length-ae.rawLen,Gt=Math.max(0,Math.min(ae.pos+Je,se.value.length));se.setSelectionRange(Gt,Gt),ce.current=null},[X]);const de=async(ae=y)=>{if(!(!ae||!s||g))try{const se=await ep(s,ae.ip,ae.port);T(se),$(se.name??""),le(se.desc??""),Z(se.rtsp_url??""),ge(se.table??""),je(se.detect_objects??[]),Re(se.save_objects??!1);const{value:Je,unit:Gt}=Jh(se.interval??1);w(String(Je)),ne(Gt),V(se.output_dir??""),U(se.archive_dir??""),Y(se.enabled?"running":"stopped"),se.ffmpeg_options&&K(e0(se.ffmpeg_options,{ffmpeg_command:se.ffmpeg_command,output_dir:se.output_dir,archive_dir:se.archive_dir}))}catch(se){o(`Failed to load camera: ${se instanceof Error?se.message:"unknown"}`,"error")}finally{A(!1)}};h.useEffect(()=>{if(!n){b(null),A(!1);return}let ae=!1;return Lc(n).then(se=>{ae||b(se)}).catch(()=>{ae||(b(null),A(!1))}),()=>{ae=!0}},[n]),h.useEffect(()=>{g&&(T(null),O(!1),A(!1),_(!1),Y("stopped"),$(""),le(""),Z(""),ge(""),je([]),Re(!1),w("1"),ne("s"),V(""),U(""),K(Nc),Tt(null))},[g,n]),h.useEffect(()=>{y&&(g||de(y),Promise.all([Qb(y.ip,y.port),tp(y.ip,y.port)]).then(([ae,se])=>{ve(ae),Ie(se),g&&ae.length===0&&wt(!0),g&&ae.length>0&&ge(Je=>Je||ae[0])}).catch(()=>{}))},[y,s]);const Te=async()=>{if(!y||!P)return;const ae=P.match(/rtsp:\/\/(?:[^@]+@)?([^:/]+)/i);if(!ae){Tt({variant:"error",message:"Cannot extract IP from RTSP URL"});return}te(!0),Tt(null);try{const se=await Wb(ae[1],y.ip,y.port);Tt(se.alive?{variant:"success",message:`${ae[1]} reachable${se.latency?` (${se.latency})`:""}`}:{variant:"error",message:`${ae[1]} unreachable`})}catch{Tt({variant:"error",message:"Ping failed"})}finally{te(!1)}},Ue=async()=>{if(!y)return;if(!X.trim()){o("Camera name is required","error");return}if(!/^[A-Za-z0-9_-]+$/.test(X.trim())){o("Camera name may only contain letters, numbers, underscores, and hyphens","error");return}if(!re){o("Please select a table","error");return}const ae=Number(be);if(!hc(ae)){o("Inference interval must be a positive integer","error");return}const se=eh(ae,Q);_(!0);try{const Je={table:re,name:X.trim(),desc:I||void 0,rtsp_url:P||void 0,interval:se,detect_objects:_e.length>0?_e:void 0,save_objects:Oe,ffmpeg_options:lh(G),ffmpeg_command:G.ffmpegCommand||void 0,output_dir:F||void 0,archive_dir:S||void 0,server_url:y.ip},Gt=await Bb(Je,y.ip,y.port);o(`Camera "${X}" created`,"success"),xc(),d(`${n}::${Gt.camera_id||X}`),c(`/camera/${encodeURIComponent(n)}/${encodeURIComponent(Gt.camera_id||X)}`)}catch(Je){o(`Failed: ${Je instanceof Error?Je.message:"unknown"}`,"error")}finally{_(!1)}},Pe=async()=>{if(!y||!s)return;const ae=Number(be);if(!hc(ae)){o("Inference interval must be a positive integer","error");return}const se=eh(ae,Q);_(!0);try{const Je={desc:I||void 0,rtsp_url:P||void 0,interval:se,detect_objects:_e.length>0?_e:void 0,save_objects:Oe,ffmpeg_options:lh(G),ffmpeg_command:G.ffmpegCommand||void 0,output_dir:F||void 0,archive_dir:S||void 0};await kb(s,Je,y.ip,y.port),o("Camera saved","success"),xc(),O(!1),await de()}catch(Je){o(`Failed: ${Je instanceof Error?Je.message:"unknown"}`,"error")}finally{_(!1)}},Ke=async()=>{if(!(!y||!s||!await m({title:"Delete Camera",message:`Delete camera "${s}"?`,confirmText:"Delete"})))try{await qb(s,y.ip,y.port),o(`Camera "${s}" deleted`,"success"),xc(),d(null),c("/")}catch(se){o(`Failed: ${se instanceof Error?se.message:"unknown"}`,"error")}},it=async()=>{if(!(!y||!s))try{C==="running"?await Gb(s,y.ip,y.port):await Yb(s,y.ip,y.port),Y(ae=>ae==="running"?"stopped":"running"),o(`Camera ${C==="running"?"disabled":"enabled"}`,"success")}catch(ae){o(`Failed: ${ae instanceof Error?ae.message:"unknown"}`,"error")}};if(x)return r.jsx(Sc,{children:r.jsx("p",{style:{color:"var(--color-on-surface-disabled)"},children:"Loading..."})});const ua=Number(be),vt=be.trim()===""||!hc(ua)?{text:"Must be a positive integer (≥ 1)",color:"var(--color-error)"}:{text:"Positive integer only (default 1 second)",color:"var(--color-on-surface-disabled)"};if(g)return r.jsxs(Sc,{children:[r.jsxs("div",{className:"page-title-group",children:[r.jsx("h1",{className:"page-title",children:"New Camera"}),r.jsxs("p",{className:"page-desc",children:["Add a new camera to ",n]})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[r.jsxs("article",{className:"card",style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"info",className:"icon-sm"})," Basic Information"]}),r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"Table *"}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("select",{value:re,onChange:ae=>ge(ae.target.value),style:{flex:1},children:pe.map(ae=>r.jsx("option",{value:ae,children:ae},ae))}),r.jsx("button",{className:"btn btn-ghost",onClick:()=>wt(!0),children:"New Table"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"Camera Name *"}),r.jsx("input",{ref:ie,value:X,onChange:ae=>{const se=ae.target.value;ce.current={pos:ae.target.selectionStart??se.length,rawLen:se.length},$(ap(se).replace(/[^A-Za-z0-9_-]/g,""))},placeholder:"CAM-01",style:{width:"100%"}}),r.jsx("div",{style:{marginTop:4,fontSize:"var(--font-size-sm)",color:"var(--color-on-surface-disabled)"},children:"Letters, numbers, underscore (_), and hyphen (-) only"})]}),r.jsx(ch,{label:"Description",value:I,onChange:le,placeholder:"Enter description"})]}),r.jsxs("article",{className:"card",style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"link",className:"icon-sm"})," Connection"]}),r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"RTSP URL"}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{value:P,onChange:ae=>{Z(ae.target.value),Tt(null)},placeholder:"rtsp://user:pass@ip:port/live",style:{flex:1}}),r.jsx("button",{className:"btn btn-ghost",onClick:Te,disabled:W,children:W?"Pinging...":"Ping"})]}),ee&&r.jsx("div",{style:{marginTop:4,fontSize:"var(--font-size-sm)",color:ee.variant==="success"?"var(--color-success)":"var(--color-error)"},children:ee.message})]})]}),r.jsxs("article",{className:"card",style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"visibility",className:"icon-sm"})," Detection"]}),r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"Detect Objects"}),r.jsx(Cc,{items:_e,options:Ee,onAdd:ae=>je(se=>[...se,ae]),onRemove:ae=>je(se=>se.filter(Je=>Je!==ae))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"AI Inference Interval"}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{type:"number",min:1,step:1,value:be,onChange:ae=>w(ae.target.value),onBlur:()=>{be===""&&w("1")},style:{flex:1}}),r.jsxs("select",{value:Q,onChange:ae=>ne(ae.target.value),children:[r.jsx("option",{value:"s",children:"Seconds"}),r.jsx("option",{value:"m",children:"Minutes"}),r.jsx("option",{value:"h",children:"Hours"})]})]}),r.jsx("div",{style:{marginTop:4,fontSize:"var(--font-size-sm)",color:vt.color},children:vt.text})]}),r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,fontSize:"var(--font-size-sm)",cursor:"pointer"},children:[r.jsx("input",{type:"checkbox",checked:Oe,onChange:ae=>Re(ae.target.checked)})," Save detection results"]})]}),r.jsx(nh,{value:G,onChange:K}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{className:"btn btn-ghost",onClick:()=>c(-1),children:"Cancel"}),r.jsx("button",{className:"btn btn-primary",onClick:Ue,disabled:D,children:D?"Creating...":"Create"})]})]}),y&&r.jsx(l0,{isOpen:Qe,onClose:()=>wt(!1),onCreated:ae=>{ve(se=>[...se,ae]),ge(ae)},ip:y.ip,port:y.port})]});const ft=H;return r.jsxs(Sc,{children:[r.jsxs("div",{className:"page-title-group",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("h1",{className:"page-title",children:(v==null?void 0:v.name)||s}),r.jsx("div",{className:`switch ${C==="running"?"active":""}`,onClick:it,children:r.jsx("div",{className:"switch-thumb"})}),r.jsx("span",{className:`text-sm ${C==="running"?"text-success":"text-on-surface-disabled"}`,children:C==="running"?"Enabled":"Disabled"})]}),r.jsx("div",{className:"flex gap-2",children:ft?r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"btn btn-ghost",onClick:()=>{O(!1),de()},children:"Cancel"}),r.jsx("button",{className:"btn btn-primary",onClick:Pe,disabled:D,children:D?"Saving...":"Save"})]}):r.jsxs(r.Fragment,{children:[r.jsx(i0,{webrtcUrl:C==="running"?v==null?void 0:v.webrtc_url:void 0}),r.jsxs("button",{className:"btn btn-ghost",onClick:()=>O(!0),children:[r.jsx(ye,{name:"edit",className:"icon-sm"})," Edit"]}),r.jsxs("button",{className:"btn btn-danger",onClick:Ke,children:[r.jsx(ye,{name:"delete",className:"icon-sm"})," Delete"]})]})})]}),r.jsxs("p",{className:"page-desc",children:[n," — ",y?`${y.ip}:${y.port}`:""]})]}),v?r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"info",className:"icon-sm"})," Basic Info"]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2",style:{gap:"12px 16px"},children:[r.jsx(Nl,{label:"Camera ID",value:v.camera_id||s||""}),r.jsx(Nl,{label:"Table",value:v.table||""}),ft?r.jsx(ch,{label:"Description",value:I,onChange:le}):r.jsx(Nl,{label:"Description",value:v.desc||""}),r.jsx(Nl,{label:"Label",value:v.label||""})]})]}),r.jsxs("article",{className:"card",children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"link",className:"icon-sm"})," Connection"]}),ft?r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"RTSP URL"}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{value:P,onChange:ae=>{Z(ae.target.value),Tt(null)},style:{flex:1}}),r.jsx("button",{className:"btn btn-ghost",onClick:Te,disabled:W,children:W?"...":"Ping"})]}),ee&&r.jsx("div",{style:{marginTop:4,fontSize:"var(--font-size-sm)",color:ee.variant==="success"?"var(--color-success)":"var(--color-error)"},children:ee.message})]}):r.jsxs("div",{className:"grid grid-cols-1",style:{gap:12},children:[r.jsx(Nl,{label:"RTSP URL",value:v.rtsp_url||""}),v.webrtc_url&&r.jsx(Nl,{label:"WebRTC URL",value:v.webrtc_url})]})]}),r.jsxs("article",{className:"card",style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("h3",{className:"card-title",children:[r.jsx(ye,{name:"visibility",className:"icon-sm"})," Detection"]}),r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"Detect Objects"}),r.jsx(Cc,{items:ft?_e:v.detect_objects??[],options:Ee,onAdd:ae=>{const se=[..._e,ae];je(se),H&&y&&s&&Ec(s,se,y.ip,y.port).catch(()=>{})},onRemove:ae=>{const se=_e.filter(Je=>Je!==ae);je(se),H&&y&&s&&Ec(s,se,y.ip,y.port).catch(()=>{})},readonly:!ft})]}),ft?r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"AI Inference Interval"}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{type:"number",min:1,step:1,value:be,onChange:ae=>w(ae.target.value),onBlur:()=>{be===""&&w("1")},style:{flex:1}}),r.jsxs("select",{value:Q,onChange:ae=>ne(ae.target.value),children:[r.jsx("option",{value:"s",children:"Seconds"}),r.jsx("option",{value:"m",children:"Minutes"}),r.jsx("option",{value:"h",children:"Hours"})]})]}),r.jsx("div",{style:{marginTop:4,fontSize:"var(--font-size-sm)",color:"var(--color-on-surface-disabled)"},children:"Positive integer only (default 1 second)"})]}):r.jsx(Nl,{label:"AI Inference Interval",value:f0(v.interval)}),r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,fontSize:"var(--font-size-sm)",cursor:ft?"pointer":"default"},children:[r.jsx("input",{type:"checkbox",checked:ft?Oe:!!v.save_objects,onChange:ae=>Re(ae.target.checked),disabled:!ft}),"Save detection results"]})]}),y&&!g&&r.jsx(a0,{cameraId:s,config:y,readOnly:!ft}),r.jsx(nh,{value:G,onChange:K,readOnly:!ft})]}):r.jsx("p",{style:{color:"var(--color-on-surface-disabled)"},children:"Camera not found."})]})}function Sc({children:n}){return r.jsx("div",{className:"page",children:r.jsx("div",{className:"page-body",children:r.jsx("div",{className:"page-body-inner",children:n})})})}function Nl({label:n,value:s}){return r.jsxs("div",{children:[r.jsx("div",{className:"form-label",children:n}),r.jsx("div",{className:"dash-field-box",children:s||"-"})]})}function f0(n){const{value:s,unit:c}=Jh(n??1);return`${s} ${c==="h"?s===1?"hour":"hours":c==="m"?s===1?"minute":"minutes":s===1?"second":"seconds"}`}function ch({label:n,value:s,onChange:c,placeholder:o}){return r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:n}),r.jsx("input",{value:s,onChange:d=>c(d.target.value),placeholder:o,style:{width:"100%"}})]})}function bi(n,s){return`${window.location.protocol}//${n}:${s}`}async function d0(n,s,c,o){const d=bi(c,o),m=new URLSearchParams({tagname:n,time:s}),g=await fetch(`${d}/api/get_chunk_info?${m}`);if(!g.ok){if(g.status===404)return null;throw new Error(`HTTP ${g.status}`)}const b=(await g.json()).data;return b&&typeof b.time=="string"?b:null}async function m0(n,s,c,o){const d=bi(c,o),m=new URLSearchParams({tagname:n,time:s}),g=await fetch(`${d}/api/v_get_chunk?${m}`);if(!g.ok){if(g.status===404)return null;throw new Error(`HTTP ${g.status}`)}return g.arrayBuffer()}async function h0(n,s,c){const o=bi(s,c),d=new URLSearchParams({tagname:n,time:"0"}),m=await fetch(`${o}/api/v_get_chunk?${d}`);return m.ok?m.arrayBuffer():null}async function p0(n,s,c){const o=bi(s,c),d=new URLSearchParams({tagname:n}),m=await fetch(`${o}/api/get_time_range?${d}`);if(!m.ok)return null;const y=(await m.json()).data;return y&&typeof y.start=="string"&&typeof y.end=="string"?y:null}async function g0(n,s,c,o,d,m){const g=bi(d,m),y=new URLSearchParams({camera_id:n,start_time:s,end_time:c,interval:String(o)});try{const b=await fetch(`${g}/api/data_gaps?${y}`);if(!b.ok)throw new Error(`HTTP ${b.status}`);const v=await b.json(),T=v.data??v;if(T&&Array.isArray(T.missing_times))return T}catch{}return{camera_id:n,start_time:s,end_time:c,interval:o,total_gaps:0,missing_times:[]}}function v0(n,s,c,o,d,m={}){const{onPlaybackTick:v,onTimeUpdate:T,onProbeProgress:x,onProbeStateChange:A}=m,[D,_]=h.useState({isPlaying:!1,isLoading:!1,isProbing:!1,currentTime:null,currentChunkInfo:null,fps:null}),H=h.useRef(null),O=h.useRef(null),C=h.useRef(new Map),Y=h.useRef(new Map),X=h.useRef(new Map),$=h.useRef(null),I=h.useRef([]),le=h.useRef(0),P=h.useRef(null),Z=h.useRef(0),re=h.useRef(null),ge=h.useRef(null),_e=h.useRef(!1),je=h.useRef(!1),Oe=h.useRef(!1),Re=h.useRef(!1),be=h.useRef(0),w=h.useRef(0),Q=h.useRef(0),ne=h.useCallback((W,te)=>{if(!(te!=null&&te.time))return null;const ie=Vh(te.time);if(!ie)return null;let ce=Number(te.duration)||0,de=Number(te.length)||0;de>1e3?ce=de/1e6:ce<=0&&de>0&&(ce=de,de=Math.round(de*1e6));const Te=Im(ie);return{camera:W,start:ie,startIso:Te,duration:ce,end:new Date(ie.getTime()+Math.max(ce,0)*1e3),lengthMicroseconds:de,sign:te.sign??null,cacheToken:Te}},[]),F=h.useCallback(async(W,te)=>{var Te;const ie=Im(te),ce=`${W}::${ie}`,de=X.current.get(ce);if(de)return de;try{const Ue=await d0(W,ie,o,d),Pe=ne(W,Ue);return Pe&&(X.current.set(ce,Pe),X.current.set(`${W}::${Pe.startIso}`,Pe)),Pe}catch(Ue){if((Te=Ue.message)!=null&&Te.includes("404"))return null;throw Ue}},[o,d,ne]),V=h.useCallback(async(W,te)=>{const ie=`${W}::${te}`,ce=C.current.get(ie);if(ce)return ce;const de=Y.current.get(ie);if(de&&de>Date.now())return null;const Te=await m0(W,te,o,d);return Te?(C.current.set(ie,Te),Y.current.delete(ie)):Y.current.set(ie,Date.now()+5e3),Te},[o,d]),S=h.useCallback(async W=>{if($.current)return $.current;const te=await h0(W,o,d);return te&&($.current=te),te},[o,d]),U=h.useCallback((W,te)=>new Promise((ie,ce)=>{const de=()=>{W.removeEventListener("updateend",de),W.removeEventListener("error",Te),ie()},Te=()=>{W.removeEventListener("updateend",de),W.removeEventListener("error",Te),ce(new Error("SourceBuffer error"))};W.addEventListener("updateend",de),W.addEventListener("error",Te);try{W.appendBuffer(te)}catch(Ue){W.removeEventListener("updateend",de),W.removeEventListener("error",Te),ce(Ue)}}),[]),G=h.useCallback(()=>{const W=n.current;if(W){if(P.current){try{URL.revokeObjectURL(P.current)}catch{}P.current=null}W.pause(),W.removeAttribute("src"),W.src="",W.load(),H.current=null,O.current=null,I.current=[]}},[n]),K=h.useCallback(async W=>{if(!s||!n.current)return!1;const te=++Z.current;_(ie=>({...ie,isLoading:!0}));try{if(G(),await new Promise(vt=>setTimeout(vt,10)),te!==Z.current)return!1;const ie=await F(s,W);if(!ie)return te===Z.current&&_(vt=>({...vt,isLoading:!1,currentChunkInfo:null})),!1;if(te!==Z.current)return!1;const[ce,de]=await Promise.all([S(s),V(s,ie.startIso)]);if(!ce||!de||te!==Z.current)return te===Z.current&&_(vt=>({...vt,isLoading:!1})),!1;const Te=new MediaSource,Ue=URL.createObjectURL(Te);if(P.current=Ue,H.current=Te,n.current.src=Ue,await new Promise((vt,ft)=>{const ae=setTimeout(()=>ft(new Error("MediaSource timeout")),5e3);Te.addEventListener("sourceopen",()=>{clearTimeout(ae),vt()},{once:!0})}),te!==Z.current)return!1;const Pe='video/mp4; codecs="avc1.4d401f"';if(!MediaSource.isTypeSupported(Pe))throw new Error("Unsupported codec");const Ke=Te.addSourceBuffer(Pe);O.current=Ke;try{Ke.mode="sequence"}catch{Ke.timestampOffset=0}await U(Ke,ce.slice(0)),await U(Ke,de.slice(0));const it=Ke.buffered.length>0?Ke.buffered.start(0):0,ua=Ke.buffered.length>0?Ke.buffered.end(0):0;le.current=it;let at=it+Math.max(0,(W.getTime()-ie.start.getTime())/1e3);at=Math.min(Math.max(it,ua-.05),Math.max(it,at)),Number.isFinite(at)&&n.current&&(n.current.currentTime=at);try{Te.endOfStream()}catch{}return I.current=[{startIso:ie.startIso,chunkInfo:ie,bufferStart:it,bufferEnd:ua}],je.current=!1,te===Z.current&&_(vt=>({...vt,currentChunkInfo:ie,currentTime:W,isLoading:!1})),T==null||T(W),!0}catch{return te===Z.current&&_(ie=>({...ie,isLoading:!1})),!1}},[s,n,F,S,V,U,G,T]),pe=h.useRef(D.currentChunkInfo);h.useEffect(()=>{pe.current=D.currentChunkInfo},[D.currentChunkInfo]);const ve=h.useCallback(async W=>{var ie;if(_(ce=>({...ce,currentTime:W})),T==null||T(W),!s||!n.current)return;const te=pe.current;if(te&&((ie=O.current)!=null&&ie.buffered.length)&&n.current.readyState>=2){const ce=W.getTime();if(ce>=te.start.getTime()&&ce<te.end.getTime()){const de=(ce-te.start.getTime())/1e3,Te=O.current.buffered.end(0),Ue=Math.min(Math.max(le.current,Te-.05),le.current+de);Number.isFinite(Ue)&&(n.current.currentTime=Ue);return}}ge.current=W,re.current||(ge.current=null,K(W),re.current=setTimeout(()=>{const ce=ge.current;re.current=null,ge.current=null,ce&&K(ce)},300))},[s,n,K,T]),Ee=h.useCallback(async W=>{if(!s)return null;const te=w.current;Q.current+=1,_(de=>({...de,isProbing:!0})),A==null||A(!0);let ie=W.getTime()+1e3;const ce=c?c.getTime():ie+36e5;try{for(;ie<=ce;){if(te!==w.current)return null;x==null||x(new Date(ie));const de=await F(s,new Date(ie));if(te!==w.current)return null;if(!de){ie+=1e3;continue}const Te=await V(s,de.startIso);if(te!==w.current)return null;if(Te)return de;ie=Math.max(ie+1e3,de.end.getTime()+1e3)}return null}finally{Q.current=Math.max(0,Q.current-1),Q.current===0&&(_(de=>({...de,isProbing:!1})),A==null||A(!1))}},[s,c,F,V,x,A]),Ie=h.useCallback(async W=>{if(!s||!n.current||!O.current||!H.current)return!1;try{const te=await V(s,W.startIso);if(!te)return!1;const ie=O.current.buffered.length>0?O.current.buffered.end(O.current.buffered.length-1):0;await U(O.current,te);const ce=O.current.buffered.length>0?O.current.buffered.end(O.current.buffered.length-1):ie;return I.current.push({startIso:W.startIso,chunkInfo:W,bufferStart:ie,bufferEnd:ce}),je.current=!1,!0}catch{return!1}},[s,n,V,U]),Qe=h.useCallback(async()=>{if(!(!n.current||!s||Re.current)){Re.current=!0;try{const W=D.currentTime??c;if(!W)return;const te=D.currentChunkInfo;if(!(!!te&&W.getTime()>=te.start.getTime()&&W.getTime()<te.end.getTime())&&!await K(W)){const de=await Ee(W);if(!de){_(Ue=>({...Ue,isPlaying:!1}));return}if(!await K(de.start))return}await n.current.play(),_(ce=>({...ce,isPlaying:!0}))}catch{}finally{Re.current=!1}}},[n,s,D.currentTime,D.currentChunkInfo,c,K,Ee]),wt=h.useCallback(()=>{var W;(W=n.current)==null||W.pause(),_(te=>te.isPlaying?{...te,isPlaying:!1}:te)},[n]),ee=h.useCallback(()=>{const W=n.current;if(!W)return null;const te=W.currentTime,ie=I.current;let ce=ie.find(Te=>te>=Te.bufferStart&&te<Te.bufferEnd);if(ce||(ce=ie.find(Te=>te>=Te.bufferStart-.1&&te<Te.bufferEnd+.1)),!ce)return null;const de=Math.max(0,te-ce.bufferStart);return{timeMs:ce.chunkInfo.start.getTime()+de*1e3,chunk:ce}},[n]);h.useEffect(()=>{const W=n.current;if(!W)return;const te=()=>{if(D.isLoading)return;const ie=ee();if(!ie)return;const{timeMs:ce,chunk:de}=ie;v==null||v(ce,0,0);const Te=Date.now();if(Te-be.current>=200){be.current=Te;const Ue=new Date(ce);_(Pe=>({...Pe,currentTime:Ue,currentChunkInfo:de.chunkInfo})),T==null||T(Ue)}if(c&&ce>=c.getTime()){W.pause(),_(Ue=>({...Ue,isPlaying:!1,currentTime:c}));return}if(Oe.current){const Ue=W.currentTime,Pe=de.bufferEnd-Ue,Ke=I.current[I.current.length-1],it=de.startIso===Ke.startIso;if(it&&je.current&&Pe<=.05){W.pause(),_(ua=>({...ua,isPlaying:!1}));return}it&&Pe<=3&&!_e.current&&Tt()}};return W.addEventListener("timeupdate",te),()=>W.removeEventListener("timeupdate",te)},[n,D.isLoading,c,ee,v,T]);const Tt=h.useCallback(async()=>{var te;if(!s||_e.current||I.current.length===0)return;const W=I.current[I.current.length-1];_e.current=!0;try{const ie=await Ee(W.chunkInfo.end);if(ie&&!I.current.some(ce=>ce.startIso===ie.startIso))await Ie(ie);else{je.current=!0;try{((te=H.current)==null?void 0:te.readyState)==="open"&&H.current.endOfStream()}catch{}}}catch{}finally{_e.current=!1}},[s,Ee,Ie]);return h.useEffect(()=>{const W=n.current;if(!W)return;const te=async()=>{const ie=Oe.current,ce=I.current[I.current.length-1];if(ce&&c&&ce.chunkInfo.end.getTime()>=c.getTime()){_(de=>({...de,isPlaying:!1}));return}if(ie&&ce){const de=await Ee(ce.chunkInfo.end);if(de){if(await K(de.start)&&n.current)try{await n.current.play(),_(Ue=>({...Ue,isPlaying:!0}))}catch{}return}}_(de=>({...de,isPlaying:!1}))};return W.addEventListener("ended",te),()=>W.removeEventListener("ended",te)},[n,c,Ee,K]),h.useEffect(()=>{Oe.current=D.isPlaying},[D.isPlaying]),h.useEffect(()=>()=>{re.current&&clearTimeout(re.current),w.current+=1,Q.current=0,G()},[G]),h.useEffect(()=>{C.current.clear(),Y.current.clear(),X.current.clear(),$.current=null,je.current=!1,w.current+=1,Q.current=0,G(),_({isPlaying:!1,isLoading:!1,isProbing:!1,currentTime:null,currentChunkInfo:null,fps:null})},[s,G]),{...D,play:Qe,pause:wt,loadChunk:K,seekToTime:ve}}function y0(n,s){const c=s.getTime()-n.getTime();return c<=36e5?8:c<=3*36e5?15:c<=12*36e5?60:c<=24*36e5?120:c<=72*36e5?300:900}function b0(n,s,c,o){const d=c.getTime()-s.getTime(),m=Math.max(1,o)*1e3;if(d<=0||!n.length)return[];const g=n.map(Vh).filter(x=>!!x).sort((x,A)=>x.getTime()-A.getTime());if(!g.length)return[];const y=[];let b=g[0].getTime(),v=g[0].getTime();const T=(x,A)=>{const D=Math.max(x,s.getTime()),_=Math.min(A,c.getTime());if(_>D){const H=(D-s.getTime())/d*100,O=(_-D)/d*100;y.push({left:Math.max(0,Math.min(100,H)),width:Math.max(.2,Math.min(100,O))})}};for(let x=1;x<g.length;x++){const A=g[x].getTime();A-v>m&&(T(b,v+m),b=A),v=A}return T(b,v+m),y}function x0(n,s,c,o,d,m=!0){const[g,y]=h.useState([]),[b,v]=h.useState(8);return h.useEffect(()=>{let T=!1;if(!m||!n||!s||!c||c.getTime()<=s.getTime()){y([]);return}const x=y0(s,c);return g0(n,s.toISOString(),c.toISOString(),x,o,d).then(A=>{if(T)return;const D=Number.isFinite(A.interval)&&A.interval>0?A.interval:x;y(Array.isArray(A.missing_times)?A.missing_times:[]),v(D)}),()=>{T=!0}},[n,s==null?void 0:s.getTime(),c==null?void 0:c.getTime(),m,o,d]),h.useMemo(()=>!m||!s||!c||c.getTime()<=s.getTime()?[]:b0(g,s,c,b),[g,b,s==null?void 0:s.getTime(),c==null?void 0:c.getTime(),m])}const S0=30;function j0(n){return Number.isFinite(n)&&n>0?n:S0}function oh(n,s,c){if(!n||!s||!c)return null;const o=s.getTime(),d=c.getTime(),m=n.getTime();return d<=o||m<o||m>d?null:(m-o)/(d-o)*100}function T0(n,s,c=new Date){const o=new Date(n.getTime()-s),d=new Date(Math.min(n.getTime()+s,c.getTime()));return{start:o,end:new Date(Math.max(o.getTime(),d.getTime()))}}function E0(n){if(!n||Number.isNaN(n.getTime()))return"--:--:--.---";const s=String(n.getHours()).padStart(2,"0"),c=String(n.getMinutes()).padStart(2,"0"),o=String(n.getSeconds()).padStart(2,"0"),d=String(n.getMilliseconds()).padStart(3,"0");return`${s}:${c}:${o}.${d}`}function fh(n,s){if(!n||Number.isNaN(n.getTime()))return s==="frame"?"--:--:--.---":"--:--:--";if(s==="frame")return E0(n);const c=String(n.getHours()).padStart(2,"0"),o=String(n.getMinutes()).padStart(2,"0"),d=String(n.getSeconds()).padStart(2,"0");return`${c}:${o}:${d}`}async function N0(n,s,c){const o=await fetch(`${n||""}/db/tql`,{method:"POST",headers:{"Content-Type":"text/plain"},body:s,signal:c}),d=o.headers.get("x-chart-type"),m=await o.text();let g;try{g=JSON.parse(m)}catch{g=m}return{data:g,chartType:d}}function C0(n){return!n||typeof n!="object"||!n.chartID&&!n.jsAssets&&!n.jsCodeAssets?null:n}const lp=new Set;function np(n,s){const c=s??"";return c&&n.startsWith("/")?`${c}${n}`:n}function _0(n,s){return new Promise((c,o)=>{const d=np(n,s),m=document.createElement("script");m.src=d,m.async=!1,m.onload=()=>{m.remove(),c()},m.onerror=()=>{console.error("[scriptLoader] FAILED",d),m.remove(),o(new Error(`Failed to load: ${d}`))},document.head.appendChild(m)})}function R0(n){return n.filter(s=>!lp.has(s))}async function dh(n,s,c){const o=R0(n);for(const d of[...o,...s])await _0(d,c),o.includes(d)&&lp.add(d)}function z0({data:n,parentRef:s,baseUrl:c}){var d;const o=h.useRef(null);return h.useEffect(()=>{if(!n)return;let m=!1;return(async()=>{var _,H,O,C,Y;const y=n.jsAssets??[];if(await dh(y,[],c),m||!o.current)return;const b=n.chartID??"",v=document.getElementById(b);v&&typeof echarts<"u"&&((_=echarts.getInstanceByDom(v))==null||_.dispose(),v.remove());const T=document.createElement("div");T.id=b;const x=((H=s==null?void 0:s.current)==null?void 0:H.clientWidth)??parseInt(((O=n.style)==null?void 0:O.width)||"600"),A=((C=s==null?void 0:s.current)==null?void 0:C.clientHeight)??parseInt(((Y=n.style)==null?void 0:Y.height)||"300");T.style.width=`${x}px`,T.style.height=`${A}px`,T.style.backgroundColor="#252525",o.current.innerHTML="",o.current.appendChild(T);const D=n.jsCodeAssets??[];await dh([],D,c)})().catch(y=>{m||console.error("ChartContainer render failed",y)}),()=>{m=!0}},[n]),h.useEffect(()=>{const m=(s==null?void 0:s.current)??o.current;if(!m||typeof ResizeObserver>"u")return;const g=new ResizeObserver(()=>{if(typeof echarts>"u"||!(n!=null&&n.chartID))return;const y=document.getElementById(n.chartID);if(!y)return;const b=echarts.getInstanceByDom(y);b&&(y.style.width=`${m.clientWidth}px`,y.style.height=`${m.clientHeight}px`,b.resize())});return g.observe(m),()=>g.disconnect()},[n==null?void 0:n.chartID]),r.jsxs(r.Fragment,{children:[(d=n==null?void 0:n.cssAssets)==null?void 0:d.map((m,g)=>r.jsx("link",{rel:"stylesheet",href:np(m,c)},g)),r.jsx("div",{ref:o})]})}const mh=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"];function A0(n){if(!n)return{};try{const s=JSON.parse(n);if(s&&typeof s=="object")return Object.entries(s).reduce((c,[o,d])=>(typeof d=="number"&&(c[o]=d),c),{})}catch{}return{}}function D0({cameraId:n,event:s,eventTimestamp:c,currentTime:o,isPlaying:d,cameraDetail:m,rangeStart:g,rangeEnd:y,baseUrl:b}){const v=h.useRef(null),T=h.useRef(`event-sync-${n}-${Date.now()}`),x=h.useRef(null),A=h.useRef(!1),[D,_]=h.useState(!0),[H,O]=h.useState(null),[C,Y]=h.useState(null);return h.useEffect(()=>{let X=!1;const $=new AbortController;return(async()=>{var le,P;_(!0),Y(null),O(null);try{if(!(m!=null&&m.table)||!(s!=null&&s.used_counts_snapshot)){_(!1);return}const Z=m.table+"_LOG",re=A0(s.used_counts_snapshot),ge=Object.keys(re);if(ge.length===0){_(!1);return}const _e=(BigInt(g.getTime())*1000000n).toString(),je=(BigInt(y.getTime())*1000000n).toString(),Oe=ge.map((U,G)=>({name:U,type:"line",showSymbol:!1,lineStyle:{width:1.5},itemStyle:{color:mh[G%mh.length]},data:[],...G===0?{markLine:{silent:!0,symbol:"none",lineStyle:{color:"#ef4444",width:2,type:"solid"},data:[{xAxis:c.getTime()}],label:{formatter:"Event",fontSize:10,color:"#ef4444"}}}:{}})),Re={title:{text:"Detection Count",textStyle:{color:"#fff",fontSize:14},left:"left",top:0},animation:!1,backgroundColor:"#252525",grid:{left:50,right:20,top:50,bottom:50},xAxis:{type:"time",min:g.getTime(),max:y.getTime(),axisTick:{alignWithLabel:!0},axisLabel:{hideOverlap:!0},axisLine:{onZero:!1}},yAxis:{type:"value",min:0,axisLine:{onZero:!1},boundaryGap:["0%","20%"]},tooltip:{trigger:"axis",backgroundColor:"rgba(30,30,30,0.9)",borderColor:"rgba(255,255,255,0.1)",textStyle:{color:"#fff",fontSize:11}},legend:{show:!0,textStyle:{color:"rgba(255,255,255,0.7)",fontSize:10},bottom:0},series:Oe},be=ge.map((U,G)=>({query:`SQL("SELECT TO_TIMESTAMP(time)/1000000 as TIME, value FROM ${Z} WHERE IDENT = '${U.replace(/'/g,"''")}' AND CAMERA_ID='${n}' AND time BETWEEN ${_e} AND ${je}")
JSON()`,idx:G,alias:U})),w=`{
let sQuery = ${JSON.stringify(be)};
let sCount = 0;
function getData(aTql, aIdx) {
fetch("${b}/db/tql", {
method: "POST",
headers: {
"Accept": "application/json, text/plain, */*",
"Content-Type": "text/plain"
},
body: aTql
})
.then(function(rsp) { return rsp.json(); })
.then(function(obj) {
if (!obj.success) return;
_chartOption.series[aIdx].data = obj?.data?.rows ?? [];
sCount++;
if (sCount >= sQuery.length) _chart.setOption(_chartOption);
})
.catch(function(err) { console.warn("EventSyncChart fetch error", err); });
}
sQuery.forEach(function(aData, idx) {
getData(aData.query, idx);
});
}`,Q=((le=v.current)==null?void 0:le.clientWidth)||600,ne=((P=v.current)==null?void 0:P.clientHeight)||300,F=`FAKE(linspace(0,0,0))
CHART(
chartID('${T.current}'),
theme('dark'),
size('${Q}px','${ne}px'),
chartOption(${JSON.stringify(Re)}),
chartJSCode(${w})
)`,{data:V}=await N0(b,F,$.signal);if(X)return;const S=C0(V);S?O(S):Y("Server did not return chart data")}catch(Z){if(X||Z instanceof DOMException&&Z.name==="AbortError")return;Y("Failed to load detection data")}finally{X||_(!1)}})(),()=>{X=!0,$.abort()}},[n,c.getTime(),g.getTime(),y.getTime(),m,b]),h.useEffect(()=>{if(!H){x.current=null;return}const X=()=>{if(typeof echarts>"u")return!1;const I=document.getElementById(T.current);if(!I)return!1;const le=echarts.getInstanceByDom(I);return le?(x.current=le,A.current=!1,!0):!1};if(X())return;const $=setInterval(()=>{X()&&clearInterval($)},200);return()=>clearInterval($)},[H]),h.useEffect(()=>{const X=x.current;if(!X||!o||!H)return;const $=()=>{try{const le=X.getModel().getComponent("grid");if(!(le!=null&&le.coordinateSystem))return;const P=le.coordinateSystem.getRect(),Z=X.convertToPixel({gridIndex:0},[o.getTime(),0])[0];if(isNaN(Z))return;const re={x1:Z,y1:P.y,x2:Z,y2:P.y+P.height};A.current?X.setOption({graphic:[{id:"current-time-marker",shape:re}]},{replaceMerge:[]}):(X.setOption({graphic:[{id:"current-time-marker",type:"line",z:100,shape:re,style:{stroke:"#f97316",lineWidth:1,lineDash:[5]}}]}),A.current=!0)}catch{}};if(!d){$();return}const I=setTimeout($,200);return()=>clearTimeout(I)},[o,H,d]),r.jsxs("div",{ref:v,style:{width:"100%",height:"100%",position:"relative"},children:[D&&r.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx("span",{style:{fontSize:12,color:"rgba(255,255,255,0.5)"},children:"Loading detection data..."})}),!D&&!H&&!C&&r.jsx("div",{style:{height:60,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx("span",{style:{fontSize:11,color:"rgba(255,255,255,0.3)"},children:"No detection data available"})}),C&&r.jsx("div",{style:{height:60,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx("span",{style:{fontSize:11,color:"#ef4444"},children:C})}),H&&r.jsx(z0,{data:H,parentRef:v,baseUrl:b})]})}function M0(n){if(!n)return{};try{const s=JSON.parse(n);if(s&&typeof s=="object")return Object.entries(s).reduce((c,[o,d])=>(typeof d=="number"&&(c[o]=d),c),{})}catch{}return{}}function w0(n){return/^\d+$/.test(n)?new Date(Number(BigInt(n)/1000000n)):new Date(n)}const hi=300*1e3;function O0({cameraId:n,timestamp:s,cameraDetail:c,event:o,config:d,alias:m,onChartToggle:g}){const y=h.useRef(null),b=h.useRef(null),v=h.useRef(null),T=h.useRef(null),x=h.useRef(null),A=h.useRef(0),D=h.useRef(0),[_,H]=h.useState(null),[O,C]=h.useState(()=>new Date(s.getTime()-hi)),[Y,X]=h.useState(()=>new Date(Math.min(s.getTime()+hi,Date.now()))),[$,I]=h.useState(5),[le,P]=h.useState("5"),[Z,re]=h.useState("frame"),[ge,_e]=h.useState(null),[je,Oe]=h.useState(null),Re=h.useRef(null),[be,w]=h.useState(null),[Q,ne]=h.useState(!1),[F,V]=h.useState(null),[S,U]=h.useState(null),[G,K]=h.useState(!1),[pe,ve]=h.useState(0),Ee=h.useCallback(J=>{G||_e(J)},[G]),Ie=h.useCallback(J=>{J||_e(null)},[]),Qe=h.useCallback(J=>{H(J);const fe=A.current,xe=D.current;if(xe>fe){const dt=Math.min(100,Math.max(0,(J.getTime()-fe)/(xe-fe)*100));v.current&&(v.current.style.left=`${dt}%`),T.current&&(T.current.style.width=`${dt}%`)}},[]),wt=h.useCallback(J=>{const fe=A.current,xe=D.current;if(xe<=fe)return;const dt=Math.min(100,Math.max(0,(J-fe)/(xe-fe)*100));if(v.current&&(v.current.style.left=`${dt}%`),T.current&&(T.current.style.width=`${dt}%`),x.current){x.current.style.left=`${dt}%`;const Xt=new Date(J),sa=String(Xt.getHours()).padStart(2,"0"),ha=String(Xt.getMinutes()).padStart(2,"0"),_l=String(Xt.getSeconds()).padStart(2,"0"),Rl=String(Xt.getMilliseconds()).padStart(3,"0");x.current.textContent=`${sa}:${ha}:${_l}.${Rl}`}},[]),ee=v0(y,n,Y,d.ip,d.port,{onPlaybackTick:wt,onTimeUpdate:Qe,onProbeProgress:Ee,onProbeStateChange:Ie}),Tt=j0(be??ee.fps),W=x0(n,O,Y,d.ip,d.port);h.useEffect(()=>{let J=!1;if(!n){w(null);return}return p0(n,d.ip,d.port).then(fe=>{if(!J){const xe=Number(fe==null?void 0:fe.fps);w(Number.isFinite(xe)&&xe>0?xe:null)}}),()=>{J=!0}},[n,d.ip,d.port]),h.useEffect(()=>{ee.loadChunk(s)},[n]),h.useEffect(()=>{const J=new Date(s.getTime()-hi),fe=new Date(Math.min(s.getTime()+hi,Date.now()));C(J),X(fe),A.current=J.getTime(),D.current=fe.getTime()},[s]),h.useEffect(()=>{A.current=O.getTime(),D.current=Y.getTime()},[O,Y]),h.useEffect(()=>{if(!ee.isProbing||ee.isPlaying){Re.current=null,Oe(null);return}const J=ge||ee.currentTime||_||O;Re.current=J,Oe(J);const fe=setInterval(()=>{if(!Re.current)return;const xe=new Date(Re.current.getTime()+1e3);if(xe.getTime()>Y.getTime()){clearInterval(fe);return}Re.current=xe,Oe(xe)},1e3);return()=>clearInterval(fe)},[ee.isProbing,ee.isPlaying]),h.useEffect(()=>{const J=b.current;if(!J)return;const fe=()=>ve(J.getBoundingClientRect().width);if(fe(),typeof ResizeObserver<"u"){const xe=new ResizeObserver(fe);return xe.observe(J),()=>xe.disconnect()}return window.addEventListener("resize",fe),()=>window.removeEventListener("resize",fe)},[]);const te=h.useRef(0);h.useEffect(()=>{if(!ee.isPlaying||!_)return;const J=Date.now();if(J-te.current<2e3)return;const fe=Y.getTime()-O.getTime();if((_.getTime()-O.getTime())/fe>.9){te.current=J;const dt=fe/2;C(new Date(_.getTime()-dt)),X(new Date(_.getTime()+dt))}},[ee.isPlaying,_]);const ie=h.useCallback(()=>{switch(Z){case"frame":return $*(1e3/Tt);case"sec":return $*1e3;case"min":return $*6e4}},[$,Z,Tt]),ce=h.useCallback(()=>{const J=ee.currentTime||_;J&&ee.seekToTime(new Date(Math.max(O.getTime(),J.getTime()-ie())))},[ee,_,O,ie]),de=h.useCallback(()=>{const J=ee.currentTime||_;J&&ee.seekToTime(new Date(Math.min(Y.getTime(),J.getTime()+ie())))},[ee,_,Y,ie]),Te=h.useCallback(()=>{ee.isProbing||ee.isLoading||(ee.isPlaying?ee.pause():ee.play())},[ee]),Ue=h.useCallback(async J=>{const fe=Y.getTime()-O.getTime(),xe=J==="prev"?-fe:fe,dt=new Date(O.getTime()+xe),Xt=new Date(Y.getTime()+xe);ee.pause(),C(dt),X(Xt),H(dt),await ee.loadChunk(dt)},[O,Y,ee]),Pe=h.useCallback(async()=>{if(ee.isLoading||ee.isProbing)return;if(ee.isPlaying&&ee.pause(),!(oh(s,O,Y)!==null)){const{start:fe,end:xe}=T0(s,hi,new Date);C(fe),X(xe)}H(s),await ee.seekToTime(s)},[ee,s,O,Y]),Ke=h.useCallback(J=>{const fe=b.current;if(!fe)return null;const xe=fe.getBoundingClientRect();return xe.width<=0?null:Math.min(1,Math.max(0,(J.clientX-xe.left)/xe.width))},[]),it=h.useCallback(J=>new Date(O.getTime()+J*(Y.getTime()-O.getTime())),[O,Y]),ua=h.useCallback(J=>{const fe=Ke(J);if(fe!==null&&(V(it(fe)),U(fe*100),G)){const xe=it(fe);ee.seekToTime(xe)}},[Ke,it,G,ee]),at=h.useCallback(J=>{J.preventDefault(),K(!0),ee.isPlaying&&ee.pause();const fe=Ke(J);fe!==null&&ee.seekToTime(it(fe));const xe=Xt=>{const sa=Ke(Xt);if(sa!==null){const ha=it(sa);V(ha),U(sa*100),ee.seekToTime(ha)}},dt=Xt=>{document.removeEventListener("mousemove",xe),document.removeEventListener("mouseup",dt),K(!1);const sa=Ke(Xt);sa!==null&&ee.loadChunk(it(sa))};document.addEventListener("mousemove",xe),document.addEventListener("mouseup",dt)},[Ke,it,ee]),vt=O.getTime(),ft=Y.getTime(),ae=ee.currentTime||_,se=!G&&je?je:!G&&ge?ge:ae;Math.min(ft,Math.max(vt,(se==null?void 0:se.getTime())??vt));const Je=oh(s,O,Y),Gt=!ee.isPlaying&&!ee.isLoading&&!ee.isProbing,Zu=`${window.location.protocol}//${d.ip}:${d.port}`,xi=!!(c!=null&&c.save_objects),ul=s;return r.jsx("div",{className:"flex flex-col gap-3",style:{borderTop:"1px solid var(--color-border)",paddingTop:12},children:r.jsxs("div",{className:"flex flex-wrap gap-3",style:{minHeight:0},children:[r.jsxs("div",{style:{flex:"1 1 400px",minWidth:0,display:"flex",flexDirection:"column",height:420},children:[r.jsxs("div",{style:{position:"relative",flex:1,minHeight:0,backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-base)",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},children:[r.jsx("video",{ref:y,muted:!0,playsInline:!0,style:{width:"100%",height:"100%",objectFit:"contain",display:ee.currentChunkInfo?"block":"none"}}),ee.isLoading&&r.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx("span",{className:"text-sm text-on-surface-disabled",children:"Loading..."})}),!ee.currentChunkInfo&&!ee.isLoading&&r.jsx("span",{className:"text-sm text-on-surface-disabled",children:"No recorded data at this time"})]}),r.jsxs("div",{className:"mt-4",style:{flexShrink:0},children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs text-on-surface-disabled",children:[r.jsx("span",{children:Pm(O)}),r.jsxs("div",{ref:b,className:"relative flex-1",style:{height:16,cursor:"pointer"},onMouseDown:at,onMouseMove:ua,onMouseLeave:()=>{G||(V(null),U(null))},children:[r.jsx("div",{ref:x,style:{position:"absolute",bottom:"100%",left:"0%",transform:"translateX(-50%)",padding:"2px 6px",borderRadius:3,fontSize:10,whiteSpace:"nowrap",fontFamily:"var(--font-family-mono)",letterSpacing:0,backgroundColor:"var(--color-primary)",color:"#fff",pointerEvents:"none",marginBottom:4,zIndex:3}}),S!==null&&F&&r.jsx("div",{style:{position:"absolute",bottom:"calc(100% + 20px)",left:`${S}%`,transform:"translateX(-50%)",padding:"2px 6px",borderRadius:3,fontSize:10,whiteSpace:"nowrap",fontFamily:"var(--font-family-mono)",letterSpacing:0,backgroundColor:"var(--color-surface-elevated)",color:"var(--color-on-surface-secondary)",border:"1px solid var(--color-border)",pointerEvents:"none",zIndex:4},children:fh(F,Z)}),r.jsx("div",{style:{position:"absolute",top:"50%",marginTop:-2,left:0,right:0,height:4,backgroundColor:"var(--color-surface-input)",borderRadius:2,pointerEvents:"none"}}),W.map((J,fe)=>r.jsx("span",{style:{position:"absolute",top:"50%",marginTop:-2,height:4,left:`${J.left}%`,width:`${J.width}%`,backgroundColor:"rgba(248, 113, 113, 0.5)",borderRadius:2,pointerEvents:"none"}},fe)),r.jsx("div",{ref:T,style:{position:"absolute",top:"50%",marginTop:-2,left:0,height:4,width:"0%",backgroundColor:"rgba(0, 108, 210, 0.5)",borderRadius:2,pointerEvents:"none"}}),r.jsx("div",{ref:v,style:{position:"absolute",top:"50%",marginTop:-6,width:12,height:12,left:"0%",transform:"translateX(-50%)",borderRadius:"50%",backgroundColor:"var(--color-primary-hover)",border:"2px solid #fff",boxShadow:"0 1px 3px rgba(0,0,0,0.4)",pointerEvents:"none",zIndex:2}}),Je!==null&&r.jsx("button",{type:"button",onClick:J=>{J.stopPropagation(),Pe()},disabled:ee.isLoading||ee.isProbing,style:{position:"absolute",top:-2,width:8,height:20,left:`${Je}%`,transform:"translateX(-50%)",background:"none",border:"none",cursor:"pointer",padding:0,zIndex:3},title:fh(s,Z),children:r.jsx("span",{style:{display:"block",width:0,height:0,margin:"0 auto",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"6px solid var(--color-warning)"}})})]}),r.jsx("span",{children:Pm(Y)})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr auto 1fr",alignItems:"center",marginTop:10},children:[r.jsxs("div",{className:"flex items-center gap-2",style:{visibility:Gt?"visible":"hidden"},children:[r.jsx("button",{className:"btn btn-ghost btn-sm btn-icon",onClick:ce,title:`-${$} ${Z}`,children:r.jsx(ye,{name:"keyboard_double_arrow_left",className:"icon-sm"})}),r.jsx("input",{type:"number",min:1,value:le,onChange:J=>{const fe=J.target.value;(fe===""||/^\d+$/.test(fe))&&P(fe)},onBlur:()=>{const J=Math.max(1,parseInt(le)||$);I(J),P(String(J))},onKeyDown:J=>{J.key==="Enter"&&(J.preventDefault(),J.target.blur())},style:{width:44,height:"var(--size-control-height-sm)",padding:"0 4px",fontSize:11,textAlign:"center"}}),r.jsxs("select",{value:Z,onChange:J=>re(J.target.value),style:{height:"var(--size-control-height-sm)",padding:"0 2px",fontSize:10,paddingRight:16,backgroundSize:"0.6rem"},children:[r.jsx("option",{value:"frame",children:"FRM"}),r.jsx("option",{value:"sec",children:"SEC"}),r.jsx("option",{value:"min",children:"MIN"})]}),r.jsx("button",{className:"btn btn-ghost btn-sm btn-icon",onClick:de,title:`+${$} ${Z}`,children:r.jsx(ye,{name:"keyboard_double_arrow_right",className:"icon-sm"})})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{className:"btn btn-ghost btn-sm btn-icon",onClick:()=>Ue("prev"),title:"Previous window",children:r.jsx(ye,{name:"skip_previous",className:"icon-sm"})}),r.jsx("button",{className:"btn btn-ghost btn-sm btn-icon",onClick:()=>{const J=ee.currentTime||_;J&&ee.seekToTime(new Date(Math.max(O.getTime(),J.getTime()-1e3)))},disabled:ee.isProbing||ee.isLoading,title:"-1s",children:r.jsx(ye,{name:"keyboard_double_arrow_left",className:"icon-sm"})}),r.jsx("button",{className:"btn btn-primary btn-sm btn-icon",onClick:Te,disabled:ee.isProbing,children:r.jsx(ye,{name:ee.isPlaying?"pause":"play_arrow",className:"icon-sm"})}),r.jsx("button",{className:"btn btn-ghost btn-sm btn-icon",onClick:()=>{const J=ee.currentTime||_;J&&ee.seekToTime(new Date(Math.min(Y.getTime(),J.getTime()+1e3)))},disabled:ee.isProbing||ee.isLoading,title:"+1s",children:r.jsx(ye,{name:"keyboard_double_arrow_right",className:"icon-sm"})}),r.jsx("button",{className:"btn btn-ghost btn-sm btn-icon",onClick:()=>Ue("next"),title:"Next window",children:r.jsx(ye,{name:"skip_next",className:"icon-sm"})})]}),r.jsxs("div",{className:"flex items-center gap-2 justify-self-end",children:[r.jsx("button",{className:"btn btn-ghost btn-sm btn-icon",onClick:()=>void Pe(),disabled:ee.isProbing||ee.isLoading,title:"Jump to event",children:r.jsx(ye,{name:"timer",className:"icon-sm"})}),xi&&r.jsx("button",{className:`btn btn-sm btn-icon ${Q?"btn-primary":"btn-ghost"}`,onClick:()=>{ne(J=>{const fe=!J;return g==null||g(fe),fe})},title:"Toggle chart",children:r.jsx(ye,{name:"show_chart",className:"icon-sm"})})]})]})]})]}),xi&&r.jsx("div",{style:{flex:Q?"1 1 400px":"0 0 0px",minWidth:0,overflow:"hidden",opacity:Q?1:0,transition:"flex 0.3s ease, opacity 0.3s ease",display:"flex",flexDirection:"column",height:Q?420:0},children:Q&&r.jsx("div",{style:{flex:1,minHeight:0},children:r.jsx(D0,{cameraId:n,event:o,eventTimestamp:ul,currentTime:_,isPlaying:ee.isPlaying,cameraDetail:c,rangeStart:O,rangeEnd:Y,baseUrl:Zu})})})]})})}function U0({isOpen:n,onClose:s,event:c,alias:o}){const[d,m]=h.useState(null),[g,y]=h.useState(!1),[b,v]=h.useState(null);if(h.useEffect(()=>{if(!o){v(null);return}let D=!1;return Lc(o).then(_=>{D||v(_)}).catch(()=>{D||v(null)}),()=>{D=!0}},[o]),h.useEffect(()=>{if(!n||!(c!=null&&c.camera_id)){m(null);return}b&&ep(c.camera_id,b.ip,b.port).then(m).catch(()=>m(null))},[n,c==null?void 0:c.camera_id,b]),h.useEffect(()=>{n||y(!1)},[n]),h.useEffect(()=>{if(!n)return;const D=_=>{_.key==="Escape"&&s()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[n,s]),!n||!c)return null;const T=M0(c.used_counts_snapshot),x=c.value_label||"",A=w0(c.time);return r.jsx("div",{className:"modal-overlay",onClick:s,children:r.jsxs("div",{className:"modal",onClick:D=>D.stopPropagation(),style:{maxWidth:g?"90vw":960,width:"100%",maxHeight:"85vh",display:"flex",flexDirection:"column",transition:"max-width 0.3s ease"},children:[r.jsxs("div",{className:"modal-header",style:{flexShrink:0},children:[r.jsxs("div",{className:"modal-title",children:[x&&r.jsx("span",{className:`tag tag-${x.toLowerCase()}`,children:x}),"Event Detail"]}),r.jsx("button",{className:"btn btn-ghost btn-sm",onClick:s,style:{padding:"0 4px"},children:r.jsx(ye,{name:"close",className:"icon-sm"})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,fontSize:"var(--font-size-sm)",overflowY:"auto",flex:1,minHeight:0},children:[r.jsxs("div",{className:"data-list",children:[r.jsx(pn,{label:"Camera",value:c.camera_id}),r.jsx(pn,{label:"Time",value:Kh(c.time)}),c.rule_name&&r.jsx(pn,{label:"Rule",value:c.rule_name})]}),c.expression_text&&r.jsxs("div",{children:[r.jsx("span",{className:"data-list-label",children:"Expression"})," ",r.jsx("code",{className:"font-mono text-warning text-sm",children:c.expression_text})]}),Object.keys(T).length>0&&r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("span",{className:"data-list-label",children:"Detected"}),Object.entries(T).map(([D,_])=>r.jsxs("span",{className:"badge badge-primary text-xs",children:[D,": ",_]},D))]}),d&&r.jsxs("div",{className:"data-list",style:{borderTop:"1px solid var(--color-border)",paddingTop:12},children:[r.jsx(pn,{label:"Camera Name",value:d.name||"-"}),r.jsx(pn,{label:"Status",value:d.enabled?"Running":"Stopped"}),d.rtsp_url&&r.jsx(pn,{label:"RTSP",value:d.rtsp_url})]}),b&&r.jsx(O0,{cameraId:c.camera_id,timestamp:A,cameraDetail:d,event:c,config:b,alias:o,onChartToggle:y})]}),r.jsx("div",{className:"modal-footer",style:{marginTop:16,flexShrink:0},children:r.jsx("button",{className:"btn btn-ghost",onClick:s,children:"Close"})})]})})}function pn({label:n,value:s}){return r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx("span",{className:"data-list-label",children:n}),r.jsx("span",{children:s})]})}const L0=["ALL","MATCH","TRIGGER","RESOLVE","ERROR"],H0=20;function _c(n){const s=c=>String(c).padStart(2,"0");return`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${s(n.getHours())}:${s(n.getMinutes())}:${s(n.getSeconds())}`}function hh(n){const s=new Date;return s.setDate(s.getDate()-n),_c(s)}function B0(n){if(!n)return{};try{const s=JSON.parse(n);if(s&&typeof s=="object")return Object.entries(s).reduce((c,[o,d])=>(typeof d=="number"&&(c[o]=d),c),{})}catch{}return{}}function k0(){const{alias:n}=Rh(),{notify:s}=il(),[c,o]=h.useState(null),[d,m]=h.useState([]),[g,y]=h.useState([]),[b,v]=h.useState(!0),[T,x]=h.useState(0),[A,D]=h.useState(1),[_,H]=h.useState(hh(7)),[O,C]=h.useState(_c(new Date)),[Y,X]=h.useState(""),[$,I]=h.useState("ALL"),[le,P]=h.useState(""),[Z,re]=h.useState(1),[ge,_e]=h.useState(null),[je,Oe]=h.useState(!1),Re=h.useRef({selectedCamera:Y,eventType:$,eventName:le,startTime:_,endTime:O});Re.current={selectedCamera:Y,eventType:$,eventName:le,startTime:_,endTime:O};const be=async(F=1,V=c)=>{if(V){v(!0);try{const S=Re.current,U={size:H0,page:F};S.selectedCamera&&(U.camera_id=S.selectedCamera),S.eventType!=="ALL"&&(U.event_type=S.eventType),S.eventName&&(U.event_name=S.eventName),S.startTime&&(U.start_time=String(BigInt(new Date(S.startTime).getTime())*1000000n)),S.endTime&&(U.end_time=String(BigInt(new Date(S.endTime).getTime())*1000000n));const G=await Zb(U,V.ip,V.port);m(G.events),x(G.total_count),D(G.total_pages)}catch(S){s(`Failed to load events: ${S instanceof Error?S.message:"unknown"}`,"error"),m([])}finally{v(!1)}}};h.useEffect(()=>{if(!n){o(null),v(!1);return}let F=!1;return Lc(n).then(V=>{F||o(V)}).catch(()=>{F||(o(null),v(!1))}),()=>{F=!0}},[n]),h.useEffect(()=>{c&&(Hb(c.ip,c.port).then(y).catch(()=>{}),be(1,c))},[c]);const w=()=>{re(1),be(1)},Q=()=>{H(hh(7)),C(_c(new Date)),X(""),I("ALL"),P(""),re(1)},ne=F=>{re(F),be(F)};return r.jsx("div",{className:"page",children:r.jsx("div",{className:"page-body-full",children:r.jsxs("div",{className:"page-body-inner",children:[r.jsxs("div",{className:"page-title-group",children:[r.jsx("h1",{className:"page-title",children:"Events"}),r.jsxs("p",{className:"page-desc",children:[n," — ",c?`${c.ip}:${c.port}`:""]})]}),r.jsxs("div",{className:"card",style:{marginBottom:16,flexShrink:0,display:"flex",flexWrap:"wrap",gap:12,alignItems:"flex-end"},children:[r.jsx(pi,{label:"From",children:r.jsx("input",{type:"datetime-local",value:_.replace(" ","T"),onChange:F=>H(F.target.value.replace("T"," "))})}),r.jsx(pi,{label:"To",children:r.jsx("input",{type:"datetime-local",value:O.replace(" ","T"),onChange:F=>C(F.target.value.replace("T"," "))})}),r.jsx(pi,{label:"Camera",children:r.jsxs("select",{value:Y,onChange:F=>X(F.target.value),children:[r.jsx("option",{value:"",children:"All"}),g.map(F=>r.jsx("option",{value:F.id,children:F.label||F.id},F.id))]})}),r.jsx(pi,{label:"Type",children:r.jsx("select",{value:$,onChange:F=>I(F.target.value),children:L0.map(F=>r.jsx("option",{value:F,children:F},F))})}),r.jsx(pi,{label:"Event Name",children:r.jsx("input",{value:le,onChange:F=>P(F.target.value),placeholder:"Search name..."})}),r.jsxs("div",{style:{display:"flex",gap:8,alignSelf:"flex-end"},children:[r.jsx("button",{className:"btn btn-primary",onClick:w,children:"Search"}),r.jsx("button",{className:"btn btn-ghost",onClick:Q,children:"Reset"})]})]}),r.jsxs("article",{className:"table-card",children:[r.jsx("div",{className:"table-card-body",children:b?r.jsx(ph,{children:"Loading events..."}):d.length===0?r.jsx(ph,{children:"No events found"}):r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"Time"}),r.jsx("th",{children:"Camera"}),r.jsx("th",{children:"Rule"}),r.jsx("th",{children:"Expression"}),r.jsx("th",{children:"Type"}),r.jsx("th",{children:"Content"})]})}),r.jsx("tbody",{children:d.map((F,V)=>{const S=B0(F.used_counts_snapshot);return r.jsxs("tr",{onClick:()=>{_e(F),Oe(!0)},children:[r.jsx("td",{className:"mono whitespace-nowrap",children:Kh(F.time)}),r.jsx("td",{children:F.camera_id}),r.jsx("td",{children:F.rule_name||"-"}),r.jsx("td",{className:"mono",children:F.expression_text||"-"}),r.jsx("td",{children:r.jsx(q0,{type:F.value_label||""})}),r.jsx("td",{children:Object.keys(S).length>0?r.jsx("div",{className:"flex gap-1 flex-nowrap",children:Object.entries(S).map(([U,G])=>r.jsxs("span",{className:"badge badge-primary text-xs",children:[U,": ",G]},U))}):"-"})]},V)})})]})}),r.jsxs("div",{className:"pagination",children:[T>0&&r.jsxs("span",{className:"pagination-info",children:["Total ",T]}),r.jsx("button",{className:"btn btn-ghost btn-sm",disabled:Z<=1,onClick:()=>ne(Z-1),children:r.jsx(ye,{name:"chevron_left",className:"icon-sm"})}),r.jsxs("span",{className:"pagination-current",children:["Page ",Z,A>1?` / ${A}`:""]}),r.jsx("button",{className:"btn btn-ghost btn-sm",disabled:Z>=A,onClick:()=>ne(Z+1),children:r.jsx(ye,{name:"chevron_right",className:"icon-sm"})})]})]}),r.jsx(U0,{isOpen:je,onClose:()=>{Oe(!1),_e(null)},event:ge,alias:n||""})]})})})}function pi({label:n,children:s}){return r.jsxs("div",{className:"form-field",children:[r.jsx("label",{className:"form-label",children:n}),s]})}function ph({children:n}){return r.jsx("div",{className:"empty-state",children:n})}function q0({type:n}){const s={ERROR:"tag-error",MATCH:"tag-match",TRIGGER:"tag-trigger",RESOLVE:"tag-resolve"};return n?r.jsx("span",{className:`tag ${s[n]||""}`,children:n}):r.jsx("span",{children:"-"})}const Y0={success:"toast-success",error:"toast-error",info:""},gh={success:"check_circle",error:"error",info:"info"};function G0(){const{notifications:n,dismissNotification:s}=il();return n.length===0?null:r.jsx("div",{className:"fixed bottom-4 right-4 z-[1000] space-y-2",children:n.map(c=>r.jsxs("div",{className:`toast animate-slide-in ${Y0[c.type]||""}`,children:[r.jsx(ye,{name:gh[c.type]||gh.info}),r.jsx("span",{className:"flex-1",children:c.message}),r.jsx("button",{onClick:()=>s(c.id),className:"opacity-60 hover:opacity-100",children:r.jsx(ye,{name:"close",className:"icon-sm"})})]},c.id))})}const X0=/^[A-Za-z0-9_-]+$/;function Q0({isOpen:n,onClose:s,onSave:c,mode:o,initial:d,existingAliases:m}){const[g,y]=h.useState(""),[b,v]=h.useState(""),[T,x]=h.useState(""),[A,D]=h.useState(""),[_,H]=h.useState("idle"),O=h.useRef(null),C=h.useRef(null);h.useLayoutEffect(()=>{const $=C.current,I=O.current;if(!$||!I)return;const le=I.value.length-$.rawLen,P=Math.max(0,Math.min($.pos+le,I.value.length));I.setSelectionRange(P,P),C.current=null},[g]),h.useEffect(()=>{if(n&&(y((d==null?void 0:d.alias)??""),v((d==null?void 0:d.ip)??(o==="new"?window.location.hostname:"")),x(d!=null&&d.port?String(d.port):o==="new"?"8000":""),D(""),H("idle"),o==="new"&&!(d!=null&&d.port))){let $=!1;return Qh().then(I=>{$||x(String(I.port))}).catch(()=>{}),()=>{$=!0}}},[n,d,o]),h.useEffect(()=>{if(!n)return;const $=I=>{I.key==="Escape"&&s()};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[n,s]);const Y=async()=>{if(!b){D("IP Address is required");return}H("testing"),D("");try{const $=`${window.location.protocol}//${b}:${Number(T)||8e3}`,I=await fetch(`${$}/api/cameras/health`,{method:"GET",signal:AbortSignal.timeout(5e3)});if(!I.ok)throw new Error(`${I.status}`);H("success")}catch{H("error")}},X=()=>{if(D(""),!g.trim()){D("Name is required");return}if(!X0.test(g.trim())){D("Name may only contain letters, numbers, underscores, and hyphens");return}if(o==="new"&&m.includes(g.trim())){D(`Name "${g.trim()}" already exists`);return}if(!b.trim()){D("IP Address is required");return}c({alias:g.trim(),ip:b.trim(),port:Number(T)||8e3}),s()};return n?r.jsx("div",{className:"modal-overlay",onClick:s,children:r.jsxs("div",{className:"modal",onClick:$=>$.stopPropagation(),style:{maxWidth:420},children:[r.jsx("div",{className:"modal-title",children:o==="new"?"New Blackbox Server":"Edit Blackbox Server"}),r.jsxs("div",{className:"modal-body",style:{display:"flex",flexDirection:"column",gap:16},children:[r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:"Name"}),r.jsx("input",{ref:O,className:"w-full",placeholder:"blackbox-1",value:g,onChange:$=>{const I=$.target.value;C.current={pos:$.target.selectionStart??I.length,rawLen:I.length},y(ap(I).replace(/[^A-Za-z0-9_-]/g,""))},style:{width:"100%"}}),r.jsx("div",{style:{marginTop:4,fontSize:"var(--font-size-sm)",color:"var(--color-on-surface-disabled)"},children:"Letters, numbers, underscore (_), and hyphen (-) only"})]}),r.jsx(vh,{label:"IP Address",placeholder:"192.168.1.100",value:b,onChange:v}),r.jsx(vh,{label:"Port",placeholder:"8000",value:T,onChange:x}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:Y,disabled:_==="testing",children:_==="testing"?"Testing...":"Test Connection"}),_==="success"&&r.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4,fontSize:"var(--font-size-sm)",color:"var(--color-success)"},children:[r.jsx(ye,{name:"check_circle",className:"icon-sm"})," Connected"]}),_==="error"&&r.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4,fontSize:"var(--font-size-sm)",color:"var(--color-error)"},children:[r.jsx(ye,{name:"error",className:"icon-sm"})," Connection failed"]})]}),A&&r.jsx("div",{style:{padding:"8px 12px",borderRadius:"var(--radius-base)",backgroundColor:"var(--color-error-muted)",color:"var(--color-error)",fontSize:"var(--font-size-sm)"},children:A})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-ghost",onClick:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:X,children:"Save"})]})]})}):null}function vh({label:n,placeholder:s,value:c,onChange:o}){return r.jsxs("div",{children:[r.jsx("label",{className:"form-label",children:n}),r.jsx("input",{className:"w-full",placeholder:s,value:c,onChange:d=>o(d.target.value),style:{width:"100%"}})]})}function V0({title:n,message:s,onConfirm:c,onCancel:o}){return h.useEffect(()=>{const d=m=>{m.key==="Escape"&&o()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[o]),r.jsx("div",{className:"modal-overlay",onClick:o,children:r.jsxs("div",{className:"modal",onClick:d=>d.stopPropagation(),children:[r.jsx("div",{className:"modal-title",children:n}),r.jsx("div",{className:"modal-body",children:s}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{onClick:o,className:"btn btn-ghost",children:"Cancel"}),r.jsx("button",{onClick:c,className:"btn btn-danger",children:"Delete"})]})]})})}const Z0="app:neo-blackbox";function $0(){const n=Gu(),s=h.useRef(null),c=h.useRef({}),[o,d]=h.useState(!1),[m,g]=h.useState("new"),[y,b]=h.useState(),[v,T]=h.useState([]),[x,A]=h.useState(null),D=h.useCallback((C,Y)=>{var X;(X=s.current)==null||X.postMessage({type:C,payload:Y})},[]);c.current={navigate:C=>n(C.path),selectTab:C=>n(C.path),requestReady:()=>D("ready"),openServerModal:C=>{g(C.mode),b(C.initial),T(C.existingAliases||[]),d(!0)},openConfirm:C=>{A({title:C.title,message:C.message,id:C.id})}},h.useEffect(()=>{const C=new BroadcastChannel(Z0);return s.current=C,C.onmessage=Y=>{const X=Y.data;if(!X||!X.type)return;const $=c.current[X.type];$&&$(X.payload)},C.postMessage({type:"ready"}),()=>C.close()},[]);const _=h.useCallback(C=>{D("serverModalResult",{action:"save",config:C,mode:m,initialAlias:y==null?void 0:y.alias}),d(!1)},[D,m,y]),H=h.useCallback(()=>{x&&D("confirmResult",{id:x.id,confirmed:!0}),A(null)},[D,x]),O=h.useCallback(()=>{x&&D("confirmResult",{id:x.id,confirmed:!1}),A(null)},[D,x]);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"bg-surface-alt text-on-surface antialiased",children:r.jsx("main",{className:"h-screen overflow-hidden bg-surface-alt",children:r.jsxs(wh,{children:[r.jsx(da,{path:"/",element:r.jsx(Mh,{to:"/settings",replace:!0})}),r.jsx(da,{path:"/settings/*",element:r.jsx(Lb,{})}),r.jsx(da,{path:"/camera/:alias/:id",element:r.jsx(o0,{})}),r.jsx(da,{path:"/events/:alias",element:r.jsx(k0,{})})]})})}),r.jsx(G0,{}),r.jsx(Q0,{isOpen:o,onClose:()=>d(!1),onSave:_,mode:m,initial:y,existingAliases:v}),x&&r.jsx(V0,{title:x.title,message:x.message,onConfirm:H,onCancel:O})]})}_v.createRoot(document.getElementById("root")).render(r.jsx(h.StrictMode,{children:r.jsx($y,{children:r.jsx(lb,{children:r.jsx(nb,{children:r.jsx($0,{})})})})}));</script>
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--shadow-xl:0 10px 25px #00000080;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:#1e1e1e;--color-surface-alt:#252525;--color-surface-elevated:#2c2c2c;--color-surface-input:#353535;--color-surface-hover:#ffffff14;--color-surface-hover-block:#ffffff21;--color-surface-active:#0053a0;--color-on-surface:#f1f1f1;--color-on-surface-secondary:#c4c4c4;--color-on-surface-tertiary:#a3a3a3;--color-on-surface-disabled:#818181;--color-on-surface-muted:#727272;--color-on-surface-hint:#aaa;--color-on-primary:#f1f1f1;--color-on-success:#1e1e1e;--color-border:#ffffff21;--color-border-medium:#626263;--color-border-focus:#006cd2;--color-primary:#005fb8;--color-primary-hover:#0075e2;--color-success:#71e071;--color-success-muted:#71e07126;--color-error:#ff5353;--color-error-light:#fa6464;--color-error-muted:#ff535326;--color-warning:#ff9800;--color-warning-muted:#ff980026;--color-info:#005fb8;--color-danger:#ff4747;--color-switch-off:#ffffff21;--color-switch-on:#005fb8;--color-switch-on-hover:#0075e2;--color-switch-thumb:#ffffff4d;--color-switch-thumb-active:#f1f1f1;--color-switch-border:#ffffff21;--color-switch-border-active:#0075e2;--color-dropdown:#2d2d2d;--color-dropdown-border:#ffffff21;--color-dropdown-option-hover:#3d3d3d;--color-scrollbar-thumb:#686868;--color-scrollbar-thumb-hover:#5c5c5c;--color-scrollbar-track:transparent;--spacing-0:0;--spacing-1:1px;--spacing-2:2px;--spacing-4:4px;--spacing-6:6px;--spacing-8:8px;--spacing-12:12px;--spacing-16:16px;--spacing-20:20px;--spacing-24:24px;--spacing-32:32px;--spacing-40:40px;--font-family-mono:"D2Coding", monospace;--font-size-xs:10px;--font-size-sm:12px;--font-size-base:13px;--font-size-md:15px;--font-size-lg:17px;--line-height-normal:1.5;--radius-base:4px;--shadow-switch:1px 2px 3px #00000020;--shadow-dropdown:0 4px 12px #0000004d;--size-control-height:32px;--size-control-height-sm:26px;--size-checkbox:13px;--size-switch-width:28px;--size-switch-height:13px;--size-switch-button:10px;--size-header-height:40px;--size-scrollbar:5px;--size-icon-sm:14px;--size-icon-base:18px;--z-index-dropdown:10;--z-index-modal:100;--transition-duration-fast:.2s;--transition-duration-normal:.3s}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.\!start{inset-inline-start:var(--spacing)!important}.start{inset-inline-start:var(--spacing)}.\!end{inset-inline-end:var(--spacing)!important}.end{inset-inline-end:var(--spacing)}.top-full{top:100%}.right-4{right:var(--spacing-4)}.bottom-4{bottom:var(--spacing-4)}.left-0{left:var(--spacing-0)}.z-20{z-index:20}.z-40{z-index:40}.z-\[1000\]{z-index:1000}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing-1)}.mt-2{margin-top:var(--spacing-2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:var(--spacing-4)}.mr-1{margin-right:var(--spacing-1)}.mb-0{margin-bottom:var(--spacing-0)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-2{margin-bottom:var(--spacing-2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-5{height:calc(var(--spacing) * 5)}.h-64{height:calc(var(--spacing) * 64)}.h-screen{height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:var(--spacing-8)}.w-full{width:100%}.w-max{width:max-content}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:var(--spacing-0)}.min-w-72{min-width:calc(var(--spacing) * 72)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-help{cursor:help}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_32px\]{grid-template-columns:1fr 32px}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing-1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:var(--spacing-2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:var(--spacing-4)}.gap-6{gap:var(--spacing-6)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing-2) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing-2) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:var(--spacing-4)}.gap-y-1{row-gap:var(--spacing-1)}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-base{border-radius:var(--radius-base)}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-border{border-color:var(--color-border)}.border-error\/30{border-color:#ff53534d}@supports (color:color-mix(in lab,red,red)){.border-error\/30{border-color:color-mix(in oklab,var(--color-error) 30%,transparent)}}.border-info\/40{border-color:#005fb866}@supports (color:color-mix(in lab,red,red)){.border-info\/40{border-color:color-mix(in oklab,var(--color-info) 40%,transparent)}}.border-primary\/30{border-color:#005fb84d}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,var(--color-primary) 30%,transparent)}}.border-success\/30{border-color:#71e0714d}@supports (color:color-mix(in lab,red,red)){.border-success\/30{border-color:color-mix(in oklab,var(--color-success) 30%,transparent)}}.border-success\/40{border-color:#71e07166}@supports (color:color-mix(in lab,red,red)){.border-success\/40{border-color:color-mix(in oklab,var(--color-success) 40%,transparent)}}.border-warning\/30{border-color:#ff98004d}@supports (color:color-mix(in lab,red,red)){.border-warning\/30{border-color:color-mix(in oklab,var(--color-warning) 30%,transparent)}}.bg-error\/10{background-color:#ff53531a}@supports (color:color-mix(in lab,red,red)){.bg-error\/10{background-color:color-mix(in oklab,var(--color-error) 10%,transparent)}}.bg-info\/10{background-color:#005fb81a}@supports (color:color-mix(in lab,red,red)){.bg-info\/10{background-color:color-mix(in oklab,var(--color-info) 10%,transparent)}}.bg-primary\/10{background-color:#005fb81a}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-muted{background-color:var(--color-success-muted)}.bg-success\/10{background-color:#71e0711a}@supports (color:color-mix(in lab,red,red)){.bg-success\/10{background-color:color-mix(in oklab,var(--color-success) 10%,transparent)}}.bg-surface{background-color:var(--color-surface)}.bg-surface-alt{background-color:var(--color-surface-alt)}.bg-surface-elevated{background-color:var(--color-surface-elevated)}.bg-warning{background-color:var(--color-warning)}.bg-warning\/10{background-color:#ff98001a}@supports (color:color-mix(in lab,red,red)){.bg-warning\/10{background-color:color-mix(in oklab,var(--color-warning) 10%,transparent)}}.p-0{padding:var(--spacing-0)}.p-3{padding:calc(var(--spacing) * 3)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing-1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:var(--spacing-2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-on-surface{color:var(--color-on-surface)}.text-on-surface-disabled{color:var(--color-on-surface-disabled)}.text-on-surface-hint{color:var(--color-on-surface-hint)}.text-on-surface-secondary{color:var(--color-on-surface-secondary)}.text-primary{color:var(--color-primary)}.text-success{color:var(--color-success)}.text-warning{color:var(--color-warning)}.uppercase{text-transform:uppercase}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 8px 8px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:block:is(:where(.group):hover *){display:block}.group-hover\:flex:is(:where(.group):hover *){display:flex}}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:bg-surface-hover:hover{background-color:var(--color-surface-hover)}.hover\:opacity-100:hover{opacity:1}}@media(min-width:40rem){.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-\[1fr_120px\]{grid-template-columns:1fr 120px}}@media(min-width:64rem){.lg\:fixed{position:fixed}.lg\:top-0{top:var(--spacing-0)}.lg\:left-0{left:var(--spacing-0)}.lg\:ml-56{margin-left:calc(var(--spacing) * 56)}.lg\:h-screen{height:100vh}.lg\:w-56{width:calc(var(--spacing) * 56)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.lg\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}}*,:before,:after{font-family:Pretendard,sans-serif}html,body,#root{height:100%;margin:0;padding:0}body{font-family:Pretendard,sans-serif;font-size:var(--font-size-base);line-height:var(--line-height-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:var(--color-surface);color:var(--color-on-surface)}button,input,select,textarea,label,span,a{font-size:inherit;color:inherit;font-family:inherit}button,[role=button]{cursor:pointer;line-height:1}input,select,textarea{height:var(--size-control-height);padding:0 var(--spacing-12);font-size:var(--font-size-base);background-color:var(--color-surface-input);border:1px solid var(--color-border);border-radius:var(--radius-base);color:inherit;line-height:1;transition:border-color .2s,background-color .2s}input:hover,select:hover,textarea:hover{border-color:var(--color-on-surface-disabled)}input::placeholder,textarea::placeholder{color:var(--color-on-surface-muted)}input:focus,select:focus,textarea:focus{border-color:var(--color-border-focus);outline:none}input:disabled,select:disabled,textarea:disabled{opacity:.5}input:disabled:hover,select:disabled:hover,textarea:disabled:hover{border-color:var(--color-border)}textarea{height:auto;padding:var(--spacing-8) var(--spacing-12);line-height:var(--line-height-normal)}input[type=checkbox]{width:var(--size-checkbox);height:var(--size-checkbox);min-width:var(--size-checkbox);min-height:var(--size-checkbox);accent-color:var(--color-primary);border-radius:var(--radius-base);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-surface-secondary);border:1.5px solid var(--color-border);cursor:pointer;vertical-align:middle;flex-shrink:0;margin:0;padding:0;position:relative;transform:translateY(.5px)}input[type=checkbox]:checked{background-color:var(--color-primary);border-color:var(--color-primary)}input[type=checkbox]:checked:after{content:"";border:1.5px solid #fff;border-width:0 1.5px 1.5px 0;width:4px;height:7px;position:absolute;top:1px;left:3px;transform:rotate(45deg)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a3a3a3' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");background-position:right .75rem center;background-repeat:no-repeat;background-size:1rem;padding-right:2.5rem}code,pre{font-family:var(--font-family-mono)}.material-symbols-outlined{font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 20;font-size:var(--size-icon-base);vertical-align:middle;justify-content:center;align-items:center;line-height:1;display:inline-flex}.material-symbols-outlined.icon-sm{font-size:var(--size-icon-sm);font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 14}.material-symbols-outlined.icon-lg{font-size:22px}::-webkit-scrollbar{width:var(--size-scrollbar);height:var(--size-scrollbar)}::-webkit-scrollbar-track{background:var(--color-scrollbar-track)}::-webkit-scrollbar-thumb{background:var(--color-scrollbar-thumb);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--color-scrollbar-thumb-hover)}@keyframes slide-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-slide-in{animation:slide-in var(--transition-duration-normal) ease-out}.animate-fade-in{animation:fade-in var(--transition-duration-fast) ease}.btn{justify-content:center;align-items:center;gap:var(--spacing-4);height:var(--size-control-height);padding:0 var(--spacing-16);font-size:var(--font-size-base);border-radius:var(--radius-base);cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;color:var(--color-on-surface);background-color:#0000;border:none;font-weight:500;line-height:1;transition:all .2s;display:inline-flex}.btn:hover{background-color:var(--color-surface-hover)}.btn:disabled{opacity:.4;pointer-events:none}.btn-primary{background-color:var(--color-primary);color:var(--color-on-primary)}.btn-primary:hover{background-color:var(--color-primary-hover)}.btn-primary-outline{background-color:var(--color-primary);color:var(--color-on-surface)}.btn-primary-outline:hover{background-color:var(--color-primary-hover)}.btn-danger{background-color:var(--color-danger);color:var(--color-on-surface)}.btn-danger:hover{background-color:var(--color-error-light)}.btn-success{color:var(--color-success);border:1px solid var(--color-success);background:0 0}.btn-success:hover{background-color:var(--color-success-muted)}.btn-ghost{color:var(--color-on-surface-tertiary);background-color:var(--color-surface-input);border:1px solid var(--color-border)}.btn-ghost:hover{background-color:var(--color-surface-hover);border-color:var(--color-on-surface-disabled)}.btn-sm{height:var(--size-control-height-sm);font-size:var(--font-size-sm);padding:0 var(--spacing-12)}.btn-icon{width:var(--size-control-height);padding:0}.btn-icon.btn-sm{width:var(--size-control-height-sm)}.input{height:var(--size-control-height);padding:0 var(--spacing-12);font-size:var(--font-size-base);background-color:var(--color-surface-input);border:1px solid var(--color-border);border-radius:var(--radius-base);color:var(--color-on-surface);line-height:1;transition:border-color .2s}.input:hover{border-color:var(--color-on-surface-disabled)}.input:focus{border-color:var(--color-border-focus);outline:none}.input::placeholder{color:var(--color-on-surface-muted)}.input:disabled{opacity:.5}.input:disabled:hover{border-color:var(--color-border)}.input-full{width:100%}.label{font-size:var(--font-size-base);color:var(--color-on-surface-secondary);margin-bottom:var(--spacing-8);font-weight:500;line-height:1;display:block}.checkbox-label{align-items:center;gap:var(--spacing-8);cursor:pointer;font-size:var(--font-size-base);color:var(--color-on-surface);line-height:1;display:inline-flex}.badge{align-items:center;gap:var(--spacing-6);padding:var(--spacing-4) var(--spacing-8);border-radius:var(--radius-base);border:1px solid var(--color-border);background-color:var(--color-surface-elevated);font-size:var(--font-size-sm);white-space:nowrap;-webkit-user-select:none;user-select:none;color:var(--color-on-surface-secondary);font-weight:500;line-height:1;display:inline-flex}.badge-success{background-color:var(--color-success-muted);color:var(--color-success);border-color:#71e0714d}.badge-error{background-color:var(--color-error-muted);color:var(--color-error);border-color:#ff53534d}.badge-warning{background-color:var(--color-warning-muted);color:var(--color-warning);border-color:#ff98004d}.badge-primary{color:var(--color-on-surface);background-color:#006cd233;border-color:#006cd266}.badge-muted{color:var(--color-on-surface-disabled);background-color:#8080801a;border-color:#80808033}.page-title{font-size:var(--font-size-lg);color:var(--color-on-surface);font-weight:600;line-height:1}.card-title{font-size:var(--font-size-md);color:var(--color-on-surface);margin-bottom:var(--spacing-12);align-items:center;gap:var(--spacing-8);font-weight:600;line-height:1;display:flex}.section-title{font-size:var(--font-size-base);color:var(--color-on-surface);font-weight:600;line-height:1}.card{background-color:var(--color-surface-alt);border:1px solid var(--color-border);border-radius:var(--radius-base);padding:var(--spacing-20);transition:border-color .2s}.dash-field-box{min-height:var(--size-control-height);background-color:var(--color-surface-alt);border:1px solid var(--color-border);border-radius:var(--radius-base);padding:0 var(--spacing-12);font-size:var(--font-size-base);word-break:break-all;line-height:var(--line-height-normal);align-items:center;display:flex}details.card{padding:0}details.card>summary{padding:var(--spacing-20);border-radius:var(--radius-base);cursor:pointer;transition:background-color .2s}details.card>summary:hover{background-color:var(--color-surface-hover-block)}details.card[open]>summary{border-radius:var(--radius-base) var(--radius-base) 0 0}.form-card{background-color:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-base);padding:var(--spacing-32)}.form-card-header{align-items:center;gap:var(--spacing-8);color:var(--color-on-surface-secondary);text-transform:uppercase;letter-spacing:.08em;margin-bottom:var(--spacing-20);font-size:11px;font-weight:700;line-height:1;display:flex}.form-label{font-size:var(--font-size-sm);color:var(--color-on-surface-tertiary);text-transform:uppercase;letter-spacing:.06em;margin-bottom:var(--spacing-8);font-weight:600;line-height:1;display:block}details.card>:not(summary){padding:0 var(--spacing-20) var(--spacing-20)}.modal-overlay{z-index:var(--z-index-modal);background-color:#00000080;justify-content:center;align-items:center;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}.modal{background-color:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:var(--radius-base);padding:var(--spacing-16);box-shadow:var(--shadow-xl);width:100%;max-width:400px}.modal-title{font-size:var(--font-size-lg);color:var(--color-on-surface);margin-bottom:var(--spacing-8);font-weight:600}.modal-body{font-size:var(--font-size-base);color:var(--color-on-surface-secondary);margin-bottom:var(--spacing-16)}.modal-footer{justify-content:flex-end;gap:var(--spacing-8);display:flex}.toast{align-items:center;gap:var(--spacing-8);padding:var(--spacing-12) var(--spacing-16);border-radius:var(--radius-base);border:1px solid var(--color-border);background-color:var(--color-surface-elevated);color:var(--color-on-surface);font-size:var(--font-size-base);min-width:300px;box-shadow:var(--shadow-xl);display:flex}.toast-success{color:var(--color-success);border-color:#71e0714d}.toast-error{color:var(--color-error);border-color:#ff53534d}.switch{width:var(--size-switch-width);height:var(--size-switch-height);background-color:var(--color-switch-off);border:1px solid var(--color-switch-border);cursor:pointer;border-radius:9999px;flex-shrink:0;transition:all .2s;position:relative}.switch:hover{background-color:#ffffff40}.switch.active{background-color:var(--color-switch-on);border-color:var(--color-switch-border-active)}.switch.active:hover{background-color:var(--color-switch-on-hover)}.switch:hover .switch-thumb{background-color:var(--color-on-surface-tertiary)}.switch.active:hover .switch-thumb{background-color:#fff}.switch-thumb{width:var(--size-switch-button);height:var(--size-switch-button);background-color:var(--color-switch-thumb);box-shadow:var(--shadow-switch);border-radius:9999px;transition:all .2s;position:absolute;top:1px;left:2px}.switch.active .switch-thumb{background-color:var(--color-switch-thumb-active);left:auto;right:2px}.side{background-color:var(--color-surface-alt);height:100%;font-size:var(--font-size-base);flex-direction:column;line-height:1;display:flex}.side-header{align-items:center;gap:var(--spacing-6);height:41px;min-height:41px;padding:0 var(--spacing-16);border-bottom:1px solid var(--color-border);font-size:var(--font-size-sm);color:var(--color-on-surface);flex-shrink:0;font-weight:600;display:flex}.side-body{background-color:var(--color-surface-alt);flex-direction:column;flex:1;min-height:0;display:flex}.side-section-title{align-items:center;gap:var(--spacing-4);height:22px;padding:0 var(--spacing-12);border-bottom:1px solid var(--color-border);background-color:var(--color-surface);font-size:var(--font-size-base);color:var(--color-on-surface-secondary);flex-shrink:0;font-weight:600;display:flex}.side-item{align-items:center;gap:var(--spacing-6);height:28px;padding:0 var(--spacing-12);border-radius:var(--radius-base);cursor:pointer;font-size:var(--font-size-base);color:var(--color-on-surface-secondary);transition:background-color .15s;display:flex}.side-item:hover{background-color:var(--color-surface-hover-block)}.side-item.active{background-color:var(--color-surface-active);color:var(--color-on-primary);font-weight:600}.side-children{padding:0}.side-item-actions{padding-left:var(--spacing-4);flex-shrink:0;align-items:center;gap:2px;margin-left:auto;display:flex}.side-item-actions>button{border-radius:var(--radius-base);justify-content:center;align-items:center;width:20px;height:20px;transition:background-color .15s;display:inline-flex}.side-item-actions>button:hover{background-color:var(--color-surface-hover)}.side-status-dot{width:8px;height:8px;margin-right:var(--spacing-4);border-radius:50%;flex-shrink:0}.side-count-badge{border-radius:var(--radius-base);background-color:var(--color-error);color:#fff;min-width:16px;height:16px;font-size:var(--font-size-xs);flex-shrink:0;justify-content:center;align-items:center;padding:0 4px;font-weight:600;line-height:1;display:inline-flex}.side-item.active .side-count-badge{color:var(--color-on-primary);background-color:#ffffff26}.page{flex-direction:column;height:100%;display:flex}.page-header{height:var(--size-header-height);padding:0 var(--spacing-40);background-color:var(--color-surface-alt);flex-shrink:0;justify-content:space-between;align-items:center;display:flex}.page-body{height:100%;padding:var(--spacing-32) var(--spacing-40) var(--spacing-40);flex:1;overflow-y:auto}.page-body-inner{flex-direction:column;max-width:960px;min-height:100%;margin:0 auto;display:flex}.page-body-full{height:100%;padding:var(--spacing-32) var(--spacing-40) var(--spacing-40);flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.page-body-full>.page-body-inner{flex:1;min-height:0}.page-title-group{margin-bottom:var(--spacing-24);flex-shrink:0}.page-title-group .page-title{margin:0}.page-desc{font-size:var(--font-size-sm);color:var(--color-on-surface-secondary);margin-top:var(--spacing-8);line-height:var(--line-height-normal)}.tab-bar{gap:var(--spacing-4);display:flex}.tab-item{align-items:center;gap:var(--spacing-6);padding:var(--spacing-8) var(--spacing-12);font-size:var(--font-size-sm);color:var(--color-on-surface-tertiary);white-space:nowrap;border-bottom:2px solid #0000;font-weight:500;text-decoration:none;transition:color .2s,border-color .2s;display:inline-flex}.tab-item:hover{color:var(--color-on-surface-secondary);border-color:var(--color-border-medium)}.tab-item.active,.tab-item[aria-current=page]{color:var(--color-on-surface);border-color:var(--color-primary)}.table{border-collapse:collapse;width:100%;font-size:var(--font-size-sm)}.table thead{z-index:1;position:sticky;top:0}.table th{padding:var(--spacing-8) var(--spacing-12);text-align:left;color:var(--color-on-surface-secondary);white-space:nowrap;background-color:var(--color-surface);border-bottom:1px solid var(--color-border);font-weight:600}.table td{padding:var(--spacing-8) var(--spacing-12);color:var(--color-on-surface);border-bottom:1px solid var(--color-border)}.table td.mono{font-family:var(--font-family-mono);font-size:var(--font-size-sm)}.table tbody tr{cursor:pointer}.table tbody tr:hover{background-color:var(--color-surface-hover)}.table-card{background-color:var(--color-surface-alt);border:1px solid var(--color-border);border-radius:var(--radius-base);flex-direction:column;flex:1;min-height:0;padding:0;display:flex;overflow:hidden}.table-card-body{flex:1;min-height:0;overflow-y:auto}.form-field{gap:var(--spacing-8);flex-direction:column;display:flex}.form-field>.form-label{margin-bottom:0}.form-row{gap:var(--spacing-12) var(--spacing-16);grid-template-columns:repeat(2,1fr);display:grid}@media(max-width:1024px){.form-row{grid-template-columns:1fr}}.input-group{width:100%;display:flex}.input-group>input,.input-group>select{flex:1;min-width:0}.input-group>input:first-child{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon{height:var(--size-control-height);padding:0 var(--spacing-12);font-size:var(--font-size-base);color:var(--color-on-surface-tertiary);background-color:var(--color-surface-input);border:1px solid var(--color-border);border-radius:0 var(--radius-base) var(--radius-base) 0;border-left:none;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.switch-row{justify-content:space-between;align-items:center;gap:var(--spacing-8);padding:var(--spacing-12);border-radius:var(--radius-base);border:1px solid var(--color-border);background-color:var(--color-surface);display:flex}.switch-row-label{font-size:var(--font-size-sm);color:var(--color-on-surface);font-weight:500}.switch-row-desc{font-size:var(--font-size-xs);color:var(--color-on-surface-hint);margin-top:var(--spacing-4)}.tag{padding:var(--spacing-2) var(--spacing-8);border-radius:var(--radius-base);font-size:var(--font-size-xs);white-space:nowrap;color:#fff;background-color:var(--color-on-surface-disabled);font-weight:700;line-height:1.4;display:inline-block}.tag-match{background-color:var(--color-primary)}.tag-trigger{background-color:var(--color-warning)}.tag-resolve{background-color:var(--color-success);color:var(--color-on-success)}.tag-error,.tag-live{background-color:var(--color-error)}.modal-sm{max-width:400px}.modal-md{max-width:480px}.modal-lg{max-width:720px}.modal-header{margin-bottom:var(--spacing-16);justify-content:space-between;align-items:center;display:flex}.modal-header .modal-title{align-items:center;gap:var(--spacing-8);margin:0;display:flex}.data-list{gap:var(--spacing-8) var(--spacing-24);font-size:var(--font-size-sm);flex-wrap:wrap;display:flex}.data-list-label{color:var(--color-on-surface-tertiary);margin-right:var(--spacing-8)}.empty-state{padding:var(--spacing-24);text-align:center;color:var(--color-on-surface-disabled);font-size:var(--font-size-sm)}.error-box{padding:var(--spacing-8) var(--spacing-12);border-radius:var(--radius-base);background-color:var(--color-error-muted);color:var(--color-error);font-size:var(--font-size-sm)}.video-container{aspect-ratio:16/9;border-radius:var(--radius-base);background-color:#000;width:100%;position:relative;overflow:hidden}.video-container>video{object-fit:contain;width:100%;height:100%}.pagination{justify-content:center;align-items:center;gap:var(--spacing-8);padding:var(--spacing-8) var(--spacing-12);border-top:1px solid var(--color-border);flex-shrink:0;display:flex}.pagination-info{font-size:var(--font-size-sm);color:var(--color-on-surface-disabled)}.pagination-current{font-size:var(--font-size-sm);color:var(--color-on-surface-secondary)}.list-item{align-items:center;gap:var(--spacing-8);padding:var(--spacing-8) var(--spacing-12);border-radius:var(--radius-base);border:1px solid var(--color-border);transition:border-color .15s;display:flex}.list-item:hover{border-color:var(--color-on-surface-disabled)}.list-item-body{flex:1;min-width:0}.list-item-title{font-weight:600;font-size:var(--font-size-base)}.list-item-subtitle{font-size:var(--font-size-sm);color:var(--color-on-surface-tertiary);font-family:var(--font-family-mono);margin-top:var(--spacing-2);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.list-item-meta{font-size:var(--font-size-xs);color:var(--color-on-surface-disabled);margin-top:var(--spacing-2)}.list-item-actions{gap:var(--spacing-4);flex-shrink:0;display:flex}.card-header{justify-content:space-between;align-items:center;display:flex}.card-header .card-title{margin-bottom:0}.card-desc{font-size:var(--font-size-xs);color:var(--color-on-surface-hint);margin-top:var(--spacing-8)}.divider{border:none;border-top:1px solid var(--color-border);margin:var(--spacing-12) 0}.dropdown-menu{z-index:var(--z-index-dropdown);background-color:var(--color-dropdown);border:1px solid var(--color-dropdown-border);border-radius:var(--radius-base);max-height:200px;box-shadow:var(--shadow-dropdown);margin-top:var(--spacing-4);position:absolute;top:100%;left:0;right:0;overflow-y:auto}.dropdown-option{padding:var(--spacing-8) var(--spacing-12);font-size:var(--font-size-sm);cursor:pointer;transition:background-color .1s}.dropdown-option:hover{background-color:var(--color-dropdown-option-hover)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}</style>
</head>
<body>
<div id="root"></div>
</body>
</html>