specweave 1.0.264 → 1.0.266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +27 -31
- package/bin/specweave.js +39 -10
- package/dist/dashboard/assets/index-ChpKRRZZ.js +11 -0
- package/dist/dashboard/assets/index-Xlk5xDzZ.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/src/cli/commands/docs.d.ts +4 -0
- package/dist/src/cli/commands/docs.d.ts.map +1 -1
- package/dist/src/cli/commands/docs.js +83 -59
- package/dist/src/cli/commands/docs.js.map +1 -1
- package/dist/src/core/living-docs/content-distributor.js +1 -1
- package/dist/src/core/living-docs/content-distributor.js.map +1 -1
- package/dist/src/core/living-docs/scaffolding/template-engine.js +1 -1
- package/dist/src/core/living-docs/scaffolding/template-engine.js.map +1 -1
- package/dist/src/core/living-docs/sync-helpers/generators.js +1 -1
- package/dist/src/core/living-docs/sync-helpers/generators.js.map +1 -1
- package/dist/src/core/llm/consent.d.ts +33 -0
- package/dist/src/core/llm/consent.d.ts.map +1 -0
- package/dist/src/core/llm/consent.js +96 -0
- package/dist/src/core/llm/consent.js.map +1 -0
- package/dist/src/core/llm/index.d.ts +2 -0
- package/dist/src/core/llm/index.d.ts.map +1 -1
- package/dist/src/core/llm/index.js +2 -0
- package/dist/src/core/llm/index.js.map +1 -1
- package/dist/src/core/llm/provider-factory.d.ts +2 -0
- package/dist/src/core/llm/provider-factory.d.ts.map +1 -1
- package/dist/src/core/llm/provider-factory.js +9 -0
- package/dist/src/core/llm/provider-factory.js.map +1 -1
- package/dist/src/core/llm/types.d.ts +17 -0
- package/dist/src/core/llm/types.d.ts.map +1 -1
- package/dist/src/core/llm/types.js.map +1 -1
- package/dist/src/core/skills/skill-judge.d.ts +2 -0
- package/dist/src/core/skills/skill-judge.d.ts.map +1 -1
- package/dist/src/core/skills/skill-judge.js +15 -2
- package/dist/src/core/skills/skill-judge.js.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.d.ts.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.js +28 -5
- package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
- package/dist/src/dashboard/server/data/claude-log-parser.d.ts +14 -10
- package/dist/src/dashboard/server/data/claude-log-parser.d.ts.map +1 -1
- package/dist/src/dashboard/server/data/claude-log-parser.js +83 -15
- package/dist/src/dashboard/server/data/claude-log-parser.js.map +1 -1
- package/dist/src/dashboard/server/data/cost-aggregator.d.ts +9 -1
- package/dist/src/dashboard/server/data/cost-aggregator.d.ts.map +1 -1
- package/dist/src/dashboard/server/data/cost-aggregator.js +10 -2
- package/dist/src/dashboard/server/data/cost-aggregator.js.map +1 -1
- package/dist/src/dashboard/server/data/dashboard-data-aggregator.d.ts.map +1 -1
- package/dist/src/dashboard/server/data/dashboard-data-aggregator.js +1 -0
- package/dist/src/dashboard/server/data/dashboard-data-aggregator.js.map +1 -1
- package/dist/src/dashboard/types.d.ts +19 -1
- package/dist/src/dashboard/types.d.ts.map +1 -1
- package/dist/src/importers/import-coordinator.js +8 -8
- package/dist/src/importers/import-coordinator.js.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.d.ts +2 -2
- package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.js +223 -69
- package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +7 -6
- package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/docusaurus-setup.js +121 -59
- package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
- package/dist/src/utils/docs-preview/index.d.ts +3 -1
- package/dist/src/utils/docs-preview/index.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/index.js +2 -1
- package/dist/src/utils/docs-preview/index.js.map +1 -1
- package/dist/src/utils/docs-preview/project-detector.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/project-detector.js +26 -7
- package/dist/src/utils/docs-preview/project-detector.js.map +1 -1
- package/dist/src/utils/docs-preview/server-manager.d.ts +4 -0
- package/dist/src/utils/docs-preview/server-manager.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/server-manager.js +102 -7
- package/dist/src/utils/docs-preview/server-manager.js.map +1 -1
- package/dist/src/utils/docs-preview/types.d.ts +12 -0
- package/dist/src/utils/docs-preview/types.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/types.js +15 -1
- package/dist/src/utils/docs-preview/types.js.map +1 -1
- package/package.json +1 -6
- package/plugins/specweave/skills/done/SKILL.md +5 -4
- package/plugins/specweave/skills/judge-llm/SKILL.md +18 -0
- package/plugins/specweave-docs/skills/preview/SKILL.md +13 -9
- package/dist/dashboard/assets/index-Cv1XUAKk.css +0 -1
- package/dist/dashboard/assets/index-DHOztQSu.js +0 -11
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(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"&&c(g)}).observe(document,{childList:!0,subtree:!0});function u(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 c(d){if(d.ep)return;d.ep=!0;const m=u(d);fetch(d.href,m)}})();var Gc={exports:{}},Yn={};var x0;function Uh(){if(x0)return Yn;x0=1;var r=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function u(c,d,m){var g=null;if(m!==void 0&&(g=""+m),d.key!==void 0&&(g=""+d.key),"key"in d){m={};for(var v in d)v!=="key"&&(m[v]=d[v])}else m=d;return d=m.ref,{$$typeof:r,type:c,key:g,ref:d!==void 0?d:null,props:m}}return Yn.Fragment=o,Yn.jsx=u,Yn.jsxs=u,Yn}var h0;function Lh(){return h0||(h0=1,Gc.exports=Uh()),Gc.exports}var n=Lh(),Xc={exports:{}},ae={};var g0;function Hh(){if(g0)return ae;g0=1;var r=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),y=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 X={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,C={};function G(S,q,k){this.props=S,this.context=q,this.refs=C,this.updater=k||X}G.prototype.isReactComponent={},G.prototype.setState=function(S,q){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,q,"setState")},G.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function H(){}H.prototype=G.prototype;function V(S,q,k){this.props=S,this.context=q,this.refs=C,this.updater=k||X}var ce=V.prototype=new H;ce.constructor=V,w(ce,G.prototype),ce.isPureReactComponent=!0;var te=Array.isArray;function $(){}var Y={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function Q(S,q,k){var J=k.ref;return{$$typeof:r,type:S,key:q,ref:J!==void 0?J:null,props:k}}function Ce(S,q){return Q(S.type,q,S.props)}function ie(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function Oe(S){var q={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(k){return q[k]})}var Xt=/\/+/g;function Qt(S,q){return typeof S=="object"&&S!==null&&S.key!=null?Oe(""+S.key):q.toString(36)}function wt(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then($,$):(S.status="pending",S.then(function(q){S.status==="pending"&&(S.status="fulfilled",S.value=q)},function(q){S.status==="pending"&&(S.status="rejected",S.reason=q)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function U(S,q,k,J,ne){var ue=typeof S;(ue==="undefined"||ue==="boolean")&&(S=null);var ve=!1;if(S===null)ve=!0;else switch(ue){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(S.$$typeof){case r:case o:ve=!0;break;case j:return ve=S._init,U(ve(S._payload),q,k,J,ne)}}if(ve)return ne=ne(S),ve=J===""?"."+Qt(S,0):J,te(ne)?(k="",ve!=null&&(k=ve.replace(Xt,"$&/")+"/"),U(ne,q,k,"",function(kl){return kl})):ne!=null&&(ie(ne)&&(ne=Ce(ne,k+(ne.key==null||S&&S.key===ne.key?"":(""+ne.key).replace(Xt,"$&/")+"/")+ve)),q.push(ne)),1;ve=0;var Ie=J===""?".":J+":";if(te(S))for(var Le=0;Le<S.length;Le++)J=S[Le],ue=Ie+Qt(J,Le),ve+=U(J,q,k,ue,ne);else if(Le=D(S),typeof Le=="function")for(S=Le.call(S),Le=0;!(J=S.next()).done;)J=J.value,ue=Ie+Qt(J,Le++),ve+=U(J,q,k,ue,ne);else if(ue==="object"){if(typeof S.then=="function")return U(wt(S),q,k,J,ne);throw q=String(S),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ve}function Z(S,q,k){if(S==null)return S;var J=[],ne=0;return U(S,J,"","",function(ue){return q.call(k,ue,ne++)}),J}function ee(S){if(S._status===-1){var q=S._result;q=q(),q.then(function(k){(S._status===0||S._status===-1)&&(S._status=1,S._result=k)},function(k){(S._status===0||S._status===-1)&&(S._status=2,S._result=k)}),S._status===-1&&(S._status=0,S._result=q)}if(S._status===1)return S._result.default;throw S._result}var Ne=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=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(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Ae={map:Z,forEach:function(S,q,k){Z(S,function(){q.apply(this,arguments)},k)},count:function(S){var q=0;return Z(S,function(){q++}),q},toArray:function(S){return Z(S,function(q){return q})||[]},only:function(S){if(!ie(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return ae.Activity=y,ae.Children=Ae,ae.Component=G,ae.Fragment=u,ae.Profiler=d,ae.PureComponent=V,ae.StrictMode=c,ae.Suspense=p,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,ae.__COMPILER_RUNTIME={__proto__:null,c:function(S){return Y.H.useMemoCache(S)}},ae.cache=function(S){return function(){return S.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(S,q,k){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var J=w({},S.props),ne=S.key;if(q!=null)for(ue in q.key!==void 0&&(ne=""+q.key),q)!F.call(q,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&q.ref===void 0||(J[ue]=q[ue]);var ue=arguments.length-2;if(ue===1)J.children=k;else if(1<ue){for(var ve=Array(ue),Ie=0;Ie<ue;Ie++)ve[Ie]=arguments[Ie+2];J.children=ve}return Q(S.type,ne,J)},ae.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},ae.createElement=function(S,q,k){var J,ne={},ue=null;if(q!=null)for(J in q.key!==void 0&&(ue=""+q.key),q)F.call(q,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=q[J]);var ve=arguments.length-2;if(ve===1)ne.children=k;else if(1<ve){for(var Ie=Array(ve),Le=0;Le<ve;Le++)Ie[Le]=arguments[Le+2];ne.children=Ie}if(S&&S.defaultProps)for(J in ve=S.defaultProps,ve)ne[J]===void 0&&(ne[J]=ve[J]);return Q(S,ue,ne)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(S){return{$$typeof:v,render:S}},ae.isValidElement=ie,ae.lazy=function(S){return{$$typeof:j,_payload:{_status:-1,_result:S},_init:ee}},ae.memo=function(S,q){return{$$typeof:h,type:S,compare:q===void 0?null:q}},ae.startTransition=function(S){var q=Y.T,k={};Y.T=k;try{var J=S(),ne=Y.S;ne!==null&&ne(k,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then($,Ne)}catch(ue){Ne(ue)}finally{q!==null&&k.types!==null&&(q.types=k.types),Y.T=q}},ae.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},ae.use=function(S){return Y.H.use(S)},ae.useActionState=function(S,q,k){return Y.H.useActionState(S,q,k)},ae.useCallback=function(S,q){return Y.H.useCallback(S,q)},ae.useContext=function(S){return Y.H.useContext(S)},ae.useDebugValue=function(){},ae.useDeferredValue=function(S,q){return Y.H.useDeferredValue(S,q)},ae.useEffect=function(S,q){return Y.H.useEffect(S,q)},ae.useEffectEvent=function(S){return Y.H.useEffectEvent(S)},ae.useId=function(){return Y.H.useId()},ae.useImperativeHandle=function(S,q,k){return Y.H.useImperativeHandle(S,q,k)},ae.useInsertionEffect=function(S,q){return Y.H.useInsertionEffect(S,q)},ae.useLayoutEffect=function(S,q){return Y.H.useLayoutEffect(S,q)},ae.useMemo=function(S,q){return Y.H.useMemo(S,q)},ae.useOptimistic=function(S,q){return Y.H.useOptimistic(S,q)},ae.useReducer=function(S,q,k){return Y.H.useReducer(S,q,k)},ae.useRef=function(S){return Y.H.useRef(S)},ae.useState=function(S){return Y.H.useState(S)},ae.useSyncExternalStore=function(S,q,k){return Y.H.useSyncExternalStore(S,q,k)},ae.useTransition=function(){return Y.H.useTransition()},ae.version="19.2.4",ae}var y0;function tu(){return y0||(y0=1,Xc.exports=Hh()),Xc.exports}var E=tu(),Qc={exports:{}},Gn={},Vc={exports:{}},Zc={};var p0;function Bh(){return p0||(p0=1,(function(r){function o(U,Z){var ee=U.length;U.push(Z);e:for(;0<ee;){var Ne=ee-1>>>1,Ae=U[Ne];if(0<d(Ae,Z))U[Ne]=Z,U[ee]=Ae,ee=Ne;else break e}}function u(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var Z=U[0],ee=U.pop();if(ee!==Z){U[0]=ee;e:for(var Ne=0,Ae=U.length,S=Ae>>>1;Ne<S;){var q=2*(Ne+1)-1,k=U[q],J=q+1,ne=U[J];if(0>d(k,ee))J<Ae&&0>d(ne,k)?(U[Ne]=ne,U[J]=ee,Ne=J):(U[Ne]=k,U[q]=ee,Ne=q);else if(J<Ae&&0>d(ne,ee))U[Ne]=ne,U[J]=ee,Ne=J;else break e}}return Z}function d(U,Z){var ee=U.sortIndex-Z.sortIndex;return ee!==0?ee:U.id-Z.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;r.unstable_now=function(){return m.now()}}else{var g=Date,v=g.now();r.unstable_now=function(){return g.now()-v}}var p=[],h=[],j=1,y=null,A=3,D=!1,X=!1,w=!1,C=!1,G=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function ce(U){for(var Z=u(h);Z!==null;){if(Z.callback===null)c(h);else if(Z.startTime<=U)c(h),Z.sortIndex=Z.expirationTime,o(p,Z);else break;Z=u(h)}}function te(U){if(w=!1,ce(U),!X)if(u(p)!==null)X=!0,$||($=!0,Oe());else{var Z=u(h);Z!==null&&wt(te,Z.startTime-U)}}var $=!1,Y=-1,F=5,Q=-1;function Ce(){return C?!0:!(r.unstable_now()-Q<F)}function ie(){if(C=!1,$){var U=r.unstable_now();Q=U;var Z=!0;try{e:{X=!1,w&&(w=!1,H(Y),Y=-1),D=!0;var ee=A;try{t:{for(ce(U),y=u(p);y!==null&&!(y.expirationTime>U&&Ce());){var Ne=y.callback;if(typeof Ne=="function"){y.callback=null,A=y.priorityLevel;var Ae=Ne(y.expirationTime<=U);if(U=r.unstable_now(),typeof Ae=="function"){y.callback=Ae,ce(U),Z=!0;break t}y===u(p)&&c(p),ce(U)}else c(p);y=u(p)}if(y!==null)Z=!0;else{var S=u(h);S!==null&&wt(te,S.startTime-U),Z=!1}}break e}finally{y=null,A=ee,D=!1}Z=void 0}}finally{Z?Oe():$=!1}}}var Oe;if(typeof V=="function")Oe=function(){V(ie)};else if(typeof MessageChannel<"u"){var Xt=new MessageChannel,Qt=Xt.port2;Xt.port1.onmessage=ie,Oe=function(){Qt.postMessage(null)}}else Oe=function(){G(ie,0)};function wt(U,Z){Y=G(function(){U(r.unstable_now())},Z)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return A},r.unstable_next=function(U){switch(A){case 1:case 2:case 3:var Z=3;break;default:Z=A}var ee=A;A=Z;try{return U()}finally{A=ee}},r.unstable_requestPaint=function(){C=!0},r.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ee=A;A=U;try{return Z()}finally{A=ee}},r.unstable_scheduleCallback=function(U,Z,ee){var Ne=r.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Ne+ee:Ne):ee=Ne,U){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=ee+Ae,U={id:j++,callback:Z,priorityLevel:U,startTime:ee,expirationTime:Ae,sortIndex:-1},ee>Ne?(U.sortIndex=ee,o(h,U),u(p)===null&&U===u(h)&&(w?(H(Y),Y=-1):w=!0,wt(te,ee-Ne))):(U.sortIndex=Ae,o(p,U),X||D||(X=!0,$||($=!0,Oe()))),U},r.unstable_shouldYield=Ce,r.unstable_wrapCallback=function(U){var Z=A;return function(){var ee=A;A=Z;try{return U.apply(this,arguments)}finally{A=ee}}}})(Zc)),Zc}var v0;function qh(){return v0||(v0=1,Vc.exports=Bh()),Vc.exports}var kc={exports:{}},Pe={};var b0;function Yh(){if(b0)return Pe;b0=1;var r=tu();function o(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)h+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var c={d:{f:u,r:function(){throw Error(o(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function m(p,h,j){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:y==null?null:""+y,children:p,containerInfo:h,implementation:j}}var g=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Pe.createPortal=function(p,h){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(o(299));return m(p,h,null,j)},Pe.flushSync=function(p){var h=g.T,j=c.p;try{if(g.T=null,c.p=2,p)return p()}finally{g.T=h,c.p=j,c.d.f()}},Pe.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,c.d.C(p,h))},Pe.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},Pe.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var j=h.as,y=v(j,h.crossOrigin),A=typeof h.integrity=="string"?h.integrity:void 0,D=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;j==="style"?c.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:A,fetchPriority:D}):j==="script"&&c.d.X(p,{crossOrigin:y,integrity:A,fetchPriority:D,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Pe.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var j=v(h.as,h.crossOrigin);c.d.M(p,{crossOrigin:j,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&c.d.M(p)},Pe.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var j=h.as,y=v(j,h.crossOrigin);c.d.L(p,j,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Pe.preloadModule=function(p,h){if(typeof p=="string")if(h){var j=v(h.as,h.crossOrigin);c.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:j,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else c.d.m(p)},Pe.requestFormReset=function(p){c.d.r(p)},Pe.unstable_batchedUpdates=function(p,h){return p(h)},Pe.useFormState=function(p,h,j){return g.H.useFormState(p,h,j)},Pe.useFormStatus=function(){return g.H.useHostTransitionStatus()},Pe.version="19.2.4",Pe}var j0;function Gh(){if(j0)return kc.exports;j0=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(o){console.error(o)}}return r(),kc.exports=Yh(),kc.exports}var N0;function Xh(){if(N0)return Gn;N0=1;var r=qh(),o=tu(),u=Gh();function c(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 v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(m(e)!==e)throw Error(c(188))}function h(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,l=t;;){var s=a.return;if(s===null)break;var i=s.alternate;if(i===null){if(l=s.return,l!==null){a=l;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===a)return p(s),e;if(i===l)return p(s),t;i=i.sibling}throw Error(c(188))}if(a.return!==l.return)a=s,l=i;else{for(var f=!1,x=s.child;x;){if(x===a){f=!0,a=s,l=i;break}if(x===l){f=!0,l=s,a=i;break}x=x.sibling}if(!f){for(x=i.child;x;){if(x===a){f=!0,a=i,l=s;break}if(x===l){f=!0,l=i,a=s;break}x=x.sibling}if(!f)throw Error(c(189))}}if(a.alternate!==l)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,A=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),V=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function Oe(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var Xt=Symbol.for("react.client.reference");function Qt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Xt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case G:return"Profiler";case C:return"StrictMode";case te:return"Suspense";case $:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case X:return"Portal";case V:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case ce:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:Qt(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return Qt(e(t))}catch{}}return null}var wt=Array.isArray,U=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},Ne=[],Ae=-1;function S(e){return{current:e}}function q(e){0>Ae||(e.current=Ne[Ae],Ne[Ae]=null,Ae--)}function k(e,t){Ae++,Ne[Ae]=e.current,e.current=t}var J=S(null),ne=S(null),ue=S(null),ve=S(null);function Ie(e,t){switch(k(ue,t),k(ne,e),k(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Bd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(J),k(J,e)}function Le(){q(J),q(ne),q(ue)}function kl(e){e.memoizedState!==null&&k(ve,e);var t=J.current,a=Bd(t,e.type);t!==a&&(k(ne,e),k(J,a))}function Jn(e){ne.current===e&&(q(J),q(ne)),ve.current===e&&(q(ve),Ln._currentValue=ee)}var Si,fu;function Ha(e){if(Si===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Si=t&&t[1]||"",fu=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Si+e+fu}var Ei=!1;function Ti(e,t){if(!e||Ei)return"";Ei=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(_){var R=_}Reflect.construct(e,[],B)}else{try{B.call()}catch(_){R=_}e.call(B.prototype)}}else{try{throw Error()}catch(_){R=_}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(_){if(_&&R&&typeof _.stack=="string")return[_.stack,R.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),f=i[0],x=i[1];if(f&&x){var b=f.split(`
|
|
4
|
+
`),z=x.split(`
|
|
5
|
+
`);for(s=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;if(l===b.length||s===z.length)for(l=b.length-1,s=z.length-1;1<=l&&0<=s&&b[l]!==z[s];)s--;for(;1<=l&&0<=s;l--,s--)if(b[l]!==z[s]){if(l!==1||s!==1)do if(l--,s--,0>s||b[l]!==z[s]){var O=`
|
|
6
|
+
`+b[l].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=l&&0<=s);break}}}finally{Ei=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ha(a):""}function dm(e,t){switch(e.tag){case 26:case 27:case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return e.child!==t&&t!==null?Ha("Suspense Fallback"):Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 15:return Ti(e.type,!1);case 11:return Ti(e.type.render,!1);case 1:return Ti(e.type,!0);case 31:return Ha("Activity");default:return""}}function du(e){try{var t="",a=null;do t+=dm(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var Ci=Object.prototype.hasOwnProperty,Ai=r.unstable_scheduleCallback,Mi=r.unstable_cancelCallback,mm=r.unstable_shouldYield,xm=r.unstable_requestPaint,ut=r.unstable_now,hm=r.unstable_getCurrentPriorityLevel,mu=r.unstable_ImmediatePriority,xu=r.unstable_UserBlockingPriority,Wn=r.unstable_NormalPriority,gm=r.unstable_LowPriority,hu=r.unstable_IdlePriority,ym=r.log,pm=r.unstable_setDisableYieldValue,$l=null,ot=null;function oa(e){if(typeof ym=="function"&&pm(e),ot&&typeof ot.setStrictMode=="function")try{ot.setStrictMode($l,e)}catch{}}var ft=Math.clz32?Math.clz32:jm,vm=Math.log,bm=Math.LN2;function jm(e){return e>>>=0,e===0?32:31-(vm(e)/bm|0)|0}var Fn=256,Pn=262144,In=4194304;function Ba(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 es(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var s=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~i,l!==0?s=Ba(l):(f&=x,f!==0?s=Ba(f):a||(a=x&~e,a!==0&&(s=Ba(a))))):(x=l&~i,x!==0?s=Ba(x):f!==0?s=Ba(f):a||(a=l&~e,a!==0&&(s=Ba(a)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:s}function Kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Nm(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 gu(){var e=In;return In<<=1,(In&62914560)===0&&(In=4194304),e}function zi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Jl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sm(e,t,a,l,s,i){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 x=e.entanglements,b=e.expirationTimes,z=e.hiddenUpdates;for(a=f&~a;0<a;){var O=31-ft(a),B=1<<O;x[O]=0,b[O]=-1;var R=z[O];if(R!==null)for(z[O]=null,O=0;O<R.length;O++){var _=R[O];_!==null&&(_.lane&=-536870913)}a&=~B}l!==0&&yu(e,l,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(f&~t))}function yu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ft(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function pu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-ft(a),s=1<<l;s&t|e[l]&t&&(e[l]|=t),a&=~s}}function vu(e,t){var a=t&-t;return a=(a&42)!==0?1:Ri(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ri(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 _i(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function bu(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:r0(e.type))}function ju(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var fa=Math.random().toString(36).slice(2),$e="__reactFiber$"+fa,at="__reactProps$"+fa,ll="__reactContainer$"+fa,wi="__reactEvents$"+fa,Em="__reactListeners$"+fa,Tm="__reactHandles$"+fa,Nu="__reactResources$"+fa,Wl="__reactMarker$"+fa;function Oi(e){delete e[$e],delete e[at],delete e[wi],delete e[Em],delete e[Tm]}function nl(e){var t=e[$e];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ll]||a[$e]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Zd(e);e!==null;){if(a=e[$e])return a;e=Zd(e)}return t}e=a,a=e.parentNode}return null}function sl(e){if(e=e[$e]||e[ll]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function il(e){var t=e[Nu];return t||(t=e[Nu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ze(e){e[Wl]=!0}var Su=new Set,Eu={};function qa(e,t){rl(e,t),rl(e+"Capture",t)}function rl(e,t){for(Eu[e]=t,e=0;e<t.length;e++)Su.add(t[e])}var Cm=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]*$"),Tu={},Cu={};function Am(e){return Ci.call(Cu,e)?!0:Ci.call(Tu,e)?!1:Cm.test(e)?Cu[e]=!0:(Tu[e]=!0,!1)}function ts(e,t,a){if(Am(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 as(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 Vt(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Au(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mm(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 s=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(f){a=""+f,i.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 Di(e){if(!e._valueTracker){var t=Au(e)?"checked":"value";e._valueTracker=Mm(e,t,""+e[t])}}function Mu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Au(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ls(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 zm=/[\n"\\]/g;function Nt(e){return e.replace(zm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ui(e,t,a,l,s,i,f,x){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=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Li(e,f,jt(t)):a!=null?Li(e,f,jt(a)):l!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+jt(x):e.removeAttribute("name")}function zu(e,t,a,l,s,i,f,x){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Di(e);return}a=a!=null?""+jt(a):"",t=t!=null?""+jt(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??s,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Di(e)}function Li(e,t,a){t==="number"&&ls(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function cl(e,t,a,l){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&l&&(e[a].defaultSelected=!0)}else{for(a=""+jt(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,l&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ru(e,t,a){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+jt(a):""}function _u(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(c(92));if(wt(l)){if(1<l.length)throw Error(c(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=jt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Di(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 Rm=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 wu(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||Rm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ou(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(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 s in t)l=t[s],t.hasOwnProperty(s)&&a[s]!==l&&wu(e,s,l)}else for(var i in t)t.hasOwnProperty(i)&&wu(e,i,t[i])}function Hi(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 _m=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"]]),wm=/^[\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 ns(e){return wm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Bi=null;function qi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,fl=null;function Du(e){var t=sl(e);if(t&&(e=t.stateNode)){var a=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ui(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="'+Nt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var s=l[at]||null;if(!s)throw Error(c(90));Ui(l,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Mu(l)}break e;case"textarea":Ru(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&cl(e,!!a.multiple,t,!1)}}}var Yi=!1;function Uu(e,t,a){if(Yi)return e(t,a);Yi=!0;try{var l=e(t);return l}finally{if(Yi=!1,(ol!==null||fl!==null)&&(Zs(),ol&&(t=ol,e=fl,fl=ol=null,Du(t),e)))for(t=0;t<e.length;t++)Du(e[t])}}function Pl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[at]||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(c(231,t,typeof a));return a}var kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gi=!1;if(kt)try{var Il={};Object.defineProperty(Il,"passive",{get:function(){Gi=!0}}),window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{Gi=!1}var da=null,Xi=null,ss=null;function Lu(){if(ss)return ss;var e,t=Xi,a=t.length,l,s="value"in da?da.value:da.textContent,i=s.length;for(e=0;e<a&&t[e]===s[e];e++);var f=a-e;for(l=1;l<=f&&t[a-l]===s[i-l];l++);return ss=s.slice(e,1<l?1-l:void 0)}function is(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 rs(){return!0}function Hu(){return!1}function lt(e){function t(a,l,s,i,f){this._reactName=a,this._targetInst=s,this.type=l,this.nativeEvent=i,this.target=f,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(i):i[x]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?rs:Hu,this.isPropagationStopped=Hu,this}return y(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=rs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=rs)},persist:function(){},isPersistent:rs}),t}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cs=lt(Ya),en=y({},Ya,{view:0,detail:0}),Om=lt(en),Qi,Vi,tn,us=y({},en,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ki,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!==tn&&(tn&&e.type==="mousemove"?(Qi=e.screenX-tn.screenX,Vi=e.screenY-tn.screenY):Vi=Qi=0,tn=e),Qi)},movementY:function(e){return"movementY"in e?e.movementY:Vi}}),Bu=lt(us),Dm=y({},us,{dataTransfer:0}),Um=lt(Dm),Lm=y({},en,{relatedTarget:0}),Zi=lt(Lm),Hm=y({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),Bm=lt(Hm),qm=y({},Ya,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ym=lt(qm),Gm=y({},Ya,{data:0}),qu=lt(Gm),Xm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qm={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"},Vm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vm[e])?!!t[e]:!1}function ki(){return Zm}var km=y({},en,{key:function(e){if(e.key){var t=Xm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ki,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$m=lt(km),Km=y({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yu=lt(Km),Jm=y({},en,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ki}),Wm=lt(Jm),Fm=y({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pm=lt(Fm),Im=y({},us,{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}),ex=lt(Im),tx=y({},Ya,{newState:0,oldState:0}),ax=lt(tx),lx=[9,13,27,32],$i=kt&&"CompositionEvent"in window,an=null;kt&&"documentMode"in document&&(an=document.documentMode);var nx=kt&&"TextEvent"in window&&!an,Gu=kt&&(!$i||an&&8<an&&11>=an),Xu=" ",Qu=!1;function Vu(e,t){switch(e){case"keyup":return lx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function sx(e,t){switch(e){case"compositionend":return Zu(t);case"keypress":return t.which!==32?null:(Qu=!0,Xu);case"textInput":return e=t.data,e===Xu&&Qu?null:e;default:return null}}function ix(e,t){if(dl)return e==="compositionend"||!$i&&Vu(e,t)?(e=Lu(),ss=Xi=da=null,dl=!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 Gu&&t.locale!=="ko"?null:t.data;default:return null}}var rx={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 ku(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rx[e.type]:t==="textarea"}function $u(e,t,a,l){ol?fl?fl.push(l):fl=[l]:ol=l,t=Ps(t,"onChange"),0<t.length&&(a=new cs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var ln=null,nn=null;function cx(e){_d(e,0)}function os(e){var t=Fl(e);if(Mu(t))return e}function Ku(e,t){if(e==="change")return t}var Ju=!1;if(kt){var Ki;if(kt){var Ji="oninput"in document;if(!Ji){var Wu=document.createElement("div");Wu.setAttribute("oninput","return;"),Ji=typeof Wu.oninput=="function"}Ki=Ji}else Ki=!1;Ju=Ki&&(!document.documentMode||9<document.documentMode)}function Fu(){ln&&(ln.detachEvent("onpropertychange",Pu),nn=ln=null)}function Pu(e){if(e.propertyName==="value"&&os(nn)){var t=[];$u(t,nn,e,qi(e)),Uu(cx,t)}}function ux(e,t,a){e==="focusin"?(Fu(),ln=t,nn=a,ln.attachEvent("onpropertychange",Pu)):e==="focusout"&&Fu()}function ox(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return os(nn)}function fx(e,t){if(e==="click")return os(t)}function dx(e,t){if(e==="input"||e==="change")return os(t)}function mx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dt=typeof Object.is=="function"?Object.is:mx;function sn(e,t){if(dt(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 s=a[l];if(!Ci.call(t,s)||!dt(e[s],t[s]))return!1}return!0}function Iu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eo(e,t){var a=Iu(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=Iu(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 ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ls(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=ls(e.document)}return t}function Wi(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 xx=kt&&"documentMode"in document&&11>=document.documentMode,ml=null,Fi=null,rn=null,Pi=!1;function lo(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Pi||ml==null||ml!==ls(l)||(l=ml,"selectionStart"in l&&Wi(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}),rn&&sn(rn,l)||(rn=l,l=Ps(Fi,"onSelect"),0<l.length&&(t=new cs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=ml)))}function Ga(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var xl={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionrun:Ga("Transition","TransitionRun"),transitionstart:Ga("Transition","TransitionStart"),transitioncancel:Ga("Transition","TransitionCancel"),transitionend:Ga("Transition","TransitionEnd")},Ii={},no={};kt&&(no=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Xa(e){if(Ii[e])return Ii[e];if(!xl[e])return e;var t=xl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in no)return Ii[e]=t[a];return e}var so=Xa("animationend"),io=Xa("animationiteration"),ro=Xa("animationstart"),hx=Xa("transitionrun"),gx=Xa("transitionstart"),yx=Xa("transitioncancel"),co=Xa("transitionend"),uo=new Map,er="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(" ");er.push("scrollEnd");function Ot(e,t){uo.set(e,t),qa(t,[e])}var fs=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)},St=[],hl=0,tr=0;function ds(){for(var e=hl,t=tr=hl=0;t<e;){var a=St[t];St[t++]=null;var l=St[t];St[t++]=null;var s=St[t];St[t++]=null;var i=St[t];if(St[t++]=null,l!==null&&s!==null){var f=l.pending;f===null?s.next=s:(s.next=f.next,f.next=s),l.pending=s}i!==0&&oo(a,s,i)}}function ms(e,t,a,l){St[hl++]=e,St[hl++]=t,St[hl++]=a,St[hl++]=l,tr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function ar(e,t,a,l){return ms(e,t,a,l),xs(e)}function Qa(e,t){return ms(e,null,null,t),xs(e)}function oo(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var s=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-ft(a),e=i.hiddenUpdates,l=e[s],l===null?e[s]=[t]:l.push(t),t.lane=a|536870912),i):null}function xs(e){if(50<zn)throw zn=0,fc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gl={};function px(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 mt(e,t,a,l){return new px(e,t,a,l)}function lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(e,t){var a=e.alternate;return a===null?(a=mt(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 fo(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 hs(e,t,a,l,s,i){var f=0;if(l=e,typeof e=="function")lr(e)&&(f=1);else if(typeof e=="string")f=Sh(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=mt(31,a,t,s),e.elementType=Q,e.lanes=i,e;case w:return Va(a.children,s,i,t);case C:f=8,s|=24;break;case G:return e=mt(12,a,t,s|2),e.elementType=G,e.lanes=i,e;case te:return e=mt(13,a,t,s),e.elementType=te,e.lanes=i,e;case $:return e=mt(19,a,t,s),e.elementType=$,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:f=10;break e;case H:f=9;break e;case ce:f=11;break e;case Y:f=14;break e;case F:f=16,l=null;break e}f=29,a=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=mt(f,a,t,s),t.elementType=e,t.type=l,t.lanes=i,t}function Va(e,t,a,l){return e=mt(7,e,l,t),e.lanes=a,e}function nr(e,t,a){return e=mt(6,e,null,t),e.lanes=a,e}function mo(e){var t=mt(18,null,null,0);return t.stateNode=e,t}function sr(e,t,a){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xo=new WeakMap;function Et(e,t){if(typeof e=="object"&&e!==null){var a=xo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:du(t)},xo.set(e,t),t)}return{value:e,source:t,stack:du(t)}}var yl=[],pl=0,gs=null,cn=0,Tt=[],Ct=0,ma=null,Ht=1,Bt="";function Kt(e,t){yl[pl++]=cn,yl[pl++]=gs,gs=e,cn=t}function ho(e,t,a){Tt[Ct++]=Ht,Tt[Ct++]=Bt,Tt[Ct++]=ma,ma=e;var l=Ht;e=Bt;var s=32-ft(l)-1;l&=~(1<<s),a+=1;var i=32-ft(t)+s;if(30<i){var f=s-s%5;i=(l&(1<<f)-1).toString(32),l>>=f,s-=f,Ht=1<<32-ft(t)+s|a<<s|l,Bt=i+e}else Ht=1<<i|a<<s|l,Bt=e}function ir(e){e.return!==null&&(Kt(e,1),ho(e,1,0))}function rr(e){for(;e===gs;)gs=yl[--pl],yl[pl]=null,cn=yl[--pl],yl[pl]=null;for(;e===ma;)ma=Tt[--Ct],Tt[Ct]=null,Bt=Tt[--Ct],Tt[Ct]=null,Ht=Tt[--Ct],Tt[Ct]=null}function go(e,t){Tt[Ct++]=Ht,Tt[Ct++]=Bt,Tt[Ct++]=ma,Ht=t.id,Bt=t.overflow,ma=e}var Ke=null,ze=null,he=!1,xa=null,At=!1,cr=Error(c(519));function ha(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw un(Et(t,e)),cr}function yo(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[$e]=e,t[at]=l,a){case"dialog":fe("cancel",t),fe("close",t);break;case"iframe":case"object":case"embed":fe("load",t);break;case"video":case"audio":for(a=0;a<_n.length;a++)fe(_n[a],t);break;case"source":fe("error",t);break;case"img":case"image":case"link":fe("error",t),fe("load",t);break;case"details":fe("toggle",t);break;case"input":fe("invalid",t),zu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":fe("invalid",t);break;case"textarea":fe("invalid",t),_u(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||Ud(t.textContent,a)?(l.popover!=null&&(fe("beforetoggle",t),fe("toggle",t)),l.onScroll!=null&&fe("scroll",t),l.onScrollEnd!=null&&fe("scrollend",t),l.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||ha(e,!0)}function po(e){for(Ke=e.return;Ke;)switch(Ke.tag){case 5:case 31:case 13:At=!1;return;case 27:case 3:At=!0;return;default:Ke=Ke.return}}function vl(e){if(e!==Ke)return!1;if(!he)return po(e),he=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Cc(e.type,e.memoizedProps)),a=!a),a&&ze&&ha(e),po(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Vd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Vd(e)}else t===27?(t=ze,za(e.type)?(e=_c,_c=null,ze=e):ze=t):ze=Ke?zt(e.stateNode.nextSibling):null;return!0}function Za(){ze=Ke=null,he=!1}function ur(){var e=xa;return e!==null&&(rt===null?rt=e:rt.push.apply(rt,e),xa=null),e}function un(e){xa===null?xa=[e]:xa.push(e)}var or=S(null),ka=null,Jt=null;function ga(e,t,a){k(or,t._currentValue),t._currentValue=a}function Wt(e){e._currentValue=or.current,q(or)}function fr(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 dr(e,t,a,l){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var f=s.child;i=i.firstContext;e:for(;i!==null;){var x=i;i=s;for(var b=0;b<t.length;b++)if(x.context===t[b]){i.lanes|=a,x=i.alternate,x!==null&&(x.lanes|=a),fr(i.return,a,e),l||(f=null);break e}i=x.next}}else if(s.tag===18){if(f=s.return,f===null)throw Error(c(341));f.lanes|=a,i=f.alternate,i!==null&&(i.lanes|=a),fr(f,a,e),f=null}else f=s.child;if(f!==null)f.return=s;else for(f=s;f!==null;){if(f===e){f=null;break}if(s=f.sibling,s!==null){s.return=f.return,f=s;break}f=f.return}s=f}}function bl(e,t,a,l){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var f=s.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var x=s.type;dt(s.pendingProps.value,f.value)||(e!==null?e.push(x):e=[x])}}else if(s===ve.current){if(f=s.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Ln):e=[Ln])}s=s.return}e!==null&&dr(t,e,a,l),t.flags|=262144}function ys(e){for(e=e.firstContext;e!==null;){if(!dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){ka=e,Jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Je(e){return vo(ka,e)}function ps(e,t){return ka===null&&$a(e),vo(e,t)}function vo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Jt===null){if(e===null)throw Error(c(308));Jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jt=Jt.next=t;return a}var vx=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()})}},bx=r.unstable_scheduleCallback,jx=r.unstable_NormalPriority,qe={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mr(){return{controller:new vx,data:new Map,refCount:0}}function on(e){e.refCount--,e.refCount===0&&bx(jx,function(){e.controller.abort()})}var fn=null,xr=0,jl=0,Nl=null;function Nx(e,t){if(fn===null){var a=fn=[];xr=0,jl=yc(),Nl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return xr++,t.then(bo,bo),t}function bo(){if(--xr===0&&fn!==null){Nl!==null&&(Nl.status="fulfilled");var e=fn;fn=null,jl=0,Nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sx(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(l.status="rejected",l.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),l}var jo=U.S;U.S=function(e,t){sd=ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Nx(e,t),jo!==null&&jo(e,t)};var Ka=S(null);function hr(){var e=Ka.current;return e!==null?e:Me.pooledCache}function vs(e,t){t===null?k(Ka,Ka.current):k(Ka,t.pool)}function No(){var e=hr();return e===null?null:{parent:qe._currentValue,pool:e}}var Sl=Error(c(460)),gr=Error(c(474)),bs=Error(c(542)),js={then:function(){}};function So(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Eo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zt,Zt),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Co(e),e;default:if(typeof t.status=="string")t.then(Zt,Zt);else{if(e=Me,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=l}},function(l){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Co(e),e}throw Wa=t,Sl}}function Ja(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Wa=a,Sl):a}}var Wa=null;function To(){if(Wa===null)throw Error(c(459));var e=Wa;return Wa=null,e}function Co(e){if(e===Sl||e===bs)throw Error(c(483))}var El=null,dn=0;function Ns(e){var t=dn;return dn+=1,El===null&&(El=[]),Eo(El,e,t)}function mn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ss(e,t){throw t.$$typeof===A?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ao(e){function t(T,N){if(e){var M=T.deletions;M===null?(T.deletions=[N],T.flags|=16):M.push(N)}}function a(T,N){if(!e)return null;for(;N!==null;)t(T,N),N=N.sibling;return null}function l(T){for(var N=new Map;T!==null;)T.key!==null?N.set(T.key,T):N.set(T.index,T),T=T.sibling;return N}function s(T,N){return T=$t(T,N),T.index=0,T.sibling=null,T}function i(T,N,M){return T.index=M,e?(M=T.alternate,M!==null?(M=M.index,M<N?(T.flags|=67108866,N):M):(T.flags|=67108866,N)):(T.flags|=1048576,N)}function f(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function x(T,N,M,L){return N===null||N.tag!==6?(N=nr(M,T.mode,L),N.return=T,N):(N=s(N,M),N.return=T,N)}function b(T,N,M,L){var P=M.type;return P===w?O(T,N,M.props.children,L,M.key):N!==null&&(N.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===F&&Ja(P)===N.type)?(N=s(N,M.props),mn(N,M),N.return=T,N):(N=hs(M.type,M.key,M.props,null,T.mode,L),mn(N,M),N.return=T,N)}function z(T,N,M,L){return N===null||N.tag!==4||N.stateNode.containerInfo!==M.containerInfo||N.stateNode.implementation!==M.implementation?(N=sr(M,T.mode,L),N.return=T,N):(N=s(N,M.children||[]),N.return=T,N)}function O(T,N,M,L,P){return N===null||N.tag!==7?(N=Va(M,T.mode,L,P),N.return=T,N):(N=s(N,M),N.return=T,N)}function B(T,N,M){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=nr(""+N,T.mode,M),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case D:return M=hs(N.type,N.key,N.props,null,T.mode,M),mn(M,N),M.return=T,M;case X:return N=sr(N,T.mode,M),N.return=T,N;case F:return N=Ja(N),B(T,N,M)}if(wt(N)||Oe(N))return N=Va(N,T.mode,M,null),N.return=T,N;if(typeof N.then=="function")return B(T,Ns(N),M);if(N.$$typeof===V)return B(T,ps(T,N),M);Ss(T,N)}return null}function R(T,N,M,L){var P=N!==null?N.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return P!==null?null:x(T,N,""+M,L);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case D:return M.key===P?b(T,N,M,L):null;case X:return M.key===P?z(T,N,M,L):null;case F:return M=Ja(M),R(T,N,M,L)}if(wt(M)||Oe(M))return P!==null?null:O(T,N,M,L,null);if(typeof M.then=="function")return R(T,N,Ns(M),L);if(M.$$typeof===V)return R(T,N,ps(T,M),L);Ss(T,M)}return null}function _(T,N,M,L,P){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return T=T.get(M)||null,x(N,T,""+L,P);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return T=T.get(L.key===null?M:L.key)||null,b(N,T,L,P);case X:return T=T.get(L.key===null?M:L.key)||null,z(N,T,L,P);case F:return L=Ja(L),_(T,N,M,L,P)}if(wt(L)||Oe(L))return T=T.get(M)||null,O(N,T,L,P,null);if(typeof L.then=="function")return _(T,N,M,Ns(L),P);if(L.$$typeof===V)return _(T,N,M,ps(N,L),P);Ss(N,L)}return null}function K(T,N,M,L){for(var P=null,ge=null,W=N,re=N=0,me=null;W!==null&&re<M.length;re++){W.index>re?(me=W,W=null):me=W.sibling;var ye=R(T,W,M[re],L);if(ye===null){W===null&&(W=me);break}e&&W&&ye.alternate===null&&t(T,W),N=i(ye,N,re),ge===null?P=ye:ge.sibling=ye,ge=ye,W=me}if(re===M.length)return a(T,W),he&&Kt(T,re),P;if(W===null){for(;re<M.length;re++)W=B(T,M[re],L),W!==null&&(N=i(W,N,re),ge===null?P=W:ge.sibling=W,ge=W);return he&&Kt(T,re),P}for(W=l(W);re<M.length;re++)me=_(W,T,re,M[re],L),me!==null&&(e&&me.alternate!==null&&W.delete(me.key===null?re:me.key),N=i(me,N,re),ge===null?P=me:ge.sibling=me,ge=me);return e&&W.forEach(function(Da){return t(T,Da)}),he&&Kt(T,re),P}function I(T,N,M,L){if(M==null)throw Error(c(151));for(var P=null,ge=null,W=N,re=N=0,me=null,ye=M.next();W!==null&&!ye.done;re++,ye=M.next()){W.index>re?(me=W,W=null):me=W.sibling;var Da=R(T,W,ye.value,L);if(Da===null){W===null&&(W=me);break}e&&W&&Da.alternate===null&&t(T,W),N=i(Da,N,re),ge===null?P=Da:ge.sibling=Da,ge=Da,W=me}if(ye.done)return a(T,W),he&&Kt(T,re),P;if(W===null){for(;!ye.done;re++,ye=M.next())ye=B(T,ye.value,L),ye!==null&&(N=i(ye,N,re),ge===null?P=ye:ge.sibling=ye,ge=ye);return he&&Kt(T,re),P}for(W=l(W);!ye.done;re++,ye=M.next())ye=_(W,T,re,ye.value,L),ye!==null&&(e&&ye.alternate!==null&&W.delete(ye.key===null?re:ye.key),N=i(ye,N,re),ge===null?P=ye:ge.sibling=ye,ge=ye);return e&&W.forEach(function(Dh){return t(T,Dh)}),he&&Kt(T,re),P}function Te(T,N,M,L){if(typeof M=="object"&&M!==null&&M.type===w&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case D:e:{for(var P=M.key;N!==null;){if(N.key===P){if(P=M.type,P===w){if(N.tag===7){a(T,N.sibling),L=s(N,M.props.children),L.return=T,T=L;break e}}else if(N.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===F&&Ja(P)===N.type){a(T,N.sibling),L=s(N,M.props),mn(L,M),L.return=T,T=L;break e}a(T,N);break}else t(T,N);N=N.sibling}M.type===w?(L=Va(M.props.children,T.mode,L,M.key),L.return=T,T=L):(L=hs(M.type,M.key,M.props,null,T.mode,L),mn(L,M),L.return=T,T=L)}return f(T);case X:e:{for(P=M.key;N!==null;){if(N.key===P)if(N.tag===4&&N.stateNode.containerInfo===M.containerInfo&&N.stateNode.implementation===M.implementation){a(T,N.sibling),L=s(N,M.children||[]),L.return=T,T=L;break e}else{a(T,N);break}else t(T,N);N=N.sibling}L=sr(M,T.mode,L),L.return=T,T=L}return f(T);case F:return M=Ja(M),Te(T,N,M,L)}if(wt(M))return K(T,N,M,L);if(Oe(M)){if(P=Oe(M),typeof P!="function")throw Error(c(150));return M=P.call(M),I(T,N,M,L)}if(typeof M.then=="function")return Te(T,N,Ns(M),L);if(M.$$typeof===V)return Te(T,N,ps(T,M),L);Ss(T,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,N!==null&&N.tag===6?(a(T,N.sibling),L=s(N,M),L.return=T,T=L):(a(T,N),L=nr(M,T.mode,L),L.return=T,T=L),f(T)):a(T,N)}return function(T,N,M,L){try{dn=0;var P=Te(T,N,M,L);return El=null,P}catch(W){if(W===Sl||W===bs)throw W;var ge=mt(29,W,null,T.mode);return ge.lanes=L,ge.return=T,ge}}}var Fa=Ao(!0),Mo=Ao(!1),ya=!1;function yr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pr(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 pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function va(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(pe&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=xs(e),oo(e,null,a),t}return ms(e,l,t,a),xs(e)}function xn(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,pu(e,a)}}function vr(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var s=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?s=i=f:i=i.next=f,a=a.next}while(a!==null);i===null?s=i=t:i=i.next=t}else s=i=t;a={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 br=!1;function hn(){if(br){var e=Nl;if(e!==null)throw e}}function gn(e,t,a,l){br=!1;var s=e.updateQueue;ya=!1;var i=s.firstBaseUpdate,f=s.lastBaseUpdate,x=s.shared.pending;if(x!==null){s.shared.pending=null;var b=x,z=b.next;b.next=null,f===null?i=z:f.next=z,f=b;var O=e.alternate;O!==null&&(O=O.updateQueue,x=O.lastBaseUpdate,x!==f&&(x===null?O.firstBaseUpdate=z:x.next=z,O.lastBaseUpdate=b))}if(i!==null){var B=s.baseState;f=0,O=z=b=null,x=i;do{var R=x.lane&-536870913,_=R!==x.lane;if(_?(de&R)===R:(l&R)===R){R!==0&&R===jl&&(br=!0),O!==null&&(O=O.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var K=e,I=x;R=t;var Te=a;switch(I.tag){case 1:if(K=I.payload,typeof K=="function"){B=K.call(Te,B,R);break e}B=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=I.payload,R=typeof K=="function"?K.call(Te,B,R):K,R==null)break e;B=y({},B,R);break e;case 2:ya=!0}}R=x.callback,R!==null&&(e.flags|=64,_&&(e.flags|=8192),_=s.callbacks,_===null?s.callbacks=[R]:_.push(R))}else _={lane:R,tag:x.tag,payload:x.payload,callback:x.callback,next:null},O===null?(z=O=_,b=B):O=O.next=_,f|=R;if(x=x.next,x===null){if(x=s.shared.pending,x===null)break;_=x,x=_.next,_.next=null,s.lastBaseUpdate=_,s.shared.pending=null}}while(!0);O===null&&(b=B),s.baseState=b,s.firstBaseUpdate=z,s.lastBaseUpdate=O,i===null&&(s.shared.lanes=0),Ea|=f,e.lanes=f,e.memoizedState=B}}function zo(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Ro(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)zo(a[e],t)}var Tl=S(null),Es=S(0);function _o(e,t){e=sa,k(Es,e),k(Tl,t),sa=e|t.baseLanes}function jr(){k(Es,sa),k(Tl,Tl.current)}function Nr(){sa=Es.current,q(Tl),q(Es)}var xt=S(null),Mt=null;function ba(e){var t=e.alternate;k(He,He.current&1),k(xt,e),Mt===null&&(t===null||Tl.current!==null||t.memoizedState!==null)&&(Mt=e)}function Sr(e){k(He,He.current),k(xt,e),Mt===null&&(Mt=e)}function wo(e){e.tag===22?(k(He,He.current),k(xt,e),Mt===null&&(Mt=e)):ja()}function ja(){k(He,He.current),k(xt,xt.current)}function ht(e){q(xt),Mt===e&&(Mt=null),q(He)}var He=S(0);function Ts(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||zc(a)||Rc(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 Ft=0,se=null,Se=null,Ye=null,Cs=!1,Cl=!1,Pa=!1,As=0,yn=0,Al=null,Ex=0;function De(){throw Error(c(321))}function Er(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!dt(e[a],t[a]))return!1;return!0}function Tr(e,t,a,l,s,i){return Ft=i,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?gf:Yr,Pa=!1,i=a(l,s),Pa=!1,Cl&&(i=Do(t,a,l,s)),Oo(e),i}function Oo(e){U.H=bn;var t=Se!==null&&Se.next!==null;if(Ft=0,Ye=Se=se=null,Cs=!1,yn=0,Al=null,t)throw Error(c(300));e===null||Ge||(e=e.dependencies,e!==null&&ys(e)&&(Ge=!0))}function Do(e,t,a,l){se=e;var s=0;do{if(Cl&&(Al=null),yn=0,Cl=!1,25<=s)throw Error(c(301));if(s+=1,Ye=Se=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}U.H=yf,i=t(a,l)}while(Cl);return i}function Tx(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?pn(t):t,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(se.flags|=1024),t}function Cr(){var e=As!==0;return As=0,e}function Ar(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Mr(e){if(Cs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cs=!1}Ft=0,Ye=Se=se=null,Cl=!1,yn=As=0,Al=null}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?se.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function Be(){if(Se===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Ye===null?se.memoizedState:Ye.next;if(t!==null)Ye=t,Se=e;else{if(e===null)throw se.alternate===null?Error(c(467)):Error(c(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Ye===null?se.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function Ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pn(e){var t=yn;return yn+=1,Al===null&&(Al=[]),e=Eo(Al,e,t),t=se,(Ye===null?t.memoizedState:Ye.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?gf:Yr),e}function zs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pn(e);if(e.$$typeof===V)return Je(e)}throw Error(c(438,String(e)))}function zr(e){var t=null,a=se.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=se.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ms(),se.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]=Ce;return t.index++,a}function Pt(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=Be();return Rr(t,Se,e)}function Rr(e,t,a){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=a;var s=e.baseQueue,i=l.pending;if(i!==null){if(s!==null){var f=s.next;s.next=i.next,i.next=f}t.baseQueue=s=i,l.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var x=f=null,b=null,z=t,O=!1;do{var B=z.lane&-536870913;if(B!==z.lane?(de&B)===B:(Ft&B)===B){var R=z.revertLane;if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),B===jl&&(O=!0);else if((Ft&R)===R){z=z.next,R===jl&&(O=!0);continue}else B={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},b===null?(x=b=B,f=i):b=b.next=B,se.lanes|=R,Ea|=R;B=z.action,Pa&&a(i,B),i=z.hasEagerState?z.eagerState:a(i,B)}else R={lane:B,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},b===null?(x=b=R,f=i):b=b.next=R,se.lanes|=B,Ea|=B;z=z.next}while(z!==null&&z!==t);if(b===null?f=i:b.next=x,!dt(i,e.memoizedState)&&(Ge=!0,O&&(a=Nl,a!==null)))throw a;e.memoizedState=i,e.baseState=f,e.baseQueue=b,l.lastRenderedState=i}return s===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function _r(e){var t=Be(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var l=a.dispatch,s=a.pending,i=t.memoizedState;if(s!==null){a.pending=null;var f=s=s.next;do i=e(i,f.action),f=f.next;while(f!==s);dt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Uo(e,t,a){var l=se,s=Be(),i=he;if(i){if(a===void 0)throw Error(c(407));a=a()}else a=t();var f=!dt((Se||s).memoizedState,a);if(f&&(s.memoizedState=a,Ge=!0),s=s.queue,Dr(Bo.bind(null,l,s,e),[e]),s.getSnapshot!==t||f||Ye!==null&&Ye.memoizedState.tag&1){if(l.flags|=2048,Ml(9,{destroy:void 0},Ho.bind(null,l,s,a,t),null),Me===null)throw Error(c(349));i||(Ft&127)!==0||Lo(l,t,a)}return a}function Lo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=se.updateQueue,t===null?(t=Ms(),se.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ho(e,t,a,l){t.value=a,t.getSnapshot=l,qo(t)&&Yo(e)}function Bo(e,t,a){return a(function(){qo(t)&&Yo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!dt(e,a)}catch{return!0}}function Yo(e){var t=Qa(e,2);t!==null&&ct(t,e,2)}function wr(e){var t=et();if(typeof e=="function"){var a=e;if(e=a(),Pa){oa(!0);try{a()}finally{oa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function Go(e,t,a,l){return e.baseState=a,Rr(e,Se,typeof l=="function"?l:Pt)}function Cx(e,t,a,l,s){if(Os(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){i.listeners.push(f)}};U.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,Xo(t,i)):(i.next=a.next,t.pending=a.next=i)}}function Xo(e,t){var a=t.action,l=t.payload,s=e.state;if(t.isTransition){var i=U.T,f={};U.T=f;try{var x=a(s,l),b=U.S;b!==null&&b(f,x),Qo(e,t,x)}catch(z){Or(e,t,z)}finally{i!==null&&f.types!==null&&(i.types=f.types),U.T=i}}else try{i=a(s,l),Qo(e,t,i)}catch(z){Or(e,t,z)}}function Qo(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Vo(e,t,l)},function(l){return Or(e,t,l)}):Vo(e,t,a)}function Vo(e,t,a){t.status="fulfilled",t.value=a,Zo(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Xo(e,a)))}function Or(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Zo(t),t=t.next;while(t!==l)}e.action=null}function Zo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ko(e,t){return t}function $o(e,t){if(he){var a=Me.formState;if(a!==null){e:{var l=se;if(he){if(ze){t:{for(var s=ze,i=At;s.nodeType!==8;){if(!i){s=null;break t}if(s=zt(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){ze=zt(s.nextSibling),l=s.data==="F!";break e}}ha(l)}l=!1}l&&(t=a[0])}}return a=et(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:t},a.queue=l,a=mf.bind(null,se,l),l.dispatch=a,l=wr(!1),i=qr.bind(null,se,!1,l.queue),l=et(),s={state:t,dispatch:null,action:e,pending:null},l.queue=s,a=Cx.bind(null,se,s,i,a),s.dispatch=a,l.memoizedState=e,[t,a,!1]}function Ko(e){var t=Be();return Jo(t,Se,e)}function Jo(e,t,a){if(t=Rr(e,t,ko)[0],e=Rs(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=pn(t)}catch(f){throw f===Sl?bs:f}else l=t;t=Be();var s=t.queue,i=s.dispatch;return a!==t.memoizedState&&(se.flags|=2048,Ml(9,{destroy:void 0},Ax.bind(null,s,a),null)),[l,i,e]}function Ax(e,t){e.action=t}function Wo(e){var t=Be(),a=Se;if(a!==null)return Jo(t,a,e);Be(),t=t.memoizedState,a=Be();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Ml(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=se.updateQueue,t===null&&(t=Ms(),se.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 Fo(){return Be().memoizedState}function _s(e,t,a,l){var s=et();se.flags|=e,s.memoizedState=Ml(1|t,{destroy:void 0},a,l===void 0?null:l)}function ws(e,t,a,l){var s=Be();l=l===void 0?null:l;var i=s.memoizedState.inst;Se!==null&&l!==null&&Er(l,Se.memoizedState.deps)?s.memoizedState=Ml(t,i,a,l):(se.flags|=e,s.memoizedState=Ml(1|t,i,a,l))}function Po(e,t){_s(8390656,8,e,t)}function Dr(e,t){ws(2048,8,e,t)}function Mx(e){se.flags|=4;var t=se.updateQueue;if(t===null)t=Ms(),se.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Io(e){var t=Be().memoizedState;return Mx({ref:t,nextImpl:e}),function(){if((pe&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function ef(e,t){return ws(4,2,e,t)}function tf(e,t){return ws(4,4,e,t)}function af(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 lf(e,t,a){a=a!=null?a.concat([e]):null,ws(4,4,af.bind(null,t,e),a)}function Ur(){}function nf(e,t){var a=Be();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Er(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function sf(e,t){var a=Be();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Er(t,l[1]))return l[0];if(l=e(),Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l}function Lr(e,t,a){return a===void 0||(Ft&1073741824)!==0&&(de&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=rd(),se.lanes|=e,Ea|=e,a)}function rf(e,t,a,l){return dt(a,t)?a:Tl.current!==null?(e=Lr(e,a,l),dt(e,t)||(Ge=!0),e):(Ft&42)===0||(Ft&1073741824)!==0&&(de&261930)===0?(Ge=!0,e.memoizedState=a):(e=rd(),se.lanes|=e,Ea|=e,t)}function cf(e,t,a,l,s){var i=Z.p;Z.p=i!==0&&8>i?i:8;var f=U.T,x={};U.T=x,qr(e,!1,t,a);try{var b=s(),z=U.S;if(z!==null&&z(x,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var O=Sx(b,l);vn(e,t,O,pt(e))}else vn(e,t,l,pt(e))}catch(B){vn(e,t,{then:function(){},status:"rejected",reason:B},pt())}finally{Z.p=i,f!==null&&x.types!==null&&(f.types=x.types),U.T=f}}function zx(){}function Hr(e,t,a,l){if(e.tag!==5)throw Error(c(476));var s=uf(e).queue;cf(e,s,t,ee,a===null?zx:function(){return of(e),a(l)})}function uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:ee},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function of(e){var t=uf(e);t.next===null&&(t=e.alternate.memoizedState),vn(e,t.next.queue,{},pt())}function Br(){return Je(Ln)}function ff(){return Be().memoizedState}function df(){return Be().memoizedState}function Rx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=pt();e=pa(a);var l=va(t,e,a);l!==null&&(ct(l,t,a),xn(l,t,a)),t={cache:mr()},e.payload=t;return}t=t.return}}function _x(e,t,a){var l=pt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Os(e)?xf(t,a):(a=ar(e,t,a,l),a!==null&&(ct(a,e,l),hf(a,t,l)))}function mf(e,t,a){var l=pt();vn(e,t,a,l)}function vn(e,t,a,l){var s={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Os(e))xf(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,x=i(f,a);if(s.hasEagerState=!0,s.eagerState=x,dt(x,f))return ms(e,t,s,0),Me===null&&ds(),!1}catch{}if(a=ar(e,t,s,l),a!==null)return ct(a,e,l),hf(a,t,l),!0}return!1}function qr(e,t,a,l){if(l={lane:2,revertLane:yc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(c(479))}else t=ar(e,a,l,2),t!==null&&ct(t,e,2)}function Os(e){var t=e.alternate;return e===se||t!==null&&t===se}function xf(e,t){Cl=Cs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function hf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pu(e,a)}}var bn={readContext:Je,use:zs,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};bn.useEffectEvent=De;var gf={readContext:Je,use:zs,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:Po,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,_s(4194308,4,af.bind(null,t,e),a)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){_s(4,2,e,t)},useMemo:function(e,t){var a=et();t=t===void 0?null:t;var l=e();if(Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=et();if(a!==void 0){var s=a(t);if(Pa){oa(!0);try{a(t)}finally{oa(!1)}}}else s=t;return l.memoizedState=l.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},l.queue=e,e=e.dispatch=_x.bind(null,se,e),[l.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:function(e){e=wr(e);var t=e.queue,a=mf.bind(null,se,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ur,useDeferredValue:function(e,t){var a=et();return Lr(a,e,t)},useTransition:function(){var e=wr(!1);return e=cf.bind(null,se,e.queue,!0,!1),et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=se,s=et();if(he){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Me===null)throw Error(c(349));(de&127)!==0||Lo(l,t,a)}s.memoizedState=a;var i={value:a,getSnapshot:t};return s.queue=i,Po(Bo.bind(null,l,i,e),[e]),l.flags|=2048,Ml(9,{destroy:void 0},Ho.bind(null,l,i,a,t),null),a},useId:function(){var e=et(),t=Me.identifierPrefix;if(he){var a=Bt,l=Ht;a=(l&~(1<<32-ft(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=As++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ex++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Br,useFormState:$o,useActionState:$o,useOptimistic:function(e){var t=et();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=qr.bind(null,se,!0,a),a.dispatch=t,[e,t]},useMemoCache:zr,useCacheRefresh:function(){return et().memoizedState=Rx.bind(null,se)},useEffectEvent:function(e){var t=et(),a={impl:e};return t.memoizedState=a,function(){if((pe&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},Yr={readContext:Je,use:zs,useCallback:nf,useContext:Je,useEffect:Dr,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:sf,useReducer:Rs,useRef:Fo,useState:function(){return Rs(Pt)},useDebugValue:Ur,useDeferredValue:function(e,t){var a=Be();return rf(a,Se.memoizedState,e,t)},useTransition:function(){var e=Rs(Pt)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:Uo,useId:ff,useHostTransitionStatus:Br,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){var a=Be();return Go(a,Se,e,t)},useMemoCache:zr,useCacheRefresh:df};Yr.useEffectEvent=Io;var yf={readContext:Je,use:zs,useCallback:nf,useContext:Je,useEffect:Dr,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:sf,useReducer:_r,useRef:Fo,useState:function(){return _r(Pt)},useDebugValue:Ur,useDeferredValue:function(e,t){var a=Be();return Se===null?Lr(a,e,t):rf(a,Se.memoizedState,e,t)},useTransition:function(){var e=_r(Pt)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:Uo,useId:ff,useHostTransitionStatus:Br,useFormState:Wo,useActionState:Wo,useOptimistic:function(e,t){var a=Be();return Se!==null?Go(a,Se,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:zr,useCacheRefresh:df};yf.useEffectEvent=Io;function Gr(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Xr={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=pt(),s=pa(l);s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(ct(t,e,l),xn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=pt(),s=pa(l);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(ct(t,e,l),xn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=pt(),l=pa(a);l.tag=2,t!=null&&(l.callback=t),t=va(e,l,a),t!==null&&(ct(t,e,a),xn(t,e,a))}};function pf(e,t,a,l,s,i,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,f):t.prototype&&t.prototype.isPureReactComponent?!sn(a,l)||!sn(s,i):!0}function vf(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&&Xr.enqueueReplaceState(t,t.state,null)}function Ia(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=y({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function bf(e){fs(e)}function jf(e){console.error(e)}function Nf(e){fs(e)}function Ds(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Sf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Qr(e,t,a){return a=pa(a),a.tag=3,a.payload={element:null},a.callback=function(){Ds(e,t)},a}function Ef(e){return e=pa(e),e.tag=3,e}function Tf(e,t,a,l){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var i=l.value;e.payload=function(){return s(i)},e.callback=function(){Sf(t,a,l)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Sf(t,a,l),typeof s!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function wx(e,t,a,l,s){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&bl(t,a,s,!0),a=xt.current,a!==null){switch(a.tag){case 31:case 13:return Mt===null?ks():a.alternate===null&&Ue===0&&(Ue=3),a.flags&=-257,a.flags|=65536,a.lanes=s,l===js?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),xc(e,l,s)),!1;case 22:return a.flags|=65536,l===js?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)),xc(e,l,s)),!1}throw Error(c(435,a.tag))}return xc(e,l,s),ks(),!1}if(he)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,l!==cr&&(e=Error(c(422),{cause:l}),un(Et(e,a)))):(l!==cr&&(t=Error(c(423),{cause:l}),un(Et(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,l=Et(l,a),s=Qr(e.stateNode,l,s),vr(e,s),Ue!==4&&(Ue=2)),!1;var i=Error(c(520),{cause:l});if(i=Et(i,a),Mn===null?Mn=[i]:Mn.push(i),Ue!==4&&(Ue=2),t===null)return!0;l=Et(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Qr(a.stateNode,l,e),vr(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ta===null||!Ta.has(i))))return a.flags|=65536,s&=-s,a.lanes|=s,s=Ef(s),Tf(s,e,a,l),vr(a,s),!1}a=a.return}while(a!==null);return!1}var Vr=Error(c(461)),Ge=!1;function We(e,t,a,l){t.child=e===null?Mo(t,null,a,l):Fa(t,e.child,a,l)}function Cf(e,t,a,l,s){a=a.render;var i=t.ref;if("ref"in l){var f={};for(var x in l)x!=="ref"&&(f[x]=l[x])}else f=l;return $a(t),l=Tr(e,t,a,f,i,s),x=Cr(),e!==null&&!Ge?(Ar(e,t,s),It(e,t,s)):(he&&x&&ir(t),t.flags|=1,We(e,t,l,s),t.child)}function Af(e,t,a,l,s){if(e===null){var i=a.type;return typeof i=="function"&&!lr(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Mf(e,t,i,l,s)):(e=hs(a.type,null,l,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Pr(e,s)){var f=i.memoizedProps;if(a=a.compare,a=a!==null?a:sn,a(f,l)&&e.ref===t.ref)return It(e,t,s)}return t.flags|=1,e=$t(i,l),e.ref=t.ref,e.return=t,t.child=e}function Mf(e,t,a,l,s){if(e!==null){var i=e.memoizedProps;if(sn(i,l)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=l=i,Pr(e,s))(e.flags&131072)!==0&&(Ge=!0);else return t.lanes=e.lanes,It(e,t,s)}return Zr(e,t,a,l,s)}function zf(e,t,a,l){var s=l.children,i=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(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;l=s&~i}else l=0,t.child=null;return Rf(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vs(t,i!==null?i.cachePool:null),i!==null?_o(t,i):jr(),wo(t);else return l=t.lanes=536870912,Rf(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(vs(t,i.cachePool),_o(t,i),ja(),t.memoizedState=null):(e!==null&&vs(t,null),jr(),ja());return We(e,t,s,a),t.child}function jn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rf(e,t,a,l,s){var i=hr();return i=i===null?null:{parent:qe._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&vs(t,null),jr(),wo(t),e!==null&&bl(e,t,l,!0),t.childLanes=s,null}function Us(e,t){return t=Hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _f(e,t,a){return Fa(t,e.child,null,a),e=Us(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function Ox(e,t,a){var l=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(he){if(l.mode==="hidden")return e=Us(t,l),t.lanes=536870912,jn(null,e);if(Sr(t),(e=ze)?(e=Qd(e,At),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Ht,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},a=mo(e),a.return=t,t.child=a,Ke=t,ze=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return Us(t,l)}var i=e.memoizedState;if(i!==null){var f=i.dehydrated;if(Sr(t),s)if(t.flags&256)t.flags&=-257,t=_f(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Ge||bl(e,t,a,!1),s=(a&e.childLanes)!==0,Ge||s){if(l=Me,l!==null&&(f=vu(l,a),f!==0&&f!==i.retryLane))throw i.retryLane=f,Qa(e,f),ct(l,e,f),Vr;ks(),t=_f(e,t,a)}else e=i.treeContext,ze=zt(f.nextSibling),Ke=t,he=!0,xa=null,At=!1,e!==null&&go(t,e),t=Us(t,l),t.flags|=4096;return t}return e=$t(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ls(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(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Zr(e,t,a,l,s){return $a(t),a=Tr(e,t,a,l,void 0,s),l=Cr(),e!==null&&!Ge?(Ar(e,t,s),It(e,t,s)):(he&&l&&ir(t),t.flags|=1,We(e,t,a,s),t.child)}function wf(e,t,a,l,s,i){return $a(t),t.updateQueue=null,a=Do(t,l,a,s),Oo(e),l=Cr(),e!==null&&!Ge?(Ar(e,t,i),It(e,t,i)):(he&&l&&ir(t),t.flags|=1,We(e,t,a,i),t.child)}function Of(e,t,a,l,s){if($a(t),t.stateNode===null){var i=gl,f=a.contextType;typeof f=="object"&&f!==null&&(i=Je(f)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Xr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},yr(t),f=a.contextType,i.context=typeof f=="object"&&f!==null?Je(f):gl,i.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(Gr(t,a,f,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(f=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),f!==i.state&&Xr.enqueueReplaceState(i,i.state,null),gn(t,l,i,s),hn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var x=t.memoizedProps,b=Ia(a,x);i.props=b;var z=i.context,O=a.contextType;f=gl,typeof O=="object"&&O!==null&&(f=Je(O));var B=a.getDerivedStateFromProps;O=typeof B=="function"||typeof i.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,O||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(x||z!==f)&&vf(t,i,l,f),ya=!1;var R=t.memoizedState;i.state=R,gn(t,l,i,s),hn(),z=t.memoizedState,x||R!==z||ya?(typeof B=="function"&&(Gr(t,a,B,l),z=t.memoizedState),(b=ya||pf(t,a,b,l,R,z,f))?(O||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=z),i.props=l,i.state=z,i.context=f,l=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,pr(e,t),f=t.memoizedProps,O=Ia(a,f),i.props=O,B=t.pendingProps,R=i.context,z=a.contextType,b=gl,typeof z=="object"&&z!==null&&(b=Je(z)),x=a.getDerivedStateFromProps,(z=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f!==B||R!==b)&&vf(t,i,l,b),ya=!1,R=t.memoizedState,i.state=R,gn(t,l,i,s),hn();var _=t.memoizedState;f!==B||R!==_||ya||e!==null&&e.dependencies!==null&&ys(e.dependencies)?(typeof x=="function"&&(Gr(t,a,x,l),_=t.memoizedState),(O=ya||pf(t,a,O,l,R,_,b)||e!==null&&e.dependencies!==null&&ys(e.dependencies))?(z||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,_,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,_,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=_),i.props=l,i.state=_,i.context=b,l=O):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,Ls(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Fa(t,e.child,null,s),t.child=Fa(t,null,a,s)):We(e,t,a,s),t.memoizedState=i.state,e=t.child):e=It(e,t,s),e}function Df(e,t,a,l){return Za(),t.flags|=256,We(e,t,a,l),t.child}var kr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $r(e){return{baseLanes:e,cachePool:No()}}function Kr(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=yt),e}function Uf(e,t,a){var l=t.pendingProps,s=!1,i=(t.flags&128)!==0,f;if((f=i)||(f=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),f&&(s=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(he){if(s?ba(t):ja(),(e=ze)?(e=Qd(e,At),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Ht,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},a=mo(e),a.return=t,t.child=a,Ke=t,ze=null)):e=null,e===null)throw ha(t);return Rc(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,s?(ja(),s=t.mode,x=Hs({mode:"hidden",children:x},s),l=Va(l,s,a,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=$r(a),l.childLanes=Kr(e,f,a),t.memoizedState=kr,jn(null,l)):(ba(t),Jr(t,x))}var b=e.memoizedState;if(b!==null&&(x=b.dehydrated,x!==null)){if(i)t.flags&256?(ba(t),t.flags&=-257,t=Wr(e,t,a)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),x=l.fallback,s=t.mode,l=Hs({mode:"visible",children:l.children},s),x=Va(x,s,a,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,Fa(t,e.child,null,a),l=t.child,l.memoizedState=$r(a),l.childLanes=Kr(e,f,a),t.memoizedState=kr,t=jn(null,l));else if(ba(t),Rc(x)){if(f=x.nextSibling&&x.nextSibling.dataset,f)var z=f.dgst;f=z,l=Error(c(419)),l.stack="",l.digest=f,un({value:l,source:null,stack:null}),t=Wr(e,t,a)}else if(Ge||bl(e,t,a,!1),f=(a&e.childLanes)!==0,Ge||f){if(f=Me,f!==null&&(l=vu(f,a),l!==0&&l!==b.retryLane))throw b.retryLane=l,Qa(e,l),ct(f,e,l),Vr;zc(x)||ks(),t=Wr(e,t,a)}else zc(x)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,ze=zt(x.nextSibling),Ke=t,he=!0,xa=null,At=!1,e!==null&&go(t,e),t=Jr(t,l.children),t.flags|=4096);return t}return s?(ja(),x=l.fallback,s=t.mode,b=e.child,z=b.sibling,l=$t(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,z!==null?x=$t(z,x):(x=Va(x,s,a,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,jn(null,l),l=t.child,x=e.child.memoizedState,x===null?x=$r(a):(s=x.cachePool,s!==null?(b=qe._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=No(),x={baseLanes:x.baseLanes|a,cachePool:s}),l.memoizedState=x,l.childLanes=Kr(e,f,a),t.memoizedState=kr,jn(e.child,l)):(ba(t),a=e.child,e=a.sibling,a=$t(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 Jr(e,t){return t=Hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hs(e,t){return e=mt(22,e,null,t),e.lanes=0,e}function Wr(e,t,a){return Fa(t,e.child,null,a),e=Jr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lf(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),fr(e.return,t,a)}function Fr(e,t,a,l,s,i){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:s,treeForkCount:i}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=s,f.treeForkCount=i)}function Hf(e,t,a){var l=t.pendingProps,s=l.revealOrder,i=l.tail;l=l.children;var f=He.current,x=(f&2)!==0;if(x?(f=f&1|2,t.flags|=128):f&=1,k(He,f),We(e,t,l,a),l=he?cn:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lf(e,a,t);else if(e.tag===19)Lf(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(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&Ts(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Fr(t,!1,s,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ts(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Fr(t,!0,a,null,i,l);break;case"together":Fr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function It(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(bl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=$t(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$t(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Pr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ys(e)))}function Dx(e,t,a){switch(t.tag){case 3:Ie(t,t.stateNode.containerInfo),ga(t,qe,e.memoizedState.cache),Za();break;case 27:case 5:kl(t);break;case 4:Ie(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ba(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Uf(e,t,a):(ba(t),e=It(e,t,a),e!==null?e.sibling:null);ba(t);break;case 19:var s=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(bl(e,t,a,!1),l=(a&t.childLanes)!==0),s){if(l)return Hf(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),k(He,He.current),l)break;return null;case 22:return t.lanes=0,zf(e,t,a,t.pendingProps);case 24:ga(t,qe,e.memoizedState.cache)}return It(e,t,a)}function Bf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ge=!0;else{if(!Pr(e,a)&&(t.flags&128)===0)return Ge=!1,Dx(e,t,a);Ge=(e.flags&131072)!==0}else Ge=!1,he&&(t.flags&1048576)!==0&&ho(t,cn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ja(t.elementType),t.type=e,typeof e=="function")lr(e)?(l=Ia(e,l),t.tag=1,t=Of(null,t,e,l,a)):(t.tag=0,t=Zr(null,t,e,l,a));else{if(e!=null){var s=e.$$typeof;if(s===ce){t.tag=11,t=Cf(null,t,e,l,a);break e}else if(s===Y){t.tag=14,t=Af(null,t,e,l,a);break e}}throw t=Qt(e)||e,Error(c(306,t,""))}}return t;case 0:return Zr(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,s=Ia(l,t.pendingProps),Of(e,t,l,s,a);case 3:e:{if(Ie(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var i=t.memoizedState;s=i.element,pr(e,t),gn(t,l,null,a);var f=t.memoizedState;if(l=f.cache,ga(t,qe,l),l!==i.cache&&dr(t,[qe],a,!0),hn(),l=f.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Df(e,t,l,a);break e}else if(l!==s){s=Et(Error(c(424)),t),un(s),t=Df(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ze=zt(e.firstChild),Ke=t,he=!0,xa=null,At=!0,a=Mo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Za(),l===s){t=It(e,t,a);break e}We(e,t,l,a)}t=t.child}return t;case 26:return Ls(e,t),e===null?(a=Jd(t.type,null,t.pendingProps,null))?t.memoizedState=a:he||(a=t.type,e=t.pendingProps,l=Is(ue.current).createElement(a),l[$e]=t,l[at]=e,Fe(l,a,e),Ze(l),t.stateNode=l):t.memoizedState=Jd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return kl(t),e===null&&he&&(l=t.stateNode=kd(t.type,t.pendingProps,ue.current),Ke=t,At=!0,s=ze,za(t.type)?(_c=s,ze=zt(l.firstChild)):ze=s),We(e,t,t.pendingProps.children,a),Ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&he&&((s=l=ze)&&(l=oh(l,t.type,t.pendingProps,At),l!==null?(t.stateNode=l,Ke=t,ze=zt(l.firstChild),At=!1,s=!0):s=!1),s||ha(t)),kl(t),s=t.type,i=t.pendingProps,f=e!==null?e.memoizedProps:null,l=i.children,Cc(s,i)?l=null:f!==null&&Cc(s,f)&&(t.flags|=32),t.memoizedState!==null&&(s=Tr(e,t,Tx,null,null,a),Ln._currentValue=s),Ls(e,t),We(e,t,l,a),t.child;case 6:return e===null&&he&&((e=a=ze)&&(a=fh(a,t.pendingProps,At),a!==null?(t.stateNode=a,Ke=t,ze=null,e=!0):e=!1),e||ha(t)),null;case 13:return Uf(e,t,a);case 4:return Ie(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fa(t,null,l,a):We(e,t,l,a),t.child;case 11:return Cf(e,t,t.type,t.pendingProps,a);case 7:return We(e,t,t.pendingProps,a),t.child;case 8:return We(e,t,t.pendingProps.children,a),t.child;case 12:return We(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ga(t,t.type,l.value),We(e,t,l.children,a),t.child;case 9:return s=t.type._context,l=t.pendingProps.children,$a(t),s=Je(s),l=l(s),t.flags|=1,We(e,t,l,a),t.child;case 14:return Af(e,t,t.type,t.pendingProps,a);case 15:return Mf(e,t,t.type,t.pendingProps,a);case 19:return Hf(e,t,a);case 31:return Ox(e,t,a);case 22:return zf(e,t,a,t.pendingProps);case 24:return $a(t),l=Je(qe),e===null?(s=hr(),s===null&&(s=Me,i=mr(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=a),s=i),t.memoizedState={parent:l,cache:s},yr(t),ga(t,qe,s)):((e.lanes&a)!==0&&(pr(e,t),gn(t,null,null,a),hn()),s=e.memoizedState,i=t.memoizedState,s.parent!==l?(s={parent:l,cache:l},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ga(t,qe,l)):(l=i.cache,ga(t,qe,l),l!==s.cache&&dr(t,[qe],a,!0))),We(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ea(e){e.flags|=4}function Ir(e,t,a,l,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(fd())e.flags|=8192;else throw Wa=js,gr}else e.flags&=-16777217}function qf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!e0(t))if(fd())e.flags|=8192;else throw Wa=js,gr}function Bs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gu():536870912,e.lanes|=t,wl|=t)}function Nn(e,t){if(!he)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 Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags&65011712,l|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags,l|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Ux(e,t,a){var l=t.pendingProps;switch(rr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Re(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Wt(qe),Le(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(vl(t)?ea(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ur())),Re(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(ea(t),i!==null?(Re(t),qf(t,i)):(Re(t),Ir(t,s,null,l,a))):i?i!==e.memoizedState?(ea(t),Re(t),qf(t,i)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ea(t),Re(t),Ir(t,s,e,l,a)),null;case 27:if(Jn(t),a=ue.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}e=J.current,vl(t)?yo(t):(e=kd(s,l,a),t.stateNode=e,ea(t))}return Re(t),null;case 5:if(Jn(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}if(i=J.current,vl(t))yo(t);else{var f=Is(ue.current);switch(i){case 1:i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=f.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?f.createElement(s,{is:l.is}):f.createElement(s)}}i[$e]=t,i[at]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.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=i;e:switch(Fe(i,s,l),s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ea(t)}}return Re(t),Ir(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=ue.current,vl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,s=Ke,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[$e]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Ud(e.nodeValue,a)),e||ha(t,!0)}else e=Is(e).createTextNode(l),e[$e]=t,t.stateNode=e}return Re(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(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[$e]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else a=ur(),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(c(558))}return Re(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=vl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!s)throw Error(c(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(c(317));s[$e]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),s=!1}else s=ur(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)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,s=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(s=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==s&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Bs(t,t.updateQueue),Re(t),null);case 4:return Le(),e===null&&jc(t.stateNode.containerInfo),Re(t),null;case 10:return Wt(t.type),Re(t),null;case 19:if(q(He),l=t.memoizedState,l===null)return Re(t),null;if(s=(t.flags&128)!==0,i=l.rendering,i===null)if(s)Nn(l,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ts(e),i!==null){for(t.flags|=128,Nn(l,!1),e=i.updateQueue,t.updateQueue=e,Bs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)fo(a,e),a=a.sibling;return k(He,He.current&1|2),he&&Kt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ut()>Qs&&(t.flags|=128,s=!0,Nn(l,!1),t.lanes=4194304)}else{if(!s)if(e=Ts(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Bs(t,e),Nn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!he)return Re(t),null}else 2*ut()-l.renderingStartTime>Qs&&a!==536870912&&(t.flags|=128,s=!0,Nn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ut(),e.sibling=null,a=He.current,k(He,s?a&1|2:a&1),he&&Kt(t,l.treeForkCount),e):(Re(t),null);case 22:case 23:return ht(t),Nr(),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&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),a=t.updateQueue,a!==null&&Bs(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&&q(Ka),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(qe),Re(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Lx(e,t){switch(rr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(qe),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Jn(t),null;case 31:if(t.memoizedState!==null){if(ht(t),t.alternate===null)throw Error(c(340));Za()}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(c(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(He),null;case 4:return Le(),null;case 10:return Wt(t.type),null;case 22:case 23:return ht(t),Nr(),e!==null&&q(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(qe),null;case 25:return null;default:return null}}function Yf(e,t){switch(rr(t),t.tag){case 3:Wt(qe),Le();break;case 26:case 27:case 5:Jn(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:q(He);break;case 10:Wt(t.type);break;case 22:case 23:ht(t),Nr(),e!==null&&q(Ka);break;case 24:Wt(qe)}}function Sn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var s=l.next;a=s;do{if((a.tag&e)===e){l=void 0;var i=a.create,f=a.inst;l=i(),f.destroy=l}a=a.next}while(a!==s)}}catch(x){je(t,t.return,x)}}function Na(e,t,a){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var i=s.next;l=i;do{if((l.tag&e)===e){var f=l.inst,x=f.destroy;if(x!==void 0){f.destroy=void 0,s=t;var b=a,z=x;try{z()}catch(O){je(s,b,O)}}}l=l.next}while(l!==i)}}catch(O){je(t,t.return,O)}}function Gf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ro(t,a)}catch(l){je(e,e.return,l)}}}function Xf(e,t,a){a.props=Ia(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){je(e,t,l)}}function En(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(s){je(e,t,s)}}function qt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(s){je(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){je(e,t,s)}else a.current=null}function Qf(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(s){je(e,e.return,s)}}function ec(e,t,a){try{var l=e.stateNode;nh(l,e.type,a,t),l[at]=t}catch(s){je(e,e.return,s)}}function Vf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&za(e.type)||e.tag===4}function tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vf(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&&za(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 ac(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=Zt));else if(l!==4&&(l===27&&za(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ac(e,t,a),e=e.sibling;e!==null;)ac(e,t,a),e=e.sibling}function qs(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&&za(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(qs(e,t,a),e=e.sibling;e!==null;)qs(e,t,a),e=e.sibling}function Zf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Fe(t,l,a),t[$e]=e,t[at]=a}catch(i){je(e,e.return,i)}}var ta=!1,Xe=!1,lc=!1,kf=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Hx(e,t){if(e=e.containerInfo,Ec=ii,e=ao(e),Wi(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 s=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var f=0,x=-1,b=-1,z=0,O=0,B=e,R=null;t:for(;;){for(var _;B!==a||s!==0&&B.nodeType!==3||(x=f+s),B!==i||l!==0&&B.nodeType!==3||(b=f+l),B.nodeType===3&&(f+=B.nodeValue.length),(_=B.firstChild)!==null;)R=B,B=_;for(;;){if(B===e)break t;if(R===a&&++z===s&&(x=f),R===i&&++O===l&&(b=f),(_=B.nextSibling)!==null)break;B=R,R=B.parentNode}B=_}a=x===-1||b===-1?null:{start:x,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(Tc={focusedElem:e,selectionRange:a},ii=!1,ke=t;ke!==null;)if(t=ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ke=e;else for(;ke!==null;){switch(t=ke,i=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++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,s=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var K=Ia(a.type,s);e=l.getSnapshotBeforeUpdate(K,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(I){je(a,a.return,I)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mc(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,ke=e;break}ke=t.return}}function $f(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:la(e,a),l&4&&Sn(5,a);break;case 1:if(la(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){je(a,a.return,f)}else{var s=Ia(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){je(a,a.return,f)}}l&64&&Gf(a),l&512&&En(a,a.return);break;case 3:if(la(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{Ro(e,t)}catch(f){je(a,a.return,f)}}break;case 27:t===null&&l&4&&Zf(a);case 26:case 5:la(e,a),t===null&&l&4&&Qf(a),l&512&&En(a,a.return);break;case 12:la(e,a);break;case 31:la(e,a),l&4&&Wf(e,a);break;case 13:la(e,a),l&4&&Ff(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=kx.bind(null,a),dh(e,a))));break;case 22:if(l=a.memoizedState!==null||ta,!l){t=t!==null&&t.memoizedState!==null||Xe,s=ta;var i=Xe;ta=l,(Xe=t)&&!i?na(e,a,(a.subtreeFlags&8772)!==0):la(e,a),ta=s,Xe=i}break;case 30:break;default:la(e,a)}}function Kf(e){var t=e.alternate;t!==null&&(e.alternate=null,Kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Oi(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 _e=null,nt=!1;function aa(e,t,a){for(a=a.child;a!==null;)Jf(e,t,a),a=a.sibling}function Jf(e,t,a){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount($l,a)}catch{}switch(a.tag){case 26:Xe||qt(a,t),aa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Xe||qt(a,t);var l=_e,s=nt;za(a.type)&&(_e=a.stateNode,nt=!1),aa(e,t,a),On(a.stateNode),_e=l,nt=s;break;case 5:Xe||qt(a,t);case 6:if(l=_e,s=nt,_e=null,aa(e,t,a),_e=l,nt=s,_e!==null)if(nt)try{(_e.nodeType===9?_e.body:_e.nodeName==="HTML"?_e.ownerDocument.body:_e).removeChild(a.stateNode)}catch(i){je(a,t,i)}else try{_e.removeChild(a.stateNode)}catch(i){je(a,t,i)}break;case 18:_e!==null&&(nt?(e=_e,Gd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yl(e)):Gd(_e,a.stateNode));break;case 4:l=_e,s=nt,_e=a.stateNode.containerInfo,nt=!0,aa(e,t,a),_e=l,nt=s;break;case 0:case 11:case 14:case 15:Na(2,a,t),Xe||Na(4,a,t),aa(e,t,a);break;case 1:Xe||(qt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Xf(a,t,l)),aa(e,t,a);break;case 21:aa(e,t,a);break;case 22:Xe=(l=Xe)||a.memoizedState!==null,aa(e,t,a),Xe=l;break;default:aa(e,t,a)}}function Wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yl(e)}catch(a){je(t,t.return,a)}}}function Ff(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yl(e)}catch(a){je(t,t.return,a)}}function Bx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new kf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new kf),t;default:throw Error(c(435,e.tag))}}function Ys(e,t){var a=Bx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var s=$x.bind(null,e,l);l.then(s,s)}})}function st(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var s=a[l],i=e,f=t,x=f;e:for(;x!==null;){switch(x.tag){case 27:if(za(x.type)){_e=x.stateNode,nt=!1;break e}break;case 5:_e=x.stateNode,nt=!1;break e;case 3:case 4:_e=x.stateNode.containerInfo,nt=!0;break e}x=x.return}if(_e===null)throw Error(c(160));Jf(i,f,s),_e=null,nt=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pf(t,e),t=t.sibling}var Dt=null;function Pf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:st(t,e),it(e),l&4&&(Na(3,e,e.return),Sn(3,e),Na(5,e,e.return));break;case 1:st(t,e),it(e),l&512&&(Xe||a===null||qt(a,a.return)),l&64&&ta&&(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 s=Dt;if(st(t,e),it(e),l&512&&(Xe||a===null||qt(a,a.return)),l&4){var i=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,s=s.ownerDocument||s;t:switch(l){case"title":i=s.getElementsByTagName("title")[0],(!i||i[Wl]||i[$e]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(l),s.head.insertBefore(i,s.querySelector("head > title"))),Fe(i,l,a),i[$e]=e,Ze(i),l=i;break e;case"link":var f=Pd("link","href",s).get(l+(a.href||""));if(f){for(var x=0;x<f.length;x++)if(i=f[x],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(x,1);break t}}i=s.createElement(l),Fe(i,l,a),s.head.appendChild(i);break;case"meta":if(f=Pd("meta","content",s).get(l+(a.content||""))){for(x=0;x<f.length;x++)if(i=f[x],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(x,1);break t}}i=s.createElement(l),Fe(i,l,a),s.head.appendChild(i);break;default:throw Error(c(468,l))}i[$e]=e,Ze(i),l=i}e.stateNode=l}else Id(s,e.type,e.stateNode);else e.stateNode=Fd(s,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?Id(s,e.type,e.stateNode):Fd(s,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ec(e,e.memoizedProps,a.memoizedProps)}break;case 27:st(t,e),it(e),l&512&&(Xe||a===null||qt(a,a.return)),a!==null&&l&4&&ec(e,e.memoizedProps,a.memoizedProps);break;case 5:if(st(t,e),it(e),l&512&&(Xe||a===null||qt(a,a.return)),e.flags&32){s=e.stateNode;try{ul(s,"")}catch(K){je(e,e.return,K)}}l&4&&e.stateNode!=null&&(s=e.memoizedProps,ec(e,s,a!==null?a.memoizedProps:s)),l&1024&&(lc=!0);break;case 6:if(st(t,e),it(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(K){je(e,e.return,K)}}break;case 3:if(ai=null,s=Dt,Dt=ei(t.containerInfo),st(t,e),Dt=s,it(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Yl(t.containerInfo)}catch(K){je(e,e.return,K)}lc&&(lc=!1,If(e));break;case 4:l=Dt,Dt=ei(e.stateNode.containerInfo),st(t,e),it(e),Dt=l;break;case 12:st(t,e),it(e);break;case 31:st(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 13:st(t,e),it(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Xs=ut()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 22:s=e.memoizedState!==null;var b=a!==null&&a.memoizedState!==null,z=ta,O=Xe;if(ta=z||s,Xe=O||b,st(t,e),Xe=O,ta=z,it(e),l&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||b||ta||Xe||el(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){b=a=t;try{if(i=b.stateNode,s)f=i.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{x=b.stateNode;var B=b.memoizedProps.style,R=B!=null&&B.hasOwnProperty("display")?B.display:null;x.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(K){je(b,b.return,K)}}}else if(t.tag===6){if(a===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(K){je(b,b.return,K)}}}else if(t.tag===18){if(a===null){b=t;try{var _=b.stateNode;s?Xd(_,!0):Xd(b.stateNode,!1)}catch(K){je(b,b.return,K)}}}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,Ys(e,a))));break;case 19:st(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 30:break;case 21:break;default:st(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Vf(l)){a=l;break}l=l.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var s=a.stateNode,i=tc(e);qs(e,i,s);break;case 5:var f=a.stateNode;a.flags&32&&(ul(f,""),a.flags&=-33);var x=tc(e);qs(e,x,f);break;case 3:case 4:var b=a.stateNode.containerInfo,z=tc(e);ac(e,z,b);break;default:throw Error(c(161))}}catch(O){je(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function If(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;If(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function la(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$f(e,t.alternate,t),t=t.sibling}function el(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),el(t);break;case 1:qt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Xf(t,t.return,a),el(t);break;case 27:On(t.stateNode);case 26:case 5:qt(t,t.return),el(t);break;case 22:t.memoizedState===null&&el(t);break;case 30:el(t);break;default:el(t)}e=e.sibling}}function na(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,s=e,i=t,f=i.flags;switch(i.tag){case 0:case 11:case 15:na(s,i,a),Sn(4,i);break;case 1:if(na(s,i,a),l=i,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(z){je(l,l.return,z)}if(l=i,s=l.updateQueue,s!==null){var x=l.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)zo(b[s],x)}catch(z){je(l,l.return,z)}}a&&f&64&&Gf(i),En(i,i.return);break;case 27:Zf(i);case 26:case 5:na(s,i,a),a&&l===null&&f&4&&Qf(i),En(i,i.return);break;case 12:na(s,i,a);break;case 31:na(s,i,a),a&&f&4&&Wf(s,i);break;case 13:na(s,i,a),a&&f&4&&Ff(s,i);break;case 22:i.memoizedState===null&&na(s,i,a),En(i,i.return);break;case 30:break;default:na(s,i,a)}t=t.sibling}}function nc(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&&on(a))}function sc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&on(e))}function Ut(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ed(e,t,a,l),t=t.sibling}function ed(e,t,a,l){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Ut(e,t,a,l),s&2048&&Sn(9,t);break;case 1:Ut(e,t,a,l);break;case 3:Ut(e,t,a,l),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&on(e)));break;case 12:if(s&2048){Ut(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,f=i.id,x=i.onPostCommit;typeof x=="function"&&x(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){je(t,t.return,b)}}else Ut(e,t,a,l);break;case 31:Ut(e,t,a,l);break;case 13:Ut(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,f=t.alternate,t.memoizedState!==null?i._visibility&2?Ut(e,t,a,l):Tn(e,t):i._visibility&2?Ut(e,t,a,l):(i._visibility|=2,zl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),s&2048&&nc(f,t);break;case 24:Ut(e,t,a,l),s&2048&&sc(t.alternate,t);break;default:Ut(e,t,a,l)}}function zl(e,t,a,l,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,f=t,x=a,b=l,z=f.flags;switch(f.tag){case 0:case 11:case 15:zl(i,f,x,b,s),Sn(8,f);break;case 23:break;case 22:var O=f.stateNode;f.memoizedState!==null?O._visibility&2?zl(i,f,x,b,s):Tn(i,f):(O._visibility|=2,zl(i,f,x,b,s)),s&&z&2048&&nc(f.alternate,f);break;case 24:zl(i,f,x,b,s),s&&z&2048&&sc(f.alternate,f);break;default:zl(i,f,x,b,s)}t=t.sibling}}function Tn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,s=l.flags;switch(l.tag){case 22:Tn(a,l),s&2048&&nc(l.alternate,l);break;case 24:Tn(a,l),s&2048&&sc(l.alternate,l);break;default:Tn(a,l)}t=t.sibling}}var Cn=8192;function Rl(e,t,a){if(e.subtreeFlags&Cn)for(e=e.child;e!==null;)td(e,t,a),e=e.sibling}function td(e,t,a){switch(e.tag){case 26:Rl(e,t,a),e.flags&Cn&&e.memoizedState!==null&&Eh(a,Dt,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,a);break;case 3:case 4:var l=Dt;Dt=ei(e.stateNode.containerInfo),Rl(e,t,a),Dt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Cn,Cn=16777216,Rl(e,t,a),Cn=l):Rl(e,t,a));break;default:Rl(e,t,a)}}function ad(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 An(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];ke=l,nd(l,e)}ad(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ld(e),e=e.sibling}function ld(e){switch(e.tag){case 0:case 11:case 15:An(e),e.flags&2048&&Na(9,e,e.return);break;case 3:An(e);break;case 12:An(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gs(e)):An(e);break;default:An(e)}}function Gs(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];ke=l,nd(l,e)}ad(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),Gs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Gs(t));break;default:Gs(t)}e=e.sibling}}function nd(e,t){for(;ke!==null;){var a=ke;switch(a.tag){case 0:case 11:case 15:Na(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:on(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ke=l;else e:for(a=e;ke!==null;){l=ke;var s=l.sibling,i=l.return;if(Kf(l),l===a){ke=null;break e}if(s!==null){s.return=i,ke=s;break e}ke=i}}}var qx={getCacheForType:function(e){var t=Je(qe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Je(qe).controller.signal}},Yx=typeof WeakMap=="function"?WeakMap:Map,pe=0,Me=null,oe=null,de=0,be=0,gt=null,Sa=!1,_l=!1,ic=!1,sa=0,Ue=0,Ea=0,tl=0,rc=0,yt=0,wl=0,Mn=null,rt=null,cc=!1,Xs=0,sd=0,Qs=1/0,Vs=null,Ta=null,Ve=0,Ca=null,Ol=null,ia=0,uc=0,oc=null,id=null,zn=0,fc=null;function pt(){return(pe&2)!==0&&de!==0?de&-de:U.T!==null?yc():bu()}function rd(){if(yt===0)if((de&536870912)===0||he){var e=Pn;Pn<<=1,(Pn&3932160)===0&&(Pn=262144),yt=e}else yt=536870912;return e=xt.current,e!==null&&(e.flags|=32),yt}function ct(e,t,a){(e===Me&&(be===2||be===9)||e.cancelPendingCommit!==null)&&(Dl(e,0),Aa(e,de,yt,!1)),Jl(e,a),((pe&2)===0||e!==Me)&&(e===Me&&((pe&2)===0&&(tl|=a),Ue===4&&Aa(e,de,yt,!1)),Yt(e))}function cd(e,t,a){if((pe&6)!==0)throw Error(c(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Kl(e,t),s=l?Qx(e,t):mc(e,t,!0),i=l;do{if(s===0){_l&&!l&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Gx(a)){s=mc(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var x=e;s=Mn;var b=x.current.memoizedState.isDehydrated;if(b&&(Dl(x,f).flags|=256),f=mc(x,f,!1),f!==2){if(ic&&!b){x.errorRecoveryDisabledLanes|=i,tl|=i,s=4;break e}i=rt,rt=s,i!==null&&(rt===null?rt=i:rt.push.apply(rt,i))}s=f}if(i=!1,s!==2)continue}}if(s===1){Dl(e,0),Aa(e,t,0,!0);break}e:{switch(l=e,i=s,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Aa(l,t,yt,!Sa);break e;case 2:rt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(s=Xs+300-ut(),10<s)){if(Aa(l,t,yt,!Sa),es(l,0,!0)!==0)break e;ia=t,l.timeoutHandle=qd(ud.bind(null,l,a,rt,Vs,cc,t,yt,tl,wl,Sa,i,"Throttled",-0,0),s);break e}ud(l,a,rt,Vs,cc,t,yt,tl,wl,Sa,i,null,-0,0)}}break}while(!0);Yt(e)}function ud(e,t,a,l,s,i,f,x,b,z,O,B,R,_){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},td(t,i,B);var K=(i&62914560)===i?Xs-ut():(i&4194048)===i?sd-ut():0;if(K=Th(B,K),K!==null){ia=i,e.cancelPendingCommit=K(yd.bind(null,e,t,i,a,l,s,f,x,b,O,B,null,R,_)),Aa(e,i,f,!z);return}}yd(e,t,i,a,l,s,f,x,b)}function Gx(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 s=a[l],i=s.getSnapshot;s=s.value;try{if(!dt(i(),s))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 Aa(e,t,a,l){t&=~rc,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var s=t;0<s;){var i=31-ft(s),f=1<<i;l[i]=-1,s&=~f}a!==0&&yu(e,a,t)}function Zs(){return(pe&6)===0?(Rn(0),!1):!0}function dc(){if(oe!==null){if(be===0)var e=oe.return;else e=oe,Jt=ka=null,Mr(e),El=null,dn=0,e=oe;for(;e!==null;)Yf(e.alternate,e),e=e.return;oe=null}}function Dl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,rh(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ia=0,dc(),Me=e,oe=a=$t(e.current,null),de=t,be=0,gt=null,Sa=!1,_l=Kl(e,t),ic=!1,wl=yt=rc=tl=Ea=Ue=0,rt=Mn=null,cc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-ft(l),i=1<<s;t|=e[s],l&=~i}return sa=t,ds(),a}function od(e,t){se=null,U.H=bn,t===Sl||t===bs?(t=To(),be=3):t===gr?(t=To(),be=4):be=t===Vr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gt=t,oe===null&&(Ue=1,Ds(e,Et(t,e.current)))}function fd(){var e=xt.current;return e===null?!0:(de&4194048)===de?Mt===null:(de&62914560)===de||(de&536870912)!==0?e===Mt:!1}function dd(){var e=U.H;return U.H=bn,e===null?bn:e}function md(){var e=U.A;return U.A=qx,e}function ks(){Ue=4,Sa||(de&4194048)!==de&&xt.current!==null||(_l=!0),(Ea&134217727)===0&&(tl&134217727)===0||Me===null||Aa(Me,de,yt,!1)}function mc(e,t,a){var l=pe;pe|=2;var s=dd(),i=md();(Me!==e||de!==t)&&(Vs=null,Dl(e,t)),t=!1;var f=Ue;e:do try{if(be!==0&&oe!==null){var x=oe,b=gt;switch(be){case 8:dc(),f=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var z=be;if(be=0,gt=null,Ul(e,x,b,z),a&&_l){f=0;break e}break;default:z=be,be=0,gt=null,Ul(e,x,b,z)}}Xx(),f=Ue;break}catch(O){od(e,O)}while(!0);return t&&e.shellSuspendCounter++,Jt=ka=null,pe=l,U.H=s,U.A=i,oe===null&&(Me=null,de=0,ds()),f}function Xx(){for(;oe!==null;)xd(oe)}function Qx(e,t){var a=pe;pe|=2;var l=dd(),s=md();Me!==e||de!==t?(Vs=null,Qs=ut()+500,Dl(e,t)):_l=Kl(e,t);e:do try{if(be!==0&&oe!==null){t=oe;var i=gt;t:switch(be){case 1:be=0,gt=null,Ul(e,t,i,1);break;case 2:case 9:if(So(i)){be=0,gt=null,hd(t);break}t=function(){be!==2&&be!==9||Me!==e||(be=7),Yt(e)},i.then(t,t);break e;case 3:be=7;break e;case 4:be=5;break e;case 7:So(i)?(be=0,gt=null,hd(t)):(be=0,gt=null,Ul(e,t,i,7));break;case 5:var f=null;switch(oe.tag){case 26:f=oe.memoizedState;case 5:case 27:var x=oe;if(f?e0(f):x.stateNode.complete){be=0,gt=null;var b=x.sibling;if(b!==null)oe=b;else{var z=x.return;z!==null?(oe=z,$s(z)):oe=null}break t}}be=0,gt=null,Ul(e,t,i,5);break;case 6:be=0,gt=null,Ul(e,t,i,6);break;case 8:dc(),Ue=6;break e;default:throw Error(c(462))}}Vx();break}catch(O){od(e,O)}while(!0);return Jt=ka=null,U.H=l,U.A=s,pe=a,oe!==null?0:(Me=null,de=0,ds(),Ue)}function Vx(){for(;oe!==null&&!mm();)xd(oe)}function xd(e){var t=Bf(e.alternate,e,sa);e.memoizedProps=e.pendingProps,t===null?$s(e):oe=t}function hd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wf(a,t,t.pendingProps,t.type,void 0,de);break;case 11:t=wf(a,t,t.pendingProps,t.type.render,t.ref,de);break;case 5:Mr(t);default:Yf(a,t),t=oe=fo(t,sa),t=Bf(a,t,sa)}e.memoizedProps=e.pendingProps,t===null?$s(e):oe=t}function Ul(e,t,a,l){Jt=ka=null,Mr(t),El=null,dn=0;var s=t.return;try{if(wx(e,s,t,a,de)){Ue=1,Ds(e,Et(a,e.current)),oe=null;return}}catch(i){if(s!==null)throw oe=s,i;Ue=1,Ds(e,Et(a,e.current)),oe=null;return}t.flags&32768?(he||l===1?e=!0:_l||(de&536870912)!==0?e=!1:(Sa=e=!0,(l===2||l===9||l===3||l===6)&&(l=xt.current,l!==null&&l.tag===13&&(l.flags|=16384))),gd(t,e)):$s(t)}function $s(e){var t=e;do{if((t.flags&32768)!==0){gd(t,Sa);return}e=t.return;var a=Ux(t.alternate,t,sa);if(a!==null){oe=a;return}if(t=t.sibling,t!==null){oe=t;return}oe=t=e}while(t!==null);Ue===0&&(Ue=5)}function gd(e,t){do{var a=Lx(e.alternate,e);if(a!==null){a.flags&=32767,oe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){oe=e;return}oe=e=a}while(e!==null);Ue=6,oe=null}function yd(e,t,a,l,s,i,f,x,b){e.cancelPendingCommit=null;do Ks();while(Ve!==0);if((pe&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=tr,Sm(e,a,i,f,x,b),e===Me&&(oe=Me=null,de=0),Ol=t,Ca=e,ia=a,uc=i,oc=s,id=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Kx(Wn,function(){return Nd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,s=Z.p,Z.p=2,f=pe,pe|=4;try{Hx(e,t,a)}finally{pe=f,Z.p=s,U.T=l}}Ve=1,pd(),vd(),bd()}}function pd(){if(Ve===1){Ve=0;var e=Ca,t=Ol,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=Z.p;Z.p=2;var s=pe;pe|=4;try{Pf(t,e);var i=Tc,f=ao(e.containerInfo),x=i.focusedElem,b=i.selectionRange;if(f!==x&&x&&x.ownerDocument&&to(x.ownerDocument.documentElement,x)){if(b!==null&&Wi(x)){var z=b.start,O=b.end;if(O===void 0&&(O=z),"selectionStart"in x)x.selectionStart=z,x.selectionEnd=Math.min(O,x.value.length);else{var B=x.ownerDocument||document,R=B&&B.defaultView||window;if(R.getSelection){var _=R.getSelection(),K=x.textContent.length,I=Math.min(b.start,K),Te=b.end===void 0?I:Math.min(b.end,K);!_.extend&&I>Te&&(f=Te,Te=I,I=f);var T=eo(x,I),N=eo(x,Te);if(T&&N&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==N.node||_.focusOffset!==N.offset)){var M=B.createRange();M.setStart(T.node,T.offset),_.removeAllRanges(),I>Te?(_.addRange(M),_.extend(N.node,N.offset)):(M.setEnd(N.node,N.offset),_.addRange(M))}}}}for(B=[],_=x;_=_.parentNode;)_.nodeType===1&&B.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<B.length;x++){var L=B[x];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}ii=!!Ec,Tc=Ec=null}finally{pe=s,Z.p=l,U.T=a}}e.current=t,Ve=2}}function vd(){if(Ve===2){Ve=0;var e=Ca,t=Ol,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=Z.p;Z.p=2;var s=pe;pe|=4;try{$f(e,t.alternate,t)}finally{pe=s,Z.p=l,U.T=a}}Ve=3}}function bd(){if(Ve===4||Ve===3){Ve=0,xm();var e=Ca,t=Ol,a=ia,l=id;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ve=5:(Ve=0,Ol=Ca=null,jd(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ta=null),_i(a),t=t.stateNode,ot&&typeof ot.onCommitFiberRoot=="function")try{ot.onCommitFiberRoot($l,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=U.T,s=Z.p,Z.p=2,U.T=null;try{for(var i=e.onRecoverableError,f=0;f<l.length;f++){var x=l[f];i(x.value,{componentStack:x.stack})}}finally{U.T=t,Z.p=s}}(ia&3)!==0&&Ks(),Yt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===fc?zn++:(zn=0,fc=e):zn=0,Rn(0)}}function jd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,on(t)))}function Ks(){return pd(),vd(),bd(),Nd()}function Nd(){if(Ve!==5)return!1;var e=Ca,t=uc;uc=0;var a=_i(ia),l=U.T,s=Z.p;try{Z.p=32>a?32:a,U.T=null,a=oc,oc=null;var i=Ca,f=ia;if(Ve=0,Ol=Ca=null,ia=0,(pe&6)!==0)throw Error(c(331));var x=pe;if(pe|=4,ld(i.current),ed(i,i.current,f,a),pe=x,Rn(0,!1),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot($l,i)}catch{}return!0}finally{Z.p=s,U.T=l,jd(e,t)}}function Sd(e,t,a){t=Et(a,t),t=Qr(e.stateNode,t,2),e=va(e,t,2),e!==null&&(Jl(e,2),Yt(e))}function je(e,t,a){if(e.tag===3)Sd(e,e,a);else for(;t!==null;){if(t.tag===3){Sd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ta===null||!Ta.has(l))){e=Et(a,e),a=Ef(2),l=va(t,a,2),l!==null&&(Tf(a,l,t,e),Jl(l,2),Yt(l));break}}t=t.return}}function xc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Yx;var s=new Set;l.set(t,s)}else s=l.get(t),s===void 0&&(s=new Set,l.set(t,s));s.has(a)||(ic=!0,s.add(a),e=Zx.bind(null,e,t,a),t.then(e,e))}function Zx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(de&a)===a&&(Ue===4||Ue===3&&(de&62914560)===de&&300>ut()-Xs?(pe&2)===0&&Dl(e,0):rc|=a,wl===de&&(wl=0)),Yt(e)}function Ed(e,t){t===0&&(t=gu()),e=Qa(e,t),e!==null&&(Jl(e,t),Yt(e))}function kx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ed(e,a)}function $x(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),Ed(e,a)}function Kx(e,t){return Ai(e,t)}var Js=null,Ll=null,hc=!1,Ws=!1,gc=!1,Ma=0;function Yt(e){e!==Ll&&e.next===null&&(Ll===null?Js=Ll=e:Ll=Ll.next=e),Ws=!0,hc||(hc=!0,Wx())}function Rn(e,t){if(!gc&&Ws){gc=!0;do for(var a=!1,l=Js;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var i=0;else{var f=l.suspendedLanes,x=l.pingedLanes;i=(1<<31-ft(42|e)+1)-1,i&=s&~(f&~x),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Md(l,i))}else i=de,i=es(l,l===Me?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Kl(l,i)||(a=!0,Md(l,i));l=l.next}while(a);gc=!1}}function Jx(){Td()}function Td(){Ws=hc=!1;var e=0;Ma!==0&&ih()&&(e=Ma);for(var t=ut(),a=null,l=Js;l!==null;){var s=l.next,i=Cd(l,t);i===0?(l.next=null,a===null?Js=s:a.next=s,s===null&&(Ll=a)):(a=l,(e!==0||(i&3)!==0)&&(Ws=!0)),l=s}Ve!==0&&Ve!==5||Rn(e),Ma!==0&&(Ma=0)}function Cd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var f=31-ft(i),x=1<<f,b=s[f];b===-1?((x&a)===0||(x&l)!==0)&&(s[f]=Nm(x,t)):b<=t&&(e.expiredLanes|=x),i&=~x}if(t=Me,a=de,a=es(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(be===2||be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Mi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Kl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Mi(l),_i(a)){case 2:case 8:a=xu;break;case 32:a=Wn;break;case 268435456:a=hu;break;default:a=Wn}return l=Ad.bind(null,e),a=Ai(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Mi(l),e.callbackPriority=2,e.callbackNode=null,2}function Ad(e,t){if(Ve!==0&&Ve!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ks()&&e.callbackNode!==a)return null;var l=de;return l=es(e,e===Me?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(cd(e,l,t),Cd(e,ut()),e.callbackNode!=null&&e.callbackNode===a?Ad.bind(null,e):null)}function Md(e,t){if(Ks())return null;cd(e,t,!0)}function Wx(){ch(function(){(pe&6)!==0?Ai(mu,Jx):Td()})}function yc(){if(Ma===0){var e=jl;e===0&&(e=Fn,Fn<<=1,(Fn&261888)===0&&(Fn=256)),Ma=e}return Ma}function zd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ns(""+e)}function Rd(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 Fx(e,t,a,l,s){if(t==="submit"&&a&&a.stateNode===s){var i=zd((s[at]||null).action),f=l.submitter;f&&(t=(t=f[at]||null)?zd(t.formAction):f.getAttribute("formAction"),t!==null&&(i=t,f=null));var x=new cs("action","action",null,l,s);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ma!==0){var b=f?Rd(s,f):new FormData(s);Hr(a,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(x.preventDefault(),b=f?Rd(s,f):new FormData(s),Hr(a,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var pc=0;pc<er.length;pc++){var vc=er[pc],Px=vc.toLowerCase(),Ix=vc[0].toUpperCase()+vc.slice(1);Ot(Px,"on"+Ix)}Ot(so,"onAnimationEnd"),Ot(io,"onAnimationIteration"),Ot(ro,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(hx,"onTransitionRun"),Ot(gx,"onTransitionStart"),Ot(yx,"onTransitionCancel"),Ot(co,"onTransitionEnd"),rl("onMouseEnter",["mouseout","mouseover"]),rl("onMouseLeave",["mouseout","mouseover"]),rl("onPointerEnter",["pointerout","pointerover"]),rl("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _n="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(" "),eh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_n));function _d(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],s=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var f=l.length-1;0<=f;f--){var x=l[f],b=x.instance,z=x.currentTarget;if(x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=z;try{i(s)}catch(O){fs(O)}s.currentTarget=null,i=b}else for(f=0;f<l.length;f++){if(x=l[f],b=x.instance,z=x.currentTarget,x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=z;try{i(s)}catch(O){fs(O)}s.currentTarget=null,i=b}}}}function fe(e,t){var a=t[wi];a===void 0&&(a=t[wi]=new Set);var l=e+"__bubble";a.has(l)||(wd(t,e,2,!1),a.add(l))}function bc(e,t,a){var l=0;t&&(l|=4),wd(a,e,l,t)}var Fs="_reactListening"+Math.random().toString(36).slice(2);function jc(e){if(!e[Fs]){e[Fs]=!0,Su.forEach(function(a){a!=="selectionchange"&&(eh.has(a)||bc(a,!1,e),bc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fs]||(t[Fs]=!0,bc("selectionchange",!1,t))}}function wd(e,t,a,l){switch(r0(t)){case 2:var s=Mh;break;case 8:s=zh;break;default:s=Lc}a=s.bind(null,t,a,e),s=void 0,!Gi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),l?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function Nc(e,t,a,l,s){var i=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 x=l.stateNode.containerInfo;if(x===s)break;if(f===4)for(f=l.return;f!==null;){var b=f.tag;if((b===3||b===4)&&f.stateNode.containerInfo===s)return;f=f.return}for(;x!==null;){if(f=nl(x),f===null)return;if(b=f.tag,b===5||b===6||b===26||b===27){l=i=f;continue e}x=x.parentNode}}l=l.return}Uu(function(){var z=i,O=qi(a),B=[];e:{var R=uo.get(e);if(R!==void 0){var _=cs,K=e;switch(e){case"keypress":if(is(a)===0)break e;case"keydown":case"keyup":_=$m;break;case"focusin":K="focus",_=Zi;break;case"focusout":K="blur",_=Zi;break;case"beforeblur":case"afterblur":_=Zi;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":_=Bu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=Um;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=Wm;break;case so:case io:case ro:_=Bm;break;case co:_=Pm;break;case"scroll":case"scrollend":_=Om;break;case"wheel":_=ex;break;case"copy":case"cut":case"paste":_=Ym;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Yu;break;case"toggle":case"beforetoggle":_=ax}var I=(t&4)!==0,Te=!I&&(e==="scroll"||e==="scrollend"),T=I?R!==null?R+"Capture":null:R;I=[];for(var N=z,M;N!==null;){var L=N;if(M=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||M===null||T===null||(L=Pl(N,T),L!=null&&I.push(wn(N,L,M))),Te)break;N=N.return}0<I.length&&(R=new _(R,K,null,a,O),B.push({event:R,listeners:I}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",R&&a!==Bi&&(K=a.relatedTarget||a.fromElement)&&(nl(K)||K[ll]))break e;if((_||R)&&(R=O.window===O?O:(R=O.ownerDocument)?R.defaultView||R.parentWindow:window,_?(K=a.relatedTarget||a.toElement,_=z,K=K?nl(K):null,K!==null&&(Te=m(K),I=K.tag,K!==Te||I!==5&&I!==27&&I!==6)&&(K=null)):(_=null,K=z),_!==K)){if(I=Bu,L="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(I=Yu,L="onPointerLeave",T="onPointerEnter",N="pointer"),Te=_==null?R:Fl(_),M=K==null?R:Fl(K),R=new I(L,N+"leave",_,a,O),R.target=Te,R.relatedTarget=M,L=null,nl(O)===z&&(I=new I(T,N+"enter",K,a,O),I.target=M,I.relatedTarget=Te,L=I),Te=L,_&&K)t:{for(I=th,T=_,N=K,M=0,L=T;L;L=I(L))M++;L=0;for(var P=N;P;P=I(P))L++;for(;0<M-L;)T=I(T),M--;for(;0<L-M;)N=I(N),L--;for(;M--;){if(T===N||N!==null&&T===N.alternate){I=T;break t}T=I(T),N=I(N)}I=null}else I=null;_!==null&&Od(B,R,_,I,!1),K!==null&&Te!==null&&Od(B,Te,K,I,!0)}}e:{if(R=z?Fl(z):window,_=R.nodeName&&R.nodeName.toLowerCase(),_==="select"||_==="input"&&R.type==="file")var ge=Ku;else if(ku(R))if(Ju)ge=dx;else{ge=ox;var W=ux}else _=R.nodeName,!_||_.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?z&&Hi(z.elementType)&&(ge=Ku):ge=fx;if(ge&&(ge=ge(e,z))){$u(B,ge,a,O);break e}W&&W(e,R,z),e==="focusout"&&z&&R.type==="number"&&z.memoizedProps.value!=null&&Li(R,"number",R.value)}switch(W=z?Fl(z):window,e){case"focusin":(ku(W)||W.contentEditable==="true")&&(ml=W,Fi=z,rn=null);break;case"focusout":rn=Fi=ml=null;break;case"mousedown":Pi=!0;break;case"contextmenu":case"mouseup":case"dragend":Pi=!1,lo(B,a,O);break;case"selectionchange":if(xx)break;case"keydown":case"keyup":lo(B,a,O)}var re;if($i)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 dl?Vu(e,a)&&(me="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(me="onCompositionStart");me&&(Gu&&a.locale!=="ko"&&(dl||me!=="onCompositionStart"?me==="onCompositionEnd"&&dl&&(re=Lu()):(da=O,Xi="value"in da?da.value:da.textContent,dl=!0)),W=Ps(z,me),0<W.length&&(me=new qu(me,e,null,a,O),B.push({event:me,listeners:W}),re?me.data=re:(re=Zu(a),re!==null&&(me.data=re)))),(re=nx?sx(e,a):ix(e,a))&&(me=Ps(z,"onBeforeInput"),0<me.length&&(W=new qu("onBeforeInput","beforeinput",null,a,O),B.push({event:W,listeners:me}),W.data=re)),Fx(B,e,z,a,O)}_d(B,t)})}function wn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ps(e,t){for(var a=t+"Capture",l=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=Pl(e,a),s!=null&&l.unshift(wn(e,s,i)),s=Pl(e,t),s!=null&&l.push(wn(e,s,i))),e.tag===3)return l;e=e.return}return[]}function th(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,a,l,s){for(var i=t._reactName,f=[];a!==null&&a!==l;){var x=a,b=x.alternate,z=x.stateNode;if(x=x.tag,b!==null&&b===l)break;x!==5&&x!==26&&x!==27||z===null||(b=z,s?(z=Pl(a,i),z!=null&&f.unshift(wn(a,z,b))):s||(z=Pl(a,i),z!=null&&f.push(wn(a,z,b)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var ah=/\r\n?/g,lh=/\u0000|\uFFFD/g;function Dd(e){return(typeof e=="string"?e:""+e).replace(ah,`
|
|
9
|
+
`).replace(lh,"")}function Ud(e,t){return t=Dd(t),Dd(e)===t}function Ee(e,t,a,l,s,i){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":as(e,"class",l);break;case"tabIndex":as(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":as(e,a,l);break;case"style":Ou(e,l,i);break;case"data":if(t!=="object"){as(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=ns(""+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 i=="function"&&(a==="formAction"?(t!=="input"&&Ee(e,t,"name",s.name,s,null),Ee(e,t,"formEncType",s.formEncType,s,null),Ee(e,t,"formMethod",s.formMethod,s,null),Ee(e,t,"formTarget",s.formTarget,s,null)):(Ee(e,t,"encType",s.encType,s,null),Ee(e,t,"method",s.method,s,null),Ee(e,t,"target",s.target,s,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ns(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"onScroll":l!=null&&fe("scroll",e);break;case"onScrollEnd":l!=null&&fe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(c(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=ns(""+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":fe("beforetoggle",e),fe("toggle",e),ts(e,"popover",l);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ts(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=_m.get(a)||a,ts(e,a,l))}}function Sc(e,t,a,l,s,i){switch(a){case"style":Ou(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(c(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&&fe("scroll",e);break;case"onScrollEnd":l!=null&&fe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Eu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),i=e[at]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,s);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ts(e,a,l)}}}function Fe(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":fe("error",e),fe("load",e);var l=!1,s=!1,i;for(i in a)if(a.hasOwnProperty(i)){var f=a[i];if(f!=null)switch(i){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ee(e,t,i,f,a,null)}}s&&Ee(e,t,"srcSet",a.srcSet,a,null),l&&Ee(e,t,"src",a.src,a,null);return;case"input":fe("invalid",e);var x=i=f=s=null,b=null,z=null;for(l in a)if(a.hasOwnProperty(l)){var O=a[l];if(O!=null)switch(l){case"name":s=O;break;case"type":f=O;break;case"checked":b=O;break;case"defaultChecked":z=O;break;case"value":i=O;break;case"defaultValue":x=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:Ee(e,t,l,O,a,null)}}zu(e,i,x,b,z,f,s,!1);return;case"select":fe("invalid",e),l=f=i=null;for(s in a)if(a.hasOwnProperty(s)&&(x=a[s],x!=null))switch(s){case"value":i=x;break;case"defaultValue":f=x;break;case"multiple":l=x;default:Ee(e,t,s,x,a,null)}t=i,a=f,e.multiple=!!l,t!=null?cl(e,!!l,t,!1):a!=null&&cl(e,!!l,a,!0);return;case"textarea":fe("invalid",e),i=s=l=null;for(f in a)if(a.hasOwnProperty(f)&&(x=a[f],x!=null))switch(f){case"value":l=x;break;case"defaultValue":s=x;break;case"children":i=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(c(91));break;default:Ee(e,t,f,x,a,null)}_u(e,l,s,i);return;case"option":for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null)&&(b==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ee(e,t,b,l,a,null));return;case"dialog":fe("beforetoggle",e),fe("toggle",e),fe("cancel",e),fe("close",e);break;case"iframe":case"object":fe("load",e);break;case"video":case"audio":for(l=0;l<_n.length;l++)fe(_n[l],e);break;case"image":fe("error",e),fe("load",e);break;case"details":fe("toggle",e);break;case"embed":case"source":case"link":fe("error",e),fe("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(c(137,t));default:Ee(e,t,z,l,a,null)}return;default:if(Hi(t)){for(O in a)a.hasOwnProperty(O)&&(l=a[O],l!==void 0&&Sc(e,t,O,l,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null&&Ee(e,t,x,l,a,null))}function nh(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 s=null,i=null,f=null,x=null,b=null,z=null,O=null;for(_ in a){var B=a[_];if(a.hasOwnProperty(_)&&B!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":b=B;default:l.hasOwnProperty(_)||Ee(e,t,_,null,l,B)}}for(var R in l){var _=l[R];if(B=a[R],l.hasOwnProperty(R)&&(_!=null||B!=null))switch(R){case"type":i=_;break;case"name":s=_;break;case"checked":z=_;break;case"defaultChecked":O=_;break;case"value":f=_;break;case"defaultValue":x=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:_!==B&&Ee(e,t,R,_,l,B)}}Ui(e,f,x,b,z,O,i,s);return;case"select":_=f=x=R=null;for(i in a)if(b=a[i],a.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":_=b;default:l.hasOwnProperty(i)||Ee(e,t,i,null,l,b)}for(s in l)if(i=l[s],b=a[s],l.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":R=i;break;case"defaultValue":x=i;break;case"multiple":f=i;default:i!==b&&Ee(e,t,s,i,l,b)}t=x,a=f,l=_,R!=null?cl(e,!!a,R,!1):!!l!=!!a&&(t!=null?cl(e,!!a,t,!0):cl(e,!!a,a?[]:"",!1));return;case"textarea":_=R=null;for(x in a)if(s=a[x],a.hasOwnProperty(x)&&s!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ee(e,t,x,null,l,s)}for(f in l)if(s=l[f],i=a[f],l.hasOwnProperty(f)&&(s!=null||i!=null))switch(f){case"value":R=s;break;case"defaultValue":_=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(c(91));break;default:s!==i&&Ee(e,t,f,s,l,i)}Ru(e,R,_);return;case"option":for(var K in a)R=a[K],a.hasOwnProperty(K)&&R!=null&&!l.hasOwnProperty(K)&&(K==="selected"?e.selected=!1:Ee(e,t,K,null,l,R));for(b in l)R=l[b],_=a[b],l.hasOwnProperty(b)&&R!==_&&(R!=null||_!=null)&&(b==="selected"?e.selected=R&&typeof R!="function"&&typeof R!="symbol":Ee(e,t,b,R,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 I in a)R=a[I],a.hasOwnProperty(I)&&R!=null&&!l.hasOwnProperty(I)&&Ee(e,t,I,null,l,R);for(z in l)if(R=l[z],_=a[z],l.hasOwnProperty(z)&&R!==_&&(R!=null||_!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(c(137,t));break;default:Ee(e,t,z,R,l,_)}return;default:if(Hi(t)){for(var Te in a)R=a[Te],a.hasOwnProperty(Te)&&R!==void 0&&!l.hasOwnProperty(Te)&&Sc(e,t,Te,void 0,l,R);for(O in l)R=l[O],_=a[O],!l.hasOwnProperty(O)||R===_||R===void 0&&_===void 0||Sc(e,t,O,R,l,_);return}}for(var T in a)R=a[T],a.hasOwnProperty(T)&&R!=null&&!l.hasOwnProperty(T)&&Ee(e,t,T,null,l,R);for(B in l)R=l[B],_=a[B],!l.hasOwnProperty(B)||R===_||R==null&&_==null||Ee(e,t,B,R,l,_)}function Ld(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sh(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var s=a[l],i=s.transferSize,f=s.initiatorType,x=s.duration;if(i&&x&&Ld(f)){for(f=0,x=s.responseEnd,l+=1;l<a.length;l++){var b=a[l],z=b.startTime;if(z>x)break;var O=b.transferSize,B=b.initiatorType;O&&Ld(B)&&(b=b.responseEnd,f+=O*(b<x?1:(x-z)/(b-z)))}if(--l,t+=8*(i+f)/(s.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 Ec=null,Tc=null;function Is(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Bd(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 Cc(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 Ac=null;function ih(){var e=window.event;return e&&e.type==="popstate"?e===Ac?!1:(Ac=e,!0):(Ac=null,!1)}var qd=typeof setTimeout=="function"?setTimeout:void 0,rh=typeof clearTimeout=="function"?clearTimeout:void 0,Yd=typeof Promise=="function"?Promise:void 0,ch=typeof queueMicrotask=="function"?queueMicrotask:typeof Yd<"u"?function(e){return Yd.resolve(null).then(e).catch(uh)}:qd;function uh(e){setTimeout(function(){throw e})}function za(e){return e==="head"}function Gd(e,t){var a=t,l=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(s),Yl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")On(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,On(a);for(var i=a.firstChild;i;){var f=i.nextSibling,x=i.nodeName;i[Wl]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=f}}else a==="body"&&On(e.ownerDocument.body);a=s}while(a);Yl(t)}function Xd(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 Mc(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":Mc(a),Oi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function oh(e,t,a,l){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Wl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=zt(e.nextSibling),e===null)break}return null}function fh(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=zt(e.nextSibling),e===null))return null;return e}function Qd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=zt(e.nextSibling),e===null))return null;return e}function zc(e){return e.data==="$?"||e.data==="$~"}function Rc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function dh(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 zt(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 _c=null;function Vd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return zt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Zd(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 kd(e,t,a){switch(t=Is(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function On(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oi(e)}var Rt=new Map,$d=new Set;function ei(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ra=Z.d;Z.d={f:mh,r:xh,D:hh,C:gh,L:yh,m:ph,X:bh,S:vh,M:jh};function mh(){var e=ra.f(),t=Zs();return e||t}function xh(e){var t=sl(e);t!==null&&t.tag===5&&t.type==="form"?of(t):ra.r(e)}var Hl=typeof document>"u"?null:document;function Kd(e,t,a){var l=Hl;if(l&&typeof t=="string"&&t){var s=Nt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),$d.has(s)||($d.add(s),e={rel:e,crossOrigin:a,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),Fe(t,"link",e),Ze(t),l.head.appendChild(t)))}}function hh(e){ra.D(e),Kd("dns-prefetch",e,null)}function gh(e,t){ra.C(e,t),Kd("preconnect",e,t)}function yh(e,t,a){ra.L(e,t,a);var l=Hl;if(l&&e&&t){var s='link[rel="preload"][as="'+Nt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Nt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Nt(a.imageSizes)+'"]')):s+='[href="'+Nt(e)+'"]';var i=s;switch(t){case"style":i=Bl(e);break;case"script":i=ql(e)}Rt.has(i)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Rt.set(i,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(Dn(i))||t==="script"&&l.querySelector(Un(i))||(t=l.createElement("link"),Fe(t,"link",e),Ze(t),l.head.appendChild(t)))}}function ph(e,t){ra.m(e,t);var a=Hl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Nt(l)+'"][href="'+Nt(e)+'"]',i=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ql(e)}if(!Rt.has(i)&&(e=y({rel:"modulepreload",href:e},t),Rt.set(i,e),a.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Un(i)))return}l=a.createElement("link"),Fe(l,"link",e),Ze(l),a.head.appendChild(l)}}}function vh(e,t,a){ra.S(e,t,a);var l=Hl;if(l&&e){var s=il(l).hoistableStyles,i=Bl(e);t=t||"default";var f=s.get(i);if(!f){var x={loading:0,preload:null};if(f=l.querySelector(Dn(i)))x.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Rt.get(i))&&wc(e,a);var b=f=l.createElement("link");Ze(b),Fe(b,"link",e),b._p=new Promise(function(z,O){b.onload=z,b.onerror=O}),b.addEventListener("load",function(){x.loading|=1}),b.addEventListener("error",function(){x.loading|=2}),x.loading|=4,ti(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:x},s.set(i,f)}}}function bh(e,t){ra.X(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(Un(s)),i||(e=y({src:e,async:!0},t),(t=Rt.get(s))&&Oc(e,t),i=a.createElement("script"),Ze(i),Fe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function jh(e,t){ra.M(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(Un(s)),i||(e=y({src:e,async:!0,type:"module"},t),(t=Rt.get(s))&&Oc(e,t),i=a.createElement("script"),Ze(i),Fe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Jd(e,t,a,l){var s=(s=ue.current)?ei(s):null;if(!s)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Bl(a.href),a=il(s).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=Bl(a.href);var i=il(s).hoistableStyles,f=i.get(e);if(f||(s=s.ownerDocument||s,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=s.querySelector(Dn(e)))&&!i._p&&(f.instance=i,f.state.loading=5),Rt.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},Rt.set(e,a),i||Nh(s,e,a,f.state))),t&&l===null)throw Error(c(528,""));return f}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ql(a),a=il(s).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(c(444,e))}}function Bl(e){return'href="'+Nt(e)+'"'}function Dn(e){return'link[rel="stylesheet"]['+e+"]"}function Wd(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Nh(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}),Fe(t,"link",a),Ze(t),e.head.appendChild(t))}function ql(e){return'[src="'+Nt(e)+'"]'}function Un(e){return"script[async]"+e}function Fd(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Nt(a.href)+'"]');if(l)return t.instance=l,Ze(l),l;var s=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ze(l),Fe(l,"style",s),ti(l,a.precedence,e),t.instance=l;case"stylesheet":s=Bl(a.href);var i=e.querySelector(Dn(s));if(i)return t.state.loading|=4,t.instance=i,Ze(i),i;l=Wd(a),(s=Rt.get(s))&&wc(l,s),i=(e.ownerDocument||e).createElement("link"),Ze(i);var f=i;return f._p=new Promise(function(x,b){f.onload=x,f.onerror=b}),Fe(i,"link",l),t.state.loading|=4,ti(i,a.precedence,e),t.instance=i;case"script":return i=ql(a.src),(s=e.querySelector(Un(i)))?(t.instance=s,Ze(s),s):(l=a,(s=Rt.get(i))&&(l=y({},a),Oc(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ze(s),Fe(s,"link",l),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ti(l,a.precedence,e));return t.instance}function ti(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=l.length?l[l.length-1]:null,i=s,f=0;f<l.length;f++){var x=l[f];if(x.dataset.precedence===t)i=x;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Oc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ai=null;function Pd(e,t,a){if(ai===null){var l=new Map,s=ai=new Map;s.set(a,l)}else s=ai,l=s.get(a),l||(l=new Map,s.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var i=a[s];if(!(i[Wl]||i[$e]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var f=i.getAttribute(t)||"";f=e+f;var x=l.get(f);x?x.push(i):l.set(f,[i])}}return l}function Id(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Sh(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 e0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Eh(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 s=Bl(l.href),i=t.querySelector(Dn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=li.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,Ze(i);return}i=t.ownerDocument||t,l=Wd(l),(s=Rt.get(s))&&wc(l,s),i=i.createElement("link"),Ze(i);var f=i;f._p=new Promise(function(x,b){f.onload=x,f.onerror=b}),Fe(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=li.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Dc=0;function Th(e,t){return e.stylesheets&&e.count===0&&si(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&si(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Dc===0&&(Dc=62500*sh());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&si(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Dc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function li(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)si(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ni=null;function si(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ni=new Map,t.forEach(Ch,e),ni=null,li.call(e))}function Ch(e,t){if(!(t.state.loading&4)){var a=ni.get(e);if(a)var l=a.get(null);else{a=new Map,ni.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var f=s[i];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),l=f)}l&&a.set(null,l)}s=t.instance,f=s.getAttribute("data-precedence"),i=a.get(f)||l,i===l&&a.set(null,s),a.set(f,s),this.count++,l=li.bind(this),s.addEventListener("load",l),s.addEventListener("error",l),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Ln={$$typeof:V,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Ah(e,t,a,l,s,i,f,x,b){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=zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.hiddenUpdates=zi(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function t0(e,t,a,l,s,i,f,x,b,z,O,B){return e=new Ah(e,t,a,f,b,z,O,B,x),t=1,i===!0&&(t|=24),i=mt(3,null,null,t),e.current=i,i.stateNode=e,t=mr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},yr(i),e}function a0(e){return e?(e=gl,e):gl}function l0(e,t,a,l,s,i){s=a0(s),l.context===null?l.context=s:l.pendingContext=s,l=pa(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=va(e,l,t),a!==null&&(ct(a,e,t),xn(a,e,t))}function n0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Uc(e,t){n0(e,t),(e=e.alternate)&&n0(e,t)}function s0(e){if(e.tag===13||e.tag===31){var t=Qa(e,67108864);t!==null&&ct(t,e,67108864),Uc(e,67108864)}}function i0(e){if(e.tag===13||e.tag===31){var t=pt();t=Ri(t);var a=Qa(e,t);a!==null&&ct(a,e,t),Uc(e,t)}}var ii=!0;function Mh(e,t,a,l){var s=U.T;U.T=null;var i=Z.p;try{Z.p=2,Lc(e,t,a,l)}finally{Z.p=i,U.T=s}}function zh(e,t,a,l){var s=U.T;U.T=null;var i=Z.p;try{Z.p=8,Lc(e,t,a,l)}finally{Z.p=i,U.T=s}}function Lc(e,t,a,l){if(ii){var s=Hc(l);if(s===null)Nc(e,t,l,ri,a),c0(e,l);else if(_h(s,e,t,a,l))l.stopPropagation();else if(c0(e,l),t&4&&-1<Rh.indexOf(e)){for(;s!==null;){var i=sl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var f=Ba(i.pendingLanes);if(f!==0){var x=i;for(x.pendingLanes|=2,x.entangledLanes|=2;f;){var b=1<<31-ft(f);x.entanglements[1]|=b,f&=~b}Yt(i),(pe&6)===0&&(Qs=ut()+500,Rn(0))}}break;case 31:case 13:x=Qa(i,2),x!==null&&ct(x,i,2),Zs(),Uc(i,2)}if(i=Hc(l),i===null&&Nc(e,t,l,ri,a),i===s)break;s=i}s!==null&&l.stopPropagation()}else Nc(e,t,l,null,a)}}function Hc(e){return e=qi(e),Bc(e)}var ri=null;function Bc(e){if(ri=null,e=nl(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=v(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 ri=e,null}function r0(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(hm()){case mu:return 2;case xu:return 8;case Wn:case gm:return 32;case hu:return 268435456;default:return 32}default:return 32}}var qc=!1,Ra=null,_a=null,wa=null,Hn=new Map,Bn=new Map,Oa=[],Rh="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 c0(e,t){switch(e){case"focusin":case"focusout":Ra=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":wa=null;break;case"pointerover":case"pointerout":Hn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bn.delete(t.pointerId)}}function qn(e,t,a,l,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[s]},t!==null&&(t=sl(t),t!==null&&s0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function _h(e,t,a,l,s){switch(t){case"focusin":return Ra=qn(Ra,e,t,a,l,s),!0;case"dragenter":return _a=qn(_a,e,t,a,l,s),!0;case"mouseover":return wa=qn(wa,e,t,a,l,s),!0;case"pointerover":var i=s.pointerId;return Hn.set(i,qn(Hn.get(i)||null,e,t,a,l,s)),!0;case"gotpointercapture":return i=s.pointerId,Bn.set(i,qn(Bn.get(i)||null,e,t,a,l,s)),!0}return!1}function u0(e){var t=nl(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,ju(e.priority,function(){i0(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,ju(e.priority,function(){i0(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 ci(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Hc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Bi=l,a.target.dispatchEvent(l),Bi=null}else return t=sl(a),t!==null&&s0(t),e.blockedOn=a,!1;t.shift()}return!0}function o0(e,t,a){ci(e)&&a.delete(t)}function wh(){qc=!1,Ra!==null&&ci(Ra)&&(Ra=null),_a!==null&&ci(_a)&&(_a=null),wa!==null&&ci(wa)&&(wa=null),Hn.forEach(o0),Bn.forEach(o0)}function ui(e,t){e.blockedOn===t&&(e.blockedOn=null,qc||(qc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,wh)))}var oi=null;function f0(e){oi!==e&&(oi=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){oi===e&&(oi=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],s=e[t+2];if(typeof l!="function"){if(Bc(l||a)===null)continue;break}var i=sl(a);i!==null&&(e.splice(t,3),t-=3,Hr(i,{pending:!0,data:s,method:a.method,action:l},l,s))}}))}function Yl(e){function t(b){return ui(b,e)}Ra!==null&&ui(Ra,e),_a!==null&&ui(_a,e),wa!==null&&ui(wa,e),Hn.forEach(t),Bn.forEach(t);for(var a=0;a<Oa.length;a++){var l=Oa[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Oa.length&&(a=Oa[0],a.blockedOn===null);)u0(a),a.blockedOn===null&&Oa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var s=a[l],i=a[l+1],f=s[at]||null;if(typeof i=="function")f||f0(a);else if(f){var x=null;if(i&&i.hasAttribute("formAction")){if(s=i,f=i[at]||null)x=f.formAction;else if(Bc(s)!==null)continue}else x=f.action;typeof x=="function"?a[l+1]=x:(a.splice(l,3),l-=3),f0(a)}}}function d0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(f){return s=f})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,s=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),s!==null&&(s(),s=null)}}}function Yc(e){this._internalRoot=e}fi.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,l=pt();l0(a,l,e,t,null,null)},fi.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;l0(e.current,2,null,e,null,null),Zs(),t[ll]=null}};function fi(e){this._internalRoot=e}fi.prototype.unstable_scheduleHydration=function(e){if(e){var t=bu();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Oa.length&&t!==0&&t<Oa[a].priority;a++);Oa.splice(a,0,e),a===0&&u0(e)}};var m0=o.version;if(m0!=="19.2.4")throw Error(c(527,m0,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=h(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var Oh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!di.isDisabled&&di.supportsFiber)try{$l=di.inject(Oh),ot=di}catch{}}return Gn.createRoot=function(e,t){if(!d(e))throw Error(c(299));var a=!1,l="",s=bf,i=jf,f=Nf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=t0(e,1,!1,null,null,a,l,null,s,i,f,d0),e[ll]=t.current,jc(e),new Yc(t)},Gn.hydrateRoot=function(e,t,a){if(!d(e))throw Error(c(299));var l=!1,s="",i=bf,f=jf,x=Nf,b=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(b=a.formState)),t=t0(e,1,!0,t,a??null,l,s,b,i,f,x,d0),t.context=a0(null),a=t.current,l=pt(),l=Ri(l),s=pa(l),s.callback=null,va(a,s,l),a=l,t.current.lanes=a,Jl(t,a),Yt(t),e[ll]=t.current,jc(e),new fi(t)},Gn.version="19.2.4",Gn}var S0;function Qh(){if(S0)return Qc.exports;S0=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(o){console.error(o)}}return r(),Qc.exports=Xh(),Qc.exports}var Vh=Qh();var E0="popstate";function Zh(r={}){function o(c,d){let{pathname:m,search:g,hash:v}=c.location;return Pc("",{pathname:m,search:g,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function u(c,d){return typeof d=="string"?d:Vn(d)}return $h(o,u,null,r)}function we(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function Lt(r,o){if(!r){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function kh(){return Math.random().toString(36).substring(2,10)}function T0(r,o){return{usr:r.state,key:r.key,idx:o}}function Pc(r,o,u=null,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof o=="string"?Ql(o):o,state:u,key:o&&o.key||c||kh()}}function Vn({pathname:r="/",search:o="",hash:u=""}){return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),u&&u!=="#"&&(r+=u.charAt(0)==="#"?u:"#"+u),r}function Ql(r){let o={};if(r){let u=r.indexOf("#");u>=0&&(o.hash=r.substring(u),r=r.substring(0,u));let c=r.indexOf("?");c>=0&&(o.search=r.substring(c),r=r.substring(0,c)),r&&(o.pathname=r)}return o}function $h(r,o,u,c={}){let{window:d=document.defaultView,v5Compat:m=!1}=c,g=d.history,v="POP",p=null,h=j();h==null&&(h=0,g.replaceState({...g.state,idx:h},""));function j(){return(g.state||{idx:null}).idx}function y(){v="POP";let C=j(),G=C==null?null:C-h;h=C,p&&p({action:v,location:w.location,delta:G})}function A(C,G){v="PUSH";let H=Pc(w.location,C,G);h=j()+1;let V=T0(H,h),ce=w.createHref(H);try{g.pushState(V,"",ce)}catch(te){if(te instanceof DOMException&&te.name==="DataCloneError")throw te;d.location.assign(ce)}m&&p&&p({action:v,location:w.location,delta:1})}function D(C,G){v="REPLACE";let H=Pc(w.location,C,G);h=j();let V=T0(H,h),ce=w.createHref(H);g.replaceState(V,"",ce),m&&p&&p({action:v,location:w.location,delta:0})}function X(C){return Kh(C)}let w={get action(){return v},get location(){return r(d,g)},listen(C){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(E0,y),p=C,()=>{d.removeEventListener(E0,y),p=null}},createHref(C){return o(d,C)},createURL:X,encodeLocation(C){let G=X(C);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:A,replace:D,go(C){return g.go(C)}};return w}function Kh(r,o=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),we(u,"No window.location.(origin|href) available to create URL");let c=typeof r=="string"?r:Vn(r);return c=c.replace(/ $/,"%20"),!o&&c.startsWith("//")&&(c=u+c),new URL(c,u)}function B0(r,o,u="/"){return Jh(r,o,u,!1)}function Jh(r,o,u,c){let d=typeof o=="string"?Ql(o):o,m=ua(d.pathname||"/",u);if(m==null)return null;let g=q0(r);Wh(g);let v=null;for(let p=0;v==null&&p<g.length;++p){let h=rg(m);v=sg(g[p],h,c)}return v}function q0(r,o=[],u=[],c="",d=!1){let m=(g,v,p=d,h)=>{let j={relativePath:h===void 0?g.path||"":h,caseSensitive:g.caseSensitive===!0,childrenIndex:v,route:g};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(c)&&p)return;we(j.relativePath.startsWith(c),`Absolute route path "${j.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(c.length)}let y=ca([c,j.relativePath]),A=u.concat(j);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 "${y}".`),q0(g.children,o,A,y,p)),!(g.path==null&&!g.index)&&o.push({path:y,score:lg(y,g.index),routesMeta:A})};return r.forEach((g,v)=>{if(g.path===""||!g.path?.includes("?"))m(g,v);else for(let p of Y0(g.path))m(g,v,!0,p)}),o}function Y0(r){let o=r.split("/");if(o.length===0)return[];let[u,...c]=o,d=u.endsWith("?"),m=u.replace(/\?$/,"");if(c.length===0)return d?[m,""]:[m];let g=Y0(c.join("/")),v=[];return v.push(...g.map(p=>p===""?m:[m,p].join("/"))),d&&v.push(...g),v.map(p=>r.startsWith("/")&&p===""?"/":p)}function Wh(r){r.sort((o,u)=>o.score!==u.score?u.score-o.score:ng(o.routesMeta.map(c=>c.childrenIndex),u.routesMeta.map(c=>c.childrenIndex)))}var Fh=/^:[\w-]+$/,Ph=3,Ih=2,eg=1,tg=10,ag=-2,C0=r=>r==="*";function lg(r,o){let u=r.split("/"),c=u.length;return u.some(C0)&&(c+=ag),o&&(c+=Ih),u.filter(d=>!C0(d)).reduce((d,m)=>d+(Fh.test(m)?Ph:m===""?eg:tg),c)}function ng(r,o){return r.length===o.length&&r.slice(0,-1).every((c,d)=>c===o[d])?r[r.length-1]-o[o.length-1]:0}function sg(r,o,u=!1){let{routesMeta:c}=r,d={},m="/",g=[];for(let v=0;v<c.length;++v){let p=c[v],h=v===c.length-1,j=m==="/"?o:o.slice(m.length)||"/",y=pi({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},j),A=p.route;if(!y&&h&&u&&!c[c.length-1].route.index&&(y=pi({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},j)),!y)return null;Object.assign(d,y.params),g.push({params:d,pathname:ca([m,y.pathname]),pathnameBase:fg(ca([m,y.pathnameBase])),route:A}),y.pathnameBase!=="/"&&(m=ca([m,y.pathnameBase]))}return g}function pi(r,o){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[u,c]=ig(r.path,r.caseSensitive,r.end),d=o.match(u);if(!d)return null;let m=d[0],g=m.replace(/(.)\/+$/,"$1"),v=d.slice(1);return{params:c.reduce((h,{paramName:j,isOptional:y},A)=>{if(j==="*"){let X=v[A]||"";g=m.slice(0,m.length-X.length).replace(/(.)\/+$/,"$1")}const D=v[A];return y&&!D?h[j]=void 0:h[j]=(D||"").replace(/%2F/g,"/"),h},{}),pathname:m,pathnameBase:g,pattern:r}}function ig(r,o=!1,u=!0){Lt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let c=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,v,p)=>(c.push({paramName:v,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(c.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),c]}function rg(r){try{return r.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Lt(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),r}}function ua(r,o){if(o==="/")return r;if(!r.toLowerCase().startsWith(o.toLowerCase()))return null;let u=o.endsWith("/")?o.length-1:o.length,c=r.charAt(u);return c&&c!=="/"?null:r.slice(u)||"/"}var cg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ug(r,o="/"){let{pathname:u,search:c="",hash:d=""}=typeof r=="string"?Ql(r):r,m;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?m=A0(u.substring(1),"/"):m=A0(u,o)):m=o,{pathname:m,search:dg(c),hash:mg(d)}}function A0(r,o){let u=o.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?u.length>1&&u.pop():d!=="."&&u.push(d)}),u.length>1?u.join("/"):"/"}function $c(r,o,u,c){return`Cannot include a '${r}' character in a manually specified \`to.${o}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function og(r){return r.filter((o,u)=>u===0||o.route.path&&o.route.path.length>0)}function G0(r){let o=og(r);return o.map((u,c)=>c===o.length-1?u.pathname:u.pathnameBase)}function X0(r,o,u,c=!1){let d;typeof r=="string"?d=Ql(r):(d={...r},we(!d.pathname||!d.pathname.includes("?"),$c("?","pathname","search",d)),we(!d.pathname||!d.pathname.includes("#"),$c("#","pathname","hash",d)),we(!d.search||!d.search.includes("#"),$c("#","search","hash",d)));let m=r===""||d.pathname==="",g=m?"/":d.pathname,v;if(g==null)v=u;else{let y=o.length-1;if(!c&&g.startsWith("..")){let A=g.split("/");for(;A[0]==="..";)A.shift(),y-=1;d.pathname=A.join("/")}v=y>=0?o[y]:"/"}let p=ug(d,v),h=g&&g!=="/"&&g.endsWith("/"),j=(m||g===".")&&u.endsWith("/");return!p.pathname.endsWith("/")&&(h||j)&&(p.pathname+="/"),p}var ca=r=>r.join("/").replace(/\/\/+/g,"/"),fg=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),dg=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,mg=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,xg=class{constructor(r,o,u,c=!1){this.status=r,this.statusText=o||"",this.internal=c,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function hg(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function gg(r){return r.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Q0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function V0(r,o){let u=r;if(typeof u!="string"||!cg.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let c=u,d=!1;if(Q0)try{let m=new URL(window.location.href),g=u.startsWith("//")?new URL(m.protocol+u):new URL(u),v=ua(g.pathname,o);g.origin===m.origin&&v!=null?u=v+g.search+g.hash:d=!0}catch{Lt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z0=["POST","PUT","PATCH","DELETE"];new Set(Z0);var yg=["GET",...Z0];new Set(yg);var Vl=E.createContext(null);Vl.displayName="DataRouter";var vi=E.createContext(null);vi.displayName="DataRouterState";var pg=E.createContext(!1),k0=E.createContext({isTransitioning:!1});k0.displayName="ViewTransition";var vg=E.createContext(new Map);vg.displayName="Fetchers";var bg=E.createContext(null);bg.displayName="Await";var _t=E.createContext(null);_t.displayName="Navigation";var Zn=E.createContext(null);Zn.displayName="Location";var Gt=E.createContext({outlet:null,matches:[],isDataRoute:!1});Gt.displayName="Route";var au=E.createContext(null);au.displayName="RouteError";var $0="REACT_ROUTER_ERROR",jg="REDIRECT",Ng="ROUTE_ERROR_RESPONSE";function Sg(r){if(r.startsWith(`${$0}:${jg}:{`))try{let o=JSON.parse(r.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function Eg(r){if(r.startsWith(`${$0}:${Ng}:{`))try{let o=JSON.parse(r.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new xg(o.status,o.statusText,o.data)}catch{}}function Tg(r,{relative:o}={}){we(kn(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:c}=E.useContext(_t),{hash:d,pathname:m,search:g}=$n(r,{relative:o}),v=m;return u!=="/"&&(v=m==="/"?u:ca([u,m])),c.createHref({pathname:v,search:g,hash:d})}function kn(){return E.useContext(Zn)!=null}function La(){return we(kn(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Zn).location}var K0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function J0(r){E.useContext(_t).static||E.useLayoutEffect(r)}function lu(){let{isDataRoute:r}=E.useContext(Gt);return r?qg():Cg()}function Cg(){we(kn(),"useNavigate() may be used only in the context of a <Router> component.");let r=E.useContext(Vl),{basename:o,navigator:u}=E.useContext(_t),{matches:c}=E.useContext(Gt),{pathname:d}=La(),m=JSON.stringify(G0(c)),g=E.useRef(!1);return J0(()=>{g.current=!0}),E.useCallback((p,h={})=>{if(Lt(g.current,K0),!g.current)return;if(typeof p=="number"){u.go(p);return}let j=X0(p,JSON.parse(m),d,h.relative==="path");r==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:ca([o,j.pathname])),(h.replace?u.replace:u.push)(j,h.state,h)},[o,u,m,d,r])}E.createContext(null);function Ag(){let{matches:r}=E.useContext(Gt),o=r[r.length-1];return o?o.params:{}}function $n(r,{relative:o}={}){let{matches:u}=E.useContext(Gt),{pathname:c}=La(),d=JSON.stringify(G0(u));return E.useMemo(()=>X0(r,JSON.parse(d),c,o==="path"),[r,d,c,o])}function Mg(r,o){return W0(r,o)}function W0(r,o,u,c,d){we(kn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=E.useContext(_t),{matches:g}=E.useContext(Gt),v=g[g.length-1],p=v?v.params:{},h=v?v.pathname:"/",j=v?v.pathnameBase:"/",y=v&&v.route;{let H=y&&y.path||"";P0(h,!y||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${H}">) 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.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let A=La(),D;if(o){let H=typeof o=="string"?Ql(o):o;we(j==="/"||H.pathname?.startsWith(j),`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 "${j}" but pathname "${H.pathname}" was given in the \`location\` prop.`),D=H}else D=A;let X=D.pathname||"/",w=X;if(j!=="/"){let H=j.replace(/^\//,"").split("/");w="/"+X.replace(/^\//,"").split("/").slice(H.length).join("/")}let C=B0(r,{pathname:w});Lt(y||C!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),Lt(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.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 G=Og(C&&C.map(H=>Object.assign({},H,{params:Object.assign({},p,H.params),pathname:ca([j,m.encodeLocation?m.encodeLocation(H.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?j:ca([j,m.encodeLocation?m.encodeLocation(H.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),g,u,c,d);return o&&G?E.createElement(Zn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},G):G}function zg(){let r=Bg(),o=hg(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),u=r instanceof Error?r.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},m={padding:"2px 4px",backgroundColor:c},g=null;return console.error("Error handled by React Router default ErrorBoundary:",r),g=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:m},"ErrorBoundary")," or"," ",E.createElement("code",{style:m},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},o),u?E.createElement("pre",{style:d},u):null,g)}var Rg=E.createElement(zg,null),F0=class extends E.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,o){return o.location!==r.location||o.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:o.error,location:o.location,revalidation:r.revalidation||o.revalidation}}componentDidCatch(r,o){this.props.onError?this.props.onError(r,o):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const u=Eg(r.digest);u&&(r=u)}let o=r!==void 0?E.createElement(Gt.Provider,{value:this.props.routeContext},E.createElement(au.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?E.createElement(_g,{error:r},o):o}};F0.contextType=pg;var Kc=new WeakMap;function _g({children:r,error:o}){let{basename:u}=E.useContext(_t);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let c=Sg(o.digest);if(c){let d=Kc.get(o);if(d)throw d;let m=V0(c.location,u);if(Q0&&!Kc.get(o))if(m.isExternal||c.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw Kc.set(o,g),g}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return r}function wg({routeContext:r,match:o,children:u}){let c=E.useContext(Vl);return c&&c.static&&c.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=o.route.id),E.createElement(Gt.Provider,{value:r},u)}function Og(r,o=[],u=null,c=null,d=null){if(r==null){if(!u)return null;if(u.errors)r=u.matches;else if(o.length===0&&!u.initialized&&u.matches.length>0)r=u.matches;else return null}let m=r,g=u?.errors;if(g!=null){let j=m.findIndex(y=>y.route.id&&g?.[y.route.id]!==void 0);we(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),m=m.slice(0,Math.min(m.length,j+1))}let v=!1,p=-1;if(u)for(let j=0;j<m.length;j++){let y=m[j];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=j),y.route.id){let{loaderData:A,errors:D}=u,X=y.route.loader&&!A.hasOwnProperty(y.route.id)&&(!D||D[y.route.id]===void 0);if(y.route.lazy||X){v=!0,p>=0?m=m.slice(0,p+1):m=[m[0]];break}}}let h=u&&c?(j,y)=>{c(j,{location:u.location,params:u.matches?.[0]?.params??{},unstable_pattern:gg(u.matches),errorInfo:y})}:void 0;return m.reduceRight((j,y,A)=>{let D,X=!1,w=null,C=null;u&&(D=g&&y.route.id?g[y.route.id]:void 0,w=y.route.errorElement||Rg,v&&(p<0&&A===0?(P0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),X=!0,C=null):p===A&&(X=!0,C=y.route.hydrateFallbackElement||null)));let G=o.concat(m.slice(0,A+1)),H=()=>{let V;return D?V=w:X?V=C:y.route.Component?V=E.createElement(y.route.Component,null):y.route.element?V=y.route.element:V=j,E.createElement(wg,{match:y,routeContext:{outlet:j,matches:G,isDataRoute:u!=null},children:V})};return u&&(y.route.ErrorBoundary||y.route.errorElement||A===0)?E.createElement(F0,{location:u.location,revalidation:u.revalidation,component:w,error:D,children:H(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:h}):H()},null)}function nu(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dg(r){let o=E.useContext(Vl);return we(o,nu(r)),o}function Ug(r){let o=E.useContext(vi);return we(o,nu(r)),o}function Lg(r){let o=E.useContext(Gt);return we(o,nu(r)),o}function su(r){let o=Lg(r),u=o.matches[o.matches.length-1];return we(u.route.id,`${r} can only be used on routes that contain a unique "id"`),u.route.id}function Hg(){return su("useRouteId")}function Bg(){let r=E.useContext(au),o=Ug("useRouteError"),u=su("useRouteError");return r!==void 0?r:o.errors?.[u]}function qg(){let{router:r}=Dg("useNavigate"),o=su("useNavigate"),u=E.useRef(!1);return J0(()=>{u.current=!0}),E.useCallback(async(d,m={})=>{Lt(u.current,K0),u.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:o,...m}))},[r,o])}var M0={};function P0(r,o,u){!o&&!M0[r]&&(M0[r]=!0,Lt(!1,u))}E.memo(Yg);function Yg({routes:r,future:o,state:u,onError:c}){return W0(r,void 0,u,c,o)}function tt(r){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 Gg({basename:r="/",children:o=null,location:u,navigationType:c="POP",navigator:d,static:m=!1,unstable_useTransitions:g}){we(!kn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=r.replace(/^\/*/,"/"),p=E.useMemo(()=>({basename:v,navigator:d,static:m,unstable_useTransitions:g,future:{}}),[v,d,m,g]);typeof u=="string"&&(u=Ql(u));let{pathname:h="/",search:j="",hash:y="",state:A=null,key:D="default"}=u,X=E.useMemo(()=>{let w=ua(h,v);return w==null?null:{location:{pathname:w,search:j,hash:y,state:A,key:D},navigationType:c}},[v,h,j,y,A,D,c]);return Lt(X!=null,`<Router basename="${v}"> is not able to match the URL "${h}${j}${y}" because it does not start with the basename, so the <Router> won't render anything.`),X==null?null:E.createElement(_t.Provider,{value:p},E.createElement(Zn.Provider,{children:o,value:X}))}function Xg({children:r,location:o}){return Mg(Ic(r),o)}function Ic(r,o=[]){let u=[];return E.Children.forEach(r,(c,d)=>{if(!E.isValidElement(c))return;let m=[...o,d];if(c.type===E.Fragment){u.push.apply(u,Ic(c.props.children,m));return}we(c.type===tt,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),we(!c.props.index||!c.props.children,"An index route cannot have child routes.");let g={id:c.props.id||m.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(g.children=Ic(c.props.children,m)),u.push(g)}),u}var gi="get",yi="application/x-www-form-urlencoded";function bi(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Qg(r){return bi(r)&&r.tagName.toLowerCase()==="button"}function Vg(r){return bi(r)&&r.tagName.toLowerCase()==="form"}function Zg(r){return bi(r)&&r.tagName.toLowerCase()==="input"}function kg(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function $g(r,o){return r.button===0&&(!o||o==="_self")&&!kg(r)}function eu(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((o,u)=>{let c=r[u];return o.concat(Array.isArray(c)?c.map(d=>[u,d]):[[u,c]])},[]))}function Kg(r,o){let u=eu(r);return o&&o.forEach((c,d)=>{u.has(d)||o.getAll(d).forEach(m=>{u.append(d,m)})}),u}var mi=null;function Jg(){if(mi===null)try{new FormData(document.createElement("form"),0),mi=!1}catch{mi=!0}return mi}var Wg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jc(r){return r!=null&&!Wg.has(r)?(Lt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yi}"`),null):r}function Fg(r,o){let u,c,d,m,g;if(Vg(r)){let v=r.getAttribute("action");c=v?ua(v,o):null,u=r.getAttribute("method")||gi,d=Jc(r.getAttribute("enctype"))||yi,m=new FormData(r)}else if(Qg(r)||Zg(r)&&(r.type==="submit"||r.type==="image")){let v=r.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=r.getAttribute("formaction")||v.getAttribute("action");if(c=p?ua(p,o):null,u=r.getAttribute("formmethod")||v.getAttribute("method")||gi,d=Jc(r.getAttribute("formenctype"))||Jc(v.getAttribute("enctype"))||yi,m=new FormData(v,r),!Jg()){let{name:h,type:j,value:y}=r;if(j==="image"){let A=h?`${h}.`:"";m.append(`${A}x`,"0"),m.append(`${A}y`,"0")}else h&&m.append(h,y)}}else{if(bi(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=gi,c=null,d=yi,g=r}return m&&d==="text/plain"&&(g=m,m=void 0),{action:c,method:u.toLowerCase(),encType:d,formData:m,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function iu(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function Pg(r,o,u,c){let d=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return u?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:o&&ua(d.pathname,o)==="/"?d.pathname=`${o.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function Ig(r,o){if(r.id in o)return o[r.id];try{let u=await import(r.module);return o[r.id]=u,u}catch(u){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ey(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function ty(r,o,u){let c=await Promise.all(r.map(async d=>{let m=o.routes[d.route.id];if(m){let g=await Ig(m,u);return g.links?g.links():[]}return[]}));return sy(c.flat(1).filter(ey).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function z0(r,o,u,c,d,m){let g=(p,h)=>u[h]?p.route.id!==u[h].route.id:!0,v=(p,h)=>u[h].pathname!==p.pathname||u[h].route.path?.endsWith("*")&&u[h].params["*"]!==p.params["*"];return m==="assets"?o.filter((p,h)=>g(p,h)||v(p,h)):m==="data"?o.filter((p,h)=>{let j=c.routes[p.route.id];if(!j||!j.hasLoader)return!1;if(g(p,h)||v(p,h))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:u[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function ay(r,o,{includeHydrateFallback:u}={}){return ly(r.map(c=>{let d=o.routes[c.route.id];if(!d)return[];let m=[d.module];return d.clientActionModule&&(m=m.concat(d.clientActionModule)),d.clientLoaderModule&&(m=m.concat(d.clientLoaderModule)),u&&d.hydrateFallbackModule&&(m=m.concat(d.hydrateFallbackModule)),d.imports&&(m=m.concat(d.imports)),m}).flat(1))}function ly(r){return[...new Set(r)]}function ny(r){let o={},u=Object.keys(r).sort();for(let c of u)o[c]=r[c];return o}function sy(r,o){let u=new Set;return new Set(o),r.reduce((c,d)=>{let m=JSON.stringify(ny(d));return u.has(m)||(u.add(m),c.push({key:m,link:d})),c},[])}function I0(){let r=E.useContext(Vl);return iu(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function iy(){let r=E.useContext(vi);return iu(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var ru=E.createContext(void 0);ru.displayName="FrameworkContext";function em(){let r=E.useContext(ru);return iu(r,"You must render this element inside a <HydratedRouter> element"),r}function ry(r,o){let u=E.useContext(ru),[c,d]=E.useState(!1),[m,g]=E.useState(!1),{onFocus:v,onBlur:p,onMouseEnter:h,onMouseLeave:j,onTouchStart:y}=o,A=E.useRef(null);E.useEffect(()=>{if(r==="render"&&g(!0),r==="viewport"){let w=G=>{G.forEach(H=>{g(H.isIntersecting)})},C=new IntersectionObserver(w,{threshold:.5});return A.current&&C.observe(A.current),()=>{C.disconnect()}}},[r]),E.useEffect(()=>{if(c){let w=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(w)}}},[c]);let D=()=>{d(!0)},X=()=>{d(!1),g(!1)};return u?r!=="intent"?[m,A,{}]:[m,A,{onFocus:Xn(v,D),onBlur:Xn(p,X),onMouseEnter:Xn(h,D),onMouseLeave:Xn(j,X),onTouchStart:Xn(y,D)}]:[!1,A,{}]}function Xn(r,o){return u=>{r&&r(u),u.defaultPrevented||o(u)}}function cy({page:r,...o}){let{router:u}=I0(),c=E.useMemo(()=>B0(u.routes,r,u.basename),[u.routes,r,u.basename]);return c?E.createElement(oy,{page:r,matches:c,...o}):null}function uy(r){let{manifest:o,routeModules:u}=em(),[c,d]=E.useState([]);return E.useEffect(()=>{let m=!1;return ty(r,o,u).then(g=>{m||d(g)}),()=>{m=!0}},[r,o,u]),c}function oy({page:r,matches:o,...u}){let c=La(),{future:d,manifest:m,routeModules:g}=em(),{basename:v}=I0(),{loaderData:p,matches:h}=iy(),j=E.useMemo(()=>z0(r,o,h,m,c,"data"),[r,o,h,m,c]),y=E.useMemo(()=>z0(r,o,h,m,c,"assets"),[r,o,h,m,c]),A=E.useMemo(()=>{if(r===c.pathname+c.search+c.hash)return[];let w=new Set,C=!1;if(o.forEach(H=>{let V=m.routes[H.route.id];!V||!V.hasLoader||(!j.some(ce=>ce.route.id===H.route.id)&&H.route.id in p&&g[H.route.id]?.shouldRevalidate||V.hasClientLoader?C=!0:w.add(H.route.id))}),w.size===0)return[];let G=Pg(r,v,d.unstable_trailingSlashAwareDataRequests,"data");return C&&w.size>0&&G.searchParams.set("_routes",o.filter(H=>w.has(H.route.id)).map(H=>H.route.id).join(",")),[G.pathname+G.search]},[v,d.unstable_trailingSlashAwareDataRequests,p,c,m,j,o,r,g]),D=E.useMemo(()=>ay(y,m),[y,m]),X=uy(y);return E.createElement(E.Fragment,null,A.map(w=>E.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...u})),D.map(w=>E.createElement("link",{key:w,rel:"modulepreload",href:w,...u})),X.map(({key:w,link:C})=>E.createElement("link",{key:w,nonce:u.nonce,...C,crossOrigin:C.crossOrigin??u.crossOrigin})))}function fy(...r){return o=>{r.forEach(u=>{typeof u=="function"?u(o):u!=null&&(u.current=o)})}}var dy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dy&&(window.__reactRouterVersion="7.13.0")}catch{}function my({basename:r,children:o,unstable_useTransitions:u,window:c}){let d=E.useRef();d.current==null&&(d.current=Zh({window:c,v5Compat:!0}));let m=d.current,[g,v]=E.useState({action:m.action,location:m.location}),p=E.useCallback(h=>{u===!1?v(h):E.startTransition(()=>v(h))},[u]);return E.useLayoutEffect(()=>m.listen(p),[m,p]),E.createElement(Gg,{basename:r,children:o,location:g.location,navigationType:g.action,navigator:m,unstable_useTransitions:u})}var tm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vt=E.forwardRef(function({onClick:o,discover:u="render",prefetch:c="none",relative:d,reloadDocument:m,replace:g,state:v,target:p,to:h,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:A,...D},X){let{basename:w,unstable_useTransitions:C}=E.useContext(_t),G=typeof h=="string"&&tm.test(h),H=V0(h,w);h=H.to;let V=Tg(h,{relative:d}),[ce,te,$]=ry(c,D),Y=gy(h,{replace:g,state:v,target:p,preventScrollReset:j,relative:d,viewTransition:y,unstable_defaultShouldRevalidate:A,unstable_useTransitions:C});function F(Ce){o&&o(Ce),Ce.defaultPrevented||Y(Ce)}let Q=E.createElement("a",{...D,...$,href:H.absoluteURL||V,onClick:H.isExternal||m?o:F,ref:fy(X,te),target:p,"data-discover":!G&&u==="render"?"true":void 0});return ce&&!G?E.createElement(E.Fragment,null,Q,E.createElement(cy,{page:V})):Q});vt.displayName="Link";var am=E.forwardRef(function({"aria-current":o="page",caseSensitive:u=!1,className:c="",end:d=!1,style:m,to:g,viewTransition:v,children:p,...h},j){let y=$n(g,{relative:h.relative}),A=La(),D=E.useContext(vi),{navigator:X,basename:w}=E.useContext(_t),C=D!=null&&jy(y)&&v===!0,G=X.encodeLocation?X.encodeLocation(y).pathname:y.pathname,H=A.pathname,V=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;u||(H=H.toLowerCase(),V=V?V.toLowerCase():null,G=G.toLowerCase()),V&&w&&(V=ua(V,w)||V);const ce=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let te=H===G||!d&&H.startsWith(G)&&H.charAt(ce)==="/",$=V!=null&&(V===G||!d&&V.startsWith(G)&&V.charAt(G.length)==="/"),Y={isActive:te,isPending:$,isTransitioning:C},F=te?o:void 0,Q;typeof c=="function"?Q=c(Y):Q=[c,te?"active":null,$?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof m=="function"?m(Y):m;return E.createElement(vt,{...h,"aria-current":F,className:Q,ref:j,style:Ce,to:g,viewTransition:v},typeof p=="function"?p(Y):p)});am.displayName="NavLink";var xy=E.forwardRef(({discover:r="render",fetcherKey:o,navigate:u,reloadDocument:c,replace:d,state:m,method:g=gi,action:v,onSubmit:p,relative:h,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:A,...D},X)=>{let{unstable_useTransitions:w}=E.useContext(_t),C=vy(),G=by(v,{relative:h}),H=g.toLowerCase()==="get"?"get":"post",V=typeof v=="string"&&tm.test(v),ce=te=>{if(p&&p(te),te.defaultPrevented)return;te.preventDefault();let $=te.nativeEvent.submitter,Y=$?.getAttribute("formmethod")||g,F=()=>C($||te.currentTarget,{fetcherKey:o,method:Y,navigate:u,replace:d,state:m,relative:h,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:A});w&&u!==!1?E.startTransition(()=>F()):F()};return E.createElement("form",{ref:X,method:H,action:G,onSubmit:c?p:ce,...D,"data-discover":!V&&r==="render"?"true":void 0})});xy.displayName="Form";function hy(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lm(r){let o=E.useContext(Vl);return we(o,hy(r)),o}function gy(r,{target:o,replace:u,state:c,preventScrollReset:d,relative:m,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:p}={}){let h=lu(),j=La(),y=$n(r,{relative:m});return E.useCallback(A=>{if($g(A,o)){A.preventDefault();let D=u!==void 0?u:Vn(j)===Vn(y),X=()=>h(r,{replace:D,state:c,preventScrollReset:d,relative:m,viewTransition:g,unstable_defaultShouldRevalidate:v});p?E.startTransition(()=>X()):X()}},[j,h,y,u,c,o,r,d,m,g,v,p])}function cu(r){Lt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let o=E.useRef(eu(r)),u=E.useRef(!1),c=La(),d=E.useMemo(()=>Kg(c.search,u.current?null:o.current),[c.search]),m=lu(),g=E.useCallback((v,p)=>{const h=eu(typeof v=="function"?v(new URLSearchParams(d)):v);u.current=!0,m("?"+h,p)},[m,d]);return[d,g]}var yy=0,py=()=>`__${String(++yy)}__`;function vy(){let{router:r}=lm("useSubmit"),{basename:o}=E.useContext(_t),u=Hg(),c=r.fetch,d=r.navigate;return E.useCallback(async(m,g={})=>{let{action:v,method:p,encType:h,formData:j,body:y}=Fg(m,o);if(g.navigate===!1){let A=g.fetcherKey||py();await c(A,u,g.action||v,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||h,flushSync:g.flushSync})}else await d(g.action||v,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||h,replace:g.replace,state:g.state,fromRouteId:u,flushSync:g.flushSync,viewTransition:g.viewTransition})},[c,d,o,u])}function by(r,{relative:o}={}){let{basename:u}=E.useContext(_t),c=E.useContext(Gt);we(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),m={...$n(r||".",{relative:o})},g=La();if(r==null){m.search=g.search;let v=new URLSearchParams(m.search),p=v.getAll("index");if(p.some(j=>j==="")){v.delete("index"),p.filter(y=>y).forEach(y=>v.append("index",y));let j=v.toString();m.search=j?`?${j}`:""}}return(!r||r===".")&&d.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(m.pathname=m.pathname==="/"?u:ca([u,m.pathname])),Vn(m)}function jy(r,{relative:o}={}){let u=E.useContext(k0);we(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=lm("useViewTransitionState"),d=$n(r,{relative:o});if(!u.isTransitioning)return!1;let m=ua(u.currentLocation.pathname,c)||u.currentLocation.pathname,g=ua(u.nextLocation.pathname,c)||u.nextLocation.pathname;return pi(d.pathname,g)!=null||pi(d.pathname,m)!=null}const nm=E.createContext({projects:[],activeProject:null,setActiveProject:()=>{},refreshProjects:()=>{}});function Zl(){return E.useContext(nm)}function Ny(){const[r,o]=E.useState([]),[u,c]=cu(),d=E.useCallback(async()=>{try{const h=await(await fetch("/api/projects")).json();h.ok&&o(h.data||[])}catch{}},[]);E.useEffect(()=>{d()},[d]);const m=u.get("project"),g=m?r.find(p=>p.id===m)||r[0]||null:r[0]||null,v=E.useCallback(p=>{c(h=>(h.set("project",p),h))},[c]);return{projects:r,activeProject:g,setActiveProject:v,refreshProjects:d}}function sm(r){const[o,u]=E.useState(null),[c,d]=E.useState(!0),[m,g]=E.useState(null),[v,p]=E.useState(0),[h,j]=E.useState(null),y=E.useCallback(()=>p(A=>A+1),[]);return E.useEffect(()=>{let A=!1;return d(!0),fetch(r).then(D=>{if(!D.ok)throw new Error(`HTTP ${D.status}`);return D.json()}).then(D=>{A||(u(D.data??D),g(null),j(new Date))}).catch(D=>{A||g(String(D.message||D))}).finally(()=>{A||d(!1)}),()=>{A=!0}},[r,v]),{data:o,loading:c,error:m,refetch:y,fetchedAt:h}}function Qe(r){const{activeProject:o}=Zl(),u=r.includes("?")?"&":"?",c=o?`${r}${u}project=${o.id}`:r;return sm(c)}function ji(r){const{url:o="/api/events"}=r,u=E.useRef(null),c=E.useRef(null),d=E.useRef(r);d.current=r;const[m,g]=E.useState("connecting"),v=E.useCallback(()=>{u.current&&u.current.close(),g("connecting");const p=new EventSource(o);u.current=p;const h=["heartbeat","increment-update","analytics-event","cost-update","notification","sync-update","sync-audit","error-detected","config-changed","activity","command-output","command-complete","job-progress"];for(const j of h)p.addEventListener(j,y=>{try{const A=JSON.parse(y.data);d.current.onEvent?.[j]?.(A),d.current.onAnyEvent?.(j,A)}catch{}});p.onopen=()=>{g("connected")},p.onerror=()=>{p.close(),g("disconnected"),c.current=setTimeout(()=>{u.current===p&&v()},3e3)}},[o]);return E.useEffect(()=>(v(),()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current?.close(),u.current=null}),[v]),{status:m}}const Sy=[{path:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1"},{path:"/increments",label:"Increments",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"},{path:"/analytics",label:"Analytics",icon:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},{path:"/costs",label:"Costs",icon:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},{path:"/sync",label:"Sync",icon:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},{path:"/errors",label:"Errors",icon:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"},{path:"/activity",label:"Activity",icon:"M13 10V3L4 14h7v7l9-11h-7z"},{path:"/notifications",label:"Notifications",icon:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",badge:!0},{path:"/config",label:"Config",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"},{path:"/plugins",label:"Plugins",icon:"M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z"},{path:"/repos",label:"Repos",icon:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{path:"/services",label:"Services",icon:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}];function Ey({d:r}){return n.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:r})})}function Ty(){const{projects:r,activeProject:o,setActiveProject:u}=Zl(),[c]=cu(),{data:d}=Qe("/api/overview"),[m,g]=E.useState(null),v=E.useCallback(A=>{const D=A;D?.pendingCount!=null&&g(D.pendingCount)},[]),{status:p}=ji({onEvent:{notification:v}}),h=m??d?.notifications?.pendingCount??0,j=c.get("project"),y=A=>j?`${A}?project=${j}`:A;return n.jsxs("aside",{className:"w-56 bg-gray-900 border-r border-gray-800 flex flex-col h-screen sticky top-0",children:[n.jsx("div",{className:"px-4 py-5 border-b border-gray-800",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 bg-indigo-500 rounded-lg flex items-center justify-center",children:n.jsx("span",{className:"text-white font-bold text-sm",children:"SW"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-semibold text-sm",children:"SpecWeave"}),n.jsx("div",{className:"text-gray-500 text-xs",children:"Dashboard"})]})]})}),r.length>1?n.jsxs("div",{className:"px-3 py-3 border-b border-gray-800",children:[n.jsx("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:"Project"}),n.jsx("select",{value:o?.id||"",onChange:A=>u(A.target.value),className:"w-full bg-gray-800 border border-gray-700 text-gray-300 text-xs rounded-lg px-2 py-1.5 focus:ring-indigo-500 focus:border-indigo-500",children:r.map(A=>n.jsx("option",{value:A.id,children:A.name},A.id))})]}):r.length===1?n.jsxs("div",{className:"px-3 py-3 border-b border-gray-800",children:[n.jsx("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:"Project"}),n.jsx("div",{className:"text-gray-300 text-xs px-2 py-1.5 truncate",title:r[0].path,children:r[0].name})]}):j?n.jsxs("div",{className:"px-3 py-3 border-b border-gray-800",children:[n.jsx("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:"Project"}),n.jsx("div",{className:"text-gray-500 text-xs px-2 py-1.5 truncate",children:decodeURIComponent(j).split(/[-/]/).pop()||"Loading..."})]}):null,n.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:Sy.map(A=>n.jsxs(am,{to:y(A.path),end:A.path==="/",className:({isActive:D})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm mb-0.5 transition-colors ${D?"bg-indigo-500/10 text-indigo-400":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[n.jsx(Ey,{d:A.icon}),n.jsx("span",{className:"flex-1",children:A.label}),A.badge&&h>0&&n.jsx("span",{className:"min-w-[18px] h-[18px] px-1 bg-rose-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center",children:h>99?"99+":h})]},A.path))}),n.jsx("div",{className:"px-4 py-3 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${p==="connected"?"bg-emerald-400 pulse-dot":p==="connecting"?"bg-amber-400 pulse-dot":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-500",children:p==="connected"?"Connected":p==="connecting"?"Connecting...":"Disconnected"})]}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[r.length," project",r.length!==1?"s":""]})]})})]})}function Cy(){const{data:r}=sm("/api/health"),{activeProject:o}=Zl(),u=o?.name||"Project",c=r?.uptime?Ay(r.uptime):"...";return n.jsxs("header",{className:"h-14 bg-gray-900/50 backdrop-blur border-b border-gray-800 flex items-center justify-between px-6",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("h1",{className:"text-gray-200 font-medium text-sm",children:u}),n.jsx("span",{className:"text-gray-600 text-xs",children:"|"}),n.jsxs("span",{className:"text-gray-500 text-xs",children:["Uptime: ",c]})]}),n.jsx("div",{className:"flex items-center gap-4",children:n.jsxs("span",{className:"text-gray-500 text-xs",children:[r?.connections??0," client",(r?.connections??0)!==1?"s":""]})})]})}function Ay(r){if(r<60)return`${Math.floor(r)}s`;if(r<3600)return`${Math.floor(r/60)}m`;const o=Math.floor(r/3600),u=Math.floor(r%3600/60);return`${o}h ${u}m`}const My={indigo:"from-indigo-500/10 to-indigo-500/5 border-indigo-500/20",emerald:"from-emerald-500/10 to-emerald-500/5 border-emerald-500/20",amber:"from-amber-500/10 to-amber-500/5 border-amber-500/20",rose:"from-rose-500/10 to-rose-500/5 border-rose-500/20",cyan:"from-cyan-500/10 to-cyan-500/5 border-cyan-500/20"},zy={indigo:"text-indigo-400",emerald:"text-emerald-400",amber:"text-amber-400",rose:"text-rose-400",cyan:"text-cyan-400"};function le({title:r,value:o,subtitle:u,tooltip:c,color:d="indigo"}){return n.jsxs("div",{className:`bg-gradient-to-br ${My[d]} border rounded-xl p-4 relative group`,title:c,children:[n.jsx("div",{className:"text-gray-400 text-xs font-medium uppercase tracking-wider mb-2",children:r}),n.jsx("div",{className:`text-2xl font-bold ${zy[d]}`,children:o}),u&&n.jsx("div",{className:"text-gray-500 text-xs mt-1",children:u}),c&&n.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2.5 py-1.5 bg-gray-800 border border-gray-700 rounded-lg text-[10px] text-gray-300 whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 shadow-lg",children:[c,n.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-px border-4 border-transparent border-t-gray-800"})]})]})}const Ry={active:"#6366f1",completed:"#10b981",paused:"#f59e0b",planning:"#06b6d4",abandoned:"#ef4444",backlog:"#6b7280",ready_for_review:"#8b5cf6"};function _y(r){return Ry[r]||"#6b7280"}function wy({segments:r,size:o=160,centerLabel:u,centerValue:c}){const d=r.reduce((p,h)=>p+h.value,0);if(d===0)return n.jsx("div",{className:"flex items-center justify-center",style:{width:o,height:o},children:n.jsx("span",{className:"text-gray-600 text-xs",children:"No data"})});const m=52,g=2*Math.PI*m;let v=0;return n.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:o,height:o},children:[n.jsx("svg",{viewBox:"0 0 128 128",className:"w-full h-full -rotate-90",children:r.map((p,h)=>{const y=p.value/d*g,A=v;return v+=y,n.jsx("circle",{cx:"64",cy:"64",r:m,fill:"none",stroke:p.color,strokeWidth:"12",strokeDasharray:`${y} ${g-y}`,strokeDashoffset:-A,className:"transition-all duration-500"},h)})}),n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[c!=null&&n.jsx("span",{className:"text-xl font-bold text-white",children:c}),u&&n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:u})]})]})}function Oy(r){return Object.entries(r).filter(([o,u])=>u>0).map(([o,u])=>({label:o,value:u,color:_y(o)}))}const Dy={default:"bg-gray-800 text-gray-300",success:"bg-emerald-500/15 text-emerald-400",warning:"bg-amber-500/15 text-amber-400",error:"bg-rose-500/15 text-rose-400",info:"bg-cyan-500/15 text-cyan-400"};function xe({label:r,variant:o="default"}){return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium ${Dy[o]}`,children:r})}function Ni(r){switch(r){case"active":case"running":return"info";case"completed":case"success":return"success";case"paused":case"pending":case"planning":return"warning";case"failed":case"abandoned":case"error":return"error";default:return"default"}}function Uy({size:r="md"}){const o={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};return n.jsxs("svg",{className:`${o[r]} animate-spin text-indigo-400`,viewBox:"0 0 24 24",fill:"none",children:[n.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}function bt(){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(Uy,{size:"lg"})})}function R0(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function Ly(r){switch(r){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return r||"Unknown"}}const Wc=r=>r.totalCost===0&&r.sessionCount>0;function Hy(){const{data:r,loading:o,error:u}=Qe("/api/overview"),[c,d]=E.useState([]),{activeProject:m}=Zl(),g=E.useRef(null);E.useEffect(()=>{if(!m||g.current===m.id)return;g.current=m.id;const h=`project=${m.id}`;fetch(`/api/activity/stream?limit=20&${h}`).then(j=>j.json()).then(j=>{j.ok&&Array.isArray(j.data)&&d(j.data)}).catch(()=>{})},[m]);const v=E.useCallback(h=>{d(j=>[h,...j].slice(0,20))},[]);if(ji({onEvent:{activity:v}}),o)return n.jsx(bt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const p=Oy(r.project.statusBreakdown);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("h2",{className:"text-lg font-semibold text-gray-200",children:[r.project.name||"Project"," Overview"]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(vt,{to:"/increments?status=active",className:"group",children:n.jsx(le,{title:"Active Increments",value:r.project.activeIncrements,subtitle:`${r.project.totalIncrements} total`,color:"indigo"})}),n.jsx(vt,{to:"/increments?status=completed",className:"group",children:n.jsx(le,{title:"Completed",value:r.project.completedIncrements,subtitle:`${Math.round(r.project.completedIncrements/Math.max(r.project.totalIncrements,1)*100)}% done`,color:"emerald"})}),n.jsx(vt,{to:"/costs",className:"group",children:n.jsx(le,{title:"Total Cost",value:Wc(r.costs)?"$0.00":`$${r.costs.totalCost.toFixed(2)}`,subtitle:Wc(r.costs)?"Max Plan":`${r.costs.sessionCount.toLocaleString()} sessions`,color:"amber"})}),n.jsx(vt,{to:"/analytics",className:"group",children:n.jsx(le,{title:"Events Today",value:r.analytics.last24hEvents,subtitle:`${r.analytics.totalEvents.toLocaleString()} total`,color:"cyan"})})]}),Wc(r.costs)&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(xe,{label:"Max Plan",variant:"info"}),n.jsx("span",{className:"text-xs text-gray-300",children:"API costs included in subscription. Token usage tracked for analytics."})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Status"}),n.jsx("div",{className:"flex items-center justify-center",children:n.jsx(wy,{segments:p,centerValue:r.project.totalIncrements,centerLabel:"total"})}),n.jsx("div",{className:"flex flex-wrap gap-2 mt-4 justify-center",children:p.map(h=>n.jsxs(vt,{to:`/increments?status=${h.label.toLowerCase()}`,className:"flex items-center gap-1.5 hover:opacity-80 transition-opacity",children:[n.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:h.color}}),n.jsxs("span",{className:"text-xs text-gray-500 hover:text-gray-300",children:[h.label," (",h.value,")"]})]},h.label))})]}),n.jsxs(vt,{to:"/sync",className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 hover:border-gray-700 transition-colors block",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Sync Health"}),n.jsx("div",{className:"space-y-3",children:Object.entries(r.sync.platforms).length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No sync platforms configured"}):Object.entries(r.sync.platforms).map(([h,j])=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:h}),j.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:j.configDetail}),!j.configDetail&&j.lastImport&&n.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Last: ",new Date(j.lastImport).toLocaleDateString()]})]}),n.jsx(xe,{label:Ly(j.connectionStatus||j.lastSyncResult),variant:R0(j.connectionStatus)!=="default"?R0(j.connectionStatus):Ni(j.lastSyncResult||"")})]},h))}),n.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Notifications"}),n.jsxs("div",{className:"flex gap-2",children:[r.notifications.criticalCount>0&&n.jsx(vt,{to:"/notifications",onClick:h=>h.stopPropagation(),children:n.jsx(xe,{label:`${r.notifications.criticalCount} critical`,variant:"error"})}),n.jsx(vt,{to:"/notifications",onClick:h=>h.stopPropagation(),children:n.jsx(xe,{label:`${r.notifications.pendingCount} pending`,variant:r.notifications.pendingCount>0?"warning":"default"})})]})]})})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Live Activity"}),n.jsx(vt,{to:"/activity",className:"text-[10px] text-indigo-400 hover:text-indigo-300",children:"View all"})]}),n.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto custom-scrollbar",children:c.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No recent activity"}):c.map((h,j)=>n.jsxs("div",{className:"flex items-start gap-2 py-1 slide-in",children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-1.5 ${h.severity==="error"?"bg-rose-400":h.severity==="warning"?"bg-amber-400":"bg-gray-600"}`}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-xs text-gray-400 truncate",children:h.title}),n.jsxs("div",{className:"text-[10px] text-gray-600",children:[h.category,h.timestamp&&` · ${By(h.timestamp)}`]})]})]},j))})]})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Types"}),n.jsx("div",{className:"flex gap-4 flex-wrap",children:Object.entries(r.project.typeBreakdown).map(([h,j])=>n.jsxs(vt,{to:`/increments?type=${h}`,className:"flex items-center gap-2 px-3 py-2 bg-gray-800/50 rounded-lg hover:bg-gray-800/80 transition-colors",children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:h}),n.jsx("span",{className:"text-xs text-gray-500 bg-gray-800 px-2 py-0.5 rounded",children:j})]},h))})]})]})}function By(r){try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function al(r,o=""){const[u,c]=cu(),d=u.get(r)??o,m=E.useCallback(g=>{c(v=>{const p=new URLSearchParams(v);return g&&g!==o?p.set(r,g):p.delete(r),p})},[r,o,c]);return[d,m]}function uu({title:r,description:o}){return n.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})})}),n.jsx("h3",{className:"text-gray-400 text-sm font-medium",children:r}),o&&n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs",children:o})]})}function qy(){const{data:r,loading:o,error:u}=Qe("/api/increments"),[c,d]=al("status","all"),[m,g]=al("type","all"),v=lu();if(o)return n.jsx(bt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const p=r.increments.filter(y=>!(c!=="all"&&y.status!==c||m!=="all"&&y.type!==m)),h=[...new Set(r.increments.map(y=>y.status))],j=[...new Set(r.increments.map(y=>y.type))];return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Increments"}),n.jsxs("span",{className:"text-sm text-gray-500",children:[r.increments.length," total"]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Status:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(xi,{label:"All",active:c==="all",onClick:()=>d("all")}),h.map(y=>n.jsx(xi,{label:y,active:c===y,onClick:()=>d(y),count:r.increments.filter(A=>A.status===y).length},y))]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Type:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(xi,{label:"All",active:m==="all",onClick:()=>g("all")}),j.map(y=>n.jsx(xi,{label:y,active:m===y,onClick:()=>g(y),count:r.increments.filter(A=>A.type===y).length},y))]})]}),n.jsxs("span",{className:"text-xs text-gray-500",children:[p.length," matching"]})]}),p.length===0?n.jsx(uu,{title:"No increments match filters",description:"Try adjusting your filters"}):n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ID"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Title"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Status"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Type"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Priority"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Tasks"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ACs"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Last Activity"})]})}),n.jsx("tbody",{children:p.map(y=>n.jsxs("tr",{onClick:()=>v(`/increments/${y.id}`),className:"border-b border-gray-800/50 hover:bg-gray-800/30 transition-colors cursor-pointer",children:[n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:y.id})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-sm text-gray-300",children:y.title})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(xe,{label:y.status,variant:Ni(y.status)})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:y.type})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(Yy,{priority:y.priority})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(_0,{completed:y.tasks.completed,total:y.tasks.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(_0,{completed:y.acs.completed,total:y.acs.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-500",children:y.lastActivity?Gy(y.lastActivity):"-"})})]},y.id))})]})})]})}function xi({label:r,active:o,onClick:u,count:c}){return n.jsxs("button",{onClick:u,className:`px-3 py-1 text-xs rounded-md transition-colors capitalize ${o?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:[r,c!==void 0&&n.jsx("span",{className:"ml-1 text-[10px] text-gray-500",children:c})]})}function _0({completed:r,total:o}){const u=o>0?Math.round(r/o*100):0;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-16 h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-all",style:{width:`${u}%`}})}),n.jsxs("span",{className:"text-xs text-gray-500",children:[r,"/",o]})]})}function Yy({priority:r}){const o={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${o[r]||o.P2}`,children:r})}function Gy(r){try{const o=new Date(r),c=new Date().getTime()-o.getTime(),d=Math.floor(c/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const m=Math.floor(d/60);if(m<24)return`${m}h ago`;const g=Math.floor(m/24);return g<7?`${g}d ago`:o.toLocaleDateString()}catch{return r}}function Xy(){const[r,o]=E.useState("commands"),[u,c]=E.useState(!1),{data:d,loading:m,error:g,refetch:v,fetchedAt:p}=Qe("/api/analytics/summary"),{data:h,loading:j,refetch:y}=Qe("/api/analytics/skills");if(m||j)return n.jsx(bt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const A=d.topCommands?.reduce((w,C)=>w+C.count,0)||0,D=d.topSkills?.reduce((w,C)=>w+C.count,0)||0,X=d.topAgents?.reduce((w,C)=>w+C.count,0)||0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Analytics"}),n.jsxs("div",{className:"flex items-center gap-3",children:[p&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Updated ",p.toLocaleTimeString()]}),n.jsxs("span",{className:"text-sm text-gray-500",children:[d.totalEvents.toLocaleString()," total events"]}),n.jsx("button",{onClick:()=>{c(!0),v(),y(),setTimeout(()=>c(!1),600)},disabled:u,className:"p-1.5 text-gray-500 hover:text-gray-300 hover:bg-gray-800 rounded-lg transition-colors disabled:opacity-50",title:"Refresh analytics",children:n.jsx("svg",{className:`w-4 h-4 ${u?"animate-spin":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Events",value:d.totalEvents.toLocaleString(),subtitle:`${d.successRate}% success rate`,color:"indigo",tooltip:`${d.totalEvents} events tracked from analytics JSONL`}),n.jsx(le,{title:"Commands",value:A.toLocaleString(),subtitle:`${d.topCommands?.length||0} unique`,color:"cyan",tooltip:`${A} total command invocations across ${d.topCommands?.length||0} distinct commands`}),n.jsx(le,{title:"Skills",value:D.toLocaleString(),subtitle:`${d.topSkills?.length||0} unique`,color:"emerald",tooltip:`${D} total skill activations across ${d.topSkills?.length||0} distinct skills`}),n.jsx(le,{title:"Agents",value:X.toLocaleString(),subtitle:`${d.topAgents?.length||0} unique`,color:"amber",tooltip:`${X} agent spawns across ${d.topAgents?.length||0} distinct agent types`})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{key:"commands",label:"Commands"},{key:"skills",label:"Skills"},{key:"agents",label:"Agents"},{key:"daily",label:"Daily Trends"}].map(w=>n.jsx("button",{onClick:()=>o(w.key),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===w.key?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:w.label},w.key))}),r==="commands"&&n.jsx(Qy,{commands:d.topCommands||[]}),r==="skills"&&n.jsx(Vy,{skills:h||[]}),r==="agents"&&n.jsx(Zy,{agents:d.topAgents||[]}),r==="daily"&&n.jsx(ky,{days:d.dailySummaries||[]})]})}function Qy({commands:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No command data available"})});const o=[...r].sort((c,d)=>d.count-c.count),u=o[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Commands"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Command"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:o.map((c,d)=>{const m=Math.max(2,c.count/u*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",d+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300 font-mono",children:c.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-indigo-500/60 transition-all",style:{width:`${m}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:c.count.toLocaleString()})]},c.name)})})]})]})}function Vy({skills:r}){const o=[...r].sort((u,c)=>c.count-u.count);return o.length===0?n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No skill usage data available"})}):n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Skill Usage Leaderboard"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Skill Name"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Plugin"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Invocations"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Success Rate"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Last Used"})]})}),n.jsx("tbody",{children:o.map((u,c)=>{const d=u.count>0?Math.round(u.successCount/u.count*100):100,m=d>=90?"success":d>=70?"warning":"error";return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",c+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300 font-mono",children:u.name})}),n.jsx("td",{className:"px-4 py-2.5",children:u.plugin&&n.jsx("span",{className:"text-[10px] text-gray-600 bg-gray-800 px-1.5 py-0.5 rounded",children:u.plugin})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:u.count.toLocaleString()}),n.jsx("td",{className:"px-4 py-2.5 text-right",children:n.jsx(xe,{label:`${d}%`,variant:m})}),n.jsx("td",{className:"px-4 py-2.5 text-xs text-gray-600 text-right whitespace-nowrap",children:u.lastUsed?$y(u.lastUsed):"-"})]},u.name)})})]})]})}function Zy({agents:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No agent data available"})});const o=[...r].sort((c,d)=>d.count-c.count),u=o[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Agents"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Agent"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:o.map((c,d)=>{const m=Math.max(2,c.count/u*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",d+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300",children:c.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-cyan-500/60 transition-all",style:{width:`${m}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:c.count.toLocaleString()})]},c.name)})})]})]})}function ky({days:r}){const o=r.slice(-14);if(o.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No daily data available"})});const u=Math.max(...o.map(m=>m.totalEvents),1),c=o.reduce((m,g)=>m+g.totalEvents,0),d=Math.round(c/o.length);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsx(le,{title:"Period Total",value:c.toLocaleString(),subtitle:`Last ${o.length} days`,color:"indigo"}),n.jsx(le,{title:"Daily Average",value:d.toLocaleString(),color:"cyan"}),n.jsx(le,{title:"Peak Day",value:u.toLocaleString(),subtitle:o.find(m=>m.totalEvents===u)?.date||"",color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:["Daily Events (Last ",o.length," Days)"]}),n.jsx("div",{className:"flex items-end gap-1.5 h-40",children:o.map(m=>{const g=Math.max(2,m.totalEvents/u*100),v=m.date.slice(5);return n.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1",children:[n.jsx("span",{className:"text-[9px] text-gray-500",children:m.totalEvents}),n.jsx("div",{className:"w-full bg-indigo-500/40 rounded-t hover:bg-indigo-500/60 transition-colors cursor-default",style:{height:`${g}%`},title:`${m.date}: ${m.totalEvents} events`}),n.jsx("span",{className:"text-[8px] text-gray-700",children:v})]},m.date)})})]})]})}function $y(r){if(!r)return"";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function im({items:r,maxBars:o=10}){const u=[...r].sort((d,m)=>m.value-d.value).slice(0,o),c=Math.max(...u.map(d=>d.value),1);return n.jsx("div",{className:"space-y-2",children:u.map((d,m)=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-xs text-gray-400 w-28 truncate text-right",title:d.label,children:d.label}),n.jsx("div",{className:"flex-1 h-5 bg-gray-800 rounded overflow-hidden",children:n.jsx("div",{className:"h-full rounded transition-all duration-500",style:{width:`${d.value/c*100}%`,backgroundColor:d.color||"#6366f1"}})}),n.jsx("span",{className:"text-xs text-gray-500 w-10 text-right",children:d.value})]},m))})}function Ky(){const[r,o]=E.useState("overview"),[u,c]=E.useState(null),{data:d,loading:m,error:g}=Qe("/api/costs/summary");if(m)return n.jsx(bt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const v=d.sessions||[],p=d.billingContext?.planType==="subscription",h=d.modelBreakdown?Object.entries(d.modelBreakdown).map(([w,C])=>({model:w,...C})).sort((w,C)=>C.cost-w.cost):Wy(v),j=v.reduce((w,C)=>w+(C.inputTokens||0),0),y=v.reduce((w,C)=>w+(C.outputTokens||0),0),A=v.reduce((w,C)=>w+(C.cacheReadTokens||0),0),D=v.reduce((w,C)=>w+(C.cacheWriteTokens||0),0),X=j+y+A+D;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Token Usage & Costs"}),p&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(xe,{label:"Subscription",variant:"info"}),n.jsxs("span",{className:"text-xs text-gray-300",children:[d.billingContext?.monthlyAmount?`$${d.billingContext.monthlyAmount}/mo plan. `:"","Costs shown as API-equivalent value for usage analytics."]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Cost",value:isMaxPlan?"$0.00":`$${d.totalCost.toFixed(2)}`,subtitle:isMaxPlan?"Included in plan":void 0,color:"amber"}),n.jsx(le,{title:"Cache Savings",value:`$${d.totalSavings.toFixed(2)}`,color:"emerald"}),n.jsx(le,{title:"Total Tokens",value:Xl(d.totalTokens),subtitle:Fy(d.totalTokens),color:"indigo"}),n.jsx(le,{title:"Sessions",value:d.sessionCount.toLocaleString(),color:"cyan"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["overview","sessions"].map(w=>n.jsx("button",{onClick:()=>o(w),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===w?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:w==="overview"?"Breakdown":`Sessions (${v.length})`},w))}),r==="overview"&&n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Cost by Model"}),h.length>0?n.jsx(im,{items:h.map(w=>({label:w.model,value:parseFloat(w.cost.toFixed(2)),color:"#f59e0b"}))}):n.jsx("p",{className:"text-gray-600 text-xs",children:"No model data"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Token Breakdown"}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(hi,{label:"Input",value:j,total:X,color:"bg-indigo-500"}),n.jsx(hi,{label:"Output",value:y,total:X,color:"bg-cyan-500"}),A>0&&n.jsx(hi,{label:"Cache Read",value:A,total:X,color:"bg-emerald-500"}),D>0&&n.jsx(hi,{label:"Cache Write",value:D,total:X,color:"bg-amber-500"})]})]}),h.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden lg:col-span-2",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Model Details"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tokens"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Avg/Session"})]})}),n.jsx("tbody",{children:h.map(w=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-sm text-gray-300",children:w.model}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:w.sessions.toLocaleString()}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(w.tokens)}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",w.cost.toFixed(2)]}),n.jsxs("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:["$",w.sessions>0?(w.cost/w.sessions).toFixed(4):"0"]})]},w.model))})]})]})]}),r==="sessions"&&n.jsx(Jy,{sessions:v,expandedSession:u,onToggle:w=>c(u===w?null:w)})]})}const Fc=30;function Jy({sessions:r,expandedSession:o,onToggle:u}){const[c,d]=E.useState(0);if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No session data available"})});const m=Math.ceil(r.length/Fc),g=c*Fc,v=g+Fc,p=r.slice(g,v);return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-3 border-b border-gray-800 flex items-center justify-between",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"}),n.jsxs("span",{className:"text-xs text-gray-500",children:[g+1,"-",Math.min(v,r.length)," of ",r.length]})]}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-8"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Input"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Output"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cache"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"When"})]})}),n.jsx("tbody",{children:p.map(h=>{const j=h.sessionId||"-",y=o===j,A=(h.cacheReadTokens||0)+(h.cacheWriteTokens||0);return n.jsxs(E.Fragment,{children:[n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>u(j),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600",children:n.jsx("span",{className:`inline-block transition-transform ${y?"rotate-90":""}`,children:"▸"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:j.slice(0,8)}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(xe,{label:h.model||"unknown",variant:"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(h.inputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(h.outputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:A>0?Xl(A):"-"}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",h.cost?.toFixed(4)||"0.0000"]}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:h.duration?w0(h.duration):"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:Py(h.timestamp)})]}),y&&n.jsx("tr",{className:"border-b border-gray-800/50",children:n.jsx("td",{colSpan:9,className:"px-6 py-3 bg-gray-800/20",children:n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-xs",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Input Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:h.inputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Output Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:h.outputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Write"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(h.cacheWriteTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Read"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(h.cacheReadTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cost"}),n.jsxs("span",{className:"text-amber-400 font-mono",children:["$",h.cost?.toFixed(6)||"0"]})]}),h.savings!=null&&h.savings>0&&n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Savings"}),n.jsxs("span",{className:"text-emerald-400 font-mono",children:["$",h.savings.toFixed(6)]})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Duration"}),n.jsx("span",{className:"text-gray-300",children:h.duration?w0(h.duration):"-"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Session ID"}),n.jsx("span",{className:"text-gray-400 font-mono text-[10px]",children:h.sessionId})]})]})})})]},j)})})]}),m>1&&n.jsxs("div",{className:"px-5 py-3 border-t border-gray-800 flex items-center justify-between",children:[n.jsx("button",{onClick:()=>d(h=>Math.max(0,h-1)),disabled:c===0,className:"px-3 py-1 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Previous"}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(m,7)},(h,j)=>{let y;return m<=7||c<3?y=j:c>m-4?y=m-7+j:y=c-3+j,n.jsx("button",{onClick:()=>d(y),className:`w-7 h-7 text-xs rounded transition-colors ${c===y?"bg-indigo-600 text-white":"text-gray-500 hover:text-gray-300 hover:bg-gray-800"}`,children:y+1},y)})}),n.jsx("button",{onClick:()=>d(h=>Math.min(m-1,h+1)),disabled:c>=m-1,className:"px-3 py-1 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Next"})]})]})}function hi({label:r,value:o,total:u,color:c}){const d=u>0?o/u*100:0,m={"bg-indigo-500":"rgb(99 102 241 / 0.6)","bg-cyan-500":"rgb(6 182 212 / 0.6)","bg-emerald-500":"rgb(16 185 129 / 0.6)","bg-amber-500":"rgb(245 158 11 / 0.6)"};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-xs text-gray-400",children:r}),n.jsxs("span",{className:"text-xs text-gray-500",children:[Xl(o)," (",d.toFixed(1),"%)"]})]}),n.jsx("div",{className:"h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full",style:{width:`${d}%`,backgroundColor:m[c]||c}})})]})}function Wy(r){const o=new Map;for(const u of r){const c=u.model||"unknown",d=o.get(c)||{cost:0,tokens:0,sessions:0};d.cost+=u.cost||0,d.tokens+=(u.inputTokens||0)+(u.outputTokens||0),d.sessions++,o.set(c,d)}return Array.from(o.entries()).map(([u,c])=>({model:u,...c})).sort((u,c)=>c.cost-u.cost)}function Xl(r){return r?r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(1)}K`:String(r):"0"}function Fy(r){return r?r.toLocaleString():"0"}function w0(r){const o=Math.round(r);if(o<60)return`${o}s`;const u=Math.floor(o/60),c=o%60;return u<60?`${u}m ${c}s`:`${Math.floor(u/60)}h ${u%60}m`}function Py(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}function ou(){const[r,o]=E.useState(!1),[u,c]=E.useState(null),[d,m]=E.useState(null),[g,v]=E.useState([]),[p,h]=E.useState("idle"),j=E.useRef(null),y=E.useRef(null);ji({onEvent:{"command-output":X=>{const w=X;y.current&&w.executionId===y.current&&w.line&&v(C=>[...C,w.line])},"command-complete":X=>{const w=X;if(y.current&&w.executionId===y.current){if(j.current&&(clearTimeout(j.current),j.current=null),o(!1),w.exitCode===0)h("success"),v(C=>[...C,"Command completed successfully."]);else{h("error");const C=`Command failed (exit code ${w.exitCode??"unknown"})`;m(C),v(G=>[...G,C])}y.current=null}}}}),E.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const A=E.useCallback(async X=>{o(!0),m(null),v([`> specweave ${X}`]),h("running");try{const C=await(await fetch(`/api/commands/${X}`,{method:"POST"})).json();return C.ok?(c(C.data),y.current=C.data?.id||null,j.current=setTimeout(()=>{y.current&&(y.current=null,o(!1),h("error"),m("Command timed out after 60 seconds"),v(G=>[...G,"Timed out after 60 seconds."]))},6e4),C.data):(m(C.error||"Command failed"),h("error"),v(G=>[...G,`Error: ${C.error||"Command failed"}`]),o(!1),null)}catch(w){return m(String(w)),h("error"),v(C=>[...C,`Error: ${String(w)}`]),o(!1),null}},[]),D=E.useCallback(()=>{o(!1),c(null),m(null),v([]),h("idle"),y.current=null,j.current&&(clearTimeout(j.current),j.current=null)},[]);return{execute:A,running:r,result:u,error:d,output:g,status:p,reset:D}}function Iy(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function ep(r){switch(r){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return r||"Unknown"}}function tp(){const[r,o]=E.useState("health"),{data:u,loading:c,error:d}=Qe("/api/sync/status"),{data:m,loading:g}=Qe("/api/sync/audit?limit=100"),{data:v,loading:p}=Qe("/api/sync/audit/summary"),{execute:h,running:j}=ou();if(c||g||p)return n.jsx(bt,{});if(d)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",d]});if(!u)return null;const y=Object.entries(u.platforms).filter(([C])=>["github","jira","ado"].includes(C)),A=m?.length||0,D=m?.filter(C=>C.result==="error").length||0,X=m?.filter(C=>C.conflict)||[],w=y.filter(([,C])=>C.connectionStatus==="connected").length;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Sync Health"}),n.jsx("button",{onClick:()=>h("sync-push"),disabled:j,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:j?"Syncing...":"Sync Now"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Platforms",value:y.length,subtitle:`${w} connected`,color:"indigo"}),n.jsx(le,{title:"Audit Entries",value:A,color:"cyan"}),n.jsx(le,{title:"Errors",value:D,color:"rose"}),n.jsx(le,{title:"Conflicts",value:X.length,color:"amber"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["health","audit","conflicts"].map(C=>n.jsx("button",{onClick:()=>o(C),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===C?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:C==="health"?"Platform Health":C==="audit"?"Audit Log":`Conflicts (${X.length})`},C))}),r==="health"&&n.jsx(n.Fragment,{children:y.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No sync platforms configured"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Configure GitHub, JIRA, or ADO in your config"})]}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:y.map(([C,G])=>{const H=v?.[C],V=G.connectionStatus||"unknown";return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(rm,{platform:C}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-gray-300 capitalize",children:C}),G.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:G.configDetail})]})]}),n.jsx(xe,{label:ep(V),variant:Iy(V)})]}),G.diagnosticMessage&&n.jsx("div",{className:"text-xs text-gray-500 mb-3 p-2 bg-gray-800/30 rounded-lg",children:G.diagnosticMessage}),V==="not_configured"&&n.jsx(vt,{to:"/config",className:"block text-center text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors",children:"Configure in Settings"}),V==="configured_never_synced"&&n.jsx("button",{onClick:()=>h("sync-push"),disabled:j,className:"w-full text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors disabled:opacity-50",children:j?"Syncing...":"Run First Sync"}),V==="sync_failed"&&n.jsx("button",{onClick:()=>h("sync-push"),disabled:j,className:"w-full text-xs text-amber-400 hover:text-amber-300 py-2 border border-amber-500/20 rounded-lg hover:border-amber-500/40 transition-colors disabled:opacity-50",children:j?"Retrying...":"Retry Sync"}),n.jsxs("div",{className:"space-y-2 mt-3",children:[G.lastImport&&n.jsx(Gl,{label:"Last Import",value:new Date(G.lastImport).toLocaleString()}),V==="connected"&&!G.lastImport&&n.jsx(Gl,{label:"Status",value:"Connected, no imports yet"}),G.lastImportCount!=null&&n.jsx(Gl,{label:"Items Imported",value:G.lastImportCount.toLocaleString()}),G.lastSkippedCount!=null&&G.lastSkippedCount>0&&n.jsx(Gl,{label:"Skipped",value:G.lastSkippedCount.toLocaleString()}),H&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t border-gray-800 my-2"}),n.jsx(Gl,{label:"Total Ops",value:H.total.toLocaleString()}),n.jsx(Gl,{label:"Success",value:H.success.toLocaleString()}),H.errors>0&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Errors"}),n.jsx(xe,{label:String(H.errors),variant:"error"})]})]})]})]},C)})})}),r==="audit"&&n.jsx(O0,{entries:m||[]}),r==="conflicts"&&n.jsx(O0,{entries:X}),u.lastUpdated&&n.jsxs("p",{className:"text-xs text-gray-600",children:["Last metadata update: ",new Date(u.lastUpdated).toLocaleString()]})]})}function O0({entries:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No audit entries"})});const o={success:"success",error:"error",denied:"warning",skipped:"default"};return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Time"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Platform"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Operation"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Item"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Direction"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Result"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"})]})}),n.jsx("tbody",{children:r.map((u,c)=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:ap(u.timestamp)}),n.jsx("td",{className:"px-4 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(rm,{platform:u.platform}),n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:u.platform})]})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400",children:u.operation}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 font-mono max-w-[120px] truncate",children:u.itemId||"-"}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(xe,{label:u.direction,variant:u.direction==="push"?"info":"default"})}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(xe,{label:u.result,variant:o[u.result]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600 text-right",children:u.duration?`${u.duration}ms`:"-"})]},c))})]})})}function Gl({label:r,value:o}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:r}),n.jsx("span",{className:"text-xs text-gray-400",children:o})]})}function rm({platform:r}){const o={github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-5 h-5 rounded ${o[r]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-[9px] text-white font-bold",children:r[0]?.toUpperCase()})})}function ap(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}const cm={prompt_too_long:"error",api_error:"warning",tool_failure:"info",hook_error:"default",rate_limit:"warning",unknown:"default"},Qn=50;function lp(){const[r,o]=al("tab","groups"),[u,c]=al("type",""),[d,m]=al("session",""),[g,v]=E.useState(0),p=g*Qn,h=u?`&type=${encodeURIComponent(u)}`:"",{data:j,loading:y}=Qe("/api/errors/groups"),{data:A,loading:D}=Qe(`/api/errors/recent?limit=${Qn}&offset=${p}${h}`),{data:X,loading:w}=Qe("/api/errors/sessions?limit=50");if(y||D||w)return n.jsx(bt,{});const C=A?.total||0,G=A?.errors||[],H=j?.length||0,V=j?.reduce((ie,Oe)=>ie+Oe.sessions,0)||0,ce=j?.[0]?.type||"-",te=d?X?.find(ie=>ie.sessionId===d):null,$=u?(X||[]).filter(ie=>ie.errors.some(Oe=>Oe.type===u)):X||[],Y=Math.ceil(C/Qn),F=ie=>{c(ie),o("errors"),m(""),v(0)},Q=ie=>{o(ie),m(""),ie!=="errors"&&v(0)},Ce=()=>{c(""),v(0)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Error Tracing"}),n.jsx("span",{className:"text-xs text-gray-500",children:"Observability for Claude Code sessions"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Errors",value:C,color:"rose"}),n.jsx(le,{title:"Error Types",value:H,color:"amber"}),n.jsx(le,{title:"Affected Sessions",value:V,color:"indigo"}),n.jsx(le,{title:"Most Common",value:ce,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["groups","errors","timeline","sessions"].map(ie=>n.jsx("button",{onClick:()=>Q(ie),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===ie?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:ie==="groups"?"Error Groups":ie==="errors"?"All Errors":ie==="timeline"?"Timeline":"Sessions"},ie))}),u&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(xe,{label:`type: ${u.replace(/_/g," ")}`,variant:"info"}),n.jsx("button",{onClick:Ce,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"clear"})]})]}),d&&te&&n.jsx(cp,{session:te,onClose:()=>m("")}),!d&&r==="groups"&&n.jsx(np,{groups:j||[],onGroupClick:F}),!d&&r==="errors"&&n.jsx(sp,{errors:G,total:C,page:g,totalPages:Y,onPageChange:v,onSessionClick:ie=>{m(ie)}}),!d&&r==="timeline"&&n.jsx(ip,{errors:G,onSessionClick:ie=>m(ie)}),!d&&r==="sessions"&&n.jsx(rp,{sessions:$,onSelect:ie=>m(ie)}),C===0&&!d&&n.jsx(uu,{title:"No errors detected",description:"Claude Code session logs are clean"})]})}function np({groups:r,onGroupClick:o}){return r.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Error Groups"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Type"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Last Seen"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Sample Message"})]})}),n.jsx("tbody",{children:r.map(u=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2",children:n.jsx(xe,{label:u.type.replace(/_/g," "),variant:cm[u.type]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-right",children:n.jsx("button",{onClick:()=>o(u.type),className:"text-sm text-indigo-400 hover:text-indigo-300 font-mono transition-colors",title:`View all ${u.count} errors of this type`,children:u.count})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.sessions}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:Kn(u.lastSeen)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 max-w-xs truncate",children:u.recentMessages[0]||"-"})]},u.type))})]})]})}function sp({errors:r,total:o,page:u,totalPages:c,onPageChange:d,onSessionClick:m}){const[g,v]=E.useState(new Set),p=E.useCallback(y=>{v(A=>{const D=new Set(A);return D.has(y)?D.delete(y):D.add(y),D})},[]);if(r.length===0)return n.jsx(uu,{title:"No errors",description:"No errors match the current filter"});const h=u*Qn+1,j=Math.min(u*Qn+r.length,o);return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-3 border-b border-gray-800 flex items-center justify-between",children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Errors ",h,"–",j," of ",o]}),c>1&&n.jsx(D0,{page:u,totalPages:c,onChange:d})]}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:r.map((y,A)=>{const D=g.has(A),X=y.message.length>120;return n.jsx("div",{className:"px-4 py-3 hover:bg-gray-800/20 transition-colors",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx(xe,{label:y.type.replace(/_/g," "),variant:cm[y.type]||"default"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:`text-xs text-gray-300 ${D?"whitespace-pre-wrap break-words":"truncate"} ${X?"cursor-pointer":""}`,onClick:X?()=>p(A):void 0,title:X&&!D?"Click to expand full message":void 0,children:[D?y.message:y.message.slice(0,200),!D&&X&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),y.context?.toolName&&n.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[n.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:y.context.toolName}),y.context.toolInput&&n.jsx("span",{className:"text-[10px] text-gray-500 font-mono truncate max-w-md",children:y.context.toolInput})]})]}),n.jsxs("div",{className:"flex-shrink-0 text-right",children:[n.jsx("div",{className:"text-[10px] text-gray-500",children:Kn(y.timestamp)}),n.jsx("button",{onClick:()=>m(y.sessionId),className:"text-[10px] text-indigo-400 hover:text-indigo-300 font-mono mt-0.5 transition-colors",title:"View full session",children:y.sessionId.slice(0,8)}),y.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600",children:["msg #",y.context.messageIndex]})]})]})},`${y.sessionId}-${y.timestamp}-${A}`)})}),c>1&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800 flex justify-end",children:n.jsx(D0,{page:u,totalPages:c,onChange:d})})]})}function D0({page:r,totalPages:o,onChange:u}){return n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{onClick:()=>u(Math.max(0,r-1)),disabled:r===0,className:"px-2 py-1 text-xs rounded transition-colors disabled:text-gray-700 text-gray-400 hover:text-white hover:bg-gray-700",children:"Prev"}),n.jsxs("span",{className:"text-[10px] text-gray-500 px-2",children:[r+1," / ",o]}),n.jsx("button",{onClick:()=>u(Math.min(o-1,r+1)),disabled:r>=o-1,className:"px-2 py-1 text-xs rounded transition-colors disabled:text-gray-700 text-gray-400 hover:text-white hover:bg-gray-700",children:"Next"})]})}function ip({errors:r,onSessionClick:o}){if(r.length===0)return null;const u={prompt_too_long:"bg-rose-400",api_error:"bg-amber-400",tool_failure:"bg-blue-400",hook_error:"bg-gray-400",rate_limit:"bg-amber-400",unknown:"bg-gray-500"};return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Error Timeline"}),n.jsx("div",{className:"space-y-1 max-h-[600px] overflow-y-auto custom-scrollbar",children:r.map((c,d)=>n.jsxs("div",{className:"flex items-start gap-3 py-2 px-2 hover:bg-gray-800/30 rounded cursor-pointer",onClick:()=>o(c.sessionId),children:[n.jsxs("div",{className:"flex flex-col items-center mt-1",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${u[c.type]||"bg-gray-500"}`}),d<r.length-1&&n.jsx("div",{className:"w-px h-full bg-gray-800 mt-1"})]}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:c.type.replace(/_/g," ")}),c.context?.toolName&&n.jsx("span",{className:"text-[10px] font-mono px-1 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:c.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-600",children:Kn(c.timestamp)})]}),n.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:c.message}),c.context?.toolInput&&n.jsx("div",{className:"text-[10px] text-gray-600 font-mono truncate mt-0.5",children:c.context.toolInput}),n.jsxs("div",{className:"text-[10px] text-gray-700 font-mono mt-0.5",children:["Session: ",c.sessionId.slice(0,8)]})]})]},d))})]})}function rp({sessions:r,onSelect:o}){return r.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Branch"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Messages"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tool Calls"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Errors"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Started"})]})}),n.jsx("tbody",{children:r.map(u=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>o(u.sessionId),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:u.sessionId.slice(0,8)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:u.gitBranch||"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.messageCount}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.toolCallCount}),n.jsx("td",{className:"px-4 py-2 text-right",children:u.errors.length>0?n.jsx(xe,{label:String(u.errors.length),variant:"error"}):n.jsx("span",{className:"text-xs text-gray-600",children:"0"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:Kn(u.startTime)})]},u.sessionId))})]})]})}function cp({session:r,onClose:o}){const[u,c]=E.useState(new Set),d=m=>{c(g=>{const v=new Set(g);return v.has(m)?v.delete(m):v.add(m),v})};return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Session: ",n.jsx("span",{className:"font-mono",children:r.sessionId.slice(0,12)})]}),n.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5",children:["v",r.version," | ",r.gitBranch," | ",r.messageCount," messages | ",r.toolCallCount," tool calls"]})]}),n.jsx("button",{onClick:o,className:"px-2 py-1 text-xs text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors",children:"Back"})]}),n.jsxs("div",{className:"flex gap-3 mb-4",children:[n.jsxs("div",{className:"text-xs text-gray-500",children:["Started: ",new Date(r.startTime).toLocaleString()]}),r.endTime&&n.jsxs("div",{className:"text-xs text-gray-500",children:["Ended: ",new Date(r.endTime).toLocaleString()]})]}),r.errors.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No errors in this session"}):n.jsx("div",{className:"space-y-2",children:r.errors.map((m,g)=>{const v=u.has(g),p=m.message.length>150;return n.jsxs("div",{className:"p-3 bg-gray-800/50 rounded-lg border-l-2 border-rose-500/50",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx(xe,{label:m.type.replace(/_/g," "),variant:"error"}),m.context?.toolName&&n.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:m.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-600",children:Kn(m.timestamp)})]}),n.jsxs("div",{className:`text-xs text-gray-400 ${v?"whitespace-pre-wrap break-words":""} ${p?"cursor-pointer":""}`,onClick:p?()=>d(g):void 0,children:[v?m.message:m.message.slice(0,300),!v&&p&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),m.context?.toolInput&&n.jsx("div",{className:"text-[10px] text-gray-500 font-mono mt-1.5 bg-gray-900/50 px-2 py-1 rounded",children:m.context.toolInput}),m.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:["At message #",m.context.messageIndex]})]},g)})})]})}function Kn(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}const up=[{value:"all",label:"All"},{value:"command",label:"Commands"},{value:"hook",label:"Hooks"},{value:"notification",label:"Notifications"},{value:"cost",label:"Cost"}],op=[{value:"all",label:"All Levels"},{value:"error",label:"Errors"},{value:"warning",label:"Warnings"},{value:"info",label:"Info"}];function fp(){const[r,o]=al("category","all"),[u,c]=al("severity","all"),d=r||"all",m=u||"all",[g,v]=E.useState([]),[p,h]=E.useState(200),[j,y]=E.useState(null),A=new URLSearchParams;A.set("limit",String(p)),d!=="all"&&A.set("categories",d),m!=="all"&&A.set("severity",m);const{data:D,loading:X}=Qe(`/api/activity/stream?${A.toString()}`),w=E.useCallback(Q=>{v(Ce=>[Q,...Ce].slice(0,50))},[]);if(ji({onEvent:{activity:w}}),X)return n.jsx(bt,{});const C=[...g,...D||[]],G=new Set,H=[];for(const Q of C){const Ce=`${Q.timestamp}:${Q.title}`;G.has(Ce)||(G.add(Ce),H.push(Q))}const V=H.filter(Q=>!(d!=="all"&&Q.category!==d||m!=="all"&&Q.severity!==m)),ce=H.filter(Q=>Q.severity==="error").length,te=H.filter(Q=>Q.severity==="warning").length,$=new Set(H.map(Q=>Q.source)),Y=Q=>{y(Ce=>Ce===Q?null:Q)},F=()=>{h(Q=>Q+200)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Activity Stream"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 pulse-dot"}),n.jsx("span",{className:"text-xs text-gray-500",children:"Live"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Total Events",value:H.length,color:"indigo"}),n.jsx(le,{title:"Errors",value:ce,color:"rose"}),n.jsx(le,{title:"Warnings",value:te,color:"amber"}),n.jsx(le,{title:"Sources",value:$.size,color:"cyan"})]}),n.jsxs("div",{className:"flex flex-wrap gap-4",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:up.map(Q=>n.jsx("button",{onClick:()=>o(Q.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${d===Q.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:Q.label},Q.value))}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:op.map(Q=>n.jsx("button",{onClick:()=>c(Q.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${m===Q.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:Q.label},Q.value))}),n.jsxs("span",{className:"text-xs text-gray-500 self-center",children:[V.length," events"]})]}),n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl divide-y divide-gray-800/50",children:V.length===0?n.jsxs("div",{className:"p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No events match filters"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Try adjusting category or severity filters"})]}):n.jsxs(n.Fragment,{children:[V.slice(0,p).map((Q,Ce)=>{const ie=`${Q.timestamp}-${Ce}`,Oe=j===ie;return n.jsx(dp,{event:Q,isExpanded:Oe,onToggle:()=>Y(ie)},ie)}),V.length>=p&&n.jsx("div",{className:"p-4 text-center",children:n.jsx("button",{onClick:F,className:"px-4 py-2 text-xs text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded-lg transition-colors",children:"Load more events"})})]})})]})}function dp({event:r,isExpanded:o,onToggle:u}){const c=r.severity==="error"?"bg-rose-400":r.severity==="warning"?"bg-amber-400":"bg-gray-600",d={command:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",hook:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",cost:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1",sync:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581"},m=r.detail||r.metadata&&Object.keys(r.metadata).length>0;return n.jsxs("div",{children:[n.jsxs("div",{className:`px-4 py-3 flex items-start gap-3 transition-colors ${m?"cursor-pointer hover:bg-gray-800/20":""}`,onClick:m?u:void 0,children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-2 flex-shrink-0 ${c}`}),n.jsx("div",{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-gray-500",children:n.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:d[r.category]||d.command})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-gray-300",children:r.title}),n.jsx(xe,{label:r.category,variant:Ni(r.severity)})]}),r.detail&&!o&&n.jsx("p",{className:"text-xs text-gray-500 mt-0.5 truncate",children:r.detail}),r.source&&n.jsxs("span",{className:"text-[10px] text-gray-600 mt-0.5 block",children:["via ",r.source]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[r.timestamp&&n.jsx("span",{className:"text-[10px] text-gray-600 whitespace-nowrap",children:mp(r.timestamp)}),m&&n.jsx("svg",{className:`w-4 h-4 text-gray-600 transition-transform duration-200 ${o?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),o&&n.jsxs("div",{className:"px-4 pb-3 ml-10 space-y-2",children:[r.detail&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Detail"}),n.jsx("p",{className:"text-xs text-gray-300 whitespace-pre-wrap",children:r.detail})]}),r.metadata&&Object.keys(r.metadata).length>0&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Metadata"}),n.jsx("pre",{className:"text-xs text-gray-400 font-mono whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(r.metadata,null,2)})]})]})]})}function mp(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function xp(){const{data:r,loading:o,error:u,refetch:c}=Qe("/api/config"),{activeProject:d}=Zl(),[m,g]=E.useState(new Set),[v,p]=E.useState({}),[h,j]=E.useState(!1),[y,A]=E.useState(null),[D,X]=E.useState([]);if(o)return n.jsx(bt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const w=$=>{g(Y=>{const F=new Set(Y);return F.has($)?F.delete($):F.add($),F})},C=Object.keys(v).length>0,G=($,Y)=>{p(F=>({...F,[$]:Y})),X(F=>F.filter(Q=>Q.path!==$))},H=async()=>{if(C){j(!0),A(null),X([]);try{const $={};for(const[Oe,Xt]of Object.entries(v))gp($,Oe,Xt);const Y=d?`?project=${d.id}`:"",Q=await(await fetch(`/api/config/validate${Y}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json();if(Q.errors&&Q.errors.length>0){X(Q.errors),A("Validation failed. Fix errors before saving."),j(!1);return}const ie=await(await fetch(`/api/config${Y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json();ie.ok?(A("Saved successfully"),p({}),X([]),c(),setTimeout(()=>A(null),3e3)):A(`Error: ${ie.error}`)}catch($){A(`Error: ${$}`)}finally{j(!1)}}},V=()=>{p({}),A(null),X([])},ce=Object.entries(r).filter(([$,Y])=>typeof Y=="object"&&Y!==null),te=Object.entries(r).filter(([$,Y])=>typeof Y!="object"||Y===null);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Configuration"}),n.jsx("span",{className:"text-xs text-gray-500",children:".specweave/config.json"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[y&&n.jsx("span",{className:`text-xs ${y.startsWith("Error")||y.startsWith("Validation")?"text-rose-400":"text-emerald-400"}`,children:y}),C&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:`${Object.keys(v).length} changes`,variant:"warning"}),n.jsx("button",{onClick:V,className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors",children:"Discard"}),n.jsx("button",{onClick:H,disabled:h,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:h?"Saving...":"Save Changes"})]})]})]}),y&&!C&&y==="Saved successfully"&&n.jsxs("div",{className:"bg-emerald-500/10 border border-emerald-500/30 rounded-lg px-4 py-2 flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),n.jsx("span",{className:"text-xs text-emerald-400",children:"Configuration saved successfully"})]}),D.length>0&&n.jsxs("div",{className:"bg-rose-500/10 border border-rose-500/30 rounded-lg px-4 py-3 space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-rose-400"}),n.jsx("span",{className:"text-xs text-rose-400 font-medium",children:"Validation errors"})]}),D.map(($,Y)=>n.jsxs("div",{className:"text-xs text-rose-300 pl-4",children:[n.jsx("span",{className:"font-mono text-rose-400",children:$.path}),": ",$.message]},Y))]}),te.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"General"}),n.jsx("div",{className:"space-y-3",children:te.map(([$,Y])=>n.jsx(om,{path:$,label:$,value:v[$]!==void 0?v[$]:Y,original:Y,onChange:F=>G($,F),edited:v[$]!==void 0,validationError:D.find(F=>F.path===$)?.message},$))})]}),ce.map(([$,Y])=>n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("button",{onClick:()=>w($),className:"w-full px-5 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 capitalize",children:$}),U0(v,$)>0&&n.jsx(xe,{label:`${U0(v,$)} edited`,variant:"warning"}),D.some(F=>F.path.startsWith($+"."))&&n.jsx(xe,{label:"errors",variant:"error"})]}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${m.has($)?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m.has($)&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800",children:n.jsx(um,{data:Y,path:$,edits:v,onChange:G,validationErrors:D,depth:0})})]},$))]})}function um({data:r,path:o,edits:u,onChange:c,validationErrors:d,depth:m}){return m>4?n.jsx("span",{className:"text-xs text-gray-600",children:"..."}):n.jsx("div",{className:"space-y-3",style:{marginLeft:m>0?16:0},children:Object.entries(r).map(([g,v])=>{const p=`${o}.${g}`;return v&&typeof v=="object"&&!Array.isArray(v)?n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono font-medium",children:g}),n.jsx(um,{data:v,path:p,edits:u,onChange:c,validationErrors:d,depth:m+1})]},g):n.jsx(om,{path:p,label:g,value:u[p]!==void 0?u[p]:v,original:v,onChange:h=>c(p,h),edited:u[p]!==void 0,validationError:d.find(h=>h.path===p)?.message},g)})})}function om({path:r,label:o,value:u,original:c,onChange:d,edited:m,validationError:g}){return typeof c=="boolean"||typeof u=="boolean"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsx("button",{onClick:()=>d(!u),className:`relative w-9 h-5 rounded-full transition-colors ${u?"bg-indigo-600":"bg-gray-700"} ${m?"ring-1 ring-amber-500/50":""}`,children:n.jsx("div",{className:`absolute top-0.5 w-4 h-4 bg-white rounded-full transition-transform ${u?"left-[18px]":"left-0.5"}`})})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:g})]}):typeof c=="number"||typeof u=="number"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsx("input",{type:"number",value:String(u??""),onChange:v=>d(v.target.value?Number(v.target.value):0),className:`bg-gray-800 border text-xs text-amber-400 font-mono rounded px-2 py-1 w-24 text-right ${g?"border-rose-500":m?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]}):Array.isArray(c)||Array.isArray(u)?n.jsx(hp,{path:r,label:o,value:Array.isArray(u)?u:Array.isArray(c)?c:[],edited:m,onChange:d,validationError:g}):n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsx("input",{type:"text",value:String(u??""),onChange:v=>d(v.target.value),className:`bg-gray-800 border text-xs text-gray-300 rounded px-2 py-1 w-48 text-right ${g?"border-rose-500":m?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]})}function hp({path:r,label:o,value:u,edited:c,onChange:d,validationError:m}){const[g,v]=E.useState(!1),[p,h]=E.useState(""),j=D=>{const X=[...u];X.splice(D,1),d(X)},y=()=>{const D=p.trim();D&&(d([...u,D]),h(""))},A=D=>{D.key==="Enter"&&(D.preventDefault(),y())};return n.jsxs("div",{className:"py-1",children:[n.jsxs("button",{onClick:()=>v(D=>!D),className:"flex items-center justify-between w-full group",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),n.jsxs("div",{className:"flex items-center gap-2",children:[c&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500"}),n.jsxs("span",{className:"text-xs text-gray-400 font-mono",children:["[",u.length," items]"]}),n.jsx("svg",{className:`w-3 h-3 text-gray-500 transition-transform duration-200 ${g?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),g&&n.jsxs("div",{className:"mt-2 ml-4 space-y-1",children:[u.length===0&&n.jsx("p",{className:"text-[10px] text-gray-600",children:"No items"}),u.map((D,X)=>n.jsxs("div",{className:"flex items-center gap-2 group/item",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono flex-1 truncate",children:String(D)}),n.jsx("button",{onClick:()=>j(X),className:"text-[10px] text-gray-600 hover:text-rose-400 opacity-0 group-hover/item:opacity-100 transition-opacity",children:"remove"})]},X)),n.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[n.jsx("input",{type:"text",value:p,onChange:D=>h(D.target.value),onKeyDown:A,placeholder:"Add item...",className:"bg-gray-800 border border-gray-700 text-xs text-gray-300 rounded px-2 py-1 flex-1 focus:ring-indigo-500 focus:border-indigo-500"}),n.jsx("button",{onClick:y,disabled:!p.trim(),className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded disabled:opacity-50 transition-colors",children:"Add"})]})]}),m&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:m})]})}function U0(r,o){return Object.keys(r).filter(u=>u.startsWith(o+".")).length}function gp(r,o,u){const c=o.split(".");let d=r;for(let m=0;m<c.length-1;m++)(!d[c[m]]||typeof d[c[m]]!="object")&&(d[c[m]]={}),d=d[c[m]];d[c[c.length-1]]=u}function fm({lines:r,status:o,onDismiss:u}){const c=E.useRef(null);return E.useEffect(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[r]),r.length===0&&o==="idle"?null:n.jsxs("div",{className:"mt-4 rounded-lg bg-gray-950 border border-gray-700 overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-900 border-b border-gray-700",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${o==="running"?"bg-yellow-400 animate-pulse":o==="success"?"bg-green-400":o==="error"?"bg-red-400":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:o==="running"?"Running...":o==="success"?"Completed":o==="error"?"Failed":"Output"})]}),o!=="running"&&u&&n.jsx("button",{onClick:u,className:"text-gray-500 hover:text-gray-300 text-xs",children:"Dismiss"})]}),n.jsxs("div",{className:"p-3 max-h-48 overflow-y-auto font-mono text-xs text-gray-300 whitespace-pre-wrap",children:[r.map((d,m)=>n.jsx("div",{children:d},m)),n.jsx("div",{ref:c})]})]})}function yp(){const{data:r,loading:o}=Qe("/api/plugins/full"),{execute:u,running:c,output:d,status:m,reset:g}=ou(),[v,p]=E.useState(null);if(o)return n.jsx(bt,{});const h=r?.plugins||[],j=r?.skills||[],y=r?.lsp,A=r?.warmup,D=r?.triggerCount||0,X=h.reduce((H,V)=>H+V.skillCount,0),w=h.reduce((H,V)=>H+V.commandCount,0),C=H=>j.filter(V=>V.plugin===H).sort((V,ce)=>ce.count-V.count),G=H=>{p(V=>V===H?null:H)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Plugins & LSP"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>u("lsp-status"),disabled:c,className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:"Check LSP"}),n.jsx("button",{onClick:()=>u("refresh-marketplace"),disabled:c,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:c?"Running...":"Refresh Marketplace"})]})]}),n.jsx(fm,{lines:d,status:m,onDismiss:g}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[n.jsx(Ua,{label:"Plugins",value:h.length}),n.jsx(Ua,{label:"Total Skills",value:X}),n.jsx(Ua,{label:"Total Commands",value:w}),n.jsx(Ua,{label:"Trigger Keywords",value:D})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Installed Plugins"})}),h.length===0?n.jsx("div",{className:"p-5 text-gray-500 text-xs",children:"No plugins installed"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:h.map(H=>{const V=v===H.name,ce=C(H.name);return n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>G(H.name),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors text-left",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("span",{className:"text-sm text-gray-300",children:H.name}),n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:H.version})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xe,{label:`${H.skillCount} skills`,variant:"info"}),n.jsx(xe,{label:`${H.commandCount} cmds`,variant:"default"}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${V?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),V&&n.jsx("div",{className:"px-4 pb-4 bg-gray-800/20",children:ce.length===0?n.jsx("p",{className:"text-xs text-gray-600 py-2",children:"No skill usage data for this plugin"}):n.jsxs("div",{className:"space-y-1 mt-1",children:[n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1",children:[n.jsx("span",{className:"text-[10px] text-gray-600 uppercase",children:"Skill"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Invocations"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Success"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Last Used"})]}),ce.map(te=>n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1.5 bg-gray-800/40 rounded",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono truncate",children:te.name}),n.jsx("span",{className:"text-xs text-gray-400 text-right font-mono",children:te.count}),n.jsxs("span",{className:"text-xs text-right font-mono",children:[n.jsx("span",{className:"text-emerald-400",children:te.successCount}),te.failureCount>0&&n.jsxs("span",{className:"text-rose-400",children:["/",te.failureCount]})]}),n.jsx("span",{className:"text-[10px] text-gray-500 text-right",children:te.lastUsed?pp(te.lastUsed):"-"})]},te.name))]})})]},H.name)})})]}),j.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Skill Usage Leaderboard"}),n.jsx(im,{items:j.sort((H,V)=>V.count-H.count).slice(0,20).map(H=>({label:H.name,value:H.count,color:"#10b981"})),maxBars:20})]}),y&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Status"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(xe,{label:y.status,variant:y.status==="ok"?"success":"warning"}),y.checked&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Checked: ",new Date(y.checked).toLocaleDateString()]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[n.jsx(Ua,{label:"Total Languages",value:y.stats.totalLanguages}),n.jsx(Ua,{label:"Checked",value:y.stats.checkedLanguages}),n.jsx(Ua,{label:"Binary Missing",value:y.stats.binaryMissing}),n.jsx(Ua,{label:"Plugin Missing",value:y.stats.pluginMissing})]}),y.missing.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"text-xs text-gray-500",children:"Missing Languages"}),y.missing.map((H,V)=>n.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-800/50 rounded",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(xe,{label:H.type,variant:H.type==="binary"?"warning":"default"}),n.jsx("span",{className:"text-xs text-gray-300",children:H.language})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-[10px] text-gray-500",children:H.binaryInstall}),H.message&&n.jsx("span",{className:"text-[10px] text-gray-600 max-w-[200px] truncate",children:H.message})]})]},V))]})]}),A&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Warmup Status"}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[A.elapsed?`${(A.elapsed/1e3).toFixed(1)}s`:""," |"," ",A.timestamp?new Date(A.timestamp).toLocaleString():""]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[A.warmedUp.map(H=>n.jsx(xe,{label:H,variant:"success"},H)),A.failed.map(H=>n.jsx(xe,{label:H,variant:"error"},H))]}),A.warmedUp.length===0&&A.failed.length===0&&n.jsx("p",{className:"text-gray-600 text-xs",children:"No warmup data"})]})]})}function Ua({label:r,value:o}){return n.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-lg font-bold text-gray-300",children:o}),n.jsx("div",{className:"text-[10px] text-gray-500",children:r})]})}function pp(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function vp(){const{data:r,loading:o}=Qe("/api/links"),{data:u,loading:c,refetch:d}=Qe("/api/services"),{execute:m,running:g,output:v,status:p,reset:h}=ou();if(o||c)return n.jsx(bt,{});const j=(u||[]).filter(C=>C.status==="running").length,y=(u||[]).length,A=new Map;for(const C of u||[])if(C.port>0&&C.status==="running"){const G=A.get(C.port)||[];G.push(C.name),A.set(C.port,G)}const D=Array.from(A.entries()).filter(([,C])=>C.length>1),X=async C=>{await m(C),setTimeout(()=>d(),3e3)},w=async C=>{await m(C),setTimeout(()=>d(),2e3)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Services & Links"}),n.jsx(fm,{lines:v,status:p,onDismiss:h}),D.length>0&&n.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded-xl p-4 flex items-start gap-3",children:[n.jsx("svg",{className:"w-5 h-5 text-amber-400 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium text-amber-300",children:"Port Conflict Detected"}),n.jsx("div",{className:"text-xs text-amber-400/80 mt-1",children:D.map(([C,G])=>n.jsxs("span",{className:"block",children:["Port ",C," is used by: ",G.join(", ")]},C))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Services",value:y,color:"indigo",tooltip:`${y} managed services`}),n.jsx(le,{title:"Running",value:j,color:"emerald",tooltip:`${j} services currently active`}),n.jsx(le,{title:"External Links",value:(r||[]).length,color:"cyan",tooltip:"Configured external links (docs, repos, etc.)"}),n.jsx(le,{title:"Stopped",value:y-j,color:"rose",tooltip:`${y-j} services not running`})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Service Status"}),n.jsx("div",{className:"space-y-3",children:(u||[]).map((C,G)=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${C.status==="running"?"bg-emerald-400":"bg-gray-600"}`}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300",children:C.name}),n.jsx("div",{className:"text-[10px] text-gray-600",children:C.status==="running"&&C.detail?n.jsx("a",{href:C.detail,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline transition-colors",children:C.detail}):C.detail})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[C.status==="running"&&C.port>0&&n.jsx(xe,{label:`Port ${C.port}`,variant:"info"}),C.status==="running"?n.jsx(xe,{label:"Running",variant:"success"}):n.jsx(xe,{label:"Stopped",variant:"default"}),C.name==="Docs Preview"&&(C.status==="running"?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("a",{href:C.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"}),n.jsx("button",{onClick:()=>w("docs-preview-stop"),disabled:g,className:"px-2 py-1 text-[10px] text-rose-400 hover:text-rose-300 border border-rose-500/30 rounded transition-colors disabled:opacity-50",children:"Stop"})]}):n.jsx("button",{onClick:()=>X("docs-preview-start"),disabled:g,className:"px-2 py-1 text-[10px] text-emerald-400 hover:text-emerald-300 border border-emerald-500/30 rounded transition-colors disabled:opacity-50",children:g?"Starting...":"Start"})),C.status==="running"&&C.name!=="Docs Preview"&&n.jsx("a",{href:C.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"})]})]},G))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"External Links"}),(r||[]).length===0?n.jsx("p",{className:"text-xs text-gray-500",children:"No external links configured"}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:(r||[]).map((C,G)=>n.jsxs("a",{href:C.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg hover:bg-gray-800 transition-colors group",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(bp,{type:C.type}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:C.name}),n.jsx("div",{className:"text-[10px] text-gray-600 truncate max-w-[200px]",children:C.url})]})]}),n.jsx("svg",{className:"w-4 h-4 text-gray-600 group-hover:text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]},G))})]})]})}function bp({type:r}){const o={docs:"bg-indigo-600",github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-8 h-8 rounded-lg ${o[r]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-xs text-white font-bold",children:r[0]?.toUpperCase()})})}const L0={critical:0,warning:1,info:2};function jp(){const[r,o]=E.useState("pending"),[u,c]=E.useState(null),{activeProject:d}=Zl(),{data:m,loading:g,error:v,refetch:p}=Qe("/api/notifications");if(g)return n.jsx(bt,{});if(v)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",v]});const h=m||[],j=h.filter(Y=>!Y.dismissedAt),y=h.filter(Y=>!!Y.dismissedAt),A=j.filter(Y=>Y.severity==="critical"),D=j.filter(Y=>Y.severity==="warning"),w=[...r==="pending"?j:r==="dismissed"?y:h].sort((Y,F)=>{const Q=L0[Y.severity]??3,Ce=L0[F.severity]??3;return Q!==Ce?Q-Ce:new Date(F.createdAt).getTime()-new Date(Y.createdAt).getTime()}),C=async Y=>{c(Y);try{const F=d?`?project=${d.id}`:"";(await fetch(`/api/notifications/${Y}/dismiss${F}`,{method:"POST"})).ok&&p()}finally{c(null)}},G=async()=>{c("__all__");try{const Y=d?`?project=${d.id}`:"";for(const F of j)await fetch(`/api/notifications/${F.id}/dismiss${Y}`,{method:"POST"});p()}finally{c(null)}},H=Y=>Y==="critical"?"error":Y==="warning"?"warning":"info",V=Y=>Y==="critical"?"border-l-rose-500":Y==="warning"?"border-l-amber-500":"border-l-blue-500",te=(Y=>{const F={};for(const Q of Y)F[Q.severity]||(F[Q.severity]=[]),F[Q.severity].push(Q);return F})(w),$={critical:"Critical",warning:"Warnings",info:"Informational"};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Notifications"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Pending",value:j.length,color:"indigo"}),n.jsx(le,{title:"Critical",value:A.length,color:"rose"}),n.jsx(le,{title:"Warnings",value:D.length,color:"amber"}),n.jsx(le,{title:"Dismissed",value:y.length,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{value:"pending",label:`Pending (${j.length})`},{value:"dismissed",label:`Dismissed (${y.length})`},{value:"all",label:`All (${h.length})`}].map(Y=>n.jsx("button",{onClick:()=>o(Y.value),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${r===Y.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:Y.label},Y.value))}),j.length>0&&n.jsx("button",{onClick:G,disabled:u==="__all__",className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors disabled:opacity-50",children:u==="__all__"?"Dismissing...":"Dismiss All"})]}),w.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mx-auto mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})}),n.jsx("p",{className:"text-gray-400 text-sm font-medium",children:r==="pending"?"No pending notifications":"No notifications"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs mx-auto",children:"Notifications appear here when imports complete, discrepancies are found, or syncs fail"})]}):n.jsx("div",{className:"space-y-4",children:["critical","warning","info"].map(Y=>{const F=te[Y];return!F||F.length===0?null:n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx("h3",{className:"text-xs font-medium text-gray-400 uppercase",children:$[Y]||Y}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:["(",F.length,")"]})]}),n.jsx("div",{className:"space-y-2",children:F.map(Q=>n.jsxs("div",{className:`bg-gray-900/50 border border-gray-800 border-l-4 ${V(Q.severity)} rounded-xl p-4 flex items-start gap-4 ${Q.dismissedAt?"opacity-60":""}`,children:[n.jsx(Np,{severity:Q.severity}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-gray-200",children:Q.title}),n.jsx(xe,{label:Q.severity,variant:H(Q.severity)}),Q.type&&n.jsx(xe,{label:Q.type,variant:"default"})]}),Q.message&&n.jsx("p",{className:"text-xs text-gray-400 mb-2",children:Q.message}),n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-600",children:[n.jsx("span",{children:new Date(Q.createdAt).toLocaleString()}),Q.source&&n.jsxs("span",{children:["via ",Q.source]}),Q.dismissedAt&&n.jsxs("span",{children:["Dismissed ",new Date(Q.dismissedAt).toLocaleString()]})]})]}),!Q.dismissedAt&&n.jsx("button",{onClick:()=>C(Q.id),disabled:u===Q.id,className:"px-2 py-1 text-xs text-gray-500 hover:text-gray-300 hover:bg-gray-800 rounded transition-colors disabled:opacity-50 flex-shrink-0",children:u===Q.id?"...":"Dismiss"})]},Q.id))})]},Y)})})]})}function Np({severity:r}){return r==="critical"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-rose-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-rose-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"})})}):r==="warning"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-amber-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}function Sp(r){if(!r)return null;if(r.startsWith("https://"))return r.replace(/\.git$/,"");const o=r.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(o)return`https://${o[1]}/${o[2]}`;const u=r.match(/^ssh:\/\/git@([^/]+)\/(.+?)(?:\.git)?$/);return u?`https://${u[1]}/${u[2]}`:null}function Ep(){const{data:r,loading:o,error:u}=Qe("/api/repos");if(o)return n.jsx(bt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});const c=r||[],d=[...new Set(c.map(v=>v.org))],m=c.filter(v=>v.hasSpecweave).length,g=c.find(v=>v.isCurrent);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Repositories"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Repositories",value:c.length,color:"indigo"}),n.jsx(le,{title:"Organizations",value:d.length,color:"cyan"}),n.jsx(le,{title:"With SpecWeave",value:m,color:"emerald"}),n.jsx(le,{title:"Current",value:g?g.name:"-",subtitle:g?`${g.org}/${g.name}`:"No current project",color:"amber"})]}),c.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No repositories found"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"This project doesn't use multi-repo mode, or the repositories/ directory hasn't been set up yet"})]}):n.jsx(n.Fragment,{children:d.map(v=>{const p=c.filter(h=>h.org===v);return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(Tp,{}),n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:v}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[p.length," ",p.length===1?"repo":"repos"]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:p.map(h=>{const j=Sp(h.remote);return n.jsxs("div",{className:`bg-gray-900/50 border rounded-xl p-4 ${h.isCurrent?"border-indigo-500/30":"border-gray-800"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cp,{}),n.jsx("span",{className:"text-sm font-medium text-gray-300",children:h.name})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[h.isCurrent&&n.jsx(xe,{label:"Current Project",variant:"info"}),n.jsx(xe,{label:h.hasSpecweave?"SpecWeave":"No SpecWeave",variant:h.hasSpecweave?"success":"default"})]})]}),n.jsxs("div",{className:"space-y-1.5 mt-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Organization"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:h.org})]}),h.branch&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Branch"}),n.jsx(xe,{label:h.branch,variant:"default"})]}),j&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-indigo-400 hover:text-indigo-300 hover:underline truncate max-w-[180px]",title:j,children:j.replace("https://","")})]}),!j&&h.remote&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:h.remote,children:h.remote})]}),h.path&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Path"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:h.path,children:h.path.split("/").slice(-3).join("/")})]}),h.lastModified&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Last Modified"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:Mp(h.lastModified)})]})]}),j&&n.jsxs("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"mt-3 flex items-center justify-center gap-1.5 text-xs text-gray-400 hover:text-gray-200 py-2 border border-gray-800 rounded-lg hover:border-gray-700 transition-colors",children:[n.jsx(Ap,{}),"Open on GitHub"]})]},h.path||`${h.org}/${h.name}`)})})]},v)})})]})}function Tp(){return n.jsx("div",{className:"w-6 h-6 rounded bg-gray-700 flex items-center justify-center",children:n.jsx("svg",{className:"w-3.5 h-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})})}function Cp(){return n.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function Ap(){return n.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function Mp(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}function zp(){const{id:r}=Ag(),{data:o,loading:u,error:c}=Qe(`/api/increments/${r||"_none"}`);if(!r)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"No increment ID specified"});if(u)return n.jsx(bt,{});if(c)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",c]});if(!o)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"Increment not found"});const d=o.taskSummary.total>0?Math.round(o.taskSummary.completed/o.taskSummary.total*100):0,m=o.acSummary.total>0?Math.round(o.acSummary.completed/o.acSummary.total*100):0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:o.dirName}),n.jsx(xe,{label:o.metadata.status||"unknown",variant:Ni(o.metadata.status||"")}),o.metadata.type&&n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:o.metadata.type}),o.metadata.priority&&n.jsx(Rp,{priority:o.metadata.priority})]}),n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:o.metadata.title||o.id}),o.metadata.project&&n.jsxs("span",{className:"text-xs text-gray-500",children:["Project: ",o.metadata.project]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(le,{title:"Tasks",value:`${o.taskSummary.completed}/${o.taskSummary.total}`,color:"indigo"}),n.jsx(le,{title:"Task Progress",value:`${d}%`,color:"cyan"}),n.jsx(le,{title:"ACs",value:`${o.acSummary.completed}/${o.acSummary.total}`,color:"emerald"}),n.jsx(le,{title:"AC Progress",value:`${m}%`,color:"amber"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 space-y-4",children:[n.jsx(H0,{label:"Tasks",completed:o.taskSummary.completed,total:o.taskSummary.total,color:"indigo"}),n.jsx(H0,{label:"Acceptance Criteria",completed:o.acSummary.completed,total:o.acSummary.total,color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Tasks (",o.tasks.length,")"]})}),o.tasks.length===0?n.jsx("div",{className:"p-5 text-center text-gray-500 text-xs",children:"No tasks found in tasks.md"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:o.tasks.map(g=>n.jsxs("div",{className:"px-5 py-3 flex items-center gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 ${g.status==="completed"?"bg-indigo-500/20 border-indigo-500 text-indigo-400":"border-gray-600"}`,children:g.status==="completed"&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:g.id}),n.jsx("span",{className:`text-sm ${g.status==="completed"?"text-gray-500 line-through":"text-gray-300"}`,children:g.title})]}),(g.userStory||g.acs)&&n.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[g.userStory&&n.jsx("span",{className:"text-[10px] text-indigo-400",children:g.userStory}),g.acs?.map(v=>n.jsx("span",{className:"text-[10px] text-emerald-500",children:v},v))]})]})]},g.id))})]}),o.acs.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Acceptance Criteria (",o.acs.length,")"]})}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:o.acs.map(g=>n.jsxs("div",{className:"px-5 py-3 flex items-start gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 mt-0.5 ${g.completed?"bg-emerald-500/20 border-emerald-500 text-emerald-400":"border-gray-600"}`,children:g.completed&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-emerald-500 font-mono",children:g.id}),n.jsx("span",{className:`text-sm ml-2 ${g.completed?"text-gray-500 line-through":"text-gray-300"}`,children:g.text})]})]},g.id))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"Metadata"}),n.jsx("div",{className:"space-y-1.5",children:Object.entries(o.metadata).filter(([g])=>!["title"].includes(g)).map(([g,v])=>n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:g}),n.jsx("span",{className:"text-xs text-gray-400",children:typeof v=="object"?JSON.stringify(v):String(v??"")})]},g))})]})]})}function H0({label:r,completed:o,total:u,color:c}){const d=u>0?Math.round(o/u*100):0,m=c==="emerald"?"bg-emerald-500":"bg-indigo-500";return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("span",{className:"text-xs text-gray-400",children:r}),n.jsxs("span",{className:"text-xs text-gray-500",children:[o,"/",u," (",d,"%)"]})]}),n.jsx("div",{className:"w-full h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${m} rounded-full transition-all`,style:{width:`${d}%`}})})]})}function Rp({priority:r}){const o={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${o[r]||o.P2}`,children:r})}function _p(){const r=Ny();return n.jsx(nm.Provider,{value:r,children:n.jsxs("div",{className:"flex min-h-screen bg-gray-950 text-gray-100",children:[n.jsx(Ty,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[n.jsx(Cy,{}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsxs(Xg,{children:[n.jsx(tt,{path:"/",element:n.jsx(Hy,{})}),n.jsx(tt,{path:"/increments",element:n.jsx(qy,{})}),n.jsx(tt,{path:"/increments/:id",element:n.jsx(zp,{})}),n.jsx(tt,{path:"/analytics",element:n.jsx(Xy,{})}),n.jsx(tt,{path:"/costs",element:n.jsx(Ky,{})}),n.jsx(tt,{path:"/sync",element:n.jsx(tp,{})}),n.jsx(tt,{path:"/errors",element:n.jsx(lp,{})}),n.jsx(tt,{path:"/activity",element:n.jsx(fp,{})}),n.jsx(tt,{path:"/config",element:n.jsx(xp,{})}),n.jsx(tt,{path:"/plugins",element:n.jsx(yp,{})}),n.jsx(tt,{path:"/services",element:n.jsx(vp,{})}),n.jsx(tt,{path:"/notifications",element:n.jsx(jp,{})}),n.jsx(tt,{path:"/repos",element:n.jsx(Ep,{})}),n.jsx(tt,{path:"*",element:n.jsxs("div",{className:"p-6 text-center",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200 mb-2",children:"Page Not Found"}),n.jsx("p",{className:"text-sm text-gray-500",children:"The page you're looking for doesn't exist."})]})})]})})]})]})})}Vh.createRoot(document.getElementById("root")).render(n.jsx(E.StrictMode,{children:n.jsx(my,{children:n.jsx(_p,{})})}));
|