codex-linux 1.0.2 → 1.0.3
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/dist/renderer/assets/main-CU1lrRNa.css +1 -0
- package/dist/renderer/assets/main-DQIKNXUA.js +304 -0
- package/dist/renderer/index.html +2 -2
- package/package.json +1 -1
- package/src/renderer/components/AgentPanel.tsx +53 -6
- package/dist/renderer/assets/main-AJwWHWV7.js +0 -304
- package/dist/renderer/assets/main-ua9RiJ9-.css +0 -1
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
function yf(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}})();function wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Au={exports:{}},Ga={},Iu={exports:{}},H={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Fn=Symbol.for("react.element"),bf=Symbol.for("react.portal"),kf=Symbol.for("react.fragment"),jf=Symbol.for("react.strict_mode"),Nf=Symbol.for("react.profiler"),Sf=Symbol.for("react.provider"),Cf=Symbol.for("react.context"),Ef=Symbol.for("react.forward_ref"),Pf=Symbol.for("react.suspense"),Mf=Symbol.for("react.memo"),Af=Symbol.for("react.lazy"),Ks=Symbol.iterator;function If(e){return e===null||typeof e!="object"?null:(e=Ks&&e[Ks]||e["@@iterator"],typeof e=="function"?e:null)}var Tu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lu=Object.assign,Ou={};function _r(e,t,r){this.props=e,this.context=t,this.refs=Ou,this.updater=r||Tu}_r.prototype.isReactComponent={};_r.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ru(){}Ru.prototype=_r.prototype;function Yi(e,t,r){this.props=e,this.context=t,this.refs=Ou,this.updater=r||Tu}var Ki=Yi.prototype=new Ru;Ki.constructor=Yi;Lu(Ki,_r.prototype);Ki.isPureReactComponent=!0;var Gs=Array.isArray,_u=Object.prototype.hasOwnProperty,Gi={current:null},Fu={key:!0,ref:!0,__self:!0,__source:!0};function zu(e,t,r){var n,a={},l=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)_u.call(t,n)&&!Fu.hasOwnProperty(n)&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var u=Array(o),f=0;f<o;f++)u[f]=arguments[f+2];a.children=u}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return{$$typeof:Fn,type:e,key:l,ref:s,props:a,_owner:Gi.current}}function Tf(e,t){return{$$typeof:Fn,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function qi(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fn}function Lf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var qs=/\/+/g;function gl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Lf(""+e.key):t.toString(36)}function ua(e,t,r,n,a){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Fn:case bf:s=!0}}if(s)return s=e,a=a(s),e=n===""?"."+gl(s,0):n,Gs(a)?(r="",e!=null&&(r=e.replace(qs,"$&/")+"/"),ua(a,t,r,"",function(f){return f})):a!=null&&(qi(a)&&(a=Tf(a,r+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(qs,"$&/")+"/")+e)),t.push(a)),1;if(s=0,n=n===""?".":n+":",Gs(e))for(var o=0;o<e.length;o++){l=e[o];var u=n+gl(l,o);s+=ua(l,t,r,u,a)}else if(u=If(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=n+gl(l,o++),s+=ua(l,t,r,u,a);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Vn(e,t,r){if(e==null)return e;var n=[],a=0;return ua(e,n,"","",function(l){return t.call(r,l,a++)}),n}function Of(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Se={current:null},ca={transition:null},Rf={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:ca,ReactCurrentOwner:Gi};function Du(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Vn,forEach:function(e,t,r){Vn(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Vn(e,function(){t++}),t},toArray:function(e){return Vn(e,function(t){return t})||[]},only:function(e){if(!qi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=_r;H.Fragment=kf;H.Profiler=Nf;H.PureComponent=Yi;H.StrictMode=jf;H.Suspense=Pf;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rf;H.act=Du;H.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Lu({},e.props),a=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Gi.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)_u.call(t,u)&&!Fu.hasOwnProperty(u)&&(n[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){o=Array(u);for(var f=0;f<u;f++)o[f]=arguments[f+2];n.children=o}return{$$typeof:Fn,type:e.type,key:a,ref:l,props:n,_owner:s}};H.createContext=function(e){return e={$$typeof:Cf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Sf,_context:e},e.Consumer=e};H.createElement=zu;H.createFactory=function(e){var t=zu.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:Ef,render:e}};H.isValidElement=qi;H.lazy=function(e){return{$$typeof:Af,_payload:{_status:-1,_result:e},_init:Of}};H.memo=function(e,t){return{$$typeof:Mf,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=ca.transition;ca.transition={};try{e()}finally{ca.transition=t}};H.unstable_act=Du;H.useCallback=function(e,t){return Se.current.useCallback(e,t)};H.useContext=function(e){return Se.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return Se.current.useDeferredValue(e)};H.useEffect=function(e,t){return Se.current.useEffect(e,t)};H.useId=function(){return Se.current.useId()};H.useImperativeHandle=function(e,t,r){return Se.current.useImperativeHandle(e,t,r)};H.useInsertionEffect=function(e,t){return Se.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return Se.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return Se.current.useMemo(e,t)};H.useReducer=function(e,t,r){return Se.current.useReducer(e,t,r)};H.useRef=function(e){return Se.current.useRef(e)};H.useState=function(e){return Se.current.useState(e)};H.useSyncExternalStore=function(e,t,r){return Se.current.useSyncExternalStore(e,t,r)};H.useTransition=function(){return Se.current.useTransition()};H.version="18.3.1";Iu.exports=H;var g=Iu.exports;const pt=wf(g),_f=yf({__proto__:null,default:pt},[g]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ff=g,zf=Symbol.for("react.element"),Df=Symbol.for("react.fragment"),Wf=Object.prototype.hasOwnProperty,$f=Ff.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uf={key:!0,ref:!0,__self:!0,__source:!0};function Wu(e,t,r){var n,a={},l=null,s=null;r!==void 0&&(l=""+r),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)Wf.call(t,n)&&!Uf.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:zf,type:e,key:l,ref:s,props:a,_owner:$f.current}}Ga.Fragment=Df;Ga.jsx=Wu;Ga.jsxs=Wu;Au.exports=Ga;var i=Au.exports,Gl={},$u={exports:{}},Fe={},Uu={exports:{}},Bu={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(S,_){var B=S.length;S.push(_);e:for(;0<B;){var D=B-1>>>1,U=S[D];if(0<a(U,_))S[D]=_,S[B]=U,B=D;else break e}}function r(S){return S.length===0?null:S[0]}function n(S){if(S.length===0)return null;var _=S[0],B=S.pop();if(B!==_){S[0]=B;e:for(var D=0,U=S.length,oe=U>>>1;D<oe;){var ke=2*(D+1)-1,De=S[ke],st=ke+1,Bt=S[st];if(0>a(De,B))st<U&&0>a(Bt,De)?(S[D]=Bt,S[st]=B,D=st):(S[D]=De,S[ke]=B,D=ke);else if(st<U&&0>a(Bt,B))S[D]=Bt,S[st]=B,D=st;else break e}}return _}function a(S,_){var B=S.sortIndex-_.sortIndex;return B!==0?B:S.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var u=[],f=[],h=1,m=null,p=3,b=!1,y=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(S){for(var _=r(f);_!==null;){if(_.callback===null)n(f);else if(_.startTime<=S)n(f),_.sortIndex=_.expirationTime,t(u,_);else break;_=r(f)}}function x(S){if(w=!1,v(S),!y)if(r(u)!==null)y=!0,F(k);else{var _=r(f);_!==null&&X(x,_.startTime-S)}}function k(S,_){y=!1,w&&(w=!1,d(T),T=-1),b=!0;var B=p;try{for(v(_),m=r(u);m!==null&&(!(m.expirationTime>_)||S&&!I());){var D=m.callback;if(typeof D=="function"){m.callback=null,p=m.priorityLevel;var U=D(m.expirationTime<=_);_=e.unstable_now(),typeof U=="function"?m.callback=U:m===r(u)&&n(u),v(_)}else n(u);m=r(u)}if(m!==null)var oe=!0;else{var ke=r(f);ke!==null&&X(x,ke.startTime-_),oe=!1}return oe}finally{m=null,p=B,b=!1}}var j=!1,E=null,T=-1,$=5,M=-1;function I(){return!(e.unstable_now()-M<$)}function W(){if(E!==null){var S=e.unstable_now();M=S;var _=!0;try{_=E(!0,S)}finally{_?A():(j=!1,E=null)}}else j=!1}var A;if(typeof c=="function")A=function(){c(W)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,L=R.port2;R.port1.onmessage=W,A=function(){L.postMessage(null)}}else A=function(){C(W,0)};function F(S){E=S,j||(j=!0,A())}function X(S,_){T=C(function(){S(e.unstable_now())},_)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(S){S.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,F(k))},e.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<S?Math.floor(1e3/S):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(S){switch(p){case 1:case 2:case 3:var _=3;break;default:_=p}var B=p;p=_;try{return S()}finally{p=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(S,_){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var B=p;p=S;try{return _()}finally{p=B}},e.unstable_scheduleCallback=function(S,_,B){var D=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?D+B:D):B=D,S){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=B+U,S={id:h++,callback:_,priorityLevel:S,startTime:B,expirationTime:U,sortIndex:-1},B>D?(S.sortIndex=B,t(f,S),r(u)===null&&S===r(f)&&(w?(d(T),T=-1):w=!0,X(x,B-D))):(S.sortIndex=U,t(u,S),y||b||(y=!0,F(k))),S},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(S){var _=p;return function(){var B=p;p=_;try{return S.apply(this,arguments)}finally{p=B}}}})(Bu);Uu.exports=Bu;var Bf=Uu.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Vf=g,_e=Bf;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var Vu=new Set,vn={};function lr(e,t){Mr(e,t),Mr(e+"Capture",t)}function Mr(e,t){for(vn[e]=t,e=0;e<t.length;e++)Vu.add(t[e])}var ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ql=Object.prototype.hasOwnProperty,Hf=/^[: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]*$/,Xs={},Zs={};function Qf(e){return ql.call(Zs,e)?!0:ql.call(Xs,e)?!1:Hf.test(e)?Zs[e]=!0:(Xs[e]=!0,!1)}function Yf(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Kf(e,t,r,n){if(t===null||typeof t>"u"||Yf(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,r,n,a,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xi=/[\-:]([a-z])/g;function Zi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xi,Zi);ge[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xi,Zi);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xi,Zi);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ji(e,t,r,n){var a=ge.hasOwnProperty(t)?ge[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Kf(t,r,a,n)&&(r=null),n||a===null?Qf(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var yt=Vf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Hn=Symbol.for("react.element"),ur=Symbol.for("react.portal"),cr=Symbol.for("react.fragment"),es=Symbol.for("react.strict_mode"),Xl=Symbol.for("react.profiler"),Hu=Symbol.for("react.provider"),Qu=Symbol.for("react.context"),ts=Symbol.for("react.forward_ref"),Zl=Symbol.for("react.suspense"),Jl=Symbol.for("react.suspense_list"),rs=Symbol.for("react.memo"),kt=Symbol.for("react.lazy"),Yu=Symbol.for("react.offscreen"),Js=Symbol.iterator;function $r(e){return e===null||typeof e!="object"?null:(e=Js&&e[Js]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,xl;function Xr(e){if(xl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);xl=t&&t[1]||""}return`
|
|
34
|
+
`+xl+e}var yl=!1;function wl(e,t){if(!e||yl)return"";yl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var n=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){n=f}e.call(t.prototype)}else{try{throw Error()}catch(f){n=f}e()}}catch(f){if(f&&n&&typeof f.stack=="string"){for(var a=f.stack.split(`
|
|
35
|
+
`),l=n.stack.split(`
|
|
36
|
+
`),s=a.length-1,o=l.length-1;1<=s&&0<=o&&a[s]!==l[o];)o--;for(;1<=s&&0<=o;s--,o--)if(a[s]!==l[o]){if(s!==1||o!==1)do if(s--,o--,0>o||a[s]!==l[o]){var u=`
|
|
37
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=o);break}}}finally{yl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Xr(e):""}function Gf(e){switch(e.tag){case 5:return Xr(e.type);case 16:return Xr("Lazy");case 13:return Xr("Suspense");case 19:return Xr("SuspenseList");case 0:case 2:case 15:return e=wl(e.type,!1),e;case 11:return e=wl(e.type.render,!1),e;case 1:return e=wl(e.type,!0),e;default:return""}}function ei(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case cr:return"Fragment";case ur:return"Portal";case Xl:return"Profiler";case es:return"StrictMode";case Zl:return"Suspense";case Jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qu:return(e.displayName||"Context")+".Consumer";case Hu:return(e._context.displayName||"Context")+".Provider";case ts:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rs:return t=e.displayName||null,t!==null?t:ei(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return ei(e(t))}catch{}}return null}function qf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ei(t);case 8:return t===es?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ku(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xf(e){var t=Ku(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,l=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qn(e){e._valueTracker||(e._valueTracker=Xf(e))}function Gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Ku(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ka(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}}function ti(e,t){var r=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function eo(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=zt(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qu(e,t){t=t.checked,t!=null&&Ji(e,"checked",t,!1)}function ri(e,t){qu(e,t);var r=zt(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ni(e,t.type,r):t.hasOwnProperty("defaultValue")&&ni(e,t.type,zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function to(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ni(e,t,r){(t!=="number"||ka(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Zr=Array.isArray;function jr(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+zt(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function ai(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ro(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(P(92));if(Zr(r)){if(1<r.length)throw Error(P(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:zt(r)}}function Xu(e,t){var r=zt(t.value),n=zt(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function no(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Zu(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function li(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Zu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yn,Ju=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yn=Yn||document.createElement("div"),Yn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var nn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Zf=["Webkit","ms","Moz","O"];Object.keys(nn).forEach(function(e){Zf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nn[t]=nn[e]})});function ec(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||nn.hasOwnProperty(e)&&nn[e]?(""+t).trim():t+"px"}function tc(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=ec(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var Jf=le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ii(e,t){if(t){if(Jf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function si(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 oi=null;function ns(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,Nr=null,Sr=null;function ao(e){if(e=Wn(e)){if(typeof ui!="function")throw Error(P(280));var t=e.stateNode;t&&(t=el(t),ui(e.stateNode,e.type,t))}}function rc(e){Nr?Sr?Sr.push(e):Sr=[e]:Nr=e}function nc(){if(Nr){var e=Nr,t=Sr;if(Sr=Nr=null,ao(e),t)for(e=0;e<t.length;e++)ao(t[e])}}function ac(e,t){return e(t)}function lc(){}var bl=!1;function ic(e,t,r){if(bl)return e(t,r);bl=!0;try{return ac(e,t,r)}finally{bl=!1,(Nr!==null||Sr!==null)&&(lc(),nc())}}function xn(e,t){var r=e.stateNode;if(r===null)return null;var n=el(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(P(231,t,typeof r));return r}var ci=!1;if(ht)try{var Ur={};Object.defineProperty(Ur,"passive",{get:function(){ci=!0}}),window.addEventListener("test",Ur,Ur),window.removeEventListener("test",Ur,Ur)}catch{ci=!1}function ep(e,t,r,n,a,l,s,o,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(h){this.onError(h)}}var an=!1,ja=null,Na=!1,di=null,tp={onError:function(e){an=!0,ja=e}};function rp(e,t,r,n,a,l,s,o,u){an=!1,ja=null,ep.apply(tp,arguments)}function np(e,t,r,n,a,l,s,o,u){if(rp.apply(this,arguments),an){if(an){var f=ja;an=!1,ja=null}else throw Error(P(198));Na||(Na=!0,di=f)}}function ir(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function sc(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 lo(e){if(ir(e)!==e)throw Error(P(188))}function ap(e){var t=e.alternate;if(!t){if(t=ir(e),t===null)throw Error(P(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var l=a.alternate;if(l===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===r)return lo(a),e;if(l===n)return lo(a),t;l=l.sibling}throw Error(P(188))}if(r.return!==n.return)r=a,n=l;else{for(var s=!1,o=a.child;o;){if(o===r){s=!0,r=a,n=l;break}if(o===n){s=!0,n=a,r=l;break}o=o.sibling}if(!s){for(o=l.child;o;){if(o===r){s=!0,r=l,n=a;break}if(o===n){s=!0,n=l,r=a;break}o=o.sibling}if(!s)throw Error(P(189))}}if(r.alternate!==n)throw Error(P(190))}if(r.tag!==3)throw Error(P(188));return r.stateNode.current===r?e:t}function oc(e){return e=ap(e),e!==null?uc(e):null}function uc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=uc(e);if(t!==null)return t;e=e.sibling}return null}var cc=_e.unstable_scheduleCallback,io=_e.unstable_cancelCallback,lp=_e.unstable_shouldYield,ip=_e.unstable_requestPaint,se=_e.unstable_now,sp=_e.unstable_getCurrentPriorityLevel,as=_e.unstable_ImmediatePriority,dc=_e.unstable_UserBlockingPriority,Sa=_e.unstable_NormalPriority,op=_e.unstable_LowPriority,fc=_e.unstable_IdlePriority,qa=null,lt=null;function up(e){if(lt&&typeof lt.onCommitFiberRoot=="function")try{lt.onCommitFiberRoot(qa,e,void 0,(e.current.flags&128)===128)}catch{}}var Ze=Math.clz32?Math.clz32:fp,cp=Math.log,dp=Math.LN2;function fp(e){return e>>>=0,e===0?32:31-(cp(e)/dp|0)|0}var Kn=64,Gn=4194304;function Jr(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ca(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,l=e.pingedLanes,s=r&268435455;if(s!==0){var o=s&~a;o!==0?n=Jr(o):(l&=s,l!==0&&(n=Jr(l)))}else s=r&~a,s!==0?n=Jr(s):l!==0&&(n=Jr(l));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,l=t&-t,a>=l||a===16&&(l&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Ze(t),a=1<<r,n|=e[r],t&=~a;return n}function pp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mp(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Ze(l),o=1<<s,u=a[s];u===-1?(!(o&r)||o&n)&&(a[s]=pp(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function fi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function pc(){var e=Kn;return Kn<<=1,!(Kn&4194240)&&(Kn=64),e}function kl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function zn(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=r}function hp(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Ze(r),l=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~l}}function ls(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ze(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var q=0;function mc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hc,is,vc,gc,xc,pi=!1,qn=[],Mt=null,At=null,It=null,yn=new Map,wn=new Map,Nt=[],vp="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 submit".split(" ");function so(e,t){switch(e){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":At=null;break;case"mouseover":case"mouseout":It=null;break;case"pointerover":case"pointerout":yn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wn.delete(t.pointerId)}}function Br(e,t,r,n,a,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:l,targetContainers:[a]},t!==null&&(t=Wn(t),t!==null&&is(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function gp(e,t,r,n,a){switch(t){case"focusin":return Mt=Br(Mt,e,t,r,n,a),!0;case"dragenter":return At=Br(At,e,t,r,n,a),!0;case"mouseover":return It=Br(It,e,t,r,n,a),!0;case"pointerover":var l=a.pointerId;return yn.set(l,Br(yn.get(l)||null,e,t,r,n,a)),!0;case"gotpointercapture":return l=a.pointerId,wn.set(l,Br(wn.get(l)||null,e,t,r,n,a)),!0}return!1}function yc(e){var t=Yt(e.target);if(t!==null){var r=ir(t);if(r!==null){if(t=r.tag,t===13){if(t=sc(r),t!==null){e.blockedOn=t,xc(e.priority,function(){vc(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function da(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=mi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);oi=n,r.target.dispatchEvent(n),oi=null}else return t=Wn(r),t!==null&&is(t),e.blockedOn=r,!1;t.shift()}return!0}function oo(e,t,r){da(e)&&r.delete(t)}function xp(){pi=!1,Mt!==null&&da(Mt)&&(Mt=null),At!==null&&da(At)&&(At=null),It!==null&&da(It)&&(It=null),yn.forEach(oo),wn.forEach(oo)}function Vr(e,t){e.blockedOn===t&&(e.blockedOn=null,pi||(pi=!0,_e.unstable_scheduleCallback(_e.unstable_NormalPriority,xp)))}function bn(e){function t(a){return Vr(a,e)}if(0<qn.length){Vr(qn[0],e);for(var r=1;r<qn.length;r++){var n=qn[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Mt!==null&&Vr(Mt,e),At!==null&&Vr(At,e),It!==null&&Vr(It,e),yn.forEach(t),wn.forEach(t),r=0;r<Nt.length;r++)n=Nt[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Nt.length&&(r=Nt[0],r.blockedOn===null);)yc(r),r.blockedOn===null&&Nt.shift()}var Cr=yt.ReactCurrentBatchConfig,Ea=!0;function yp(e,t,r,n){var a=q,l=Cr.transition;Cr.transition=null;try{q=1,ss(e,t,r,n)}finally{q=a,Cr.transition=l}}function wp(e,t,r,n){var a=q,l=Cr.transition;Cr.transition=null;try{q=4,ss(e,t,r,n)}finally{q=a,Cr.transition=l}}function ss(e,t,r,n){if(Ea){var a=mi(e,t,r,n);if(a===null)Tl(e,t,n,Pa,r),so(e,n);else if(gp(a,e,t,r,n))n.stopPropagation();else if(so(e,n),t&4&&-1<vp.indexOf(e)){for(;a!==null;){var l=Wn(a);if(l!==null&&hc(l),l=mi(e,t,r,n),l===null&&Tl(e,t,n,Pa,r),l===a)break;a=l}a!==null&&n.stopPropagation()}else Tl(e,t,n,null,r)}}var Pa=null;function mi(e,t,r,n){if(Pa=null,e=ns(n),e=Yt(e),e!==null)if(t=ir(e),t===null)e=null;else if(r=t.tag,r===13){if(e=sc(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Pa=e,null}function wc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sp()){case as:return 1;case dc:return 4;case Sa:case op:return 16;case fc:return 536870912;default:return 16}default:return 16}}var Ct=null,os=null,fa=null;function bc(){if(fa)return fa;var e,t=os,r=t.length,n,a="value"in Ct?Ct.value:Ct.textContent,l=a.length;for(e=0;e<r&&t[e]===a[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===a[l-n];n++);return fa=a.slice(e,1<n?1-n:void 0)}function pa(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 Xn(){return!0}function uo(){return!1}function ze(e){function t(r,n,a,l,s){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Xn:uo,this.isPropagationStopped=uo,this}return le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Xn)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Xn)},persist:function(){},isPersistent:Xn}),t}var Fr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},us=ze(Fr),Dn=le({},Fr,{view:0,detail:0}),bp=ze(Dn),jl,Nl,Hr,Xa=le({},Dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cs,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!==Hr&&(Hr&&e.type==="mousemove"?(jl=e.screenX-Hr.screenX,Nl=e.screenY-Hr.screenY):Nl=jl=0,Hr=e),jl)},movementY:function(e){return"movementY"in e?e.movementY:Nl}}),co=ze(Xa),kp=le({},Xa,{dataTransfer:0}),jp=ze(kp),Np=le({},Dn,{relatedTarget:0}),Sl=ze(Np),Sp=le({},Fr,{animationName:0,elapsedTime:0,pseudoElement:0}),Cp=ze(Sp),Ep=le({},Fr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pp=ze(Ep),Mp=le({},Fr,{data:0}),fo=ze(Mp),Ap={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ip={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"},Tp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tp[e])?!!t[e]:!1}function cs(){return Lp}var Op=le({},Dn,{key:function(e){if(e.key){var t=Ap[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ip[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cs,charCode:function(e){return e.type==="keypress"?pa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rp=ze(Op),_p=le({},Xa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),po=ze(_p),Fp=le({},Dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cs}),zp=ze(Fp),Dp=le({},Fr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wp=ze(Dp),$p=le({},Xa,{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}),Up=ze($p),Bp=[9,13,27,32],ds=ht&&"CompositionEvent"in window,ln=null;ht&&"documentMode"in document&&(ln=document.documentMode);var Vp=ht&&"TextEvent"in window&&!ln,kc=ht&&(!ds||ln&&8<ln&&11>=ln),mo=" ",ho=!1;function jc(e,t){switch(e){case"keyup":return Bp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Hp(e,t){switch(e){case"compositionend":return Nc(t);case"keypress":return t.which!==32?null:(ho=!0,mo);case"textInput":return e=t.data,e===mo&&ho?null:e;default:return null}}function Qp(e,t){if(dr)return e==="compositionend"||!ds&&jc(e,t)?(e=bc(),fa=os=Ct=null,dr=!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 kc&&t.locale!=="ko"?null:t.data;default:return null}}var Yp={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 vo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yp[e.type]:t==="textarea"}function Sc(e,t,r,n){rc(n),t=Ma(t,"onChange"),0<t.length&&(r=new us("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var sn=null,kn=null;function Kp(e){_c(e,0)}function Za(e){var t=mr(e);if(Gu(t))return e}function Gp(e,t){if(e==="change")return t}var Cc=!1;if(ht){var Cl;if(ht){var El="oninput"in document;if(!El){var go=document.createElement("div");go.setAttribute("oninput","return;"),El=typeof go.oninput=="function"}Cl=El}else Cl=!1;Cc=Cl&&(!document.documentMode||9<document.documentMode)}function xo(){sn&&(sn.detachEvent("onpropertychange",Ec),kn=sn=null)}function Ec(e){if(e.propertyName==="value"&&Za(kn)){var t=[];Sc(t,kn,e,ns(e)),ic(Kp,t)}}function qp(e,t,r){e==="focusin"?(xo(),sn=t,kn=r,sn.attachEvent("onpropertychange",Ec)):e==="focusout"&&xo()}function Xp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Za(kn)}function Zp(e,t){if(e==="click")return Za(t)}function Jp(e,t){if(e==="input"||e==="change")return Za(t)}function em(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var et=typeof Object.is=="function"?Object.is:em;function jn(e,t){if(et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!ql.call(t,a)||!et(e[a],t[a]))return!1}return!0}function yo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wo(e,t){var r=yo(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=yo(r)}}function Pc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mc(){for(var e=window,t=ka();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ka(e.document)}return t}function fs(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")}function tm(e){var t=Mc(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Pc(r.ownerDocument.documentElement,r)){if(n!==null&&fs(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,l=Math.min(n.start,a);n=n.end===void 0?l:Math.min(n.end,a),!e.extend&&l>n&&(a=n,n=l,l=a),a=wo(r,l);var s=wo(r,n);a&&s&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),l>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rm=ht&&"documentMode"in document&&11>=document.documentMode,fr=null,hi=null,on=null,vi=!1;function bo(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;vi||fr==null||fr!==ka(n)||(n=fr,"selectionStart"in n&&fs(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),on&&jn(on,n)||(on=n,n=Ma(hi,"onSelect"),0<n.length&&(t=new us("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=fr)))}function Zn(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var pr={animationend:Zn("Animation","AnimationEnd"),animationiteration:Zn("Animation","AnimationIteration"),animationstart:Zn("Animation","AnimationStart"),transitionend:Zn("Transition","TransitionEnd")},Pl={},Ac={};ht&&(Ac=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function Ja(e){if(Pl[e])return Pl[e];if(!pr[e])return e;var t=pr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ac)return Pl[e]=t[r];return e}var Ic=Ja("animationend"),Tc=Ja("animationiteration"),Lc=Ja("animationstart"),Oc=Ja("transitionend"),Rc=new Map,ko="abort auxClick 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(" ");function Wt(e,t){Rc.set(e,t),lr(t,[e])}for(var Ml=0;Ml<ko.length;Ml++){var Al=ko[Ml],nm=Al.toLowerCase(),am=Al[0].toUpperCase()+Al.slice(1);Wt(nm,"on"+am)}Wt(Ic,"onAnimationEnd");Wt(Tc,"onAnimationIteration");Wt(Lc,"onAnimationStart");Wt("dblclick","onDoubleClick");Wt("focusin","onFocus");Wt("focusout","onBlur");Wt(Oc,"onTransitionEnd");Mr("onMouseEnter",["mouseout","mouseover"]);Mr("onMouseLeave",["mouseout","mouseover"]);Mr("onPointerEnter",["pointerout","pointerover"]);Mr("onPointerLeave",["pointerout","pointerover"]);lr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));lr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));lr("onBeforeInput",["compositionend","keypress","textInput","paste"]);lr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));lr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));lr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var en="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(" "),lm=new Set("cancel close invalid load scroll toggle".split(" ").concat(en));function jo(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,np(n,t,void 0,e),e.currentTarget=null}function _c(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var l=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],u=o.instance,f=o.currentTarget;if(o=o.listener,u!==l&&a.isPropagationStopped())break e;jo(a,o,f),l=u}else for(s=0;s<n.length;s++){if(o=n[s],u=o.instance,f=o.currentTarget,o=o.listener,u!==l&&a.isPropagationStopped())break e;jo(a,o,f),l=u}}}if(Na)throw e=di,Na=!1,di=null,e}function ee(e,t){var r=t[bi];r===void 0&&(r=t[bi]=new Set);var n=e+"__bubble";r.has(n)||(Fc(t,e,2,!1),r.add(n))}function Il(e,t,r){var n=0;t&&(n|=4),Fc(r,e,n,t)}var Jn="_reactListening"+Math.random().toString(36).slice(2);function Nn(e){if(!e[Jn]){e[Jn]=!0,Vu.forEach(function(r){r!=="selectionchange"&&(lm.has(r)||Il(r,!1,e),Il(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jn]||(t[Jn]=!0,Il("selectionchange",!1,t))}}function Fc(e,t,r,n){switch(wc(t)){case 1:var a=yp;break;case 4:a=wp;break;default:a=ss}r=a.bind(null,t,r,e),a=void 0,!ci||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Tl(e,t,r,n,a){var l=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(s===4)for(s=n.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===a||u.nodeType===8&&u.parentNode===a))return;s=s.return}for(;o!==null;){if(s=Yt(o),s===null)return;if(u=s.tag,u===5||u===6){n=l=s;continue e}o=o.parentNode}}n=n.return}ic(function(){var f=l,h=ns(r),m=[];e:{var p=Rc.get(e);if(p!==void 0){var b=us,y=e;switch(e){case"keypress":if(pa(r)===0)break e;case"keydown":case"keyup":b=Rp;break;case"focusin":y="focus",b=Sl;break;case"focusout":y="blur",b=Sl;break;case"beforeblur":case"afterblur":b=Sl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=co;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=jp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=zp;break;case Ic:case Tc:case Lc:b=Cp;break;case Oc:b=Wp;break;case"scroll":b=bp;break;case"wheel":b=Up;break;case"copy":case"cut":case"paste":b=Pp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=po}var w=(t&4)!==0,C=!w&&e==="scroll",d=w?p!==null?p+"Capture":null:p;w=[];for(var c=f,v;c!==null;){v=c;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,d!==null&&(x=xn(c,d),x!=null&&w.push(Sn(c,x,v)))),C)break;c=c.return}0<w.length&&(p=new b(p,y,null,r,h),m.push({event:p,listeners:w}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",p&&r!==oi&&(y=r.relatedTarget||r.fromElement)&&(Yt(y)||y[vt]))break e;if((b||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,b?(y=r.relatedTarget||r.toElement,b=f,y=y?Yt(y):null,y!==null&&(C=ir(y),y!==C||y.tag!==5&&y.tag!==6)&&(y=null)):(b=null,y=f),b!==y)){if(w=co,x="onMouseLeave",d="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(w=po,x="onPointerLeave",d="onPointerEnter",c="pointer"),C=b==null?p:mr(b),v=y==null?p:mr(y),p=new w(x,c+"leave",b,r,h),p.target=C,p.relatedTarget=v,x=null,Yt(h)===f&&(w=new w(d,c+"enter",y,r,h),w.target=v,w.relatedTarget=C,x=w),C=x,b&&y)t:{for(w=b,d=y,c=0,v=w;v;v=sr(v))c++;for(v=0,x=d;x;x=sr(x))v++;for(;0<c-v;)w=sr(w),c--;for(;0<v-c;)d=sr(d),v--;for(;c--;){if(w===d||d!==null&&w===d.alternate)break t;w=sr(w),d=sr(d)}w=null}else w=null;b!==null&&No(m,p,b,w,!1),y!==null&&C!==null&&No(m,C,y,w,!0)}}e:{if(p=f?mr(f):window,b=p.nodeName&&p.nodeName.toLowerCase(),b==="select"||b==="input"&&p.type==="file")var k=Gp;else if(vo(p))if(Cc)k=Jp;else{k=Xp;var j=qp}else(b=p.nodeName)&&b.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=Zp);if(k&&(k=k(e,f))){Sc(m,k,r,h);break e}j&&j(e,p,f),e==="focusout"&&(j=p._wrapperState)&&j.controlled&&p.type==="number"&&ni(p,"number",p.value)}switch(j=f?mr(f):window,e){case"focusin":(vo(j)||j.contentEditable==="true")&&(fr=j,hi=f,on=null);break;case"focusout":on=hi=fr=null;break;case"mousedown":vi=!0;break;case"contextmenu":case"mouseup":case"dragend":vi=!1,bo(m,r,h);break;case"selectionchange":if(rm)break;case"keydown":case"keyup":bo(m,r,h)}var E;if(ds)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else dr?jc(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(kc&&r.locale!=="ko"&&(dr||T!=="onCompositionStart"?T==="onCompositionEnd"&&dr&&(E=bc()):(Ct=h,os="value"in Ct?Ct.value:Ct.textContent,dr=!0)),j=Ma(f,T),0<j.length&&(T=new fo(T,e,null,r,h),m.push({event:T,listeners:j}),E?T.data=E:(E=Nc(r),E!==null&&(T.data=E)))),(E=Vp?Hp(e,r):Qp(e,r))&&(f=Ma(f,"onBeforeInput"),0<f.length&&(h=new fo("onBeforeInput","beforeinput",null,r,h),m.push({event:h,listeners:f}),h.data=E))}_c(m,t)})}function Sn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ma(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,l=a.stateNode;a.tag===5&&l!==null&&(a=l,l=xn(e,r),l!=null&&n.unshift(Sn(e,l,a)),l=xn(e,t),l!=null&&n.push(Sn(e,l,a))),e=e.return}return n}function sr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function No(e,t,r,n,a){for(var l=t._reactName,s=[];r!==null&&r!==n;){var o=r,u=o.alternate,f=o.stateNode;if(u!==null&&u===n)break;o.tag===5&&f!==null&&(o=f,a?(u=xn(r,l),u!=null&&s.unshift(Sn(r,u,o))):a||(u=xn(r,l),u!=null&&s.push(Sn(r,u,o)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var im=/\r\n?/g,sm=/\u0000|\uFFFD/g;function So(e){return(typeof e=="string"?e:""+e).replace(im,`
|
|
38
|
+
`).replace(sm,"")}function ea(e,t,r){if(t=So(t),So(e)!==t&&r)throw Error(P(425))}function Aa(){}var gi=null,xi=null;function yi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wi=typeof setTimeout=="function"?setTimeout:void 0,om=typeof clearTimeout=="function"?clearTimeout:void 0,Co=typeof Promise=="function"?Promise:void 0,um=typeof queueMicrotask=="function"?queueMicrotask:typeof Co<"u"?function(e){return Co.resolve(null).then(e).catch(cm)}:wi;function cm(e){setTimeout(function(){throw e})}function Ll(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),bn(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);bn(t)}function Tt(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==="$?")break;if(t==="/$")return null}}return e}function Eo(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var zr=Math.random().toString(36).slice(2),at="__reactFiber$"+zr,Cn="__reactProps$"+zr,vt="__reactContainer$"+zr,bi="__reactEvents$"+zr,dm="__reactListeners$"+zr,fm="__reactHandles$"+zr;function Yt(e){var t=e[at];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vt]||r[at]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Eo(e);e!==null;){if(r=e[at])return r;e=Eo(e)}return t}e=r,r=e.parentNode}return null}function Wn(e){return e=e[at]||e[vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function el(e){return e[Cn]||null}var ki=[],hr=-1;function $t(e){return{current:e}}function te(e){0>hr||(e.current=ki[hr],ki[hr]=null,hr--)}function J(e,t){hr++,ki[hr]=e.current,e.current=t}var Dt={},be=$t(Dt),Me=$t(!1),Jt=Dt;function Ar(e,t){var r=e.type.contextTypes;if(!r)return Dt;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},l;for(l in r)a[l]=t[l];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ae(e){return e=e.childContextTypes,e!=null}function Ia(){te(Me),te(be)}function Po(e,t,r){if(be.current!==Dt)throw Error(P(168));J(be,t),J(Me,r)}function zc(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(P(108,qf(e)||"Unknown",a));return le({},r,n)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dt,Jt=be.current,J(be,e),J(Me,Me.current),!0}function Mo(e,t,r){var n=e.stateNode;if(!n)throw Error(P(169));r?(e=zc(e,t,Jt),n.__reactInternalMemoizedMergedChildContext=e,te(Me),te(be),J(be,e)):te(Me),J(Me,r)}var ct=null,tl=!1,Ol=!1;function Dc(e){ct===null?ct=[e]:ct.push(e)}function pm(e){tl=!0,Dc(e)}function Ut(){if(!Ol&&ct!==null){Ol=!0;var e=0,t=q;try{var r=ct;for(q=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ct=null,tl=!1}catch(a){throw ct!==null&&(ct=ct.slice(e+1)),cc(as,Ut),a}finally{q=t,Ol=!1}}return null}var vr=[],gr=0,La=null,Oa=0,We=[],$e=0,er=null,dt=1,ft="";function Vt(e,t){vr[gr++]=Oa,vr[gr++]=La,La=e,Oa=t}function Wc(e,t,r){We[$e++]=dt,We[$e++]=ft,We[$e++]=er,er=e;var n=dt;e=ft;var a=32-Ze(n)-1;n&=~(1<<a),r+=1;var l=32-Ze(t)+a;if(30<l){var s=a-a%5;l=(n&(1<<s)-1).toString(32),n>>=s,a-=s,dt=1<<32-Ze(t)+a|r<<a|n,ft=l+e}else dt=1<<l|r<<a|n,ft=e}function ps(e){e.return!==null&&(Vt(e,1),Wc(e,1,0))}function ms(e){for(;e===La;)La=vr[--gr],vr[gr]=null,Oa=vr[--gr],vr[gr]=null;for(;e===er;)er=We[--$e],We[$e]=null,ft=We[--$e],We[$e]=null,dt=We[--$e],We[$e]=null}var Re=null,Oe=null,re=!1,Xe=null;function $c(e,t){var r=Ue(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Ao(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Re=e,Oe=Tt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Re=e,Oe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=er!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ue(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Re=e,Oe=null,!0):!1;default:return!1}}function ji(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ni(e){if(re){var t=Oe;if(t){var r=t;if(!Ao(e,t)){if(ji(e))throw Error(P(418));t=Tt(r.nextSibling);var n=Re;t&&Ao(e,t)?$c(n,r):(e.flags=e.flags&-4097|2,re=!1,Re=e)}}else{if(ji(e))throw Error(P(418));e.flags=e.flags&-4097|2,re=!1,Re=e}}}function Io(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Re=e}function ta(e){if(e!==Re)return!1;if(!re)return Io(e),re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yi(e.type,e.memoizedProps)),t&&(t=Oe)){if(ji(e))throw Uc(),Error(P(418));for(;t;)$c(e,t),t=Tt(t.nextSibling)}if(Io(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Oe=Tt(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Oe=null}}else Oe=Re?Tt(e.stateNode.nextSibling):null;return!0}function Uc(){for(var e=Oe;e;)e=Tt(e.nextSibling)}function Ir(){Oe=Re=null,re=!1}function hs(e){Xe===null?Xe=[e]:Xe.push(e)}var mm=yt.ReactCurrentBatchConfig;function Qr(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(P(309));var n=r.stateNode}if(!n)throw Error(P(147,e));var a=n,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var o=a.refs;s===null?delete o[l]:o[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(P(284));if(!r._owner)throw Error(P(290,e))}return e}function ra(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function To(e){var t=e._init;return t(e._payload)}function Bc(e){function t(d,c){if(e){var v=d.deletions;v===null?(d.deletions=[c],d.flags|=16):v.push(c)}}function r(d,c){if(!e)return null;for(;c!==null;)t(d,c),c=c.sibling;return null}function n(d,c){for(d=new Map;c!==null;)c.key!==null?d.set(c.key,c):d.set(c.index,c),c=c.sibling;return d}function a(d,c){return d=_t(d,c),d.index=0,d.sibling=null,d}function l(d,c,v){return d.index=v,e?(v=d.alternate,v!==null?(v=v.index,v<c?(d.flags|=2,c):v):(d.flags|=2,c)):(d.flags|=1048576,c)}function s(d){return e&&d.alternate===null&&(d.flags|=2),d}function o(d,c,v,x){return c===null||c.tag!==6?(c=$l(v,d.mode,x),c.return=d,c):(c=a(c,v),c.return=d,c)}function u(d,c,v,x){var k=v.type;return k===cr?h(d,c,v.props.children,x,v.key):c!==null&&(c.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&To(k)===c.type)?(x=a(c,v.props),x.ref=Qr(d,c,v),x.return=d,x):(x=wa(v.type,v.key,v.props,null,d.mode,x),x.ref=Qr(d,c,v),x.return=d,x)}function f(d,c,v,x){return c===null||c.tag!==4||c.stateNode.containerInfo!==v.containerInfo||c.stateNode.implementation!==v.implementation?(c=Ul(v,d.mode,x),c.return=d,c):(c=a(c,v.children||[]),c.return=d,c)}function h(d,c,v,x,k){return c===null||c.tag!==7?(c=Xt(v,d.mode,x,k),c.return=d,c):(c=a(c,v),c.return=d,c)}function m(d,c,v){if(typeof c=="string"&&c!==""||typeof c=="number")return c=$l(""+c,d.mode,v),c.return=d,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Hn:return v=wa(c.type,c.key,c.props,null,d.mode,v),v.ref=Qr(d,null,c),v.return=d,v;case ur:return c=Ul(c,d.mode,v),c.return=d,c;case kt:var x=c._init;return m(d,x(c._payload),v)}if(Zr(c)||$r(c))return c=Xt(c,d.mode,v,null),c.return=d,c;ra(d,c)}return null}function p(d,c,v,x){var k=c!==null?c.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:o(d,c,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Hn:return v.key===k?u(d,c,v,x):null;case ur:return v.key===k?f(d,c,v,x):null;case kt:return k=v._init,p(d,c,k(v._payload),x)}if(Zr(v)||$r(v))return k!==null?null:h(d,c,v,x,null);ra(d,v)}return null}function b(d,c,v,x,k){if(typeof x=="string"&&x!==""||typeof x=="number")return d=d.get(v)||null,o(c,d,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Hn:return d=d.get(x.key===null?v:x.key)||null,u(c,d,x,k);case ur:return d=d.get(x.key===null?v:x.key)||null,f(c,d,x,k);case kt:var j=x._init;return b(d,c,v,j(x._payload),k)}if(Zr(x)||$r(x))return d=d.get(v)||null,h(c,d,x,k,null);ra(c,x)}return null}function y(d,c,v,x){for(var k=null,j=null,E=c,T=c=0,$=null;E!==null&&T<v.length;T++){E.index>T?($=E,E=null):$=E.sibling;var M=p(d,E,v[T],x);if(M===null){E===null&&(E=$);break}e&&E&&M.alternate===null&&t(d,E),c=l(M,c,T),j===null?k=M:j.sibling=M,j=M,E=$}if(T===v.length)return r(d,E),re&&Vt(d,T),k;if(E===null){for(;T<v.length;T++)E=m(d,v[T],x),E!==null&&(c=l(E,c,T),j===null?k=E:j.sibling=E,j=E);return re&&Vt(d,T),k}for(E=n(d,E);T<v.length;T++)$=b(E,d,T,v[T],x),$!==null&&(e&&$.alternate!==null&&E.delete($.key===null?T:$.key),c=l($,c,T),j===null?k=$:j.sibling=$,j=$);return e&&E.forEach(function(I){return t(d,I)}),re&&Vt(d,T),k}function w(d,c,v,x){var k=$r(v);if(typeof k!="function")throw Error(P(150));if(v=k.call(v),v==null)throw Error(P(151));for(var j=k=null,E=c,T=c=0,$=null,M=v.next();E!==null&&!M.done;T++,M=v.next()){E.index>T?($=E,E=null):$=E.sibling;var I=p(d,E,M.value,x);if(I===null){E===null&&(E=$);break}e&&E&&I.alternate===null&&t(d,E),c=l(I,c,T),j===null?k=I:j.sibling=I,j=I,E=$}if(M.done)return r(d,E),re&&Vt(d,T),k;if(E===null){for(;!M.done;T++,M=v.next())M=m(d,M.value,x),M!==null&&(c=l(M,c,T),j===null?k=M:j.sibling=M,j=M);return re&&Vt(d,T),k}for(E=n(d,E);!M.done;T++,M=v.next())M=b(E,d,T,M.value,x),M!==null&&(e&&M.alternate!==null&&E.delete(M.key===null?T:M.key),c=l(M,c,T),j===null?k=M:j.sibling=M,j=M);return e&&E.forEach(function(W){return t(d,W)}),re&&Vt(d,T),k}function C(d,c,v,x){if(typeof v=="object"&&v!==null&&v.type===cr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Hn:e:{for(var k=v.key,j=c;j!==null;){if(j.key===k){if(k=v.type,k===cr){if(j.tag===7){r(d,j.sibling),c=a(j,v.props.children),c.return=d,d=c;break e}}else if(j.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&To(k)===j.type){r(d,j.sibling),c=a(j,v.props),c.ref=Qr(d,j,v),c.return=d,d=c;break e}r(d,j);break}else t(d,j);j=j.sibling}v.type===cr?(c=Xt(v.props.children,d.mode,x,v.key),c.return=d,d=c):(x=wa(v.type,v.key,v.props,null,d.mode,x),x.ref=Qr(d,c,v),x.return=d,d=x)}return s(d);case ur:e:{for(j=v.key;c!==null;){if(c.key===j)if(c.tag===4&&c.stateNode.containerInfo===v.containerInfo&&c.stateNode.implementation===v.implementation){r(d,c.sibling),c=a(c,v.children||[]),c.return=d,d=c;break e}else{r(d,c);break}else t(d,c);c=c.sibling}c=Ul(v,d.mode,x),c.return=d,d=c}return s(d);case kt:return j=v._init,C(d,c,j(v._payload),x)}if(Zr(v))return y(d,c,v,x);if($r(v))return w(d,c,v,x);ra(d,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,c!==null&&c.tag===6?(r(d,c.sibling),c=a(c,v),c.return=d,d=c):(r(d,c),c=$l(v,d.mode,x),c.return=d,d=c),s(d)):r(d,c)}return C}var Tr=Bc(!0),Vc=Bc(!1),Ra=$t(null),_a=null,xr=null,vs=null;function gs(){vs=xr=_a=null}function xs(e){var t=Ra.current;te(Ra),e._currentValue=t}function Si(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Er(e,t){_a=e,vs=xr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pe=!0),e.firstContext=null)}function Ve(e){var t=e._currentValue;if(vs!==e)if(e={context:e,memoizedValue:t,next:null},xr===null){if(_a===null)throw Error(P(308));xr=e,_a.dependencies={lanes:0,firstContext:e}}else xr=xr.next=e;return t}var Kt=null;function ys(e){Kt===null?Kt=[e]:Kt.push(e)}function Hc(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,ys(t)):(r.next=a.next,a.next=r),t.interleaved=r,gt(e,n)}function gt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var jt=!1;function ws(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lt(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Q&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,gt(e,r)}return a=n.interleaved,a===null?(t.next=t,ys(n)):(t.next=a.next,a.next=t),n.interleaved=t,gt(e,r)}function ma(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ls(e,r)}}function Lo(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,l=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};l===null?a=l=s:l=l.next=s,r=r.next}while(r!==null);l===null?a=l=t:l=l.next=t}else a=l=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Fa(e,t,r,n){var a=e.updateQueue;jt=!1;var l=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var u=o,f=u.next;u.next=null,s===null?l=f:s.next=f,s=u;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==s&&(o===null?h.firstBaseUpdate=f:o.next=f,h.lastBaseUpdate=u))}if(l!==null){var m=a.baseState;s=0,h=f=u=null,o=l;do{var p=o.lane,b=o.eventTime;if((n&p)===p){h!==null&&(h=h.next={eventTime:b,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,w=o;switch(p=t,b=r,w.tag){case 1:if(y=w.payload,typeof y=="function"){m=y.call(b,m,p);break e}m=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,p=typeof y=="function"?y.call(b,m,p):y,p==null)break e;m=le({},m,p);break e;case 2:jt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[o]:p.push(o))}else b={eventTime:b,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(f=h=b,u=m):h=h.next=b,s|=p;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(h===null&&(u=m),a.baseState=u,a.firstBaseUpdate=f,a.lastBaseUpdate=h,t=a.shared.interleaved,t!==null){a=t;do s|=a.lane,a=a.next;while(a!==t)}else l===null&&(a.shared.lanes=0);rr|=s,e.lanes=s,e.memoizedState=m}}function Oo(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(P(191,a));a.call(n)}}}var $n={},it=$t($n),En=$t($n),Pn=$t($n);function Gt(e){if(e===$n)throw Error(P(174));return e}function bs(e,t){switch(J(Pn,t),J(En,e),J(it,$n),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:li(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=li(t,e)}te(it),J(it,t)}function Lr(){te(it),te(En),te(Pn)}function Yc(e){Gt(Pn.current);var t=Gt(it.current),r=li(t,e.type);t!==r&&(J(En,e),J(it,r))}function ks(e){En.current===e&&(te(it),te(En))}var ne=$t(0);function za(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Rl=[];function js(){for(var e=0;e<Rl.length;e++)Rl[e]._workInProgressVersionPrimary=null;Rl.length=0}var ha=yt.ReactCurrentDispatcher,_l=yt.ReactCurrentBatchConfig,tr=0,ae=null,ce=null,pe=null,Da=!1,un=!1,Mn=0,hm=0;function xe(){throw Error(P(321))}function Ns(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!et(e[r],t[r]))return!1;return!0}function Ss(e,t,r,n,a,l){if(tr=l,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ha.current=e===null||e.memoizedState===null?ym:wm,e=r(n,a),un){l=0;do{if(un=!1,Mn=0,25<=l)throw Error(P(301));l+=1,pe=ce=null,t.updateQueue=null,ha.current=bm,e=r(n,a)}while(un)}if(ha.current=Wa,t=ce!==null&&ce.next!==null,tr=0,pe=ce=ae=null,Da=!1,t)throw Error(P(300));return e}function Cs(){var e=Mn!==0;return Mn=0,e}function nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pe===null?ae.memoizedState=pe=e:pe=pe.next=e,pe}function He(){if(ce===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=ce.next;var t=pe===null?ae.memoizedState:pe.next;if(t!==null)pe=t,ce=e;else{if(e===null)throw Error(P(310));ce=e,e={memoizedState:ce.memoizedState,baseState:ce.baseState,baseQueue:ce.baseQueue,queue:ce.queue,next:null},pe===null?ae.memoizedState=pe=e:pe=pe.next=e}return pe}function An(e,t){return typeof t=="function"?t(e):t}function Fl(e){var t=He(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=ce,a=n.baseQueue,l=r.pending;if(l!==null){if(a!==null){var s=a.next;a.next=l.next,l.next=s}n.baseQueue=a=l,r.pending=null}if(a!==null){l=a.next,n=n.baseState;var o=s=null,u=null,f=l;do{var h=f.lane;if((tr&h)===h)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),n=f.hasEagerState?f.eagerState:e(n,f.action);else{var m={lane:h,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(o=u=m,s=n):u=u.next=m,ae.lanes|=h,rr|=h}f=f.next}while(f!==null&&f!==l);u===null?s=n:u.next=o,et(n,t.memoizedState)||(Pe=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do l=a.lane,ae.lanes|=l,rr|=l,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function zl(e){var t=He(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,l=t.memoizedState;if(a!==null){r.pending=null;var s=a=a.next;do l=e(l,s.action),s=s.next;while(s!==a);et(l,t.memoizedState)||(Pe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),r.lastRenderedState=l}return[l,n]}function Kc(){}function Gc(e,t){var r=ae,n=He(),a=t(),l=!et(n.memoizedState,a);if(l&&(n.memoizedState=a,Pe=!0),n=n.queue,Es(Zc.bind(null,r,n,e),[e]),n.getSnapshot!==t||l||pe!==null&&pe.memoizedState.tag&1){if(r.flags|=2048,In(9,Xc.bind(null,r,n,a,t),void 0,null),me===null)throw Error(P(349));tr&30||qc(r,t,a)}return a}function qc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Xc(e,t,r,n){t.value=r,t.getSnapshot=n,Jc(t)&&ed(e)}function Zc(e,t,r){return r(function(){Jc(t)&&ed(e)})}function Jc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!et(e,r)}catch{return!0}}function ed(e){var t=gt(e,1);t!==null&&Je(t,e,1,-1)}function Ro(e){var t=nt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:e},t.queue=e,e=e.dispatch=xm.bind(null,ae,e),[t.memoizedState,e]}function In(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function td(){return He().memoizedState}function va(e,t,r,n){var a=nt();ae.flags|=e,a.memoizedState=In(1|t,r,void 0,n===void 0?null:n)}function rl(e,t,r,n){var a=He();n=n===void 0?null:n;var l=void 0;if(ce!==null){var s=ce.memoizedState;if(l=s.destroy,n!==null&&Ns(n,s.deps)){a.memoizedState=In(t,r,l,n);return}}ae.flags|=e,a.memoizedState=In(1|t,r,l,n)}function _o(e,t){return va(8390656,8,e,t)}function Es(e,t){return rl(2048,8,e,t)}function rd(e,t){return rl(4,2,e,t)}function nd(e,t){return rl(4,4,e,t)}function ad(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ld(e,t,r){return r=r!=null?r.concat([e]):null,rl(4,4,ad.bind(null,t,e),r)}function Ps(){}function id(e,t){var r=He();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ns(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function sd(e,t){var r=He();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ns(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function od(e,t,r){return tr&21?(et(r,t)||(r=pc(),ae.lanes|=r,rr|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pe=!0),e.memoizedState=r)}function vm(e,t){var r=q;q=r!==0&&4>r?r:4,e(!0);var n=_l.transition;_l.transition={};try{e(!1),t()}finally{q=r,_l.transition=n}}function ud(){return He().memoizedState}function gm(e,t,r){var n=Rt(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},cd(e))dd(t,r);else if(r=Hc(e,t,r,n),r!==null){var a=Ne();Je(r,e,n,a),fd(r,t,n)}}function xm(e,t,r){var n=Rt(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(cd(e))dd(t,a);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,o=l(s,r);if(a.hasEagerState=!0,a.eagerState=o,et(o,s)){var u=t.interleaved;u===null?(a.next=a,ys(t)):(a.next=u.next,u.next=a),t.interleaved=a;return}}catch{}finally{}r=Hc(e,t,a,n),r!==null&&(a=Ne(),Je(r,e,n,a),fd(r,t,n))}}function cd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function dd(e,t){un=Da=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function fd(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ls(e,r)}}var Wa={readContext:Ve,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useInsertionEffect:xe,useLayoutEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useMutableSource:xe,useSyncExternalStore:xe,useId:xe,unstable_isNewReconciler:!1},ym={readContext:Ve,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Ve,useEffect:_o,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,va(4194308,4,ad.bind(null,t,e),r)},useLayoutEffect:function(e,t){return va(4194308,4,e,t)},useInsertionEffect:function(e,t){return va(4,2,e,t)},useMemo:function(e,t){var r=nt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=nt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=gm.bind(null,ae,e),[n.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:Ro,useDebugValue:Ps,useDeferredValue:function(e){return nt().memoizedState=e},useTransition:function(){var e=Ro(!1),t=e[0];return e=vm.bind(null,e[1]),nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ae,a=nt();if(re){if(r===void 0)throw Error(P(407));r=r()}else{if(r=t(),me===null)throw Error(P(349));tr&30||qc(n,t,r)}a.memoizedState=r;var l={value:r,getSnapshot:t};return a.queue=l,_o(Zc.bind(null,n,l,e),[e]),n.flags|=2048,In(9,Xc.bind(null,n,l,r,t),void 0,null),r},useId:function(){var e=nt(),t=me.identifierPrefix;if(re){var r=ft,n=dt;r=(n&~(1<<32-Ze(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Mn++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=hm++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wm={readContext:Ve,useCallback:id,useContext:Ve,useEffect:Es,useImperativeHandle:ld,useInsertionEffect:rd,useLayoutEffect:nd,useMemo:sd,useReducer:Fl,useRef:td,useState:function(){return Fl(An)},useDebugValue:Ps,useDeferredValue:function(e){var t=He();return od(t,ce.memoizedState,e)},useTransition:function(){var e=Fl(An)[0],t=He().memoizedState;return[e,t]},useMutableSource:Kc,useSyncExternalStore:Gc,useId:ud,unstable_isNewReconciler:!1},bm={readContext:Ve,useCallback:id,useContext:Ve,useEffect:Es,useImperativeHandle:ld,useInsertionEffect:rd,useLayoutEffect:nd,useMemo:sd,useReducer:zl,useRef:td,useState:function(){return zl(An)},useDebugValue:Ps,useDeferredValue:function(e){var t=He();return ce===null?t.memoizedState=e:od(t,ce.memoizedState,e)},useTransition:function(){var e=zl(An)[0],t=He().memoizedState;return[e,t]},useMutableSource:Kc,useSyncExternalStore:Gc,useId:ud,unstable_isNewReconciler:!1};function Ge(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ci(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:le({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var nl={isMounted:function(e){return(e=e._reactInternals)?ir(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ne(),a=Rt(e),l=mt(n,a);l.payload=t,r!=null&&(l.callback=r),t=Lt(e,l,a),t!==null&&(Je(t,e,a,n),ma(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ne(),a=Rt(e),l=mt(n,a);l.tag=1,l.payload=t,r!=null&&(l.callback=r),t=Lt(e,l,a),t!==null&&(Je(t,e,a,n),ma(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ne(),n=Rt(e),a=mt(r,n);a.tag=2,t!=null&&(a.callback=t),t=Lt(e,a,n),t!==null&&(Je(t,e,n,r),ma(t,e,n))}};function Fo(e,t,r,n,a,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,l,s):t.prototype&&t.prototype.isPureReactComponent?!jn(r,n)||!jn(a,l):!0}function pd(e,t,r){var n=!1,a=Dt,l=t.contextType;return typeof l=="object"&&l!==null?l=Ve(l):(a=Ae(t)?Jt:be.current,n=t.contextTypes,l=(n=n!=null)?Ar(e,a):Dt),t=new t(r,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=nl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=l),t}function zo(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&nl.enqueueReplaceState(t,t.state,null)}function Ei(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},ws(e);var l=t.contextType;typeof l=="object"&&l!==null?a.context=Ve(l):(l=Ae(t)?Jt:be.current,a.context=Ar(e,l)),a.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Ci(e,t,l,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&nl.enqueueReplaceState(a,a.state,null),Fa(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Or(e,t){try{var r="",n=t;do r+=Gf(n),n=n.return;while(n);var a=r}catch(l){a=`
|
|
39
|
+
Error generating stack: `+l.message+`
|
|
40
|
+
`+l.stack}return{value:e,source:t,stack:a,digest:null}}function Dl(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Pi(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var km=typeof WeakMap=="function"?WeakMap:Map;function md(e,t,r){r=mt(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ua||(Ua=!0,zi=n),Pi(e,t)},r}function hd(e,t,r){r=mt(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){Pi(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(r.callback=function(){Pi(e,t),typeof n!="function"&&(Ot===null?Ot=new Set([this]):Ot.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function Do(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new km;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=_m.bind(null,e,t,r),t.then(e,e))}function Wo(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function $o(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=mt(-1,1),t.tag=2,Lt(r,t,1))),r.lanes|=1),e)}var jm=yt.ReactCurrentOwner,Pe=!1;function je(e,t,r,n){t.child=e===null?Vc(t,null,r,n):Tr(t,e.child,r,n)}function Uo(e,t,r,n,a){r=r.render;var l=t.ref;return Er(t,a),n=Ss(e,t,r,n,l,a),r=Cs(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,xt(e,t,a)):(re&&r&&ps(t),t.flags|=1,je(e,t,n,a),t.child)}function Bo(e,t,r,n,a){if(e===null){var l=r.type;return typeof l=="function"&&!_s(l)&&l.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=l,vd(e,t,l,n,a)):(e=wa(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&a)){var s=l.memoizedProps;if(r=r.compare,r=r!==null?r:jn,r(s,n)&&e.ref===t.ref)return xt(e,t,a)}return t.flags|=1,e=_t(l,n),e.ref=t.ref,e.return=t,t.child=e}function vd(e,t,r,n,a){if(e!==null){var l=e.memoizedProps;if(jn(l,n)&&e.ref===t.ref)if(Pe=!1,t.pendingProps=n=l,(e.lanes&a)!==0)e.flags&131072&&(Pe=!0);else return t.lanes=e.lanes,xt(e,t,a)}return Mi(e,t,r,n,a)}function gd(e,t,r){var n=t.pendingProps,a=n.children,l=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(wr,Te),Te|=r;else{if(!(r&1073741824))return e=l!==null?l.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(wr,Te),Te|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=l!==null?l.baseLanes:r,J(wr,Te),Te|=n}else l!==null?(n=l.baseLanes|r,t.memoizedState=null):n=r,J(wr,Te),Te|=n;return je(e,t,a,r),t.child}function xd(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Mi(e,t,r,n,a){var l=Ae(r)?Jt:be.current;return l=Ar(t,l),Er(t,a),r=Ss(e,t,r,n,l,a),n=Cs(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,xt(e,t,a)):(re&&n&&ps(t),t.flags|=1,je(e,t,r,a),t.child)}function Vo(e,t,r,n,a){if(Ae(r)){var l=!0;Ta(t)}else l=!1;if(Er(t,a),t.stateNode===null)ga(e,t),pd(t,r,n),Ei(t,r,n,a),n=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var u=s.context,f=r.contextType;typeof f=="object"&&f!==null?f=Ve(f):(f=Ae(r)?Jt:be.current,f=Ar(t,f));var h=r.getDerivedStateFromProps,m=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==n||u!==f)&&zo(t,s,n,f),jt=!1;var p=t.memoizedState;s.state=p,Fa(t,n,s,a),u=t.memoizedState,o!==n||p!==u||Me.current||jt?(typeof h=="function"&&(Ci(t,r,h,n),u=t.memoizedState),(o=jt||Fo(t,r,o,n,p,u,f))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),s.props=n,s.state=u,s.context=f,n=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Qc(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:Ge(t.type,o),s.props=f,m=t.pendingProps,p=s.context,u=r.contextType,typeof u=="object"&&u!==null?u=Ve(u):(u=Ae(r)?Jt:be.current,u=Ar(t,u));var b=r.getDerivedStateFromProps;(h=typeof b=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==m||p!==u)&&zo(t,s,n,u),jt=!1,p=t.memoizedState,s.state=p,Fa(t,n,s,a);var y=t.memoizedState;o!==m||p!==y||Me.current||jt?(typeof b=="function"&&(Ci(t,r,b,n),y=t.memoizedState),(f=jt||Fo(t,r,f,n,p,y,u)||!1)?(h||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,y,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,y,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),s.props=n,s.state=y,s.context=u,n=f):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Ai(e,t,r,n,l,a)}function Ai(e,t,r,n,a,l){xd(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return a&&Mo(t,r,!1),xt(e,t,l);n=t.stateNode,jm.current=t;var o=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=Tr(t,e.child,null,l),t.child=Tr(t,null,o,l)):je(e,t,o,l),t.memoizedState=n.state,a&&Mo(t,r,!0),t.child}function yd(e){var t=e.stateNode;t.pendingContext?Po(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Po(e,t.context,!1),bs(e,t.containerInfo)}function Ho(e,t,r,n,a){return Ir(),hs(a),t.flags|=256,je(e,t,r,n),t.child}var Ii={dehydrated:null,treeContext:null,retryLane:0};function Ti(e){return{baseLanes:e,cachePool:null,transitions:null}}function wd(e,t,r){var n=t.pendingProps,a=ne.current,l=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),J(ne,a&1),e===null)return Ni(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=n.children,e=n.fallback,l?(n=t.mode,l=t.child,s={mode:"hidden",children:s},!(n&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=il(s,n,0,null),e=Xt(e,n,r,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ti(r),t.memoizedState=Ii,e):Ms(t,s));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return Nm(e,t,s,n,o,a,r);if(l){l=n.fallback,s=t.mode,a=e.child,o=a.sibling;var u={mode:"hidden",children:n.children};return!(s&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=_t(a,u),n.subtreeFlags=a.subtreeFlags&14680064),o!==null?l=_t(o,l):(l=Xt(l,s,r,null),l.flags|=2),l.return=t,n.return=t,n.sibling=l,t.child=n,n=l,l=t.child,s=e.child.memoizedState,s=s===null?Ti(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~r,t.memoizedState=Ii,n}return l=e.child,e=l.sibling,n=_t(l,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Ms(e,t){return t=il({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function na(e,t,r,n){return n!==null&&hs(n),Tr(t,e.child,null,r),e=Ms(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nm(e,t,r,n,a,l,s){if(r)return t.flags&256?(t.flags&=-257,n=Dl(Error(P(422))),na(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=n.fallback,a=t.mode,n=il({mode:"visible",children:n.children},a,0,null),l=Xt(l,a,s,null),l.flags|=2,n.return=t,l.return=t,n.sibling=l,t.child=n,t.mode&1&&Tr(t,e.child,null,s),t.child.memoizedState=Ti(s),t.memoizedState=Ii,l);if(!(t.mode&1))return na(e,t,s,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var o=n.dgst;return n=o,l=Error(P(419)),n=Dl(l,n,void 0),na(e,t,s,n)}if(o=(s&e.childLanes)!==0,Pe||o){if(n=me,n!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|s)?0:a,a!==0&&a!==l.retryLane&&(l.retryLane=a,gt(e,a),Je(n,e,a,-1))}return Rs(),n=Dl(Error(P(421))),na(e,t,s,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Fm.bind(null,e),a._reactRetry=t,null):(e=l.treeContext,Oe=Tt(a.nextSibling),Re=t,re=!0,Xe=null,e!==null&&(We[$e++]=dt,We[$e++]=ft,We[$e++]=er,dt=e.id,ft=e.overflow,er=t),t=Ms(t,n.children),t.flags|=4096,t)}function Qo(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Si(e.return,t,r)}function Wl(e,t,r,n,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=n,l.tail=r,l.tailMode=a)}function bd(e,t,r){var n=t.pendingProps,a=n.revealOrder,l=n.tail;if(je(e,t,n.children,r),n=ne.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qo(e,r,t);else if(e.tag===19)Qo(e,r,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}n&=1}if(J(ne,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&za(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),Wl(t,!1,a,r,l);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&za(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}Wl(t,!0,r,null,l);break;case"together":Wl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ga(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),rr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,r=_t(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=_t(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Sm(e,t,r){switch(t.tag){case 3:yd(t),Ir();break;case 5:Yc(t);break;case 1:Ae(t.type)&&Ta(t);break;case 4:bs(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;J(Ra,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(J(ne,ne.current&1),t.flags|=128,null):r&t.child.childLanes?wd(e,t,r):(J(ne,ne.current&1),e=xt(e,t,r),e!==null?e.sibling:null);J(ne,ne.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return bd(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),J(ne,ne.current),n)break;return null;case 22:case 23:return t.lanes=0,gd(e,t,r)}return xt(e,t,r)}var kd,Li,jd,Nd;kd=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Li=function(){};jd=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,Gt(it.current);var l=null;switch(r){case"input":a=ti(e,a),n=ti(e,n),l=[];break;case"select":a=le({},a,{value:void 0}),n=le({},n,{value:void 0}),l=[];break;case"textarea":a=ai(e,a),n=ai(e,n),l=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Aa)}ii(r,n);var s;r=null;for(f in a)if(!n.hasOwnProperty(f)&&a.hasOwnProperty(f)&&a[f]!=null)if(f==="style"){var o=a[f];for(s in o)o.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(vn.hasOwnProperty(f)?l||(l=[]):(l=l||[]).push(f,null));for(f in n){var u=n[f];if(o=a!=null?a[f]:void 0,n.hasOwnProperty(f)&&u!==o&&(u!=null||o!=null))if(f==="style")if(o){for(s in o)!o.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in u)u.hasOwnProperty(s)&&o[s]!==u[s]&&(r||(r={}),r[s]=u[s])}else r||(l||(l=[]),l.push(f,r)),r=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(vn.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&ee("scroll",e),l||o===u||(l=[])):(l=l||[]).push(f,u))}r&&(l=l||[]).push("style",r);var f=l;(t.updateQueue=f)&&(t.flags|=4)}};Nd=function(e,t,r,n){r!==n&&(t.flags|=4)};function Yr(e,t){if(!re)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Cm(e,t,r){var n=t.pendingProps;switch(ms(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ye(t),null;case 1:return Ae(t.type)&&Ia(),ye(t),null;case 3:return n=t.stateNode,Lr(),te(Me),te(be),js(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xe!==null&&($i(Xe),Xe=null))),Li(e,t),ye(t),null;case 5:ks(t);var a=Gt(Pn.current);if(r=t.type,e!==null&&t.stateNode!=null)jd(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(P(166));return ye(t),null}if(e=Gt(it.current),ta(t)){n=t.stateNode,r=t.type;var l=t.memoizedProps;switch(n[at]=t,n[Cn]=l,e=(t.mode&1)!==0,r){case"dialog":ee("cancel",n),ee("close",n);break;case"iframe":case"object":case"embed":ee("load",n);break;case"video":case"audio":for(a=0;a<en.length;a++)ee(en[a],n);break;case"source":ee("error",n);break;case"img":case"image":case"link":ee("error",n),ee("load",n);break;case"details":ee("toggle",n);break;case"input":eo(n,l),ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!l.multiple},ee("invalid",n);break;case"textarea":ro(n,l),ee("invalid",n)}ii(r,l),a=null;for(var s in l)if(l.hasOwnProperty(s)){var o=l[s];s==="children"?typeof o=="string"?n.textContent!==o&&(l.suppressHydrationWarning!==!0&&ea(n.textContent,o,e),a=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&ea(n.textContent,o,e),a=["children",""+o]):vn.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ee("scroll",n)}switch(r){case"input":Qn(n),to(n,l,!0);break;case"textarea":Qn(n),no(n);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(n.onclick=Aa)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Zu(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[at]=t,e[Cn]=n,kd(e,t,!1,!1),t.stateNode=e;e:{switch(s=si(r,n),r){case"dialog":ee("cancel",e),ee("close",e),a=n;break;case"iframe":case"object":case"embed":ee("load",e),a=n;break;case"video":case"audio":for(a=0;a<en.length;a++)ee(en[a],e);a=n;break;case"source":ee("error",e),a=n;break;case"img":case"image":case"link":ee("error",e),ee("load",e),a=n;break;case"details":ee("toggle",e),a=n;break;case"input":eo(e,n),a=ti(e,n),ee("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=le({},n,{value:void 0}),ee("invalid",e);break;case"textarea":ro(e,n),a=ai(e,n),ee("invalid",e);break;default:a=n}ii(r,a),o=a;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?tc(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Ju(e,u)):l==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&gn(e,u):typeof u=="number"&&gn(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(vn.hasOwnProperty(l)?u!=null&&l==="onScroll"&&ee("scroll",e):u!=null&&Ji(e,l,u,s))}switch(r){case"input":Qn(e),to(e,n,!1);break;case"textarea":Qn(e),no(e);break;case"option":n.value!=null&&e.setAttribute("value",""+zt(n.value));break;case"select":e.multiple=!!n.multiple,l=n.value,l!=null?jr(e,!!n.multiple,l,!1):n.defaultValue!=null&&jr(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Aa)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ye(t),null;case 6:if(e&&t.stateNode!=null)Nd(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(r=Gt(Pn.current),Gt(it.current),ta(t)){if(n=t.stateNode,r=t.memoizedProps,n[at]=t,(l=n.nodeValue!==r)&&(e=Re,e!==null))switch(e.tag){case 3:ea(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ea(n.nodeValue,r,(e.mode&1)!==0)}l&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[at]=t,t.stateNode=n}return ye(t),null;case 13:if(te(ne),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(re&&Oe!==null&&t.mode&1&&!(t.flags&128))Uc(),Ir(),t.flags|=98560,l=!1;else if(l=ta(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(P(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(P(317));l[at]=t}else Ir(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ye(t),l=!1}else Xe!==null&&($i(Xe),Xe=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||ne.current&1?de===0&&(de=3):Rs())),t.updateQueue!==null&&(t.flags|=4),ye(t),null);case 4:return Lr(),Li(e,t),e===null&&Nn(t.stateNode.containerInfo),ye(t),null;case 10:return xs(t.type._context),ye(t),null;case 17:return Ae(t.type)&&Ia(),ye(t),null;case 19:if(te(ne),l=t.memoizedState,l===null)return ye(t),null;if(n=(t.flags&128)!==0,s=l.rendering,s===null)if(n)Yr(l,!1);else{if(de!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=za(e),s!==null){for(t.flags|=128,Yr(l,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)l=r,e=n,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return J(ne,ne.current&1|2),t.child}e=e.sibling}l.tail!==null&&se()>Rr&&(t.flags|=128,n=!0,Yr(l,!1),t.lanes=4194304)}else{if(!n)if(e=za(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Yr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!re)return ye(t),null}else 2*se()-l.renderingStartTime>Rr&&r!==1073741824&&(t.flags|=128,n=!0,Yr(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(r=l.last,r!==null?r.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=se(),t.sibling=null,r=ne.current,J(ne,n?r&1|2:r&1),t):(ye(t),null);case 22:case 23:return Os(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Te&1073741824&&(ye(t),t.subtreeFlags&6&&(t.flags|=8192)):ye(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Em(e,t){switch(ms(t),t.tag){case 1:return Ae(t.type)&&Ia(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Lr(),te(Me),te(be),js(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ks(t),null;case 13:if(te(ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ne),null;case 4:return Lr(),null;case 10:return xs(t.type._context),null;case 22:case 23:return Os(),null;case 24:return null;default:return null}}var aa=!1,we=!1,Pm=typeof WeakSet=="function"?WeakSet:Set,O=null;function yr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ie(e,t,n)}else r.current=null}function Oi(e,t,r){try{r()}catch(n){ie(e,t,n)}}var Yo=!1;function Mm(e,t){if(gi=Ea,e=Mc(),fs(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,l=n.focusNode;n=n.focusOffset;try{r.nodeType,l.nodeType}catch{r=null;break e}var s=0,o=-1,u=-1,f=0,h=0,m=e,p=null;t:for(;;){for(var b;m!==r||a!==0&&m.nodeType!==3||(o=s+a),m!==l||n!==0&&m.nodeType!==3||(u=s+n),m.nodeType===3&&(s+=m.nodeValue.length),(b=m.firstChild)!==null;)p=m,m=b;for(;;){if(m===e)break t;if(p===r&&++f===a&&(o=s),p===l&&++h===n&&(u=s),(b=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=b}r=o===-1||u===-1?null:{start:o,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(xi={focusedElem:e,selectionRange:r},Ea=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,C=y.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ge(t.type,w),C);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(x){ie(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return y=Yo,Yo=!1,y}function cn(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var l=a.destroy;a.destroy=void 0,l!==void 0&&Oi(t,r,l)}a=a.next}while(a!==n)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ri(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Sd(e){var t=e.alternate;t!==null&&(e.alternate=null,Sd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[at],delete t[Cn],delete t[bi],delete t[dm],delete t[fm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cd(e){return e.tag===5||e.tag===3||e.tag===4}function Ko(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cd(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.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 _i(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Aa));else if(n!==4&&(e=e.child,e!==null))for(_i(e,t,r),e=e.sibling;e!==null;)_i(e,t,r),e=e.sibling}function Fi(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Fi(e,t,r),e=e.sibling;e!==null;)Fi(e,t,r),e=e.sibling}var he=null,qe=!1;function wt(e,t,r){for(r=r.child;r!==null;)Ed(e,t,r),r=r.sibling}function Ed(e,t,r){if(lt&&typeof lt.onCommitFiberUnmount=="function")try{lt.onCommitFiberUnmount(qa,r)}catch{}switch(r.tag){case 5:we||yr(r,t);case 6:var n=he,a=qe;he=null,wt(e,t,r),he=n,qe=a,he!==null&&(qe?(e=he,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):he.removeChild(r.stateNode));break;case 18:he!==null&&(qe?(e=he,r=r.stateNode,e.nodeType===8?Ll(e.parentNode,r):e.nodeType===1&&Ll(e,r),bn(e)):Ll(he,r.stateNode));break;case 4:n=he,a=qe,he=r.stateNode.containerInfo,qe=!0,wt(e,t,r),he=n,qe=a;break;case 0:case 11:case 14:case 15:if(!we&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var l=a,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&Oi(r,t,s),a=a.next}while(a!==n)}wt(e,t,r);break;case 1:if(!we&&(yr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){ie(r,t,o)}wt(e,t,r);break;case 21:wt(e,t,r);break;case 22:r.mode&1?(we=(n=we)||r.memoizedState!==null,wt(e,t,r),we=n):wt(e,t,r);break;default:wt(e,t,r)}}function Go(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Pm),t.forEach(function(n){var a=zm.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function Ke(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var l=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:he=o.stateNode,qe=!1;break e;case 3:he=o.stateNode.containerInfo,qe=!0;break e;case 4:he=o.stateNode.containerInfo,qe=!0;break e}o=o.return}if(he===null)throw Error(P(160));Ed(l,s,a),he=null,qe=!1;var u=a.alternate;u!==null&&(u.return=null),a.return=null}catch(f){ie(a,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Pd(t,e),t=t.sibling}function Pd(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ke(t,e),rt(e),n&4){try{cn(3,e,e.return),al(3,e)}catch(w){ie(e,e.return,w)}try{cn(5,e,e.return)}catch(w){ie(e,e.return,w)}}break;case 1:Ke(t,e),rt(e),n&512&&r!==null&&yr(r,r.return);break;case 5:if(Ke(t,e),rt(e),n&512&&r!==null&&yr(r,r.return),e.flags&32){var a=e.stateNode;try{gn(a,"")}catch(w){ie(e,e.return,w)}}if(n&4&&(a=e.stateNode,a!=null)){var l=e.memoizedProps,s=r!==null?r.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&qu(a,l),si(o,s);var f=si(o,l);for(s=0;s<u.length;s+=2){var h=u[s],m=u[s+1];h==="style"?tc(a,m):h==="dangerouslySetInnerHTML"?Ju(a,m):h==="children"?gn(a,m):Ji(a,h,m,f)}switch(o){case"input":ri(a,l);break;case"textarea":Xu(a,l);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!l.multiple;var b=l.value;b!=null?jr(a,!!l.multiple,b,!1):p!==!!l.multiple&&(l.defaultValue!=null?jr(a,!!l.multiple,l.defaultValue,!0):jr(a,!!l.multiple,l.multiple?[]:"",!1))}a[Cn]=l}catch(w){ie(e,e.return,w)}}break;case 6:if(Ke(t,e),rt(e),n&4){if(e.stateNode===null)throw Error(P(162));a=e.stateNode,l=e.memoizedProps;try{a.nodeValue=l}catch(w){ie(e,e.return,w)}}break;case 3:if(Ke(t,e),rt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{bn(t.containerInfo)}catch(w){ie(e,e.return,w)}break;case 4:Ke(t,e),rt(e);break;case 13:Ke(t,e),rt(e),a=e.child,a.flags&8192&&(l=a.memoizedState!==null,a.stateNode.isHidden=l,!l||a.alternate!==null&&a.alternate.memoizedState!==null||(Ts=se())),n&4&&Go(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(we=(f=we)||h,Ke(t,e),we=f):Ke(t,e),rt(e),n&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!h&&e.mode&1)for(O=e,h=e.child;h!==null;){for(m=O=h;O!==null;){switch(p=O,b=p.child,p.tag){case 0:case 11:case 14:case 15:cn(4,p,p.return);break;case 1:yr(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){ie(n,r,w)}}break;case 5:yr(p,p.return);break;case 22:if(p.memoizedState!==null){Xo(m);continue}}b!==null?(b.return=p,O=b):Xo(m)}h=h.sibling}e:for(h=null,m=e;;){if(m.tag===5){if(h===null){h=m;try{a=m.stateNode,f?(l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=m.stateNode,u=m.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=ec("display",s))}catch(w){ie(e,e.return,w)}}}else if(m.tag===6){if(h===null)try{m.stateNode.nodeValue=f?"":m.memoizedProps}catch(w){ie(e,e.return,w)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;h===m&&(h=null),m=m.return}h===m&&(h=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Ke(t,e),rt(e),n&4&&Go(e);break;case 21:break;default:Ke(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Cd(r)){var n=r;break e}r=r.return}throw Error(P(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(gn(a,""),n.flags&=-33);var l=Ko(e);Fi(e,l,a);break;case 3:case 4:var s=n.stateNode.containerInfo,o=Ko(e);_i(e,o,s);break;default:throw Error(P(161))}}catch(u){ie(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Am(e,t,r){O=e,Md(e)}function Md(e,t,r){for(var n=(e.mode&1)!==0;O!==null;){var a=O,l=a.child;if(a.tag===22&&n){var s=a.memoizedState!==null||aa;if(!s){var o=a.alternate,u=o!==null&&o.memoizedState!==null||we;o=aa;var f=we;if(aa=s,(we=u)&&!f)for(O=a;O!==null;)s=O,u=s.child,s.tag===22&&s.memoizedState!==null?Zo(a):u!==null?(u.return=s,O=u):Zo(a);for(;l!==null;)O=l,Md(l),l=l.sibling;O=a,aa=o,we=f}qo(e)}else a.subtreeFlags&8772&&l!==null?(l.return=a,O=l):qo(e)}}function qo(e){for(;O!==null;){var t=O;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:we||al(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!we)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Ge(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Oo(t,l,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Oo(t,s,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var h=f.memoizedState;if(h!==null){var m=h.dehydrated;m!==null&&bn(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}we||t.flags&512&&Ri(t)}catch(p){ie(t,t.return,p)}}if(t===e){O=null;break}if(r=t.sibling,r!==null){r.return=t.return,O=r;break}O=t.return}}function Xo(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var r=t.sibling;if(r!==null){r.return=t.return,O=r;break}O=t.return}}function Zo(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{al(4,t)}catch(u){ie(t,r,u)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(u){ie(t,a,u)}}var l=t.return;try{Ri(t)}catch(u){ie(t,l,u)}break;case 5:var s=t.return;try{Ri(t)}catch(u){ie(t,s,u)}}}catch(u){ie(t,t.return,u)}if(t===e){O=null;break}var o=t.sibling;if(o!==null){o.return=t.return,O=o;break}O=t.return}}var Im=Math.ceil,$a=yt.ReactCurrentDispatcher,As=yt.ReactCurrentOwner,Be=yt.ReactCurrentBatchConfig,Q=0,me=null,ue=null,ve=0,Te=0,wr=$t(0),de=0,Tn=null,rr=0,ll=0,Is=0,dn=null,Ee=null,Ts=0,Rr=1/0,ut=null,Ua=!1,zi=null,Ot=null,la=!1,Et=null,Ba=0,fn=0,Di=null,xa=-1,ya=0;function Ne(){return Q&6?se():xa!==-1?xa:xa=se()}function Rt(e){return e.mode&1?Q&2&&ve!==0?ve&-ve:mm.transition!==null?(ya===0&&(ya=pc()),ya):(e=q,e!==0||(e=window.event,e=e===void 0?16:wc(e.type)),e):1}function Je(e,t,r,n){if(50<fn)throw fn=0,Di=null,Error(P(185));zn(e,r,n),(!(Q&2)||e!==me)&&(e===me&&(!(Q&2)&&(ll|=r),de===4&&St(e,ve)),Ie(e,n),r===1&&Q===0&&!(t.mode&1)&&(Rr=se()+500,tl&&Ut()))}function Ie(e,t){var r=e.callbackNode;mp(e,t);var n=Ca(e,e===me?ve:0);if(n===0)r!==null&&io(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&io(r),t===1)e.tag===0?pm(Jo.bind(null,e)):Dc(Jo.bind(null,e)),um(function(){!(Q&6)&&Ut()}),r=null;else{switch(mc(n)){case 1:r=as;break;case 4:r=dc;break;case 16:r=Sa;break;case 536870912:r=fc;break;default:r=Sa}r=Fd(r,Ad.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Ad(e,t){if(xa=-1,ya=0,Q&6)throw Error(P(327));var r=e.callbackNode;if(Pr()&&e.callbackNode!==r)return null;var n=Ca(e,e===me?ve:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Va(e,n);else{t=n;var a=Q;Q|=2;var l=Td();(me!==e||ve!==t)&&(ut=null,Rr=se()+500,qt(e,t));do try{Om();break}catch(o){Id(e,o)}while(!0);gs(),$a.current=l,Q=a,ue!==null?t=0:(me=null,ve=0,t=de)}if(t!==0){if(t===2&&(a=fi(e),a!==0&&(n=a,t=Wi(e,a))),t===1)throw r=Tn,qt(e,0),St(e,n),Ie(e,se()),r;if(t===6)St(e,n);else{if(a=e.current.alternate,!(n&30)&&!Tm(a)&&(t=Va(e,n),t===2&&(l=fi(e),l!==0&&(n=l,t=Wi(e,l))),t===1))throw r=Tn,qt(e,0),St(e,n),Ie(e,se()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(P(345));case 2:Ht(e,Ee,ut);break;case 3:if(St(e,n),(n&130023424)===n&&(t=Ts+500-se(),10<t)){if(Ca(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){Ne(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=wi(Ht.bind(null,e,Ee,ut),t);break}Ht(e,Ee,ut);break;case 4:if(St(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var s=31-Ze(n);l=1<<s,s=t[s],s>a&&(a=s),n&=~l}if(n=a,n=se()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Im(n/1960))-n,10<n){e.timeoutHandle=wi(Ht.bind(null,e,Ee,ut),n);break}Ht(e,Ee,ut);break;case 5:Ht(e,Ee,ut);break;default:throw Error(P(329))}}}return Ie(e,se()),e.callbackNode===r?Ad.bind(null,e):null}function Wi(e,t){var r=dn;return e.current.memoizedState.isDehydrated&&(qt(e,t).flags|=256),e=Va(e,t),e!==2&&(t=Ee,Ee=r,t!==null&&$i(t)),e}function $i(e){Ee===null?Ee=e:Ee.push.apply(Ee,e)}function Tm(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var a=r[n],l=a.getSnapshot;a=a.value;try{if(!et(l(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 St(e,t){for(t&=~Is,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ze(t),n=1<<r;e[r]=-1,t&=~n}}function Jo(e){if(Q&6)throw Error(P(327));Pr();var t=Ca(e,0);if(!(t&1))return Ie(e,se()),null;var r=Va(e,t);if(e.tag!==0&&r===2){var n=fi(e);n!==0&&(t=n,r=Wi(e,n))}if(r===1)throw r=Tn,qt(e,0),St(e,t),Ie(e,se()),r;if(r===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ht(e,Ee,ut),Ie(e,se()),null}function Ls(e,t){var r=Q;Q|=1;try{return e(t)}finally{Q=r,Q===0&&(Rr=se()+500,tl&&Ut())}}function nr(e){Et!==null&&Et.tag===0&&!(Q&6)&&Pr();var t=Q;Q|=1;var r=Be.transition,n=q;try{if(Be.transition=null,q=1,e)return e()}finally{q=n,Be.transition=r,Q=t,!(Q&6)&&Ut()}}function Os(){Te=wr.current,te(wr)}function qt(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,om(r)),ue!==null)for(r=ue.return;r!==null;){var n=r;switch(ms(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Ia();break;case 3:Lr(),te(Me),te(be),js();break;case 5:ks(n);break;case 4:Lr();break;case 13:te(ne);break;case 19:te(ne);break;case 10:xs(n.type._context);break;case 22:case 23:Os()}r=r.return}if(me=e,ue=e=_t(e.current,null),ve=Te=t,de=0,Tn=null,Is=ll=rr=0,Ee=dn=null,Kt!==null){for(t=0;t<Kt.length;t++)if(r=Kt[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,l=r.pending;if(l!==null){var s=l.next;l.next=a,n.next=s}r.pending=n}Kt=null}return e}function Id(e,t){do{var r=ue;try{if(gs(),ha.current=Wa,Da){for(var n=ae.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Da=!1}if(tr=0,pe=ce=ae=null,un=!1,Mn=0,As.current=null,r===null||r.return===null){de=1,Tn=t,ue=null;break}e:{var l=e,s=r.return,o=r,u=t;if(t=ve,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,h=o,m=h.tag;if(!(h.mode&1)&&(m===0||m===11||m===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var b=Wo(s);if(b!==null){b.flags&=-257,$o(b,s,o,l,t),b.mode&1&&Do(l,f,t),t=b,u=f;var y=t.updateQueue;if(y===null){var w=new Set;w.add(u),t.updateQueue=w}else y.add(u);break e}else{if(!(t&1)){Do(l,f,t),Rs();break e}u=Error(P(426))}}else if(re&&o.mode&1){var C=Wo(s);if(C!==null){!(C.flags&65536)&&(C.flags|=256),$o(C,s,o,l,t),hs(Or(u,o));break e}}l=u=Or(u,o),de!==4&&(de=2),dn===null?dn=[l]:dn.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var d=md(l,u,t);Lo(l,d);break e;case 1:o=u;var c=l.type,v=l.stateNode;if(!(l.flags&128)&&(typeof c.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ot===null||!Ot.has(v)))){l.flags|=65536,t&=-t,l.lanes|=t;var x=hd(l,o,t);Lo(l,x);break e}}l=l.return}while(l!==null)}Od(r)}catch(k){t=k,ue===r&&r!==null&&(ue=r=r.return);continue}break}while(!0)}function Td(){var e=$a.current;return $a.current=Wa,e===null?Wa:e}function Rs(){(de===0||de===3||de===2)&&(de=4),me===null||!(rr&268435455)&&!(ll&268435455)||St(me,ve)}function Va(e,t){var r=Q;Q|=2;var n=Td();(me!==e||ve!==t)&&(ut=null,qt(e,t));do try{Lm();break}catch(a){Id(e,a)}while(!0);if(gs(),Q=r,$a.current=n,ue!==null)throw Error(P(261));return me=null,ve=0,de}function Lm(){for(;ue!==null;)Ld(ue)}function Om(){for(;ue!==null&&!lp();)Ld(ue)}function Ld(e){var t=_d(e.alternate,e,Te);e.memoizedProps=e.pendingProps,t===null?Od(e):ue=t,As.current=null}function Od(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Em(r,t),r!==null){r.flags&=32767,ue=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{de=6,ue=null;return}}else if(r=Cm(r,t,Te),r!==null){ue=r;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);de===0&&(de=5)}function Ht(e,t,r){var n=q,a=Be.transition;try{Be.transition=null,q=1,Rm(e,t,r,n)}finally{Be.transition=a,q=n}return null}function Rm(e,t,r,n){do Pr();while(Et!==null);if(Q&6)throw Error(P(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var l=r.lanes|r.childLanes;if(hp(e,l),e===me&&(ue=me=null,ve=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||la||(la=!0,Fd(Sa,function(){return Pr(),null})),l=(r.flags&15990)!==0,r.subtreeFlags&15990||l){l=Be.transition,Be.transition=null;var s=q;q=1;var o=Q;Q|=4,As.current=null,Mm(e,r),Pd(r,e),tm(xi),Ea=!!gi,xi=gi=null,e.current=r,Am(r),ip(),Q=o,q=s,Be.transition=l}else e.current=r;if(la&&(la=!1,Et=e,Ba=a),l=e.pendingLanes,l===0&&(Ot=null),up(r.stateNode),Ie(e,se()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(Ua)throw Ua=!1,e=zi,zi=null,e;return Ba&1&&e.tag!==0&&Pr(),l=e.pendingLanes,l&1?e===Di?fn++:(fn=0,Di=e):fn=0,Ut(),null}function Pr(){if(Et!==null){var e=mc(Ba),t=Be.transition,r=q;try{if(Be.transition=null,q=16>e?16:e,Et===null)var n=!1;else{if(e=Et,Et=null,Ba=0,Q&6)throw Error(P(331));var a=Q;for(Q|=4,O=e.current;O!==null;){var l=O,s=l.child;if(O.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var f=o[u];for(O=f;O!==null;){var h=O;switch(h.tag){case 0:case 11:case 15:cn(8,h,l)}var m=h.child;if(m!==null)m.return=h,O=m;else for(;O!==null;){h=O;var p=h.sibling,b=h.return;if(Sd(h),h===f){O=null;break}if(p!==null){p.return=b,O=p;break}O=b}}}var y=l.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var C=w.sibling;w.sibling=null,w=C}while(w!==null)}}O=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,O=s;else e:for(;O!==null;){if(l=O,l.flags&2048)switch(l.tag){case 0:case 11:case 15:cn(9,l,l.return)}var d=l.sibling;if(d!==null){d.return=l.return,O=d;break e}O=l.return}}var c=e.current;for(O=c;O!==null;){s=O;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,O=v;else e:for(s=c;O!==null;){if(o=O,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:al(9,o)}}catch(k){ie(o,o.return,k)}if(o===s){O=null;break e}var x=o.sibling;if(x!==null){x.return=o.return,O=x;break e}O=o.return}}if(Q=a,Ut(),lt&&typeof lt.onPostCommitFiberRoot=="function")try{lt.onPostCommitFiberRoot(qa,e)}catch{}n=!0}return n}finally{q=r,Be.transition=t}}return!1}function eu(e,t,r){t=Or(r,t),t=md(e,t,1),e=Lt(e,t,1),t=Ne(),e!==null&&(zn(e,1,t),Ie(e,t))}function ie(e,t,r){if(e.tag===3)eu(e,e,r);else for(;t!==null;){if(t.tag===3){eu(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ot===null||!Ot.has(n))){e=Or(r,e),e=hd(t,e,1),t=Lt(t,e,1),e=Ne(),t!==null&&(zn(t,1,e),Ie(t,e));break}}t=t.return}}function _m(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ne(),e.pingedLanes|=e.suspendedLanes&r,me===e&&(ve&r)===r&&(de===4||de===3&&(ve&130023424)===ve&&500>se()-Ts?qt(e,0):Is|=r),Ie(e,t)}function Rd(e,t){t===0&&(e.mode&1?(t=Gn,Gn<<=1,!(Gn&130023424)&&(Gn=4194304)):t=1);var r=Ne();e=gt(e,t),e!==null&&(zn(e,t,r),Ie(e,r))}function Fm(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Rd(e,r)}function zm(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(P(314))}n!==null&&n.delete(t),Rd(e,r)}var _d;_d=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)Pe=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Pe=!1,Sm(e,t,r);Pe=!!(e.flags&131072)}else Pe=!1,re&&t.flags&1048576&&Wc(t,Oa,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ga(e,t),e=t.pendingProps;var a=Ar(t,be.current);Er(t,r),a=Ss(null,t,n,e,a,r);var l=Cs();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(n)?(l=!0,Ta(t)):l=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ws(t),a.updater=nl,t.stateNode=a,a._reactInternals=t,Ei(t,n,e,r),t=Ai(null,t,n,!0,l,r)):(t.tag=0,re&&l&&ps(t),je(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ga(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=Wm(n),e=Ge(n,e),a){case 0:t=Mi(null,t,n,e,r);break e;case 1:t=Vo(null,t,n,e,r);break e;case 11:t=Uo(null,t,n,e,r);break e;case 14:t=Bo(null,t,n,Ge(n.type,e),r);break e}throw Error(P(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ge(n,a),Mi(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ge(n,a),Vo(e,t,n,a,r);case 3:e:{if(yd(t),e===null)throw Error(P(387));n=t.pendingProps,l=t.memoizedState,a=l.element,Qc(e,t),Fa(t,n,null,r);var s=t.memoizedState;if(n=s.element,l.isDehydrated)if(l={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){a=Or(Error(P(423)),t),t=Ho(e,t,n,r,a);break e}else if(n!==a){a=Or(Error(P(424)),t),t=Ho(e,t,n,r,a);break e}else for(Oe=Tt(t.stateNode.containerInfo.firstChild),Re=t,re=!0,Xe=null,r=Vc(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ir(),n===a){t=xt(e,t,r);break e}je(e,t,n,r)}t=t.child}return t;case 5:return Yc(t),e===null&&Ni(t),n=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,s=a.children,yi(n,a)?s=null:l!==null&&yi(n,l)&&(t.flags|=32),xd(e,t),je(e,t,s,r),t.child;case 6:return e===null&&Ni(t),null;case 13:return wd(e,t,r);case 4:return bs(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Tr(t,null,n,r):je(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ge(n,a),Uo(e,t,n,a,r);case 7:return je(e,t,t.pendingProps,r),t.child;case 8:return je(e,t,t.pendingProps.children,r),t.child;case 12:return je(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,l=t.memoizedProps,s=a.value,J(Ra,n._currentValue),n._currentValue=s,l!==null)if(et(l.value,s)){if(l.children===a.children&&!Me.current){t=xt(e,t,r);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){s=l.child;for(var u=o.firstContext;u!==null;){if(u.context===n){if(l.tag===1){u=mt(-1,r&-r),u.tag=2;var f=l.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}l.lanes|=r,u=l.alternate,u!==null&&(u.lanes|=r),Si(l.return,r,t),o.lanes|=r;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(P(341));s.lanes|=r,o=s.alternate,o!==null&&(o.lanes|=r),Si(s,r,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}je(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Er(t,r),a=Ve(a),n=n(a),t.flags|=1,je(e,t,n,r),t.child;case 14:return n=t.type,a=Ge(n,t.pendingProps),a=Ge(n.type,a),Bo(e,t,n,a,r);case 15:return vd(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ge(n,a),ga(e,t),t.tag=1,Ae(n)?(e=!0,Ta(t)):e=!1,Er(t,r),pd(t,n,a),Ei(t,n,a,r),Ai(null,t,n,!0,e,r);case 19:return bd(e,t,r);case 22:return gd(e,t,r)}throw Error(P(156,t.tag))};function Fd(e,t){return cc(e,t)}function Dm(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(e,t,r,n){return new Dm(e,t,r,n)}function _s(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wm(e){if(typeof e=="function")return _s(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ts)return 11;if(e===rs)return 14}return 2}function _t(e,t){var r=e.alternate;return r===null?(r=Ue(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function wa(e,t,r,n,a,l){var s=2;if(n=e,typeof e=="function")_s(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case cr:return Xt(r.children,a,l,t);case es:s=8,a|=8;break;case Xl:return e=Ue(12,r,t,a|2),e.elementType=Xl,e.lanes=l,e;case Zl:return e=Ue(13,r,t,a),e.elementType=Zl,e.lanes=l,e;case Jl:return e=Ue(19,r,t,a),e.elementType=Jl,e.lanes=l,e;case Yu:return il(r,a,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hu:s=10;break e;case Qu:s=9;break e;case ts:s=11;break e;case rs:s=14;break e;case kt:s=16,n=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=Ue(s,r,t,a),t.elementType=e,t.type=n,t.lanes=l,t}function Xt(e,t,r,n){return e=Ue(7,e,n,t),e.lanes=r,e}function il(e,t,r,n){return e=Ue(22,e,n,t),e.elementType=Yu,e.lanes=r,e.stateNode={isHidden:!1},e}function $l(e,t,r){return e=Ue(6,e,null,t),e.lanes=r,e}function Ul(e,t,r){return t=Ue(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $m(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kl(0),this.expirationTimes=kl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kl(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Fs(e,t,r,n,a,l,s,o,u){return e=new $m(e,t,r,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Ue(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ws(l),e}function Um(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ur,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function zd(e){if(!e)return Dt;e=e._reactInternals;e:{if(ir(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ae(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var r=e.type;if(Ae(r))return zc(e,r,t)}return t}function Dd(e,t,r,n,a,l,s,o,u){return e=Fs(r,n,!0,e,a,l,s,o,u),e.context=zd(null),r=e.current,n=Ne(),a=Rt(r),l=mt(n,a),l.callback=t??null,Lt(r,l,a),e.current.lanes=a,zn(e,a,n),Ie(e,n),e}function sl(e,t,r,n){var a=t.current,l=Ne(),s=Rt(a);return r=zd(r),t.context===null?t.context=r:t.pendingContext=r,t=mt(l,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Lt(a,t,s),e!==null&&(Je(e,a,s,l),ma(e,a,s)),s}function Ha(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function tu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function zs(e,t){tu(e,t),(e=e.alternate)&&tu(e,t)}function Bm(){return null}var Wd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ds(e){this._internalRoot=e}ol.prototype.render=Ds.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));sl(e,t,null,null)};ol.prototype.unmount=Ds.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nr(function(){sl(null,e,null,null)}),t[vt]=null}};function ol(e){this._internalRoot=e}ol.prototype.unstable_scheduleHydration=function(e){if(e){var t=gc();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Nt.length&&t!==0&&t<Nt[r].priority;r++);Nt.splice(r,0,e),r===0&&yc(e)}};function Ws(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ul(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ru(){}function Vm(e,t,r,n,a){if(a){if(typeof n=="function"){var l=n;n=function(){var f=Ha(s);l.call(f)}}var s=Dd(t,n,e,0,null,!1,!1,"",ru);return e._reactRootContainer=s,e[vt]=s.current,Nn(e.nodeType===8?e.parentNode:e),nr(),s}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var o=n;n=function(){var f=Ha(u);o.call(f)}}var u=Fs(e,0,!1,null,null,!1,!1,"",ru);return e._reactRootContainer=u,e[vt]=u.current,Nn(e.nodeType===8?e.parentNode:e),nr(function(){sl(t,u,r,n)}),u}function cl(e,t,r,n,a){var l=r._reactRootContainer;if(l){var s=l;if(typeof a=="function"){var o=a;a=function(){var u=Ha(s);o.call(u)}}sl(t,s,e,a)}else s=Vm(r,t,e,a,n);return Ha(s)}hc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Jr(t.pendingLanes);r!==0&&(ls(t,r|1),Ie(t,se()),!(Q&6)&&(Rr=se()+500,Ut()))}break;case 13:nr(function(){var n=gt(e,1);if(n!==null){var a=Ne();Je(n,e,1,a)}}),zs(e,1)}};is=function(e){if(e.tag===13){var t=gt(e,134217728);if(t!==null){var r=Ne();Je(t,e,134217728,r)}zs(e,134217728)}};vc=function(e){if(e.tag===13){var t=Rt(e),r=gt(e,t);if(r!==null){var n=Ne();Je(r,e,t,n)}zs(e,t)}};gc=function(){return q};xc=function(e,t){var r=q;try{return q=e,t()}finally{q=r}};ui=function(e,t,r){switch(t){case"input":if(ri(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=el(n);if(!a)throw Error(P(90));Gu(n),ri(n,a)}}}break;case"textarea":Xu(e,r);break;case"select":t=r.value,t!=null&&jr(e,!!r.multiple,t,!1)}};ac=Ls;lc=nr;var Hm={usingClientEntryPoint:!1,Events:[Wn,mr,el,rc,nc,Ls]},Kr={findFiberByHostInstance:Yt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Qm={bundleType:Kr.bundleType,version:Kr.version,rendererPackageName:Kr.rendererPackageName,rendererConfig:Kr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=oc(e),e===null?null:e.stateNode},findFiberByHostInstance:Kr.findFiberByHostInstance||Bm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ia=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ia.isDisabled&&ia.supportsFiber)try{qa=ia.inject(Qm),lt=ia}catch{}}Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hm;Fe.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ws(t))throw Error(P(200));return Um(e,t,null,r)};Fe.createRoot=function(e,t){if(!Ws(e))throw Error(P(299));var r=!1,n="",a=Wd;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Fs(e,1,!1,null,null,r,!1,n,a),e[vt]=t.current,Nn(e.nodeType===8?e.parentNode:e),new Ds(t)};Fe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=oc(t),e=e===null?null:e.stateNode,e};Fe.flushSync=function(e){return nr(e)};Fe.hydrate=function(e,t,r){if(!ul(t))throw Error(P(200));return cl(null,e,t,!0,r)};Fe.hydrateRoot=function(e,t,r){if(!Ws(e))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,a=!1,l="",s=Wd;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=Dd(t,null,e,1,r??null,a,!1,l,s),e[vt]=t.current,Nn(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new ol(t)};Fe.render=function(e,t,r){if(!ul(t))throw Error(P(200));return cl(null,e,t,!1,r)};Fe.unmountComponentAtNode=function(e){if(!ul(e))throw Error(P(40));return e._reactRootContainer?(nr(function(){cl(null,null,e,!1,function(){e._reactRootContainer=null,e[vt]=null})}),!0):!1};Fe.unstable_batchedUpdates=Ls;Fe.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!ul(r))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return cl(e,t,r,!1,n)};Fe.version="18.3.1-next-f1338f8080-20240426";function $d(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($d)}catch(e){console.error(e)}}$d(),$u.exports=Fe;var Ym=$u.exports,nu=Ym;Gl.createRoot=nu.createRoot,Gl.hydrateRoot=nu.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function Ln(){return Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ln.apply(this,arguments)}var Pt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Pt||(Pt={}));const au="popstate";function Km(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:s,hash:o}=n.location;return Ui("",{pathname:l,search:s,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Ud(a)}return qm(t,r,null,e)}function fe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $s(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Gm(){return Math.random().toString(36).substr(2,8)}function lu(e,t){return{usr:e.state,key:e.key,idx:t}}function Ui(e,t,r,n){return r===void 0&&(r=null),Ln({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Dr(t):t,{state:r,key:t&&t.key||n||Gm()})}function Ud(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Dr(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function qm(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,s=a.history,o=Pt.Pop,u=null,f=h();f==null&&(f=0,s.replaceState(Ln({},s.state,{idx:f}),""));function h(){return(s.state||{idx:null}).idx}function m(){o=Pt.Pop;let C=h(),d=C==null?null:C-f;f=C,u&&u({action:o,location:w.location,delta:d})}function p(C,d){o=Pt.Push;let c=Ui(w.location,C,d);f=h()+1;let v=lu(c,f),x=w.createHref(c);try{s.pushState(v,"",x)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(x)}l&&u&&u({action:o,location:w.location,delta:1})}function b(C,d){o=Pt.Replace;let c=Ui(w.location,C,d);f=h();let v=lu(c,f),x=w.createHref(c);s.replaceState(v,"",x),l&&u&&u({action:o,location:w.location,delta:0})}function y(C){let d=a.location.origin!=="null"?a.location.origin:a.location.href,c=typeof C=="string"?C:Ud(C);return c=c.replace(/ $/,"%20"),fe(d,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,d)}let w={get action(){return o},get location(){return e(a,s)},listen(C){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(au,m),u=C,()=>{a.removeEventListener(au,m),u=null}},createHref(C){return t(a,C)},createURL:y,encodeLocation(C){let d=y(C);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:p,replace:b,go(C){return s.go(C)}};return w}var iu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(iu||(iu={}));function Xm(e,t,r){return r===void 0&&(r="/"),Zm(e,t,r)}function Zm(e,t,r,n){let a=typeof t=="string"?Dr(t):t,l=Hd(a.pathname||"/",r);if(l==null)return null;let s=Bd(e);Jm(s);let o=null;for(let u=0;o==null&&u<s.length;++u){let f=dh(l);o=oh(s[u],f)}return o}function Bd(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,s,o)=>{let u={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};u.relativePath.startsWith("/")&&(fe(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let f=Zt([n,u.relativePath]),h=r.concat(u);l.children&&l.children.length>0&&(fe(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Bd(l.children,t,h,f)),!(l.path==null&&!l.index)&&t.push({path:f,score:ih(f,l.index),routesMeta:h})};return e.forEach((l,s)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))a(l,s);else for(let u of Vd(l.path))a(l,s,u)}),t}function Vd(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let s=Vd(n.join("/")),o=[];return o.push(...s.map(u=>u===""?l:[l,u].join("/"))),a&&o.push(...s),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function Jm(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:sh(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const eh=/^:[\w-]+$/,th=3,rh=2,nh=1,ah=10,lh=-2,su=e=>e==="*";function ih(e,t){let r=e.split("/"),n=r.length;return r.some(su)&&(n+=lh),t&&(n+=rh),r.filter(a=>!su(a)).reduce((a,l)=>a+(eh.test(l)?th:l===""?nh:ah),n)}function sh(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function oh(e,t,r){let{routesMeta:n}=e,a={},l="/",s=[];for(let o=0;o<n.length;++o){let u=n[o],f=o===n.length-1,h=l==="/"?t:t.slice(l.length)||"/",m=uh({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},h),p=u.route;if(!m)return null;Object.assign(a,m.params),s.push({params:a,pathname:Zt([l,m.pathname]),pathnameBase:xh(Zt([l,m.pathnameBase])),route:p}),m.pathnameBase!=="/"&&(l=Zt([l,m.pathnameBase]))}return s}function uh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ch(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],s=l.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:n.reduce((f,h,m)=>{let{paramName:p,isOptional:b}=h;if(p==="*"){let w=o[m]||"";s=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const y=o[m];return b&&!y?f[p]=void 0:f[p]=(y||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:s,pattern:e}}function ch(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),$s(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,u)=>(n.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function dh(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $s(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Hd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const fh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ph=e=>fh.test(e);function mh(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Dr(e):e,l;if(r)if(ph(r))l=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),$s(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+r))}r.startsWith("/")?l=ou(r.substring(1),"/"):l=ou(r,t)}else l=t;return{pathname:l,search:yh(n),hash:wh(a)}}function ou(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Bl(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hh(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function vh(e,t){let r=hh(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function gh(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Dr(e):(a=Ln({},e),fe(!a.pathname||!a.pathname.includes("?"),Bl("?","pathname","search",a)),fe(!a.pathname||!a.pathname.includes("#"),Bl("#","pathname","hash",a)),fe(!a.search||!a.search.includes("#"),Bl("#","search","hash",a)));let l=e===""||a.pathname==="",s=l?"/":a.pathname,o;if(s==null)o=r;else{let m=t.length-1;if(!n&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),m-=1;a.pathname=p.join("/")}o=m>=0?t[m]:"/"}let u=mh(a,o),f=s&&s!=="/"&&s.endsWith("/"),h=(l||s===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(f||h)&&(u.pathname+="/"),u}const Zt=e=>e.join("/").replace(/\/\/+/g,"/"),xh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function bh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Qd=["post","put","patch","delete"];new Set(Qd);const kh=["get",...Qd];new Set(kh);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function On(){return On=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},On.apply(this,arguments)}const Us=g.createContext(null),jh=g.createContext(null),dl=g.createContext(null),fl=g.createContext(null),Wr=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Yd=g.createContext(null);function pl(){return g.useContext(fl)!=null}function Bs(){return pl()||fe(!1),g.useContext(fl).location}function Kd(e){g.useContext(dl).static||g.useLayoutEffect(e)}function Nh(){let{isDataRoute:e}=g.useContext(Wr);return e?Fh():Sh()}function Sh(){pl()||fe(!1);let e=g.useContext(Us),{basename:t,future:r,navigator:n}=g.useContext(dl),{matches:a}=g.useContext(Wr),{pathname:l}=Bs(),s=JSON.stringify(vh(a,r.v7_relativeSplatPath)),o=g.useRef(!1);return Kd(()=>{o.current=!0}),g.useCallback(function(f,h){if(h===void 0&&(h={}),!o.current)return;if(typeof f=="number"){n.go(f);return}let m=gh(f,JSON.parse(s),l,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Zt([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,l,e])}function Ch(e,t){return Eh(e,t)}function Eh(e,t,r,n){pl()||fe(!1);let{navigator:a}=g.useContext(dl),{matches:l}=g.useContext(Wr),s=l[l.length-1],o=s?s.params:{};s&&s.pathname;let u=s?s.pathnameBase:"/";s&&s.route;let f=Bs(),h;if(t){var m;let C=typeof t=="string"?Dr(t):t;u==="/"||(m=C.pathname)!=null&&m.startsWith(u)||fe(!1),h=C}else h=f;let p=h.pathname||"/",b=p;if(u!=="/"){let C=u.replace(/^\//,"").split("/");b="/"+p.replace(/^\//,"").split("/").slice(C.length).join("/")}let y=Xm(e,{pathname:b}),w=Th(y&&y.map(C=>Object.assign({},C,{params:Object.assign({},o,C.params),pathname:Zt([u,a.encodeLocation?a.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?u:Zt([u,a.encodeLocation?a.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),l,r,n);return t&&w?g.createElement(fl.Provider,{value:{location:On({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Pt.Pop}},w):w}function Ph(){let e=_h(),t=bh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,null)}const Mh=g.createElement(Ph,null);class Ah extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?g.createElement(Wr.Provider,{value:this.props.routeContext},g.createElement(Yd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ih(e){let{routeContext:t,match:r,children:n}=e,a=g.useContext(Us);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(Wr.Provider,{value:t},n)}function Th(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if(!r)return null;if(r.errors)e=r.matches;else if((l=n)!=null&&l.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,o=(a=r)==null?void 0:a.errors;if(o!=null){let h=s.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);h>=0||fe(!1),s=s.slice(0,Math.min(s.length,h+1))}let u=!1,f=-1;if(r&&n&&n.v7_partialHydration)for(let h=0;h<s.length;h++){let m=s[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=h),m.route.id){let{loaderData:p,errors:b}=r,y=m.route.loader&&p[m.route.id]===void 0&&(!b||b[m.route.id]===void 0);if(m.route.lazy||y){u=!0,f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}return s.reduceRight((h,m,p)=>{let b,y=!1,w=null,C=null;r&&(b=o&&m.route.id?o[m.route.id]:void 0,w=m.route.errorElement||Mh,u&&(f<0&&p===0?(zh("route-fallback"),y=!0,C=null):f===p&&(y=!0,C=m.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,p+1)),c=()=>{let v;return b?v=w:y?v=C:m.route.Component?v=g.createElement(m.route.Component,null):m.route.element?v=m.route.element:v=h,g.createElement(Ih,{match:m,routeContext:{outlet:h,matches:d,isDataRoute:r!=null},children:v})};return r&&(m.route.ErrorBoundary||m.route.errorElement||p===0)?g.createElement(Ah,{location:r.location,revalidation:r.revalidation,component:w,error:b,children:c(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):c()},null)}var Gd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Gd||{}),qd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(qd||{});function Lh(e){let t=g.useContext(Us);return t||fe(!1),t}function Oh(e){let t=g.useContext(jh);return t||fe(!1),t}function Rh(e){let t=g.useContext(Wr);return t||fe(!1),t}function Xd(e){let t=Rh(),r=t.matches[t.matches.length-1];return r.route.id||fe(!1),r.route.id}function _h(){var e;let t=g.useContext(Yd),r=Oh(),n=Xd();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Fh(){let{router:e}=Lh(Gd.UseNavigateStable),t=Xd(qd.UseNavigateStable),r=g.useRef(!1);return Kd(()=>{r.current=!0}),g.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,On({fromRouteId:t},l)))},[e,t])}const uu={};function zh(e,t,r){uu[e]||(uu[e]=!0)}function Dh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ot(e){fe(!1)}function Wh(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Pt.Pop,navigator:l,static:s=!1,future:o}=e;pl()&&fe(!1);let u=t.replace(/^\/*/,"/"),f=g.useMemo(()=>({basename:u,navigator:l,static:s,future:On({v7_relativeSplatPath:!1},o)}),[u,o,l,s]);typeof n=="string"&&(n=Dr(n));let{pathname:h="/",search:m="",hash:p="",state:b=null,key:y="default"}=n,w=g.useMemo(()=>{let C=Hd(h,u);return C==null?null:{location:{pathname:C,search:m,hash:p,state:b,key:y},navigationType:a}},[u,h,m,p,b,y,a]);return w==null?null:g.createElement(dl.Provider,{value:f},g.createElement(fl.Provider,{children:r,value:w}))}function $h(e){let{children:t,location:r}=e;return Ch(Bi(t),r)}new Promise(()=>{});function Bi(e,t){t===void 0&&(t=[]);let r=[];return g.Children.forEach(e,(n,a)=>{if(!g.isValidElement(n))return;let l=[...t,a];if(n.type===g.Fragment){r.push.apply(r,Bi(n.props.children,l));return}n.type!==ot&&fe(!1),!n.props.index||!n.props.children||fe(!1);let s={id:n.props.id||l.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=Bi(n.props.children,l)),r.push(s)}),r}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/const Uh="6";try{window.__reactRouterVersion=Uh}catch{}const Bh="startTransition",cu=_f[Bh];function Vh(e){let{basename:t,children:r,future:n,window:a}=e,l=g.useRef();l.current==null&&(l.current=Km({window:a,v5Compat:!0}));let s=l.current,[o,u]=g.useState({action:s.action,location:s.location}),{v7_startTransition:f}=n||{},h=g.useCallback(m=>{f&&cu?cu(()=>u(m)):u(m)},[u,f]);return g.useLayoutEffect(()=>s.listen(h),[s,h]),g.useEffect(()=>Dh(n),[n]),g.createElement(Wh,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:s,future:n})}var du;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(du||(du={}));var fu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fu||(fu={}));/**
|
|
68
|
+
* @license lucide-react v0.303.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var Hh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
73
|
+
* @license lucide-react v0.303.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const Qh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),V=(e,t)=>{const r=g.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:o="",children:u,...f},h)=>g.createElement("svg",{ref:h,...Hh,width:a,height:a,stroke:n,strokeWidth:s?Number(l)*24/Number(a):l,className:["lucide",`lucide-${Qh(e)}`,o].join(" "),...f},[...t.map(([m,p])=>g.createElement(m,p)),...Array.isArray(u)?u:[u]]));return r.displayName=`${e}`,r};/**
|
|
78
|
+
* @license lucide-react v0.303.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const ba=V("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
83
|
+
* @license lucide-react v0.303.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const Yh=V("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
|
|
88
|
+
* @license lucide-react v0.303.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const Zd=V("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
93
|
+
* @license lucide-react v0.303.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const Kh=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
98
|
+
* @license lucide-react v0.303.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const Gh=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
103
|
+
* @license lucide-react v0.303.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const Jd=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
108
|
+
* @license lucide-react v0.303.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const Qa=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
113
|
+
* @license lucide-react v0.303.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const ef=V("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
118
|
+
* @license lucide-react v0.303.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const pu=V("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
123
|
+
* @license lucide-react v0.303.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const tf=V("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
128
|
+
* @license lucide-react v0.303.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
131
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/const qh=V("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
|
133
|
+
* @license lucide-react v0.303.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const Xh=V("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
138
|
+
* @license lucide-react v0.303.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const Vi=V("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
|
|
143
|
+
* @license lucide-react v0.303.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
146
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/const Zh=V("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
|
|
148
|
+
* @license lucide-react v0.303.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const Jh=V("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
|
|
153
|
+
* @license lucide-react v0.303.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const ev=V("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
158
|
+
* @license lucide-react v0.303.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/const rf=V("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
163
|
+
* @license lucide-react v0.303.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
166
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/const pn=V("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
168
|
+
* @license lucide-react v0.303.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
171
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const tv=V("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
|
173
|
+
* @license lucide-react v0.303.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
+
*/const rv=V("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
|
|
178
|
+
* @license lucide-react v0.303.0 - ISC
|
|
179
|
+
*
|
|
180
|
+
* This source code is licensed under the ISC license.
|
|
181
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
+
*/const nv=V("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
|
|
183
|
+
* @license lucide-react v0.303.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/const av=V("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
188
|
+
* @license lucide-react v0.303.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
191
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
+
*/const lv=V("MessageCirclePlus",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
|
|
193
|
+
* @license lucide-react v0.303.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
196
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
+
*/const Vs=V("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
198
|
+
* @license lucide-react v0.303.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
201
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/const iv=V("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
203
|
+
* @license lucide-react v0.303.0 - ISC
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the ISC license.
|
|
206
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
+
*/const sv=V("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
|
|
208
|
+
* @license lucide-react v0.303.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/const ov=V("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/**
|
|
213
|
+
* @license lucide-react v0.303.0 - ISC
|
|
214
|
+
*
|
|
215
|
+
* This source code is licensed under the ISC license.
|
|
216
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
+
*/const uv=V("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
|
|
218
|
+
* @license lucide-react v0.303.0 - ISC
|
|
219
|
+
*
|
|
220
|
+
* This source code is licensed under the ISC license.
|
|
221
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
+
*/const ml=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
223
|
+
* @license lucide-react v0.303.0 - ISC
|
|
224
|
+
*
|
|
225
|
+
* This source code is licensed under the ISC license.
|
|
226
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
+
*/const Hs=V("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
228
|
+
* @license lucide-react v0.303.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/const cv=V("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
|
|
233
|
+
* @license lucide-react v0.303.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/const Hi=V("ScrollText",[["path",{d:"M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4",key:"13a6an"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M15 12h-5",key:"r7krc0"}]]);/**
|
|
238
|
+
* @license lucide-react v0.303.0 - ISC
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the ISC license.
|
|
241
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const nf=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
243
|
+
* @license lucide-react v0.303.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
+
*/const dv=V("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
248
|
+
* @license lucide-react v0.303.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/const Qs=V("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
253
|
+
* @license lucide-react v0.303.0 - ISC
|
|
254
|
+
*
|
|
255
|
+
* This source code is licensed under the ISC license.
|
|
256
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
+
*/const fv=V("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
|
|
258
|
+
* @license lucide-react v0.303.0 - ISC
|
|
259
|
+
*
|
|
260
|
+
* This source code is licensed under the ISC license.
|
|
261
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
+
*/const pv=V("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
263
|
+
* @license lucide-react v0.303.0 - ISC
|
|
264
|
+
*
|
|
265
|
+
* This source code is licensed under the ISC license.
|
|
266
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
+
*/const mv=V("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);/**
|
|
268
|
+
* @license lucide-react v0.303.0 - ISC
|
|
269
|
+
*
|
|
270
|
+
* This source code is licensed under the ISC license.
|
|
271
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
+
*/const Un=V("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
273
|
+
* @license lucide-react v0.303.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/const mn=V("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
278
|
+
* @license lucide-react v0.303.0 - ISC
|
|
279
|
+
*
|
|
280
|
+
* This source code is licensed under the ISC license.
|
|
281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
+
*/const Ys=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
283
|
+
* @license lucide-react v0.303.0 - ISC
|
|
284
|
+
*
|
|
285
|
+
* This source code is licensed under the ISC license.
|
|
286
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
+
*/const af=V("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),hv=[{id:"chat",label:"Chat",icon:Vs},{id:"agents",label:"Agents",icon:ba},{id:"code",label:"Code",icon:ef},{id:"worktrees",label:"Worktrees",icon:pn},{id:"skills",label:"Skills",icon:mn},{id:"automations",label:"Automations",icon:Qa},{id:"audit",label:"Audit",icon:Hi}],vv=({activeTab:e,onTabChange:t})=>i.jsxs("aside",{className:"w-[200px] bg-[var(--bg-surface)] border-r border-[var(--border-subtle)] flex flex-col","data-testid":"sidebar",children:[i.jsx("div",{className:"p-4 border-b border-[var(--border-faint)]",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-[22px] h-[22px] bg-[var(--teal-500)] rounded-[6px] flex items-center justify-center",children:i.jsx("span",{className:"text-[12px] font-bold text-[var(--bg-void)] font-[var(--font-body)]",children:"C"})}),i.jsx("span",{className:"font-medium text-[14px] text-[var(--text-primary)]",children:"Codex"})]})}),i.jsx("nav",{className:"flex-1 p-3 space-y-0.5 overflow-y-auto","data-testid":"sidebar-nav",children:hv.map(r=>{const n=r.icon,a=e===r.id;return i.jsxs("button",{onClick:()=>t(r.id),className:`w-full flex items-center gap-2 px-2.5 py-2 rounded-[var(--radius-sm)] text-[12px] transition-all duration-[150ms] ${a?"bg-[rgba(0,200,168,0.08)] text-[var(--teal-300)] border-l-[2px] border-[var(--teal-500)] pl-[9px]":"text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]"}`,"data-testid":`nav-${r.id}`,children:[i.jsx(n,{className:"w-3.5 h-3.5 opacity-50"}),i.jsx("span",{children:r.label})]},r.id)})}),i.jsx("div",{className:"p-3 border-t border-[var(--border-faint)]",children:i.jsxs("button",{onClick:()=>t("settings"),className:`w-full flex items-center gap-2 px-2.5 py-2 rounded-[var(--radius-sm)] text-[12px] transition-all duration-[150ms] ${e==="settings"?"bg-[rgba(0,200,168,0.08)] text-[var(--teal-300)] border-l-[2px] border-[var(--teal-500)] pl-[9px]":"text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]"}`,"data-testid":"nav-settings",children:[i.jsx(Qs,{className:"w-3.5 h-3.5 opacity-50"}),i.jsx("span",{children:"Settings"})]})})]}),gv=({activeTab:e,agents:t})=>{const r=t.filter(o=>o.status==="running").length,n=()=>{switch(e){case"agents":return"Agents";case"worktrees":return"Worktrees";case"skills":return"Skills";case"automations":return"Automations";case"settings":return"Settings";default:return"Codex"}},a=()=>{window.electronAPI.window.minimize()},l=()=>{window.electronAPI.window.maximize()},s=()=>{window.electronAPI.window.close()};return i.jsxs("header",{className:"h-12 border-b border-[var(--border-subtle)] bg-[var(--bg-surface)] flex items-center justify-between px-5","data-testid":"app-header",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{children:i.jsx("h1",{className:"text-[18px] font-medium text-[var(--text-primary)] tracking-tight","data-testid":"page-title",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:n()})}),e==="agents"&&r>0&&i.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 bg-[rgba(60,200,120,0.1)] border border-[rgba(60,200,120,0.2)] rounded-full text-[11px] font-medium text-[var(--success)]",children:[i.jsxs("span",{className:"relative flex h-2 w-2",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-[var(--success)] opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-[var(--success)]"})]}),r," running"]}),i.jsxs("div",{className:"relative hidden md:block",children:[i.jsx(nf,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-[var(--text-muted)]"}),i.jsx("input",{type:"text",placeholder:"Search...",className:"pl-8 pr-3 py-1.5 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-sm)] text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-muted)] w-56 focus:outline-none focus:border-[var(--teal-500)] transition-colors","data-testid":"search-input"})]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{onClick:a,className:"p-2 hover:bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors","data-testid":"window-minimize",children:i.jsx(iv,{className:"w-3.5 h-3.5"})}),i.jsx("button",{onClick:l,className:"p-2 hover:bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors","data-testid":"window-maximize",children:i.jsx(pv,{className:"w-3.5 h-3.5"})}),i.jsx("button",{onClick:s,className:"p-2 hover:bg-[rgba(232,90,106,0.1)] hover:text-[var(--error)] rounded-[var(--radius-sm)] text-[var(--text-muted)] transition-colors","data-testid":"window-close",children:i.jsx(Ys,{className:"w-3.5 h-3.5"})})]})]})};var br=(e=>(e.PENDING="pending",e.APPROVED="approved",e.REJECTED="rejected",e.APPLIED="applied",e))(br||{});const xv=({changes:e,onApprove:t,onReject:r,onApply:n,onAddLineComment:a,onDeleteLineComment:l,initialComments:s={}})=>{var W;const[o,u]=g.useState(0),[f,h]=g.useState("unified"),[m,p]=g.useState(null),[b,y]=g.useState(""),[w,C]=g.useState(s),d=g.useRef(null),c=e[o],v=A=>{const R=[],L=A.split(`
|
|
288
|
+
`);let F=0,X=0;for(const S of L)if(S.startsWith("@@")){const _=S.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);_&&(F=parseInt(_[1])-1,X=parseInt(_[2])-1),R.push({type:"header",content:S})}else S.startsWith("+")?(X++,R.push({type:"addition",content:S.slice(1),newLineNum:X})):S.startsWith("-")?(F++,R.push({type:"deletion",content:S.slice(1),oldLineNum:F})):S.startsWith(" ")?(F++,X++,R.push({type:"context",content:S.slice(1),oldLineNum:F,newLineNum:X})):(S.startsWith("diff")||S.startsWith("index")||S.startsWith("---")||S.startsWith("+++"))&&R.push({type:"header",content:S});return R},x=A=>{const R=(A.match(/^\+/gm)||[]).length,L=(A.match(/^-/gm)||[]).length;return{additions:R,deletions:L}},k=A=>{p(A===m?null:A),A!==m&&setTimeout(()=>{var R;return(R=d.current)==null?void 0:R.focus()},100)},j=A=>{if(!b.trim()||!c)return;const R={id:`comment-${Date.now()}`,lineNumber:A,content:b.trim(),author:"You",createdAt:new Date},L=c.id;C(F=>({...F,[L]:[...F[L]||[],R]})),a==null||a(L,A,b.trim()),y(""),p(null)},E=A=>{if(!c)return;const R=c.id;C(L=>{var F;return{...L,[R]:((F=L[R])==null?void 0:F.filter(X=>X.id!==A))||[]}}),l==null||l(A)},T=A=>{var R;return c?((R=w[c.id])==null?void 0:R.filter(L=>L.lineNumber===A))||[]:[]};if(!c)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground p-8",children:[i.jsx(nv,{className:"w-16 h-16 mb-4 opacity-30"}),i.jsx("h3",{className:"text-lg font-medium",children:"No Changes to Review"}),i.jsx("p",{className:"text-sm mt-2",children:"All changes have been reviewed"})]});const $=x(c.diff),M=v(c.diff),I=((W=w[c.id])==null?void 0:W.length)||0;return i.jsxs("div",{className:"flex flex-col h-full bg-card",children:[i.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between bg-background/50",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Vi,{className:"w-5 h-5 text-muted-foreground"}),i.jsx("span",{className:"font-medium truncate max-w-md",children:c.filePath})]}),i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsxs("span",{className:"text-green-500",children:["+",$.additions]}),i.jsxs("span",{className:"text-red-500",children:["-",$.deletions]})]}),I>0&&i.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:[i.jsx(Vs,{className:"w-3 h-3"}),I]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"text-sm text-muted-foreground",children:[o+1," of ",e.length]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{onClick:()=>u(Math.max(0,o-1)),disabled:o===0,className:"p-1.5 hover:bg-muted rounded-md disabled:opacity-50",children:i.jsx(Gh,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>u(Math.min(e.length-1,o+1)),disabled:o===e.length-1,className:"p-1.5 hover:bg-muted rounded-md disabled:opacity-50",children:i.jsx(Jd,{className:"w-4 h-4"})})]})]})]}),i.jsxs("div",{className:"px-4 py-2 border-b border-border flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>h("unified"),className:`px-3 py-1 text-sm rounded-md transition-colors ${f==="unified"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:"Unified"}),i.jsx("button",{onClick:()=>h("split"),className:`px-3 py-1 text-sm rounded-md transition-colors ${f==="split"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:"Split"})]}),i.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${c.status===br.PENDING?"bg-yellow-500/10 text-yellow-500":c.status===br.APPROVED?"bg-green-500/10 text-green-500":c.status===br.REJECTED?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:c.status})]}),i.jsx("div",{className:"flex-1 overflow-auto bg-background",children:f==="unified"?i.jsx("div",{className:"font-mono text-sm",children:M.map((A,R)=>{const L=A.newLineNum||A.oldLineNum||R,F=T(L),X=m===R;return i.jsxs("div",{children:[i.jsxs("div",{onClick:()=>A.type!=="header"&&k(R),className:`flex px-4 py-0.5 group cursor-pointer transition-colors ${A.type==="addition"?"bg-green-500/10 hover:bg-green-500/20":A.type==="deletion"?"bg-red-500/10 hover:bg-red-500/20":A.type==="header"?"bg-muted/50 text-muted-foreground":"hover:bg-muted/50"} ${X?"ring-2 ring-primary ring-inset":""}`,children:[i.jsxs("div",{className:"flex gap-2 w-20 flex-shrink-0 text-muted-foreground select-none",children:[i.jsx("span",{className:"w-8 text-right",children:A.oldLineNum||""}),i.jsx("span",{className:"w-8 text-right",children:A.newLineNum||""})]}),i.jsx("span",{className:`w-6 flex-shrink-0 select-none ${A.type==="addition"?"text-green-500":A.type==="deletion"?"text-red-500":"text-muted-foreground"}`,children:A.type==="addition"?"+":A.type==="deletion"?"-":" "}),i.jsx("span",{className:`flex-1 ${A.type==="addition"?"text-green-700 dark:text-green-300":A.type==="deletion"?"text-red-700 dark:text-red-300":""}`,children:A.content||" "}),A.type!=="header"&&i.jsx("button",{onClick:S=>{S.stopPropagation(),k(R)},className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-muted rounded transition-opacity",title:"Add comment",children:i.jsx(lv,{className:"w-3.5 h-3.5 text-muted-foreground"})})]}),F.length>0&&i.jsx("div",{className:"bg-muted/30 border-l-2 border-primary ml-4 mr-4 my-1 rounded-r",children:F.map(S=>i.jsxs("div",{className:"p-3 border-b border-border last:border-b-0",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx("span",{className:"font-medium text-foreground",children:S.author}),i.jsx("span",{children:"•"}),i.jsx("span",{children:new Date(S.createdAt).toLocaleString()})]}),i.jsx("button",{onClick:()=>E(S.id),className:"p-1 hover:bg-muted rounded opacity-0 hover:opacity-100 transition-opacity",title:"Delete comment",children:i.jsx(Un,{className:"w-3 h-3 text-muted-foreground"})})]}),i.jsx("p",{className:"text-sm mt-1",children:S.content})]},S.id))}),X&&A.type!=="header"&&i.jsxs("div",{className:"px-4 py-2 bg-primary/5 border-l-2 border-primary ml-4 mr-4 my-1 rounded-r",children:[i.jsx("textarea",{ref:d,value:b,onChange:S=>y(S.target.value),placeholder:"Add a comment on this line...",className:"w-full px-3 py-2 bg-background border border-input rounded-md text-sm resize-none",rows:2,onKeyDown:S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),j(L)),S.key==="Escape"&&(p(null),y(""))}}),i.jsxs("div",{className:"flex items-center justify-end gap-2 mt-2",children:[i.jsx("button",{onClick:()=>{p(null),y("")},className:"px-3 py-1 text-xs text-muted-foreground hover:text-foreground",children:"Cancel"}),i.jsxs("button",{onClick:()=>j(L),disabled:!b.trim(),className:"flex items-center gap-1 px-3 py-1 bg-primary text-primary-foreground rounded-md text-xs hover:bg-primary/90 disabled:opacity-50",children:[i.jsx(dv,{className:"w-3 h-3"}),"Comment"]})]})]})]},R)})}):i.jsxs("div",{className:"grid grid-cols-2 gap-0 font-mono text-sm",children:[i.jsxs("div",{className:"border-r border-border",children:[i.jsx("div",{className:"px-2 py-1 bg-muted text-xs text-muted-foreground sticky top-0",children:"Before"}),M.map((A,R)=>i.jsxs("div",{className:`flex px-2 py-0.5 ${A.type==="deletion"?"bg-red-500/10 text-red-700 dark:text-red-300":""} ${A.type==="header"?"text-muted-foreground text-xs":""}`,children:[i.jsx("span",{className:"w-8 text-right text-muted-foreground select-none mr-2",children:A.oldLineNum||""}),i.jsx("span",{children:A.content||" "})]},`old-${R}`))]}),i.jsxs("div",{children:[i.jsx("div",{className:"px-2 py-1 bg-muted text-xs text-muted-foreground sticky top-0",children:"After"}),M.map((A,R)=>i.jsxs("div",{className:`flex px-2 py-0.5 ${A.type==="addition"?"bg-green-500/10 text-green-700 dark:text-green-300":""} ${A.type==="header"?"text-muted-foreground text-xs":""}`,children:[i.jsx("span",{className:"w-8 text-right text-muted-foreground select-none mr-2",children:A.newLineNum||""}),i.jsx("span",{children:A.content||" "})]},`new-${R}`))]})]})}),i.jsx("div",{className:"px-4 py-3 border-t border-border flex items-center justify-between bg-background/50",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{onClick:()=>r(c.id),className:"flex items-center gap-2 px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded-md transition-colors",children:[i.jsx(Ys,{className:"w-4 h-4"}),"Reject"]}),i.jsxs("button",{onClick:()=>{t(c.id),o<e.length-1&&u(o+1)},className:"flex items-center gap-2 px-4 py-2 text-sm bg-green-500/10 text-green-500 hover:bg-green-500/20 rounded-md transition-colors",children:[i.jsx(Zd,{className:"w-4 h-4"}),"Approve"]}),c.status===br.APPROVED&&i.jsxs("button",{onClick:()=>n(c.id),className:"flex items-center gap-2 px-4 py-2 text-sm bg-primary text-primary-foreground hover:bg-primary/90 rounded-md transition-colors",children:[i.jsx(tv,{className:"w-4 h-4"}),"Apply"]})]})})]})},yv=({agents:e,providers:t,skills:r,onCreateAgent:n,onDeleteAgent:a})=>{var Bt;const[l,s]=g.useState(!1),[o,u]=g.useState(null),[f,h]=g.useState([]),[m,p]=g.useState(!1),[b,y]=g.useState([]),[w,C]=g.useState([]),[d,c]=g.useState(!1),[v,x]=g.useState({}),[k,j]=g.useState({}),[E,T]=g.useState("task"),[$,M]=g.useState(""),[I,W]=g.useState({name:"",projectPath:"",providerId:"",model:"",skills:[]}),[A,R]=g.useState(null),[L,F]=g.useState(!1),X=g.useMemo(()=>o?f.filter(N=>N.agentId===o.id):[],[f,o]),S=async N=>{p(!0);try{const z=await window.electronAPI.changes.list(N);h(z)}catch(z){console.error("Failed to load code changes:",z)}finally{p(!1)}},_=async N=>{try{const z=await window.electronAPI.queue.list(N);y(z)}catch(z){console.error("Failed to load queue:",z)}},B=async N=>{try{const z=await window.electronAPI.queue.history(N,20);C(z)}catch(z){console.error("Failed to load queue history:",z)}};g.useEffect(()=>{o&&(S(o.id),_(o.id),B(o.id))},[o==null?void 0:o.id]),g.useEffect(()=>{t.length>0&&!I.providerId&&W(N=>{var z;return{...N,providerId:t[0].id,model:((z=t[0].models[0])==null?void 0:z.id)||""}})},[t]),g.useEffect(()=>{const N=(K,Z)=>{x(Qe=>({...Qe,[Z.agentId]:!0}))},z=async(K,Z)=>{const Qe=k[Z.agentId];if(Qe){try{await window.electronAPI.queue.complete(Z.agentId,Qe.id,"completed"),await _(Z.agentId)}catch(Ye){console.error("Failed to complete queued item:",Ye)}j(Ye=>({...Ye,[Z.agentId]:null}))}x(Ye=>({...Ye,[Z.agentId]:!1}))},Y=async(K,Z)=>{const Qe=k[Z.agentId];if(Qe){try{await window.electronAPI.queue.complete(Z.agentId,Qe.id,"failed",Z.error?String(Z.error):void 0),await _(Z.agentId)}catch(Ye){console.error("Failed to fail queued item:",Ye)}j(Ye=>({...Ye,[Z.agentId]:null}))}x(Ye=>({...Ye,[Z.agentId]:!1}))};return window.electronAPI.on("agent:taskStarted",N),window.electronAPI.on("agent:taskCompleted",z),window.electronAPI.on("agent:taskFailed",Y),()=>{window.electronAPI.removeListener("agent:taskStarted",N),window.electronAPI.removeListener("agent:taskCompleted",z),window.electronAPI.removeListener("agent:taskFailed",Y)}},[k]),g.useEffect(()=>{if(!o)return;const N=o.id;v[N]||k[N]||!b.some(K=>(K.status||"pending")==="pending")||(x(K=>({...K,[N]:!0})),(async()=>{try{const K=await window.electronAPI.queue.claimNext(N);if(!K){x(Z=>({...Z,[N]:!1}));return}j(Z=>({...Z,[N]:K})),await _(N),K.type==="message"?(await window.electronAPI.agent.sendMessage(N,K.content),await window.electronAPI.queue.complete(N,K.id,"completed"),j(Z=>({...Z,[N]:null})),await _(N),x(Z=>({...Z,[N]:!1}))):await window.electronAPI.agent.executeTask(N,K.content)}catch(K){console.error("Failed to dispatch queued item:",K);const Z=k[N];if(Z){try{await window.electronAPI.queue.complete(N,Z.id,"failed",K instanceof Error?K.message:String(K))}catch{}j(Qe=>({...Qe,[N]:null}))}x(Qe=>({...Qe,[N]:!1})),await _(N),await window.electronAPI.notification.show({title:"Queue dispatch failed",body:K instanceof Error?K.message:String(K)})}})())},[b,v,k,o==null?void 0:o.id]),g.useEffect(()=>{const N=(z,Y)=>{o&&Y.agentId===o.id&&S(o.id)};return window.electronAPI.on("changes:created",N),()=>{window.electronAPI.removeListener("changes:created",N)}},[o==null?void 0:o.id]);const D=async()=>{var N,z,Y;if(!I.name.trim()){R("Agent name is required");return}if(!I.projectPath.trim()){R("Project path is required");return}if(!I.model){R("Please select a model");return}R(null),F(!0);try{await n(I),s(!1),W({name:"",projectPath:"",providerId:((N=t[0])==null?void 0:N.id)||"",model:((Y=(z=t[0])==null?void 0:z.models[0])==null?void 0:Y.id)||"",skills:[]})}catch(K){console.error("Failed to create agent:",K),R(K instanceof Error?K.message:"Failed to create agent")}finally{F(!1)}},U=async(N,z)=>{try{await window.electronAPI.agent.sendMessage(N,z)}catch(Y){console.error("Failed to send message:",Y)}},oe=async N=>{if(o)try{await window.electronAPI.changes.approve(N),await S(o.id),await window.electronAPI.notification.show({title:"Change approved",body:"The change is approved and ready to apply."})}catch(z){console.error("Failed to approve change:",z),await window.electronAPI.notification.show({title:"Approve failed",body:z instanceof Error?z.message:String(z)})}},ke=async(N,z)=>{if(o)try{const Y=typeof z=="string"?z:window.prompt("Rejection comment (optional):")??void 0;await window.electronAPI.changes.reject(N,Y),await S(o.id),await window.electronAPI.notification.show({title:"Change rejected",body:"The change was rejected."})}catch(Y){console.error("Failed to reject change:",Y),await window.electronAPI.notification.show({title:"Reject failed",body:Y instanceof Error?Y.message:String(Y)})}},De=async N=>{if(o)try{await window.electronAPI.changes.apply(N),await S(o.id),await window.electronAPI.notification.show({title:"Change applied",body:"The change was written to the worktree."})}catch(z){console.error("Failed to apply change:",z),await window.electronAPI.notification.show({title:"Apply failed",body:z instanceof Error?z.message:String(z)})}},st=N=>{switch(N){case"running":return i.jsx("div",{className:"w-2 h-2 bg-[var(--success)] rounded-full animate-pulse"});case"paused":return i.jsx("div",{className:"w-2 h-2 bg-[var(--warning)] rounded-full"});case"error":return i.jsx("div",{className:"w-2 h-2 bg-[var(--error)] rounded-full"});default:return i.jsx("div",{className:"w-2 h-2 bg-[var(--text-muted)] rounded-full"})}};return i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-80 border-r border-[var(--border-subtle)] bg-[var(--bg-surface)] flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-faint)] flex items-center justify-between",children:[i.jsx("h2",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:"Active Agents"}),i.jsx("button",{onClick:()=>s(!0),className:"p-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] transition-colors",children:i.jsx(ml,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-2 space-y-1",children:[e.map(N=>i.jsxs("div",{onClick:()=>u(N),className:`p-3 rounded-[var(--radius-md)] cursor-pointer transition-all ${(o==null?void 0:o.id)===N.id?"bg-[rgba(0,200,168,0.08)] border border-[var(--border-accent)]":"hover:bg-[var(--bg-hover)] border border-transparent"}`,children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ba,{className:"w-4 h-4 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:N.name})]}),st(N.status)]}),i.jsxs("div",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:[i.jsx("div",{className:"truncate",children:N.projectPath}),i.jsx("div",{className:"mt-1",children:N.model})]})]},N.id)),e.length===0&&i.jsxs("div",{className:"text-center py-8 text-[var(--text-muted)]",children:[i.jsx(ba,{className:"w-12 h-12 mx-auto mb-2 opacity-30"}),i.jsx("p",{className:"text-[13px]",children:"No agents yet"}),i.jsx("p",{className:"text-[11px] mt-1",children:"Create your first agent to get started"})]})]})]}),i.jsx("div",{className:"flex-1 flex flex-col",children:o?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)]",children:o.name}),i.jsxs("p",{className:"text-[12px] text-[var(--text-muted)]",children:[o.projectPath," · ",o.model]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{onClick:()=>U(o.id,"Hello!"),className:"px-3 py-1.5 text-[12px] bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] transition-colors flex items-center gap-1",children:[i.jsx(Vs,{className:"w-3.5 h-3.5"}),"Chat"]}),i.jsx("button",{onClick:()=>a(o.id),className:"p-2 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Un,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-[13px] font-medium text-[var(--text-primary)]",children:"Queue"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Stack work while the agent is busy"})]}),i.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[b.length," queued",v[o.id]?" · running":""]})]}),i.jsxs("div",{className:"mt-3 flex gap-2",children:[i.jsxs("select",{value:E,onChange:N=>T(N.target.value),className:"px-2 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[12px] text-[var(--text-primary)]",children:[i.jsx("option",{value:"task",children:"Task"}),i.jsx("option",{value:"message",children:"Message"})]}),i.jsx("input",{value:$,onChange:N=>M(N.target.value),placeholder:E==="task"?"Describe the task...":"Type a message...",className:"flex-1 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]"}),i.jsx("button",{onClick:()=>{if(!$.trim()||!o)return;const N=o.id;(async()=>{try{await window.electronAPI.queue.enqueue(N,E,$.trim()),M(""),await _(N)}catch(z){await window.electronAPI.notification.show({title:"Enqueue failed",body:z instanceof Error?z.message:String(z)})}})()},className:"px-3 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-md)] hover:bg-[var(--teal-400)] text-[12px] font-medium transition-colors",children:"Add"})]}),i.jsxs("div",{className:"mt-3 space-y-2 max-h-40 overflow-auto",children:[b.map((N,z)=>i.jsxs("div",{className:"flex items-center gap-2 p-2 bg-[var(--bg-elevated)] rounded-[var(--radius-md)]",children:[i.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-[var(--bg-hover)] border border-[var(--border-subtle)] text-[var(--text-secondary)]",children:N.type}),i.jsx("span",{className:"text-[12px] flex-1 truncate text-[var(--text-primary)]",children:N.content}),i.jsx("button",{onClick:()=>{const Y=o.id;(async()=>(await window.electronAPI.queue.delete(Y,N.id),await _(Y)))()},className:"text-[11px] text-[var(--error)] hover:underline",children:"Remove"})]},N.id)),b.length===0&&i.jsx("div",{className:"text-[11px] text-[var(--text-muted)]",children:"No queued items"})]}),i.jsxs("div",{className:"mt-3",children:[i.jsxs("button",{onClick:()=>c(!d),className:"text-[11px] text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:[d?"Hide":"Show"," history (",w.length,")"]}),d&&i.jsxs("div",{className:"mt-2 space-y-1 max-h-32 overflow-auto",children:[w.map(N=>i.jsxs("div",{className:"flex items-center gap-2 p-2 bg-[var(--bg-elevated)] rounded-[var(--radius-md)] text-[11px]",children:[i.jsx("span",{className:`px-1.5 py-0.5 rounded-full ${N.status==="completed"?"bg-[rgba(60,200,120,0.1)] text-[var(--success)]":"bg-[rgba(232,90,106,0.1)] text-[var(--error)]"}`,children:N.status}),i.jsx("span",{className:"text-[var(--text-muted)]",children:N.type}),i.jsx("span",{className:"flex-1 truncate text-[var(--text-primary)]",children:N.content}),N.error&&i.jsx("span",{className:"text-[var(--error)] truncate",title:N.error,children:"⚠️"})]},N.id)),w.length===0&&i.jsx("div",{className:"text-[11px] text-[var(--text-muted)]",children:"No completed items yet"})]})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium text-[var(--text-secondary)] mb-2",children:"Status"}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("span",{className:`px-2 py-1 rounded-full text-[11px] font-medium ${o.status==="running"?"bg-[rgba(60,200,120,0.1)] text-[var(--success)]":o.status==="paused"?"bg-[rgba(230,185,74,0.1)] text-[var(--warning)]":o.status==="error"?"bg-[rgba(232,90,106,0.1)] text-[var(--error)]":"bg-[var(--bg-hover)] text-[var(--text-muted)]"}`,children:o.status})})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium text-[var(--text-secondary)] mb-2",children:"Skills"}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.skills.map(N=>{const z=r.find(Y=>Y.id===N);return i.jsx("span",{className:"px-2 py-1 bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[11px] text-[var(--text-secondary)]",children:(z==null?void 0:z.name)||N},N)}),o.skills.length===0&&i.jsx("span",{className:"text-[12px] text-[var(--text-muted)]",children:"No skills applied"})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium text-[var(--text-secondary)] mb-2",children:"Recent Tasks"}),i.jsxs("div",{className:"space-y-2",children:[o.tasks.slice(-5).map(N=>i.jsxs("div",{className:"p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-[12px] font-medium text-[var(--text-primary)]",children:N.description}),i.jsx("span",{className:`text-[11px] ${N.status==="completed"?"text-[var(--success)]":N.status==="failed"?"text-[var(--error)]":N.status==="running"?"text-[var(--info)]":"text-[var(--text-muted)]"}`,children:N.status})]}),N.status==="running"&&i.jsx("div",{className:"mt-2 h-1 bg-[var(--bg-hover)] rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full bg-[var(--teal-500)] transition-all",style:{width:`${N.progress}%`}})})]},N.id)),o.tasks.length===0&&i.jsx("span",{className:"text-[12px] text-[var(--text-muted)]",children:"No tasks yet"})]})]})]}),i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] overflow-hidden min-h-[420px]",children:[i.jsxs("div",{className:"p-3 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-[13px] font-medium text-[var(--text-primary)]",children:"Changes"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Review and apply changes generated by the agent"})]}),i.jsx("button",{onClick:async()=>{if(o)try{const z=(await window.electronAPI.checkpoints.list(o.id)).find(K=>!K.restoredAt),Y=z==null?void 0:z.filePath;await window.electronAPI.checkpoints.restoreLast(o.id),await S(o.id),await window.electronAPI.notification.show({title:"Checkpoint restored",body:Y?`Rolled back: ${Y}`:"Last applied change was rolled back."})}catch(N){await window.electronAPI.notification.show({title:"Rollback failed",body:N instanceof Error?N.message:String(N)})}},className:"px-3 py-1.5 text-[11px] bg-[var(--bg-hover)] hover:bg-[var(--bg-active)] rounded-[var(--radius-sm)] text-[var(--text-secondary)] transition-colors",children:"Undo last apply"}),m&&i.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:"Loading..."})]}),i.jsx("div",{className:"h-[520px]",children:i.jsx(xv,{changes:X.filter(N=>N.status!==br.APPLIED),onApprove:oe,onReject:ke,onApply:De})})]})]})})]}):i.jsx("div",{className:"flex-1 flex items-center justify-center text-[var(--text-muted)]",children:i.jsxs("div",{className:"text-center",children:[i.jsx(ba,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),i.jsx("p",{className:"text-[14px]",children:"Select an agent to view details"})]})})}),l&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[500px] max-w-[90vw]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Agent"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Name"}),i.jsx("input",{type:"text",value:I.name,onChange:N=>W({...I,name:N.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"My Coding Agent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Project Path"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",value:I.projectPath,onChange:N=>W({...I,projectPath:N.target.value}),className:"flex-1 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"/path/to/project"}),i.jsx("button",{onClick:async()=>{const N=await window.electronAPI.dialog.selectFolder();N&&W({...I,projectPath:N})},className:"px-3 py-2 bg-[var(--bg-hover)] rounded-[var(--radius-md)] hover:bg-[var(--bg-active)] text-[13px] text-[var(--text-secondary)] transition-colors",children:"Browse"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Provider"}),i.jsx("select",{value:I.providerId,onChange:N=>{var Y;const z=t.find(K=>K.id===N.target.value);W({...I,providerId:N.target.value,model:((Y=z==null?void 0:z.models[0])==null?void 0:Y.id)||""})},className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:t.map(N=>i.jsx("option",{value:N.id,children:N.name},N.id))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Model"}),i.jsx("select",{value:I.model,onChange:N=>W({...I,model:N.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:(Bt=t.find(N=>N.id===I.providerId))==null?void 0:Bt.models.map(N=>i.jsx("option",{value:N.id,children:N.name},N.id))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Skills"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(N=>i.jsx("button",{onClick:()=>{const z=I.skills.includes(N.id)?I.skills.filter(Y=>Y!==N.id):[...I.skills,N.id];W({...I,skills:z})},className:`px-3 py-1.5 rounded-[var(--radius-sm)] text-[12px] transition-colors ${I.skills.includes(N.id)?"bg-[var(--teal-500)] text-[var(--bg-void)]":"bg-[var(--bg-hover)] text-[var(--text-secondary)] hover:bg-[var(--bg-active)]"}`,children:N.name},N.id))})]})]}),A&&i.jsx("div",{className:"mt-4 p-3 bg-[rgba(232,90,106,0.1)] border border-[rgba(232,90,106,0.3)] rounded-[var(--radius-md)]",children:i.jsx("p",{className:"text-[12px] text-[var(--error)]",children:A})}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>{s(!1),R(null)},className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:D,disabled:L||!I.name||!I.projectPath,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] disabled:opacity-50 text-[13px] font-medium transition-colors flex items-center gap-2",children:L?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-[var(--bg-void)] border-t-transparent rounded-full animate-spin"}),"Creating..."]}):"Create Agent"})]})]})})]})},wv=({worktrees:e,onCreateWorktree:t})=>{const[r,n]=g.useState(!1),[a,l]=g.useState({repoPath:"",name:""}),s=async()=>{try{await t(a.repoPath,a.name),n(!1),l({repoPath:"",name:""})}catch(o){console.error("Failed to create worktree:",o)}};return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[18px] font-medium text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:"Worktrees"}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)]",children:"Isolated workspaces for agents"})]}),i.jsxs("button",{onClick:()=>n(!0),className:"flex items-center gap-2 px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:[i.jsx(ml,{className:"w-4 h-4"}),"New Worktree"]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.map(o=>{var u;return i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] hover:border-[var(--border-accent)] hover:translate-y-[-2px] transition-all",children:[i.jsxs("div",{className:"flex items-start justify-between mb-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(pn,{className:"w-5 h-5 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:o.name})]}),o.isMain&&i.jsx("span",{className:"badge badge-teal text-[10px]",children:"Main"})]}),i.jsxs("div",{className:"space-y-2 text-[12px] text-[var(--text-muted)]",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(rf,{className:"w-4 h-4"}),i.jsx("span",{className:"truncate",children:o.path})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(pn,{className:"w-4 h-4"}),i.jsx("span",{children:o.branch})]}),i.jsx("div",{className:"text-[11px] font-[var(--font-mono)] text-[var(--teal-300)] truncate",children:(u=o.commit)==null?void 0:u.slice(0,8)})]}),!o.isMain&&i.jsxs("div",{className:"flex gap-2 mt-4 pt-4 border-t border-[var(--border-faint)]",children:[i.jsxs("button",{className:"flex-1 px-3 py-1.5 text-[12px] bg-[var(--bg-hover)] rounded-[var(--radius-sm)] hover:bg-[var(--bg-active)] text-[var(--text-secondary)] transition-colors",children:[i.jsx(rv,{className:"w-4 h-4 inline mr-1"}),"Merge"]}),i.jsx("button",{className:"p-1.5 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Un,{className:"w-4 h-4"})})]})]},o.name)}),e.length===0&&i.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-[var(--text-muted)]",children:[i.jsx(pn,{className:"w-16 h-16 mb-4 opacity-30"}),i.jsx("p",{className:"text-[15px] font-medium text-[var(--text-primary)]",children:"No worktrees yet"}),i.jsx("p",{className:"text-[12px]",children:"Create a worktree to isolate agent changes"})]})]})}),r&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[500px]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Worktree"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Repository Path"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",value:a.repoPath,onChange:o=>l({...a,repoPath:o.target.value}),className:"flex-1 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"/path/to/repo"}),i.jsx("button",{onClick:async()=>{const o=await window.electronAPI.dialog.selectFolder();o&&l({...a,repoPath:o})},className:"px-3 py-2 bg-[var(--bg-hover)] rounded-[var(--radius-md)] hover:bg-[var(--bg-active)] text-[13px] text-[var(--text-secondary)] transition-colors",children:"Browse"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Worktree Name"}),i.jsx("input",{type:"text",value:a.name,onChange:o=>l({...a,name:o.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"feature-branch"})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>n(!1),className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:s,disabled:!a.repoPath||!a.name,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] disabled:opacity-50 text-[13px] font-medium transition-colors hover:bg-[var(--teal-400)]",children:"Create Worktree"})]})]})})]})},bv=({skills:e,onCreateSkill:t})=>{const[r,n]=g.useState(!1),[a,l]=g.useState(null),[s,o]=g.useState(""),[u,f]=g.useState({name:"",description:"",content:""}),h=e.filter(p=>p.name.toLowerCase().includes(s.toLowerCase())||p.description.toLowerCase().includes(s.toLowerCase())||p.tags.some(b=>b.toLowerCase().includes(s.toLowerCase()))),m=async()=>{try{await t(u),n(!1),f({name:"",description:"",content:""})}catch(p){console.error("Failed to create skill:",p)}};return i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-80 border-r border-[var(--border-subtle)] bg-[var(--bg-surface)] flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-faint)]",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("h2",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:"Skills Library"}),i.jsx("button",{onClick:()=>n(!0),className:"p-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] transition-colors",children:i.jsx(ml,{className:"w-4 h-4"})})]}),i.jsx("input",{type:"text",placeholder:"Search skills...",value:s,onChange:p=>o(p.target.value),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]"})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-2 space-y-1",children:[h.map(p=>i.jsxs("div",{onClick:()=>l(p),className:`p-3 rounded-[var(--radius-md)] cursor-pointer transition-all ${(a==null?void 0:a.id)===p.id?"bg-[rgba(0,200,168,0.08)] border border-[var(--border-accent)]":"hover:bg-[var(--bg-hover)] border border-transparent"}`,children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(mn,{className:"w-4 h-4 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:p.name})]}),i.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)] line-clamp-2",children:p.description}),i.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:p.tags.slice(0,3).map(b=>i.jsx("span",{className:"badge badge-neutral text-[10px]",children:b},b))})]},p.id)),h.length===0&&i.jsxs("div",{className:"text-center py-8 text-[var(--text-muted)]",children:[i.jsx(mn,{className:"w-12 h-12 mx-auto mb-2 opacity-30"}),i.jsx("p",{className:"text-[13px]",children:"No skills found"})]})]})]}),i.jsx("div",{className:"flex-1 flex flex-col",children:a?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)]",children:a.name}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)]",children:a.description}),i.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:a.tags.map(p=>i.jsxs("span",{className:"badge badge-teal",children:[i.jsx(mv,{className:"w-3 h-3"}),p]},p))})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{className:"p-2 hover:bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[var(--text-muted)] transition-colors",children:i.jsx(ov,{className:"w-4 h-4"})}),i.jsx("button",{className:"p-2 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Un,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium mb-2 text-[var(--text-secondary)]",children:"Files"}),i.jsx("div",{className:"space-y-2",children:a.files.map(p=>i.jsxs("div",{className:"p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Zh,{className:"w-4 h-4 text-[var(--text-muted)]"}),i.jsx("span",{className:"text-[12px] font-medium text-[var(--text-primary)]",children:p.path}),i.jsx("span",{className:"text-[10px] text-[var(--text-muted)] uppercase",children:p.type})]}),i.jsx("pre",{className:"text-[11px] bg-[var(--bg-void)] p-2 rounded-[var(--radius-sm)] overflow-x-auto border border-[var(--border-faint)]",children:i.jsxs("code",{className:"text-[var(--teal-300)]",children:[p.content.slice(0,500),p.content.length>500?"...":""]})})]},p.path))})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium mb-2 text-[var(--text-secondary)]",children:"Configuration"}),i.jsx("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] p-3 rounded-[var(--radius-md)] text-[12px]",children:i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Entry Point:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.config.entryPoint})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Version:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.version})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Author:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.author})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Dependencies:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.config.dependencies.length||"None"})]})]})})]})]})})]}):i.jsx("div",{className:"flex-1 flex items-center justify-center text-[var(--text-muted)]",children:i.jsxs("div",{className:"text-center",children:[i.jsx(mn,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),i.jsx("p",{className:"text-[14px]",children:"Select a skill to view details"})]})})}),r&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[600px]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Skill"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Name"}),i.jsx("input",{type:"text",value:u.name,onChange:p=>f({...u,name:p.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"My Custom Skill"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Description"}),i.jsx("textarea",{value:u.description,onChange:p=>f({...u,description:p.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] h-20 resize-none text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"What does this skill do?"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Content"}),i.jsx("textarea",{value:u.content,onChange:p=>f({...u,content:p.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] h-40 resize-none font-[var(--font-mono)] text-[12px] text-[var(--teal-300)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"Enter skill instructions..."})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>n(!1),className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:m,disabled:!u.name||!u.content,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] disabled:opacity-50 text-[13px] font-medium transition-colors hover:bg-[var(--teal-400)]",children:"Create Skill"})]})]})})]})},kv=({automations:e,agents:t,skills:r,onCreateAutomation:n})=>{const[a,l]=g.useState(!1),[s,o]=g.useState({name:"",description:"",triggerType:"schedule",triggerConfig:{cron:"0 9 * * *"},actions:[]}),u=async()=>{try{await n(s),l(!1),o({name:"",description:"",triggerType:"schedule",triggerConfig:{cron:"0 9 * * *"},actions:[]})}catch(h){console.error("Failed to create automation:",h)}},f=async(h,m)=>{try{await window.electronAPI.automation.toggle(h,m)}catch(p){console.error("Failed to toggle automation:",p)}};return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[18px] font-medium text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:"Automations"}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)]",children:"Schedule and automate agent tasks"})]}),i.jsxs("button",{onClick:()=>l(!0),className:"flex items-center gap-2 px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:[i.jsx(ml,{className:"w-4 h-4"}),"New Automation"]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.map(h=>i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] hover:border-[var(--border-accent)] transition-colors",children:[i.jsxs("div",{className:"flex items-start justify-between mb-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Qa,{className:"w-5 h-5 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:h.name})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>f(h.id,!h.enabled),className:`p-1.5 rounded-[var(--radius-sm)] transition-colors ${h.enabled?"text-[var(--success)] hover:bg-[rgba(60,200,120,0.1)]":"text-[var(--text-muted)] hover:bg-[var(--bg-hover)]"}`,children:h.enabled?i.jsx(sv,{className:"w-4 h-4"}):i.jsx(uv,{className:"w-4 h-4"})}),i.jsx("button",{className:"p-1.5 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Un,{className:"w-4 h-4"})})]})]}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)] mb-3",children:h.description}),i.jsxs("div",{className:"flex items-center gap-4 text-[11px] text-[var(--text-muted)]",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Yh,{className:"w-3 h-3"}),i.jsx("span",{className:"capitalize",children:h.trigger.type})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(af,{className:"w-3 h-3"}),i.jsxs("span",{children:[h.actions.length," actions"]})]}),h.runCount>0&&i.jsxs("div",{children:["Run ",h.runCount," times"]})]}),h.enabled&&i.jsxs("div",{className:"mt-3 flex items-center gap-2 text-[11px] text-[var(--success)]",children:[i.jsx("div",{className:"w-2 h-2 bg-[var(--success)] rounded-full animate-pulse"}),"Active"]})]},h.id)),e.length===0&&i.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-[var(--text-muted)]",children:[i.jsx(Qa,{className:"w-16 h-16 mb-4 opacity-30"}),i.jsx("p",{className:"text-[15px] font-medium text-[var(--text-primary)]",children:"No automations yet"}),i.jsx("p",{className:"text-[12px]",children:"Create an automation to schedule agent tasks"})]})]})}),a&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[600px]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Automation"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Name"}),i.jsx("input",{type:"text",value:s.name,onChange:h=>o({...s,name:h.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"Daily Code Review"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Description"}),i.jsx("textarea",{value:s.description,onChange:h=>o({...s,description:h.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] h-20 resize-none text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"What does this automation do?"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Trigger Type"}),i.jsxs("select",{value:s.triggerType,onChange:h=>o({...s,triggerType:h.target.value,triggerConfig:h.target.value==="schedule"?{cron:"0 9 * * *"}:{}}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:[i.jsx("option",{value:"schedule",children:"Schedule (Cron)"}),i.jsx("option",{value:"event",children:"Event"}),i.jsx("option",{value:"webhook",children:"Webhook"}),i.jsx("option",{value:"manual",children:"Manual Only"})]})]}),s.triggerType==="schedule"&&i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Cron Expression"}),i.jsx("input",{type:"text",value:s.triggerConfig.cron,onChange:h=>o({...s,triggerConfig:{cron:h.target.value}}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--teal-300)] font-[var(--font-mono)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"0 9 * * *"}),i.jsx("p",{className:"text-[10px] text-[var(--text-muted)] mt-1",children:"Example: 0 9 * * * (every day at 9 AM)"})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>l(!1),className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:u,disabled:!s.name,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] disabled:opacity-50 text-[13px] font-medium transition-colors hover:bg-[var(--teal-400)]",children:"Create Automation"})]})]})})]})},jv=({settings:e,providers:t,onSettingsChange:r})=>{const[n,a]=g.useState(e),[l,s]=g.useState({}),[o,u]=g.useState("general"),[f,h]=g.useState(n.defaultModel),m=async()=>{for(const[d,c]of Object.entries(n))await window.electronAPI.settings.set(d,c);r(n)},p=async(d,c)=>{try{await window.electronAPI.providers.configure(d,{apiKey:c});const v=await window.electronAPI.providers.test(d);alert(v?"Connection successful!":"Connection failed. Please check your API key.")}catch(v){console.error("Failed to configure provider:",v),alert("Failed to configure provider")}},b=(d,c)=>{h(d),a({...n,defaultModel:d,defaultProvider:c})},y=[{id:"general",label:"General"},{id:"providers",label:"AI Providers"},{id:"appearance",label:"Appearance"},{id:"shortcuts",label:"Shortcuts"}],w=t.find(d=>d.isFree),C=t.filter(d=>!d.isFree);return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(Qs,{className:"w-5 h-5 text-[var(--teal-400)]"}),i.jsx("h2",{className:"text-[18px] font-medium text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:"Settings"})]}),i.jsx("div",{className:"tabs",children:y.map(d=>i.jsx("button",{onClick:()=>u(d.id),className:`tab ${o===d.id?"active":""}`,children:d.label},d.id))})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[o==="general"&&i.jsxs("div",{className:"max-w-2xl space-y-6",children:[i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"General Settings"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Auto Save"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Automatically save changes"})]}),i.jsx("input",{type:"checkbox",checked:n.autoSave,onChange:d=>a({...n,autoSave:d.target.checked}),className:"w-5 h-5 accent-[var(--teal-500)]"})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Max Parallel Agents"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Maximum number of agents running simultaneously"})]}),i.jsx("input",{type:"number",value:n.maxParallelAgents,onChange:d=>a({...n,maxParallelAgents:parseInt(d.target.value)}),className:"w-20 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",min:1,max:10})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Show Notifications"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Display desktop notifications for agent events"})]}),i.jsx("input",{type:"checkbox",checked:n.showNotifications,onChange:d=>a({...n,showNotifications:d.target.checked}),className:"w-5 h-5 accent-[var(--teal-500)]"})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Confirm Destructive Actions"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Show confirmation dialogs before deleting agents or worktrees"})]}),i.jsx("input",{type:"checkbox",checked:n.confirmDestructiveActions,onChange:d=>a({...n,confirmDestructiveActions:d.target.checked}),className:"w-5 h-5 accent-[var(--teal-500)]"})]})]})]}),i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"Git Configuration"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Author Name"}),i.jsx("input",{type:"text",value:n.gitAuthorName,onChange:d=>a({...n,gitAuthorName:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"Your Name"})]}),i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Author Email"}),i.jsx("input",{type:"email",value:n.gitAuthorEmail,onChange:d=>a({...n,gitAuthorEmail:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"your@email.com"})]})]})]})]}),o==="providers"&&i.jsxs("div",{className:"max-w-4xl space-y-6",children:[w&&i.jsxs("section",{className:"p-4 border-2 border-[rgba(60,200,120,0.3)] bg-[rgba(60,200,120,0.05)] rounded-[var(--radius-lg)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(fv,{className:"w-5 h-5 text-[var(--success)]"}),i.jsx("h3",{className:"text-[15px] font-medium text-[var(--text-primary)]",children:"Free AI Models"}),i.jsx("span",{className:"badge badge-success",children:"No API Key Required"})]}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)] mb-4",children:"Start using AI immediately with free models from OpenRouter, Groq, Google AI Studio, and Cerebras. No API key required for OpenRouter free tier - just select a model and start chatting!"}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-2 text-[var(--text-secondary)]",children:"Select Model"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2 max-h-96 overflow-y-auto",children:w.models.sort((d,c)=>{const v=["openrouter","groq","google","cerebras"],x=d.backend||"openrouter",k=c.backend||"openrouter";return v.indexOf(x)-v.indexOf(k)}).map(d=>i.jsxs("button",{onClick:()=>b(d.id,w.id),className:`p-3 text-left rounded-[var(--radius-md)] border transition-all ${f===d.id?"border-[var(--teal-500)] bg-[rgba(0,200,168,0.08)]":"border-[var(--border-subtle)] hover:border-[var(--teal-500)] hover:bg-[var(--bg-hover)]"}`,children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"font-medium text-[12px] truncate text-[var(--text-primary)]",children:d.name}),f===d.id&&i.jsx(Zd,{className:"w-4 h-4 text-[var(--teal-400)] flex-shrink-0"})]}),i.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[rgba(104,144,244,0.1)] text-[var(--info)]",children:d.backend||"openrouter"}),d.supportsVision&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[rgba(136,88,219,0.1)] text-purple-400",children:"vision"}),d.contextWindow>=1e5&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[rgba(230,185,74,0.1)] text-[var(--warning)]",children:d.contextWindow>=1e6?"1M ctx":`${d.contextWindow/1e3}k ctx`})]}),i.jsx("p",{className:"text-[10px] text-[var(--text-muted)] mt-1 truncate",children:d.description})]},d.id))})]})]}),i.jsxs("section",{children:[i.jsx("h3",{className:"text-[15px] font-medium mb-4 text-[var(--text-primary)]",children:"Premium Providers"}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)] mb-4",children:"Add your API keys for premium models with higher limits and advanced features."}),i.jsx("div",{className:"space-y-4",children:C.map(d=>i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)]",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:d.name}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:d.description})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"radio",name:"activeProvider",checked:n.defaultProvider===d.id,onChange:()=>a({...n,defaultProvider:d.id}),className:"w-4 h-4 accent-[var(--teal-500)]"}),i.jsx("span",{className:"text-[12px] text-[var(--text-secondary)]",children:"Default"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"API Key"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx("input",{type:l[d.id]?"text":"password",defaultValue:d.config.apiKey,placeholder:`Enter ${d.name} API key`,className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] pr-10 focus:outline-none focus:border-[var(--teal-500)]",onBlur:c=>p(d.id,c.target.value)}),i.jsx("button",{onClick:()=>s({...l,[d.id]:!l[d.id]}),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:l[d.id]?i.jsx(qh,{className:"w-4 h-4"}):i.jsx(Xh,{className:"w-4 h-4"})})]}),i.jsx("button",{onClick:()=>p(d.id,d.config.apiKey||""),className:"px-3 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-md)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:"Test"})]})]}),d.models.length>0&&i.jsxs("div",{className:"mt-3",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Available Models"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:d.models.map(c=>i.jsx("span",{className:"px-2 py-1 bg-[var(--bg-hover)] rounded text-[11px] text-[var(--text-secondary)]",children:c.name},c.id))})]})]},d.id))})]}),i.jsxs("section",{className:"p-4 bg-[rgba(104,144,244,0.1)] border border-[rgba(104,144,244,0.3)] rounded-[var(--radius-lg)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(af,{className:"w-4 h-4 text-[var(--info)]"}),i.jsx("h4",{className:"font-medium text-[var(--info)]",children:"Get Free API Keys"})]}),i.jsxs("div",{className:"text-[12px] text-[var(--text-muted)] space-y-1",children:[i.jsxs("p",{children:[i.jsx("strong",{children:"OpenRouter:"})," ",i.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"openrouter.ai"})," - No key needed for free models"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Ollama:"})," ",i.jsx("a",{href:"https://ollama.com",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"ollama.com"})," - Local models, no API key needed"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"NVIDIA NIM:"})," ",i.jsx("a",{href:"https://build.nvidia.com",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"build.nvidia.com"})," - Kimi K2.5, DeepSeek R1, Llama (40 req/min free)"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Groq:"})," ",i.jsx("a",{href:"https://console.groq.com",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"console.groq.com"})," - Fast inference, generous free tier"]})]})]})]}),o==="appearance"&&i.jsx("div",{className:"max-w-2xl space-y-6",children:i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"Appearance"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Theme"}),i.jsxs("select",{value:n.theme,onChange:d=>a({...n,theme:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:[i.jsx("option",{value:"dark",children:"Dark (Abyss Teal)"}),i.jsx("option",{value:"system",children:"System"})]})]}),i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Font Size"}),i.jsx("input",{type:"range",value:n.fontSize,onChange:d=>a({...n,fontSize:parseInt(d.target.value)}),className:"w-full accent-[var(--teal-500)]",min:10,max:20}),i.jsxs("span",{className:"text-[12px] text-[var(--text-muted)]",children:[n.fontSize,"px"]})]}),i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Font Family"}),i.jsx("input",{type:"text",value:n.fontFamily,onChange:d=>a({...n,fontFamily:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] focus:outline-none focus:border-[var(--teal-500)]"})]})]})]})}),o==="shortcuts"&&i.jsx("div",{className:"max-w-2xl",children:i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"Keyboard Shortcuts"}),i.jsx("div",{className:"space-y-2",children:Object.entries(n.shortcuts).map(([d,c])=>i.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("span",{className:"text-[12px] capitalize text-[var(--text-secondary)]",children:d.replace(/:/g," ")}),i.jsx("input",{type:"text",value:c,onChange:v=>a({...n,shortcuts:{...n.shortcuts,[d]:v.target.value}}),className:"px-3 py-1 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-sm)] text-[11px] font-[var(--font-mono)] text-[var(--teal-300)] w-32 focus:outline-none focus:border-[var(--teal-500)]"})]},d))})]})})]}),i.jsx("div",{className:"p-4 border-t border-[var(--border-subtle)] flex justify-end bg-[var(--bg-surface)]",children:i.jsxs("button",{onClick:m,className:"flex items-center gap-2 px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:[i.jsx(cv,{className:"w-4 h-4"}),"Save Settings"]})})]})},Nv=({rootPath:e,onFileSelect:t,selectedFile:r,fileFilter:n})=>{var C;const[a,l]=g.useState(null),[s,o]=g.useState(""),[u,f]=g.useState(!1),h=g.useCallback(async d=>{try{const c=await window.electronAPI.fs.readdir(d,{withFileTypes:!0}),v=[];for(const x of c){if(x.name.startsWith(".")&&x.name!==".git"||x.name==="node_modules"||x.name==="dist"||x.name==="build")continue;const k=`${d}/${x.name}`,j={name:x.name,path:k,type:x.isDirectory()?"directory":"file"};x.isDirectory()&&(j.children=[]),v.push(j)}return v.sort((x,k)=>x.type===k.type?x.name.localeCompare(k.name):x.type==="directory"?-1:1)}catch(c){return console.error("Failed to load directory:",c),[]}},[]),m=g.useCallback(async()=>{f(!0);const d={name:e.split("/").pop()||"root",path:e,type:"directory",expanded:!0,children:await h(e)};l(d),f(!1)},[e,h]);g.useEffect(()=>{m()},[m]);const p=async(d,c)=>{if(d.type!=="directory"){t(d.path);return}const v=(x,k)=>k.length===0?{...x,expanded:!x.expanded,children:x.expanded?x.children:void 0}:x.children?{...x,children:x.children.map(j=>j.name===k[0]?v(j,k.slice(1)):j)}:x;if(!d.children||d.children.length===0){const x=await h(d.path),k=(j,E)=>E.length===0?{...j,expanded:!0,children:x}:j.children?{...j,children:j.children.map(T=>T.name===E[0]?k(T,E.slice(1)):T)}:j;l(j=>j?k(j,[...c,d.name]):null)}else l(x=>x?v(x,[...c,d.name]):null)},b=(d,c)=>c?d.reduce((v,x)=>{const k=x.name.toLowerCase().includes(c.toLowerCase());if(x.type==="directory"&&x.children){const j=b(x.children,c);(k||j.length>0)&&v.push({...x,children:j,expanded:!0})}else k&&v.push(x);return v},[]):d,y=(d,c=0,v=[])=>{const x=r===d.path,k=c*16+8;return i.jsxs("div",{children:[i.jsxs("div",{onClick:()=>p(d,v),className:`flex items-center gap-1 py-1 px-2 cursor-pointer hover:bg-muted transition-colors ${x?"bg-primary/10 text-primary":""}`,style:{paddingLeft:`${k}px`},children:[d.type==="directory"&&i.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:d.expanded?i.jsx(Kh,{className:"w-3 h-3 text-muted-foreground"}):i.jsx(Jd,{className:"w-3 h-3 text-muted-foreground"})}),d.type==="directory"?i.jsx(rf,{className:`w-4 h-4 ${x?"text-primary":"text-blue-500"}`}):i.jsx(Jh,{className:`w-4 h-4 ${x?"text-primary":"text-muted-foreground"}`}),i.jsx("span",{className:"text-sm truncate",children:d.name})]}),d.type==="directory"&&d.expanded&&d.children&&i.jsx("div",{children:d.children.map(j=>y(j,c+1,[...v,d.name]))})]},d.path)},w=a&&s?{...a,children:b(a.children||[],s)}:a;return i.jsxs("div",{className:"flex flex-col h-full bg-card border-r border-border",children:[i.jsxs("div",{className:"p-3 border-b border-border",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx("span",{className:"font-medium text-sm",children:"Explorer"}),i.jsx("button",{onClick:m,className:"p-1.5 hover:bg-muted rounded-md",title:"Refresh",children:i.jsx(Hs,{className:`w-4 h-4 ${u?"animate-spin":""}`})})]}),i.jsxs("div",{className:"relative",children:[i.jsx(nf,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground"}),i.jsx("input",{type:"text",value:s,onChange:d=>o(d.target.value),placeholder:"Search files...",className:"w-full pl-8 pr-3 py-1.5 bg-background border border-input rounded-md text-sm"})]})]}),i.jsx("div",{className:"flex-1 overflow-auto py-2",children:w?y(w):i.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:u?"Loading...":"No files"})}),i.jsxs("div",{className:"px-3 py-2 border-t border-border text-xs text-muted-foreground",children:[((C=a==null?void 0:a.children)==null?void 0:C.length)||0," items"]})]})};function mu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Sv(e){if(Array.isArray(e))return e}function Cv(e,t,r){return(t=Lv(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ev(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,l,s,o=[],u=!0,f=!1;try{if(l=(r=r.call(e)).next,t!==0)for(;!(u=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);u=!0);}catch(h){f=!0,a=h}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw a}}return o}}function Pv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
289
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hu(Object(r),!0).forEach(function(n){Cv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mv(e,t){if(e==null)return{};var r,n,a=Av(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Av(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Iv(e,t){return Sv(e)||Ev(e,t)||Ov(e,t)||Pv()}function Tv(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lv(e){var t=Tv(e,"string");return typeof t=="symbol"?t:t+""}function Ov(e,t){if(e){if(typeof e=="string")return mu(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mu(e,t):void 0}}function Rv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gu(Object(r),!0).forEach(function(n){Rv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _v(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(a,l){return l(a)},n)}}function tn(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return a.length>=e.length?e.apply(this,a):function(){for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return t.apply(r,[].concat(a,o))}}}function Ya(e){return{}.toString.call(e).includes("Object")}function Fv(e){return!Object.keys(e).length}function Rn(e){return typeof e=="function"}function zv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Dv(e,t){return Ya(t)||Ft("changeType"),Object.keys(t).some(function(r){return!zv(e,r)})&&Ft("changeField"),t}function Wv(e){Rn(e)||Ft("selectorType")}function $v(e){Rn(e)||Ya(e)||Ft("handlerType"),Ya(e)&&Object.values(e).some(function(t){return!Rn(t)})&&Ft("handlersType")}function Uv(e){e||Ft("initialIsRequired"),Ya(e)||Ft("initialType"),Fv(e)&&Ft("initialContent")}function Bv(e,t){throw new Error(e[t]||e.default)}var Vv={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Ft=tn(Bv)(Vv),sa={changes:Dv,selector:Wv,handler:$v,initial:Uv};function Hv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};sa.initial(e),sa.handler(t);var r={current:e},n=tn(Kv)(r,t),a=tn(Yv)(r),l=tn(sa.changes)(e),s=tn(Qv)(r);function o(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(h){return h};return sa.selector(f),f(r.current)}function u(f){_v(n,a,l,s)(f)}return[o,u]}function Qv(e,t){return Rn(t)?t(e.current):t}function Yv(e,t){return e.current=xu(xu({},e.current),t),t}function Kv(e,t,r){return Rn(t)?t(e.current):Object.keys(r).forEach(function(n){var a;return(a=t[n])===null||a===void 0?void 0:a.call(t,e.current[n])}),r}var Gv={create:Hv},qv={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Xv(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return a.length>=e.length?e.apply(this,a):function(){for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return t.apply(r,[].concat(a,o))}}}function Zv(e){return{}.toString.call(e).includes("Object")}function Jv(e){return e||yu("configIsRequired"),Zv(e)||yu("configType"),e.urls?(eg(),{paths:{vs:e.urls.monacoBase}}):e}function eg(){console.warn(lf.deprecation)}function tg(e,t){throw new Error(e[t]||e.default)}var lf={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
290
|
+
You are using deprecated way of configuration.
|
|
291
|
+
|
|
292
|
+
Instead of using
|
|
293
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
294
|
+
use
|
|
295
|
+
monaco.config({ paths: { vs: '...' } })
|
|
296
|
+
|
|
297
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
298
|
+
`},yu=Xv(tg)(lf),rg={config:Jv},ng=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(a){return r.reduceRight(function(l,s){return s(l)},a)}};function sf(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],sf(e[r],t[r]))}),vu(vu({},e),t)}var ag={type:"cancelation",msg:"operation is manually canceled"};function Vl(e){var t=!1,r=new Promise(function(n,a){e.then(function(l){return t?a(ag):n(l)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var lg=["monaco"],ig=Gv.create({config:qv,isInitialized:!1,resolve:null,reject:null,monaco:null}),of=Iv(ig,2),Bn=of[0],hl=of[1];function sg(e){var t=rg.config(e),r=t.monaco,n=Mv(t,lg);hl(function(a){return{config:sf(a.config,n),monaco:r}})}function og(){var e=Bn(function(t){var r=t.monaco,n=t.isInitialized,a=t.resolve;return{monaco:r,isInitialized:n,resolve:a}});if(!e.isInitialized){if(hl({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Vl(Hl);if(window.monaco&&window.monaco.editor)return uf(window.monaco),e.resolve(window.monaco),Vl(Hl);ng(ug,dg)(fg)}return Vl(Hl)}function ug(e){return document.body.appendChild(e)}function cg(e){var t=document.createElement("script");return e&&(t.src=e),t}function dg(e){var t=Bn(function(n){var a=n.config,l=n.reject;return{config:a,reject:l}}),r=cg("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function fg(){var e=Bn(function(r){var n=r.config,a=r.resolve,l=r.reject;return{config:n,resolve:a,reject:l}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;uf(n),e.resolve(n)},function(r){e.reject(r)})}function uf(e){Bn().monaco||hl({monaco:e})}function pg(){return Bn(function(e){var t=e.monaco;return t})}var Hl=new Promise(function(e,t){return hl({resolve:e,reject:t})}),cf={config:sg,init:og,__getMonacoInstance:pg},mg={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Ql=mg,hg={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},vg=hg;function gg({children:e}){return pt.createElement("div",{style:vg.container},e)}var xg=gg,yg=xg;function wg({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:l,wrapperProps:s}){return pt.createElement("section",{style:{...Ql.wrapper,width:e,height:t},...s},!r&&pt.createElement(yg,null,n),pt.createElement("div",{ref:a,style:{...Ql.fullWidth,...!r&&Ql.hide},className:l}))}var bg=wg,df=g.memo(bg);function kg(e){g.useEffect(e,[])}var ff=kg;function jg(e,t,r=!0){let n=g.useRef(!0);g.useEffect(n.current||!r?()=>{n.current=!1}:e,t)}var Le=jg;function hn(){}function kr(e,t,r,n){return Ng(e,n)||Sg(e,t,r,n)}function Ng(e,t){return e.editor.getModel(pf(e,t))}function Sg(e,t,r,n){return e.editor.createModel(t,r,n?pf(e,n):void 0)}function pf(e,t){return e.Uri.parse(t)}function Cg({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:l,modifiedModelPath:s,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:u=!1,theme:f="light",loading:h="Loading...",options:m={},height:p="100%",width:b="100%",className:y,wrapperProps:w={},beforeMount:C=hn,onMount:d=hn}){let[c,v]=g.useState(!1),[x,k]=g.useState(!0),j=g.useRef(null),E=g.useRef(null),T=g.useRef(null),$=g.useRef(d),M=g.useRef(C),I=g.useRef(!1);ff(()=>{let L=cf.init();return L.then(F=>(E.current=F)&&k(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>j.current?R():L.cancel()}),Le(()=>{if(j.current&&E.current){let L=j.current.getOriginalEditor(),F=kr(E.current,e||"",n||r||"text",l||"");F!==L.getModel()&&L.setModel(F)}},[l],c),Le(()=>{if(j.current&&E.current){let L=j.current.getModifiedEditor(),F=kr(E.current,t||"",a||r||"text",s||"");F!==L.getModel()&&L.setModel(F)}},[s],c),Le(()=>{let L=j.current.getModifiedEditor();L.getOption(E.current.editor.EditorOption.readOnly)?L.setValue(t||""):t!==L.getValue()&&(L.executeEdits("",[{range:L.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),L.pushUndoStop())},[t],c),Le(()=>{var L,F;(F=(L=j.current)==null?void 0:L.getModel())==null||F.original.setValue(e||"")},[e],c),Le(()=>{let{original:L,modified:F}=j.current.getModel();E.current.editor.setModelLanguage(L,n||r||"text"),E.current.editor.setModelLanguage(F,a||r||"text")},[r,n,a],c),Le(()=>{var L;(L=E.current)==null||L.editor.setTheme(f)},[f],c),Le(()=>{var L;(L=j.current)==null||L.updateOptions(m)},[m],c);let W=g.useCallback(()=>{var X;if(!E.current)return;M.current(E.current);let L=kr(E.current,e||"",n||r||"text",l||""),F=kr(E.current,t||"",a||r||"text",s||"");(X=j.current)==null||X.setModel({original:L,modified:F})},[r,t,a,e,n,l,s]),A=g.useCallback(()=>{var L;!I.current&&T.current&&(j.current=E.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...m}),W(),(L=E.current)==null||L.editor.setTheme(f),v(!0),I.current=!0)},[m,f,W]);g.useEffect(()=>{c&&$.current(j.current,E.current)},[c]),g.useEffect(()=>{!x&&!c&&A()},[x,c,A]);function R(){var F,X,S,_;let L=(F=j.current)==null?void 0:F.getModel();o||((X=L==null?void 0:L.original)==null||X.dispose()),u||((S=L==null?void 0:L.modified)==null||S.dispose()),(_=j.current)==null||_.dispose()}return pt.createElement(df,{width:b,height:p,isEditorReady:c,loading:h,_ref:T,className:y,wrapperProps:w})}var Eg=Cg,Pg=g.memo(Eg);function Mg(e){let t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var Ag=Mg,oa=new Map;function Ig({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:l,theme:s="light",line:o,loading:u="Loading...",options:f={},overrideServices:h={},saveViewState:m=!0,keepCurrentModel:p=!1,width:b="100%",height:y="100%",className:w,wrapperProps:C={},beforeMount:d=hn,onMount:c=hn,onChange:v,onValidate:x=hn}){let[k,j]=g.useState(!1),[E,T]=g.useState(!0),$=g.useRef(null),M=g.useRef(null),I=g.useRef(null),W=g.useRef(c),A=g.useRef(d),R=g.useRef(),L=g.useRef(n),F=Ag(l),X=g.useRef(!1),S=g.useRef(!1);ff(()=>{let D=cf.init();return D.then(U=>($.current=U)&&T(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>M.current?B():D.cancel()}),Le(()=>{var U,oe,ke,De;let D=kr($.current,e||n||"",t||a||"",l||r||"");D!==((U=M.current)==null?void 0:U.getModel())&&(m&&oa.set(F,(oe=M.current)==null?void 0:oe.saveViewState()),(ke=M.current)==null||ke.setModel(D),m&&((De=M.current)==null||De.restoreViewState(oa.get(l))))},[l],k),Le(()=>{var D;(D=M.current)==null||D.updateOptions(f)},[f],k),Le(()=>{!M.current||n===void 0||(M.current.getOption($.current.editor.EditorOption.readOnly)?M.current.setValue(n):n!==M.current.getValue()&&(S.current=!0,M.current.executeEdits("",[{range:M.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),M.current.pushUndoStop(),S.current=!1))},[n],k),Le(()=>{var U,oe;let D=(U=M.current)==null?void 0:U.getModel();D&&a&&((oe=$.current)==null||oe.editor.setModelLanguage(D,a))},[a],k),Le(()=>{var D;o!==void 0&&((D=M.current)==null||D.revealLine(o))},[o],k),Le(()=>{var D;(D=$.current)==null||D.editor.setTheme(s)},[s],k);let _=g.useCallback(()=>{var D;if(!(!I.current||!$.current)&&!X.current){A.current($.current);let U=l||r,oe=kr($.current,n||e||"",t||a||"",U||"");M.current=(D=$.current)==null?void 0:D.editor.create(I.current,{model:oe,automaticLayout:!0,...f},h),m&&M.current.restoreViewState(oa.get(U)),$.current.editor.setTheme(s),o!==void 0&&M.current.revealLine(o),j(!0),X.current=!0}},[e,t,r,n,a,l,f,h,m,s,o]);g.useEffect(()=>{k&&W.current(M.current,$.current)},[k]),g.useEffect(()=>{!E&&!k&&_()},[E,k,_]),L.current=n,g.useEffect(()=>{var D,U;k&&v&&((D=R.current)==null||D.dispose(),R.current=(U=M.current)==null?void 0:U.onDidChangeModelContent(oe=>{S.current||v(M.current.getValue(),oe)}))},[k,v]),g.useEffect(()=>{if(k){let D=$.current.editor.onDidChangeMarkers(U=>{var ke;let oe=(ke=M.current.getModel())==null?void 0:ke.uri;if(oe&&U.find(De=>De.path===oe.path)){let De=$.current.editor.getModelMarkers({resource:oe});x==null||x(De)}});return()=>{D==null||D.dispose()}}return()=>{}},[k,x]);function B(){var D,U;(D=R.current)==null||D.dispose(),p?m&&oa.set(l,M.current.saveViewState()):(U=M.current.getModel())==null||U.dispose(),M.current.dispose()}return pt.createElement(df,{width:b,height:y,isEditorReady:k,loading:u,_ref:I,className:w,wrapperProps:C})}var Tg=Ig,Lg=g.memo(Tg),Og=Lg;function mf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=mf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rg(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=mf(e))&&(n&&(n+=" "),n+=t);return n}const wu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bu=Rg,_g=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return bu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:l}=t,s=Object.keys(a).map(f=>{const h=r==null?void 0:r[f],m=l==null?void 0:l[f];if(h===null)return null;const p=wu(h)||wu(m);return a[f][p]}),o=r&&Object.entries(r).reduce((f,h)=>{let[m,p]=h;return p===void 0||(f[m]=p),f},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,h)=>{let{class:m,className:p,...b}=h;return Object.entries(b).every(y=>{let[w,C]=y;return Array.isArray(C)?C.includes({...l,...o}[w]):{...l,...o}[w]===C})?[...f,m,p]:f},[]);return bu(e,s,u,r==null?void 0:r.class,r==null?void 0:r.className)},Fg=_g("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[var(--radius-sm)] font-medium transition-all duration-[180ms] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--teal-400)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg-void)] disabled:pointer-events-none disabled:opacity-50 cursor-pointer border-none",{variants:{variant:{primary:"bg-[var(--teal-500)] text-[var(--bg-void)] hover:bg-[var(--teal-400)] active:scale-[0.98] font-medium",secondary:"bg-transparent text-[var(--teal-400)] border border-[var(--border-accent)] hover:bg-[rgba(0,200,168,0.06)] active:scale-[0.98]",ghost:"bg-transparent text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] active:scale-[0.98]",danger:"bg-[rgba(232,90,106,0.1)] text-[var(--error)] border border-[rgba(232,90,106,0.2)] hover:bg-[rgba(232,90,106,0.15)]",outline:"bg-transparent text-[var(--text-secondary)] border border-[var(--border-default)] hover:border-[var(--border-accent)] hover:text-[var(--teal-400)]",icon:"bg-[var(--bg-elevated)] text-[var(--text-secondary)] border border-[var(--border-subtle)] hover:bg-[var(--bg-hover)] hover:text-[var(--teal-400)]"},size:{default:"h-10 px-4.5 py-2 text-[13px]",sm:"h-8 px-3 text-[11px] rounded-[var(--radius-sm)]",lg:"h-12 px-6 text-[14px]",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-2"}},defaultVariants:{variant:"primary",size:"default"}}),rn=pt.forwardRef(({className:e,variant:t,size:r,loading:n,children:a,disabled:l,ariaLabel:s,ariaDescribedBy:o,ariaExpanded:u,ariaPressed:f,...h},m)=>i.jsxs("button",{className:Fg({variant:t,size:r,className:e}),ref:m,disabled:l||n,"aria-label":s,"aria-describedby":o,"aria-expanded":u,"aria-pressed":f,...h,children:[n&&i.jsx(av,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),a]}));rn.displayName="Button";const zg=({value:e,language:t="javascript",theme:r="vs-dark",readOnly:n=!1,onChange:a,onSave:l,showLineNumbers:s=!0,wordWrap:o="on",fontSize:u=14,minimap:f=!0,lineNumbers:h="on",originalValue:m,diffEditor:p=!1,height:b="100%",dataTestid:y="code-editor"})=>{const w=g.useRef(null),C=g.useRef(null),d=g.useCallback((k,j)=>{w.current=k,C.current=j,j.languages.registerCompletionItemProvider(t,{provideCompletionItems:(E,T)=>{const $=E.getWordUntilPosition(T),M={startLineNumber:T.lineNumber,endLineNumber:T.lineNumber,startColumn:$.startColumn,endColumn:$.endColumn};return{suggestions:[{label:"console.log",kind:j.languages.CompletionItemKind.Function,insertText:"console.log(${1:message})",insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"const",kind:j.languages.CompletionItemKind.Keyword,insertText:"const ${1:name} = ${2:value}",insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"function",kind:j.languages.CompletionItemKind.Function,insertText:"function ${1:name}(${2:params}) {\n ${3:// body}\n}",insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"async",kind:j.languages.CompletionItemKind.Keyword,insertText:"async function ${1:name}(${2:params}) {\n ${3:// body}\n}",insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"class",kind:j.languages.CompletionItemKind.Class,insertText:`class \${1:Name} {
|
|
299
|
+
constructor(\${2:params}) {
|
|
300
|
+
\${3:// init}
|
|
301
|
+
}
|
|
302
|
+
}`,insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"interface",kind:j.languages.CompletionItemKind.Interface,insertText:"interface ${1:Name} {\n ${2:property}: ${3:type}\n}",insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"import",kind:j.languages.CompletionItemKind.Module,insertText:"import { ${1:module} } from '${2:path}'",insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"export",kind:j.languages.CompletionItemKind.Module,insertText:"export ${1:default} ${2:statement}",insertTextRules:j.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M}]}}}),k.addCommand(j.KeyMod.CtrlCmd|j.KeyCode.KeyS,()=>{l&&k.getValue()&&l(k.getValue())}),k.focus()},[t,l]),c=g.useCallback(()=>{navigator.clipboard.writeText(e)},[e]),v=g.useCallback(()=>{const k=new Blob([e],{type:"text/plain"}),j=URL.createObjectURL(k),E=document.createElement("a");E.href=j,E.download=`code.${t==="typescript"?"ts":t==="javascript"?"js":t==="python"?"py":"txt"}`,E.click(),URL.revokeObjectURL(j)},[e,t]),x=g.useCallback(()=>{var k;w.current&&((k=w.current.getAction("editor.action.formatDocument"))==null||k.run())},[]);return p&&m!==void 0?i.jsxs("div",{className:"flex flex-col h-full border border-border rounded-lg overflow-hidden","data-testid":y,children:[i.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-muted/50 border-b border-border",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[i.jsx("span",{children:"Diff Editor"}),i.jsx("span",{className:"px-2 py-0.5 bg-secondary rounded text-xs",children:t})]}),i.jsx("div",{className:"flex items-center gap-1",children:i.jsx(rn,{variant:"ghost",size:"sm",onClick:c,children:i.jsx(pu,{className:"w-4 h-4"})})})]}),i.jsx("div",{className:"flex-1",children:i.jsx(Pg,{height:"100%",language:t,theme:r,original:m,modified:e,options:{readOnly:n,renderSideBySide:!0,fontSize:u,minimap:{enabled:f},lineNumbers:"on",wordWrap:o,scrollBeyondLastLine:!1,automaticLayout:!0}})})]}):i.jsxs("div",{className:"flex flex-col h-full border border-border rounded-lg overflow-hidden","data-testid":y,children:[i.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-muted/50 border-b border-border",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[i.jsx("span",{children:t==="typescript"?"TypeScript":t==="javascript"?"JavaScript":t}),i.jsxs("span",{className:"px-2 py-0.5 bg-secondary rounded text-xs",children:[e.split(`
|
|
303
|
+
`).length," lines"]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(rn,{variant:"ghost",size:"sm",onClick:x,title:"Format code",children:i.jsx(Qs,{className:"w-4 h-4"})}),i.jsx(rn,{variant:"ghost",size:"sm",onClick:c,title:"Copy to clipboard",children:i.jsx(pu,{className:"w-4 h-4"})}),i.jsx(rn,{variant:"ghost",size:"sm",onClick:v,title:"Download file",children:i.jsx(tf,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"flex-1",style:{height:b},children:i.jsx(Og,{height:"100%",language:t,value:e,theme:r,onChange:a,onMount:d,options:{readOnly:n,fontSize:u,minimap:{enabled:f},lineNumbers:s?h:"off",wordWrap:o,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,insertSpaces:!0,folding:!0,foldingHighlight:!0,showFoldingControls:"always",bracketPairColorization:{enabled:!0},padding:{top:8,bottom:8},smoothScrolling:!0,cursorBlinking:"smooth",cursorSmoothCaretAnimation:"on",renderLineHighlight:"all",renderWhitespace:"selection",guides:{bracketPairs:!0,indentation:!0}},loading:i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx(Hs,{className:"w-6 h-6 animate-spin text-muted-foreground"})})})})]})},Dg=({children:e,direction:t="horizontal",defaultSplit:r=50,minSize:n=200})=>{const[a,l]=g.useState(r),[s,o]=g.useState(!1),u=g.useCallback(()=>{o(!0)},[]),f=g.useCallback(()=>{o(!1)},[]),h=g.useCallback(p=>{if(!s)return;const y=p.currentTarget.getBoundingClientRect();let w;t==="horizontal"?w=(p.clientX-y.left)/y.width*100:w=(p.clientY-y.top)/y.height*100;const C=n/(t==="horizontal"?y.width:y.height)*100;w=Math.max(C,Math.min(100-C,w)),l(w)},[s,t,n]),m=t==="horizontal";return i.jsxs("div",{className:`flex ${m?"flex-row":"flex-col"} w-full h-full`,onMouseMove:h,onMouseUp:f,onMouseLeave:f,children:[i.jsx("div",{className:"overflow-hidden",style:{[m?"width":"height"]:`${a}%`,[m?"height":"width"]:"100%"},children:e[0]}),i.jsx("div",{className:`${m?"w-1 cursor-col-resize":"h-1 cursor-row-resize"} bg-border hover:bg-primary transition-colors flex-shrink-0`,onMouseDown:u,style:{userSelect:"none"},children:i.jsx("div",{className:`${m?"w-full h-8":"h-full w-8"} mx-auto my-auto flex items-center justify-center`,children:i.jsx("div",{className:`${m?"w-0.5 h-4":"w-4 h-0.5"} bg-muted-foreground/30 rounded-full`})})}),i.jsx("div",{className:"overflow-hidden flex-1",style:{[m?"width":"height"]:`${100-a}%`},children:e[1]})]})},Wg=({rootPath:e="/"})=>{const[t,r]=g.useState(null),[n,a]=g.useState(""),[l,s]=g.useState("plaintext"),[o,u]=g.useState(!1),[f,h]=g.useState([]),[m,p]=g.useState(null),b=c=>{var k;const v=(k=c.split(".").pop())==null?void 0:k.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",html:"html",htm:"html",css:"css",scss:"scss",less:"less",md:"markdown",mdx:"markdown",py:"python",rs:"rust",go:"go",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",sql:"sql",yaml:"yaml",yml:"yaml",xml:"xml",sh:"shell",bash:"shell",zsh:"shell",dockerfile:"dockerfile",toml:"ini",ini:"ini"}[v||""]||"plaintext"},y=g.useCallback(async c=>{if(f.includes(c)){p(c);return}u(!0);try{const v=await window.electronAPI.fs.readFile(c);a(v),r(c),s(b(c)),h(x=>[...x,c]),p(c)}catch(v){console.error("Failed to read file:",v)}finally{u(!1)}},[f]),w=(c,v)=>{v==null||v.stopPropagation();const x=f.filter(k=>k!==c);h(x),m===c&&p(x[x.length-1]||null)},C=g.useCallback(async c=>{if(m)try{await window.electronAPI.fs.writeFile(m,c),a(c)}catch(v){console.error("Failed to save file:",v)}},[m]),d=c=>c.split("/").pop()||c;return i.jsxs("div",{className:"flex flex-col h-full",children:[f.length>0&&i.jsx("div",{className:"flex items-center bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] overflow-x-auto",children:f.map(c=>i.jsxs("div",{onClick:()=>p(c),className:`flex items-center gap-2 px-3 py-2 text-sm cursor-pointer border-r border-[var(--color-border)] min-w-0 ${m===c?"bg-[var(--color-bg-primary)] text-[var(--color-text-primary)]":"text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-tertiary)]"}`,children:[i.jsx(Vi,{className:"w-4 h-4 flex-shrink-0"}),i.jsx("span",{className:"truncate max-w-32",children:d(c)}),i.jsx("button",{onClick:v=>w(c,v),className:"ml-1 p-0.5 hover:bg-[var(--color-bg-tertiary)] rounded",children:i.jsx(Ys,{className:"w-3 h-3"})})]},c))}),i.jsx("div",{className:"flex-1 flex overflow-hidden",children:i.jsxs(Dg,{direction:"horizontal",defaultRatio:.2,minSize:150,maxSize:400,children:[i.jsx("div",{className:"h-full overflow-hidden",children:i.jsx(Nv,{rootPath:e,onFileSelect:y,selectedFile:t||void 0})}),i.jsx("div",{className:"h-full overflow-hidden bg-[var(--color-bg-primary)]",children:m?i.jsx(zg,{value:n,language:l,onChange:c=>a(c||""),onSave:C,height:"100%",dataTestid:"code-workspace-editor"}):i.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:i.jsxs("div",{className:"text-center",children:[i.jsx(Vi,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),i.jsx("p",{children:"Select a file to edit"}),i.jsx("p",{className:"text-sm mt-2",children:"Or use the file explorer to browse"})]})})})]})}),i.jsxs("div",{className:"flex items-center justify-between px-3 py-1 bg-[var(--color-bg-secondary)] border-t border-[var(--color-border)] text-xs text-[var(--color-text-secondary)]",children:[i.jsx("div",{className:"flex items-center gap-4",children:m&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:d(m)}),i.jsx("span",{children:l}),i.jsxs("span",{children:[n.split(`
|
|
304
|
+
`).length," lines"]})]})}),i.jsx("div",{children:o&&i.jsx("span",{className:"text-[var(--color-accent)]",children:"Loading..."})})]})]})};function tt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ar(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const hf=6048e5,$g=864e5;let Ug={};function vl(){return Ug}function _n(e,t){var o,u,f,h;const r=vl(),n=(t==null?void 0:t.weekStartsOn)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=tt(e),l=a.getDay(),s=(l<n?7:0)+l-n;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Ka(e){return _n(e,{weekStartsOn:1})}function vf(e){const t=tt(e),r=t.getFullYear(),n=ar(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=Ka(n),l=ar(e,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const s=Ka(l);return t.getTime()>=a.getTime()?r+1:t.getTime()>=s.getTime()?r:r-1}function ku(e){const t=tt(e);return t.setHours(0,0,0,0),t}function ju(e){const t=tt(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Bg(e,t){const r=ku(e),n=ku(t),a=+r-ju(r),l=+n-ju(n);return Math.round((a-l)/$g)}function Vg(e){const t=vf(e),r=ar(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Ka(r)}function Hg(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Qg(e){if(!Hg(e)&&typeof e!="number")return!1;const t=tt(e);return!isNaN(Number(t))}function Yg(e){const t=tt(e),r=ar(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Kg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gg=(e,t,r)=>{let n;const a=Kg[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Yl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const qg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Xg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jg={date:Yl({formats:qg,defaultWidth:"full"}),time:Yl({formats:Xg,defaultWidth:"full"}),dateTime:Yl({formats:Zg,defaultWidth:"full"})},ex={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tx=(e,t,r,n)=>ex[e];function Gr(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):s;a=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[o]||e.values[s]}const l=e.argumentCallback?e.argumentCallback(t):t;return a[l]}}const rx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ax={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},lx={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ix={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ox=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},ux={ordinalNumber:ox,era:Gr({values:rx,defaultWidth:"wide"}),quarter:Gr({values:nx,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gr({values:ax,defaultWidth:"wide"}),day:Gr({values:lx,defaultWidth:"wide"}),dayPeriod:Gr({values:ix,defaultWidth:"wide",formattingValues:sx,defaultFormattingWidth:"wide"})};function qr(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=t.match(a);if(!l)return null;const s=l[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(o)?dx(o,m=>m.test(s)):cx(o,m=>m.test(s));let f;f=e.valueCallback?e.valueCallback(u):u,f=r.valueCallback?r.valueCallback(f):f;const h=t.slice(s.length);return{value:f,rest:h}}}function cx(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function dx(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function fx(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],l=t.match(e.parsePattern);if(!l)return null;let s=e.valueCallback?e.valueCallback(l[0]):l[0];s=r.valueCallback?r.valueCallback(s):s;const o=t.slice(a.length);return{value:s,rest:o}}}const px=/^(\d+)(th|st|nd|rd)?/i,mx=/\d+/i,hx={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},vx={any:[/^b/i,/^(a|c)/i]},gx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xx={any:[/1/i,/2/i,/3/i,/4/i]},yx={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},wx={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bx={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},kx={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jx={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Nx={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Sx={ordinalNumber:fx({matchPattern:px,parsePattern:mx,valueCallback:e=>parseInt(e,10)}),era:qr({matchPatterns:hx,defaultMatchWidth:"wide",parsePatterns:vx,defaultParseWidth:"any"}),quarter:qr({matchPatterns:gx,defaultMatchWidth:"wide",parsePatterns:xx,defaultParseWidth:"any",valueCallback:e=>e+1}),month:qr({matchPatterns:yx,defaultMatchWidth:"wide",parsePatterns:wx,defaultParseWidth:"any"}),day:qr({matchPatterns:bx,defaultMatchWidth:"wide",parsePatterns:kx,defaultParseWidth:"any"}),dayPeriod:qr({matchPatterns:jx,defaultMatchWidth:"any",parsePatterns:Nx,defaultParseWidth:"any"})},Cx={code:"en-US",formatDistance:Gg,formatLong:Jg,formatRelative:tx,localize:ux,match:Sx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ex(e){const t=tt(e);return Bg(t,Yg(t))+1}function Px(e){const t=tt(e),r=+Ka(t)-+Vg(t);return Math.round(r/hf)+1}function gf(e,t){var h,m,p,b;const r=tt(e),n=r.getFullYear(),a=vl(),l=(t==null?void 0:t.firstWeekContainsDate)??((m=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((b=(p=a.locale)==null?void 0:p.options)==null?void 0:b.firstWeekContainsDate)??1,s=ar(e,0);s.setFullYear(n+1,0,l),s.setHours(0,0,0,0);const o=_n(s,t),u=ar(e,0);u.setFullYear(n,0,l),u.setHours(0,0,0,0);const f=_n(u,t);return r.getTime()>=o.getTime()?n+1:r.getTime()>=f.getTime()?n:n-1}function Mx(e,t){var o,u,f,h;const r=vl(),n=(t==null?void 0:t.firstWeekContainsDate)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,a=gf(e,t),l=ar(e,0);return l.setFullYear(a,0,n),l.setHours(0,0,0,0),_n(l,t)}function Ax(e,t){const r=tt(e),n=+_n(r,t)-+Mx(r,t);return Math.round(n/hf)+1}function G(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const bt={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return G(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):G(r+1,2)},d(e,t){return G(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return G(e.getHours()%12||12,t.length)},H(e,t){return G(e.getHours(),t.length)},m(e,t){return G(e.getMinutes(),t.length)},s(e,t){return G(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return G(a,t.length)}},or={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Nu={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return bt.y(e,t)},Y:function(e,t,r,n){const a=gf(e,n),l=a>0?a:1-a;if(t==="YY"){const s=l%100;return G(s,2)}return t==="Yo"?r.ordinalNumber(l,{unit:"year"}):G(l,t.length)},R:function(e,t){const r=vf(e);return G(r,t.length)},u:function(e,t){const r=e.getFullYear();return G(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return G(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return G(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return bt.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return G(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Ax(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):G(a,t.length)},I:function(e,t,r){const n=Px(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):G(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):bt.d(e,t)},D:function(e,t,r){const n=Ex(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):G(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),l=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return G(l,2);case"eo":return r.ordinalNumber(l,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),l=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return G(l,t.length);case"co":return r.ordinalNumber(l,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return G(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=or.noon:n===0?a=or.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=or.evening:n>=12?a=or.afternoon:n>=4?a=or.morning:a=or.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return bt.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):bt.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):G(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):G(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):bt.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):bt.s(e,t)},S:function(e,t){return bt.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Cu(n);case"XXXX":case"XX":return Qt(n);case"XXXXX":case"XXX":default:return Qt(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Cu(n);case"xxxx":case"xx":return Qt(n);case"xxxxx":case"xxx":default:return Qt(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Su(n,":");case"OOOO":default:return"GMT"+Qt(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Su(n,":");case"zzzz":default:return"GMT"+Qt(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return G(n,t.length)},T:function(e,t,r){const n=e.getTime();return G(n,t.length)}};function Su(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),l=n%60;return l===0?r+String(a):r+String(a)+t+G(l,2)}function Cu(e,t){return e%60===0?(e>0?"-":"+")+G(Math.abs(e)/60,2):Qt(e,t)}function Qt(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=G(Math.trunc(n/60),2),l=G(n%60,2);return r+a+t+l}const Eu=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},xf=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ix=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Eu(e,t);let l;switch(n){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;case"PPPP":default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",Eu(n,t)).replace("{{time}}",xf(a,t))},Tx={p:xf,P:Ix},Lx=/^D+$/,Ox=/^Y+$/,Rx=["D","DD","YY","YYYY"];function _x(e){return Lx.test(e)}function Fx(e){return Ox.test(e)}function zx(e,t,r){const n=Dx(e,t,r);if(console.warn(n),Rx.includes(e))throw new RangeError(n)}function Dx(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Wx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ux=/^'([^]*?)'?$/,Bx=/''/g,Vx=/[a-zA-Z]/;function Hx(e,t,r){var h,m,p,b;const n=vl(),a=n.locale??Cx,l=n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,s=n.weekStartsOn??((b=(p=n.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0,o=tt(e);if(!Qg(o))throw new RangeError("Invalid time value");let u=t.match($x).map(y=>{const w=y[0];if(w==="p"||w==="P"){const C=Tx[w];return C(y,a.formatLong)}return y}).join("").match(Wx).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const w=y[0];if(w==="'")return{isToken:!1,value:Qx(y)};if(Nu[w])return{isToken:!0,value:y};if(w.match(Vx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(u=a.localize.preprocessor(o,u));const f={firstWeekContainsDate:l,weekStartsOn:s,locale:a};return u.map(y=>{if(!y.isToken)return y.value;const w=y.value;(Fx(w)||_x(w))&&zx(w,t,String(e));const C=Nu[w[0]];return C(o,w,a.localize,f)}).join("")}function Qx(e){const t=e.match(Ux);return t?t[1].replace(Bx,"'"):e}const Yx=()=>{const[e,t]=g.useState([]),[r,n]=g.useState(!1),[a,l]=g.useState(""),[s,o]=g.useState(null),u=async()=>{n(!0);try{const p=await window.electronAPI.audit.recent(100);t(p)}catch(p){console.error("Failed to load audit events:",p)}finally{n(!1)}};g.useEffect(()=>{u()},[]);const f=a?e.filter(p=>p.action.toLowerCase().includes(a.toLowerCase())):e,h=async()=>{var p,b;try{const y=await((b=(p=window.electronAPI.dialog).selectFile)==null?void 0:b.call(p,[{name:"JSON",extensions:["json"]}]));y&&(await window.electronAPI.audit.export(y),await window.electronAPI.notification.show({title:"Audit log exported",body:`Exported to ${y}`}))}catch(y){console.error("Export failed:",y)}},m=p=>p.includes("created")?"bg-green-500/10 text-green-500":p.includes("deleted")?"bg-red-500/10 text-red-500":p.includes("applied")||p.includes("restored")?"bg-blue-500/10 text-blue-500":p.includes("failed")?"bg-orange-500/10 text-orange-500":"bg-gray-500/10 text-gray-500";return i.jsxs("div",{className:"h-full flex flex-col bg-card",children:[i.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between bg-background/50",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Hi,{className:"w-5 h-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-medium",children:"Audit Trail"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Session activity log"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:u,disabled:r,className:"p-2 hover:bg-muted rounded-md disabled:opacity-50",title:"Refresh",children:i.jsx(Hs,{className:`w-4 h-4 ${r?"animate-spin":""}`})}),i.jsx("button",{onClick:h,className:"p-2 hover:bg-muted rounded-md",title:"Export logs",children:i.jsx(tf,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"p-3 border-b border-border",children:i.jsxs("div",{className:"relative",children:[i.jsx(ev,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),i.jsx("input",{type:"text",value:a,onChange:p=>l(p.target.value),placeholder:"Filter by action...",className:"w-full pl-9 pr-3 py-2 bg-background border border-input rounded-md text-sm"})]})}),i.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:f.length===0?i.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[i.jsx(Hi,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),i.jsx("p",{className:"text-sm",children:"No audit events"})]}):f.map(p=>i.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[i.jsxs("button",{onClick:()=>o(s===p.id?null:p.id),className:"w-full px-3 py-2 flex items-center gap-3 hover:bg-muted/50 transition-colors text-left",children:[i.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${m(p.action)}`,children:p.action}),i.jsx("span",{className:"text-xs text-muted-foreground flex-1",children:Hx(new Date(p.timestamp),"MMM d, HH:mm:ss")}),i.jsx("span",{className:"text-xs text-muted-foreground",children:s===p.id?"−":"+"})]}),s===p.id&&i.jsx("div",{className:"px-3 py-2 bg-muted/30 border-t border-border",children:i.jsx("pre",{className:"text-xs font-mono text-muted-foreground overflow-x-auto",children:JSON.stringify(p.details,null,2)})})]},p.id))}),i.jsxs("div",{className:"px-4 py-2 border-t border-border text-xs text-muted-foreground",children:["Showing ",f.length," of ",e.length," events"]})]})},Kx=[{id:"meta-llama/llama-3.3-70b-instruct:free",name:"Llama 3.3 70B",backend:"openrouter"},{id:"deepseek/deepseek-r1-0528:free",name:"DeepSeek R1",backend:"openrouter"},{id:"mistralai/mistral-small-3.1-24b-instruct:free",name:"Mistral Small 3.1",backend:"openrouter"}],Gx=({agents:e,providers:t,skills:r,onCreateAgent:n})=>{const[a,l]=g.useState(""),[s,o]=g.useState("Cowork"),[u]=g.useState(Kx[0].id),f=g.useRef(null),h=[{icon:ef,text:"Optimize my workflow"},{icon:pn,text:"Organize my files"},{icon:mn,text:"Find insights in data"},{icon:Qa,text:"Build an automation"}],m=[{name:"Project Constitution v4",lines:491,type:"TEXT"},{name:"Task Breakdown",lines:566,type:"TEXT"},{name:"Implementation Plan",lines:390,type:"TEXT"}],p=async()=>{if(a.trim())try{const y=await n({name:"Quick Chat",projectPath:process.cwd(),providerId:"free",model:u,skills:[]});await window.electronAPI.agent.sendMessage(y.id,a),l("")}catch(y){console.error("Failed to send message:",y)}},b=y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),p())};return i.jsxs("div",{className:"h-full flex relative",children:[i.jsx("div",{className:"absolute inset-0 pointer-events-none z-0",style:{backgroundImage:"radial-gradient(circle, rgba(0,200,168,0.04) 1px, transparent 1px)",backgroundSize:"22px 22px"}}),i.jsx("div",{className:"absolute w-[600px] h-[400px] -top-[120px] -right-[100px] pointer-events-none z-0",style:{background:"radial-gradient(ellipse, rgba(0,200,168,0.09) 0%, transparent 65%)"}}),i.jsx("div",{className:"absolute w-[300px] h-[300px] -bottom-[80px] -left-[60px] pointer-events-none z-0",style:{background:"radial-gradient(circle, rgba(0,150,130,0.06) 0%, transparent 70%)"}}),i.jsxs("div",{className:"flex-1 flex flex-col z-10",children:[i.jsx("div",{className:"h-12 border-b border-[var(--border-subtle)] flex items-center px-5 gap-1",children:i.jsx("div",{className:"flex gap-0.5 bg-[var(--bg-elevated)] p-[3px] rounded-lg",children:["Chat","Cowork","Code"].map(y=>i.jsx("button",{onClick:()=>o(y),className:`px-4 py-1.5 rounded-md text-xs font-medium transition-all ${s===y?"bg-[var(--bg-card)] text-[var(--text-primary)] shadow-[0_1px_4px_rgba(0,0,0,0.4)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:y},y))})}),i.jsxs("div",{className:"flex-1 p-7 flex flex-col gap-5 overflow-hidden",children:[i.jsxs("h1",{className:"text-[22px] leading-tight tracking-[-0.01em] text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:["Let's knock something",i.jsx("br",{}),"off your list"]}),i.jsx("div",{className:"grid grid-cols-2 gap-2.5 flex-1",children:h.map((y,w)=>{const C=y.icon;return i.jsxs("button",{onClick:()=>l(y.text),className:"flex items-center gap-2.5 px-4 py-3.5 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-left hover:border-[var(--border-accent)] transition-colors group",children:[i.jsx("div",{className:"w-7 h-7 rounded-md bg-[rgba(0,200,168,0.08)] border border-[rgba(0,200,168,0.12)] flex items-center justify-center flex-shrink-0",children:i.jsx(C,{className:"w-3.5 h-3.5 text-[var(--teal-400)]"})}),i.jsx("span",{className:"text-[12px] text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors",children:y.text})]},w)})}),i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-default)] rounded-[var(--radius-lg)] px-3.5 py-3 flex gap-2.5 items-center",children:[i.jsx("textarea",{ref:f,value:a,onChange:y=>l(y.target.value),onKeyDown:b,placeholder:"How can I help you today?",className:"flex-1 bg-transparent border-none outline-none text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] resize-none leading-normal",rows:1}),i.jsx("button",{onClick:p,disabled:!a.trim(),className:"w-7 h-7 rounded-[7px] bg-[var(--teal-500)] flex items-center justify-center disabled:opacity-50 hover:bg-[var(--teal-400)] transition-colors flex-shrink-0",children:i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"var(--bg-void)",children:i.jsx("path",{d:"M1 6l9-4-3.5 4L10 10 1 6z"})})})]})]})]}),i.jsxs("div",{className:"w-60 bg-[var(--bg-surface)] border-l border-[var(--border-subtle)] p-4 flex flex-col gap-3 z-10 flex-shrink-0",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] font-medium tracking-[0.12em] uppercase text-[var(--text-muted)] mb-1",children:"Memory"}),i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] px-3 py-2.5 text-[11px] text-[var(--text-secondary)] leading-relaxed",children:["Purpose & context",i.jsx("small",{className:"block text-[var(--text-muted)] text-[10px] mt-0.5",children:"Only you · Updated 14 days ago"})]})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] font-medium tracking-[0.12em] uppercase text-[var(--text-muted)] mb-1",children:"Files"}),i.jsx("div",{className:"flex flex-col gap-2",children:m.map((y,w)=>i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] px-3 py-2.5 text-[11px] text-[var(--text-secondary)] leading-relaxed",children:[y.name,i.jsxs("small",{className:"block text-[var(--text-muted)] text-[10px] mt-0.5",children:[y.lines," lines · ",y.type]})]},w))})]}),i.jsxs("div",{className:"mt-auto",children:[i.jsx("div",{className:"h-1 bg-[var(--bg-hover)] rounded overflow-hidden",children:i.jsx("div",{className:"h-full rounded bg-gradient-to-r from-[var(--teal-700)] to-[var(--teal-400)]",style:{width:"2%"}})}),i.jsx("div",{className:"text-[9px] text-[var(--text-muted)] mt-1.5",children:"2% of project capacity"})]})]})]})},qx={app:{name:"Codex Linux",loading:"Loading Codex...",offline:"You are offline",online:"Back online"},sidebar:{agents:"Agents",worktrees:"Worktrees",skills:"Skills",automations:"Automations",settings:"Settings"},agents:{title:"Agents",description:"Manage your AI coding agents",create:"New Agent",delete:"Delete Agent",start:"Start",stop:"Stop",running:"running",idle:"idle",error:"error",name:"Agent Name",model:"Model",skills:"Skills",worktree:"Worktree",status:"Status",lastActivity:"Last Activity",noAgents:"No agents yet",createFirst:"Create your first agent to get started"},worktrees:{title:"Worktrees",description:"Isolated Git workspaces",create:"New Worktree",delete:"Delete Worktree",name:"Worktree Name",branch:"Branch",path:"Path",noWorktrees:"No worktrees yet"},skills:{title:"Skills",description:"Reusable AI capabilities",create:"New Skill",delete:"Delete Skill",name:"Skill Name",description_label:"Description",instructions:"Instructions",tags:"Tags",noSkills:"No skills yet",builtIn:"Built-in",custom:"Custom"},automations:{title:"Automations",description:"Scheduled tasks and workflows",create:"New Automation",delete:"Delete Automation",run:"Run Now",pause:"Pause",resume:"Resume",name:"Automation Name",schedule:"Schedule",command:"Command",trigger:"Trigger",lastRun:"Last Run",nextRun:"Next Run",noAutomations:"No automations yet",cron:"Cron Expression",manual:"Manual",interval:"Interval"},settings:{title:"Settings",description:"Configure your preferences",general:"General",appearance:"Appearance",api:"API Keys",security:"Security",language:"Language",theme:"Theme",dark:"Dark",light:"Light",system:"System",openai:"OpenAI API Key",anthropic:"Anthropic API Key",github:"GitHub Token",database:"Database",backup:"Backup",restore:"Restore",export:"Export",import:"Import",clear:"Clear Data",save:"Save",cancel:"Cancel",reset:"Reset to Defaults"},chat:{placeholder:"Type your message...",send:"Send",thinking:"Thinking...",error:"Error sending message",copy:"Copy",edit:"Edit",delete:"Delete",regenerate:"Regenerate"},terminal:{title:"Terminal",newTab:"New Tab",closeTab:"Close Tab",clear:"Clear",copy:"Copy",paste:"Paste"},fileExplorer:{title:"Files",openFile:"Open File",newFile:"New File",newFolder:"New Folder",rename:"Rename",delete:"Delete",refresh:"Refresh"},common:{save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",create:"Create",close:"Close",confirm:"Confirm",search:"Search",loading:"Loading...",error:"Error",success:"Success",warning:"Warning",info:"Info",yes:"Yes",no:"No",ok:"OK",back:"Back",next:"Next",previous:"Previous",refresh:"Refresh",export:"Export",import:"Import"},errors:{generic:"An error occurred",network:"Network error",notFound:"Not found",unauthorized:"Unauthorized",forbidden:"Forbidden",validation:"Validation error",serverError:"Server error"}},Xx={app:{name:"Codex Linux",loading:"Chargement de Codex...",offline:"Vous êtes hors ligne",online:"De retour en ligne"},sidebar:{agents:"Agents",worktrees:"Arborescences",skills:"Compétences",automations:"Automatisations",settings:"Paramètres"},agents:{title:"Agents",description:"Gérez vos agents de codage IA",create:"Nouvel Agent",delete:"Supprimer Agent",start:"Démarrer",stop:"Arrêter",running:"en cours",idle:"inactif",error:"erreur",name:"Nom de l'agent",model:"Modèle",skills:"Compétences",worktree:"Arborescence",status:"Statut",lastActivity:"Dernière activité",noAgents:"Aucun agent",createFirst:"Créez votre premier agent pour commencer"},worktrees:{title:"Arborescences",description:"Espaces de travail Git isolés",create:"Nouvelle Arborescence",delete:"Supprimer Arborescence",name:"Nom de l'arborescence",branch:"Branche",path:"Chemin",noWorktrees:"Aucune arborescence"},skills:{title:"Compétences",description:"Capacités IA réutilisables",create:"Nouvelle Compétence",delete:"Supprimer Compétence",name:"Nom de la compétence",description_label:"Description",instructions:"Instructions",tags:"Tags",noSkills:"Aucune compétence",builtIn:"Intégré",custom:"Personnalisé"},automations:{title:"Automatisations",description:"Tâches et flux de travail planifiés",create:"Nouvelle Automatisation",delete:"Supprimer Automatisation",run:"Exécuter",pause:"Pause",resume:"Reprendre",name:"Nom de l'automatisation",schedule:"Planification",command:"Commande",trigger:"Déclencheur",lastRun:"Dernière exécution",nextRun:"Prochaine exécution",noAutomations:"Aucune automatisation",cron:"Expression Cron",manual:"Manuel",interval:"Intervalle"},settings:{title:"Paramètres",description:"Configurez vos préférences",general:"Général",appearance:"Apparence",api:"Clés API",security:"Sécurité",language:"Langue",theme:"Thème",dark:"Sombre",light:"Clair",system:"Système",openai:"Clé API OpenAI",anthropic:"Clé API Anthropic",github:"Token GitHub",database:"Base de données",backup:"Sauvegarde",restore:"Restaurer",export:"Exporter",import:"Importer",clear:"Effacer les données",save:"Enregistrer",cancel:"Annuler",reset:"Réinitialiser"},chat:{placeholder:"Tapez votre message...",send:"Envoyer",thinking:"Réflexion...",error:"Erreur d'envoi du message",copy:"Copier",edit:"Modifier",delete:"Supprimer",regenerate:"Régénérer"},terminal:{title:"Terminal",newTab:"Nouvel onglet",closeTab:"Fermer l'onglet",clear:"Effacer",copy:"Copier",paste:"Coller"},fileExplorer:{title:"Fichiers",openFile:"Ouvrir le fichier",newFile:"Nouveau fichier",newFolder:"Nouveau dossier",rename:"Renommer",delete:"Supprimer",refresh:"Actualiser"},common:{save:"Enregistrer",cancel:"Annuler",delete:"Supprimer",edit:"Modifier",create:"Créer",close:"Fermer",confirm:"Confirmer",search:"Rechercher",loading:"Chargement...",error:"Erreur",success:"Succès",warning:"Avertissement",info:"Info",yes:"Oui",no:"Non",ok:"OK",back:"Retour",next:"Suivant",previous:"Précédent",refresh:"Actualiser",export:"Exporter",import:"Importer"},errors:{generic:"Une erreur est survenue",network:"Erreur réseau",notFound:"Non trouvé",unauthorized:"Non autorisé",forbidden:"Interdit",validation:"Erreur de validation",serverError:"Erreur serveur"}},Zx={app:{name:"Codex Linux",loading:"Cargando Codex...",offline:"Estás desconectado",online:"De nuevo en línea"},sidebar:{agents:"Agentes",worktrees:"Árboles de trabajo",skills:"Habilidades",automations:"Automatizaciones",settings:"Configuración"},agents:{title:"Agentes",description:"Gestiona tus agentes de codificación IA",create:"Nuevo Agente",delete:"Eliminar Agente",start:"Iniciar",stop:"Detener",running:"ejecutando",idle:"inactivo",error:"error",name:"Nombre del agente",model:"Modelo",skills:"Habilidades",worktree:"Árbol de trabajo",status:"Estado",lastActivity:"Última actividad",noAgents:"Sin agentes",createFirst:"Crea tu primer agente para comenzar"},worktrees:{title:"Árboles de trabajo",description:"Espacios de trabajo Git aislados",create:"Nuevo Árbol",delete:"Eliminar Árbol",name:"Nombre del árbol",branch:"Rama",path:"Ruta",noWorktrees:"Sin árboles de trabajo"},skills:{title:"Habilidades",description:"Capacidades IA reutilizables",create:"Nueva Habilidad",delete:"Eliminar Habilidad",name:"Nombre de habilidad",description_label:"Descripción",instructions:"Instrucciones",tags:"Etiquetas",noSkills:"Sin habilidades",builtIn:"Integrado",custom:"Personalizado"},automations:{title:"Automatizaciones",description:"Tareas y flujos de trabajo programados",create:"Nueva Automatización",delete:"Eliminar Automatización",run:"Ejecutar",pause:"Pausar",resume:"Reanudar",name:"Nombre de automatización",schedule:"Programación",command:"Comando",trigger:"Disparador",lastRun:"Última ejecución",nextRun:"Próxima ejecución",noAutomations:"Sin automatizaciones",cron:"Expresión Cron",manual:"Manual",interval:"Intervalo"},settings:{title:"Configuración",description:"Configura tus preferencias",general:"General",appearance:"Apariencia",api:"Claves API",security:"Seguridad",language:"Idioma",theme:"Tema",dark:"Oscuro",light:"Claro",system:"Sistema",openai:"Clave API OpenAI",anthropic:"Clave API Anthropic",github:"Token GitHub",database:"Base de datos",backup:"Copia de seguridad",restore:"Restaurar",export:"Exportar",import:"Importar",clear:"Borrar datos",save:"Guardar",cancel:"Cancelar",reset:"Restablecer"},chat:{placeholder:"Escribe tu mensaje...",send:"Enviar",thinking:"Pensando...",error:"Error al enviar mensaje",copy:"Copiar",edit:"Editar",delete:"Eliminar",regenerate:"Regenerar"},terminal:{title:"Terminal",newTab:"Nueva pestaña",closeTab:"Cerrar pestaña",clear:"Limpiar",copy:"Copiar",paste:"Pegar"},fileExplorer:{title:"Archivos",openFile:"Abrir archivo",newFile:"Nuevo archivo",newFolder:"Nueva carpeta",rename:"Renombrar",delete:"Eliminar",refresh:"Actualizar"},common:{save:"Guardar",cancel:"Cancelar",delete:"Eliminar",edit:"Editar",create:"Crear",close:"Cerrar",confirm:"Confirmar",search:"Buscar",loading:"Cargando...",error:"Error",success:"Éxito",warning:"Advertencia",info:"Info",yes:"Sí",no:"No",ok:"OK",back:"Atrás",next:"Siguiente",previous:"Anterior",refresh:"Actualizar",export:"Exportar",import:"Importar"},errors:{generic:"Ha ocurrido un error",network:"Error de red",notFound:"No encontrado",unauthorized:"No autorizado",forbidden:"Prohibido",validation:"Error de validación",serverError:"Error del servidor"}},Jx={app:{name:"Codex Linux",loading:"Codex wird geladen...",offline:"Sie sind offline",online:"Wieder online"},sidebar:{agents:"Agenten",worktrees:"Arbeitsbäume",skills:"Fähigkeiten",automations:"Automatisierungen",settings:"Einstellungen"},agents:{title:"Agenten",description:"Verwalten Sie Ihre KI-Codierungsagenten",create:"Neuer Agent",delete:"Agent löschen",start:"Starten",stop:"Stoppen",running:"läuft",idle:"inaktiv",error:"Fehler",name:"Agentenname",model:"Modell",skills:"Fähigkeiten",worktree:"Arbeitsbaum",status:"Status",lastActivity:"Letzte Aktivität",noAgents:"Keine Agenten",createFirst:"Erstellen Sie Ihren ersten Agenten"},worktrees:{title:"Arbeitsbäume",description:"Isolierte Git-Arbeitsbereiche",create:"Neuer Arbeitsbaum",delete:"Arbeitsbaum löschen",name:"Arbeitsbaumname",branch:"Branch",path:"Pfad",noWorktrees:"Keine Arbeitsbäume"},skills:{title:"Fähigkeiten",description:"Wiederverwendbare KI-Fähigkeiten",create:"Neue Fähigkeit",delete:"Fähigkeit löschen",name:"Fähigkeitsname",description_label:"Beschreibung",instructions:"Anweisungen",tags:"Tags",noSkills:"Keine Fähigkeiten",builtIn:"Eingebaut",custom:"Benutzerdefiniert"},automations:{title:"Automatisierungen",description:"Geplante Aufgaben und Workflows",create:"Neue Automatisierung",delete:"Automatisierung löschen",run:"Jetzt ausführen",pause:"Pausieren",resume:"Fortsetzen",name:"Automatisierungsname",schedule:"Zeitplan",command:"Befehl",trigger:"Auslöser",lastRun:"Letzte Ausführung",nextRun:"Nächste Ausführung",noAutomations:"Keine Automatisierungen",cron:"Cron-Ausdruck",manual:"Manuell",interval:"Intervall"},settings:{title:"Einstellungen",description:"Konfigurieren Sie Ihre Präferenzen",general:"Allgemein",appearance:"Erscheinungsbild",api:"API-Schlüssel",security:"Sicherheit",language:"Sprache",theme:"Thema",dark:"Dunkel",light:"Hell",system:"System",openai:"OpenAI API-Schlüssel",anthropic:"Anthropic API-Schlüssel",github:"GitHub-Token",database:"Datenbank",backup:"Sicherung",restore:"Wiederherstellen",export:"Exportieren",import:"Importieren",clear:"Daten löschen",save:"Speichern",cancel:"Abbrechen",reset:"Zurücksetzen"},chat:{placeholder:"Nachricht eingeben...",send:"Senden",thinking:"Denke nach...",error:"Fehler beim Senden",copy:"Kopieren",edit:"Bearbeiten",delete:"Löschen",regenerate:"Neu generieren"},terminal:{title:"Terminal",newTab:"Neuer Tab",closeTab:"Tab schließen",clear:"Löschen",copy:"Kopieren",paste:"Einfügen"},fileExplorer:{title:"Dateien",openFile:"Datei öffnen",newFile:"Neue Datei",newFolder:"Neuer Ordner",rename:"Umbenennen",delete:"Löschen",refresh:"Aktualisieren"},common:{save:"Speichern",cancel:"Abbrechen",delete:"Löschen",edit:"Bearbeiten",create:"Erstellen",close:"Schließen",confirm:"Bestätigen",search:"Suchen",loading:"Laden...",error:"Fehler",success:"Erfolg",warning:"Warnung",info:"Info",yes:"Ja",no:"Nein",ok:"OK",back:"Zurück",next:"Weiter",previous:"Zurück",refresh:"Aktualisieren",export:"Exportieren",import:"Importieren"},errors:{generic:"Ein Fehler ist aufgetreten",network:"Netzwerkfehler",notFound:"Nicht gefunden",unauthorized:"Nicht autorisiert",forbidden:"Verboten",validation:"Validierungsfehler",serverError:"Serverfehler"}},Pu={en:qx,fr:Xx,es:Zx,de:Jx},ey={en:"English",fr:"Français",es:"Español",de:"Deutsch"},Qi="en";function Mu(e){return Pu[e]||Pu[Qi]}function ty(){if(typeof navigator>"u")return Qi;const e=navigator.language.split("-")[0];return["en","fr","es","de"].includes(e)?e:Qi}const ry=["ar","he","fa","ur"];function Kl(e){return ry.includes(e)}const ny=g.createContext(void 0);function ay({children:e,initialLanguage:t}){const[r,n]=g.useState(()=>{if(t)return t;const u=localStorage.getItem("codex-language");return u&&["en","fr","es","de"].includes(u)?u:ty()}),[a,l]=g.useState(()=>Mu(r));g.useEffect(()=>{const u=Mu(r);l(u),localStorage.setItem("codex-language",r),document.documentElement.lang=r,document.documentElement.setAttribute("data-lang",r),document.documentElement.dir=Kl(r)?"rtl":"ltr"},[r]);const s=g.useCallback(u=>{n(u)},[]),o=Kl(r)?"rtl":"ltr";return i.jsx(ny.Provider,{value:{language:r,t:a,setLanguage:s,availableLanguages:ey,isRTL:Kl(r),dir:o},children:i.jsx("div",{dir:o,children:e})})}function ly(){const e=Nh(),t=Bs(),[r,n]=g.useState([]),[a,l]=g.useState([]),[s,o]=g.useState([]),[u,f]=g.useState([]),[h,m]=g.useState([]),[p,b]=g.useState(null),[y,w]=g.useState("agents"),[C,d]=g.useState(!0),[c,v]=g.useState({});g.useEffect(()=>{const I=t.pathname;if(I==="/"){w("chat");return}if(I.startsWith("/agents")){w("agents");return}if(I.startsWith("/code")){w("code");return}if(I.startsWith("/worktrees")){w("worktrees");return}if(I.startsWith("/skills")){w("skills");return}if(I.startsWith("/automations")){w("automations");return}if(I.startsWith("/settings")){w("settings");return}w("chat")},[t.pathname]);const x=I=>{switch(w(I),I){case"chat":e("/");break;case"agents":e("/agents");break;case"code":e("/code");break;case"worktrees":e("/worktrees");break;case"skills":e("/skills");break;case"automations":e("/automations");break;case"settings":e("/settings");break;default:e("/")}};g.useEffect(()=>{k();const I=({agentId:R,chunk:L})=>{v(F=>({...F,[R]:(F[R]||"")+L}))},W=({agentId:R})=>{n(L=>L.map(F=>F.id===R&&c[R]?{...F,messages:[...F.messages,{id:Date.now().toString(),role:"assistant",content:c[R],timestamp:new Date}]}:F)),v(L=>{const F={...L};return delete F[R],F})},A=({agentId:R,error:L})=>{console.error(`Stream error for agent ${R}:`,L),v(F=>{const X={...F};return delete X[R],X})};return window.electronAPI.on("agent:streamChunk",I),window.electronAPI.on("agent:streamEnd",W),window.electronAPI.on("agent:streamError",A),()=>{window.electronAPI.removeListener("agent:streamChunk",I),window.electronAPI.removeListener("agent:streamEnd",W),window.electronAPI.removeListener("agent:streamError",A)}},[]);const k=async()=>{try{const[I,W,A,R,L]=await Promise.all([window.electronAPI.agent.list(),window.electronAPI.skills.list(),window.electronAPI.automation.list(),window.electronAPI.providers.list(),window.electronAPI.settings.getAll()]);n(I),o(W),f(A),m(R),b(L)}catch(I){console.error("Failed to load initial data:",I)}finally{d(!1)}},j=async I=>{try{const W=await window.electronAPI.agent.create(I);return n(A=>[...A,W]),W}catch(W){throw console.error("Failed to create agent:",W),W}},E=async I=>{try{await window.electronAPI.agent.delete(I),n(W=>W.filter(A=>A.id!==I))}catch(W){console.error("Failed to delete agent:",W)}},T=async(I,W)=>{try{const A=await window.electronAPI.worktree.create(I,W);return l(R=>[...R,A]),A}catch(A){throw console.error("Failed to create worktree:",A),A}},$=async I=>{try{const W=await window.electronAPI.skills.create(I);return o(A=>[...A,W]),W}catch(W){throw console.error("Failed to create skill:",W),W}},M=async I=>{try{const W=await window.electronAPI.automation.create(I);return f(A=>[...A,W]),W}catch(W){throw console.error("Failed to create automation:",W),W}};return C?i.jsx("div",{className:"flex items-center justify-center h-screen bg-[var(--bg-void)]","data-testid":"app-loading",children:i.jsxs("div",{className:"flex flex-col items-center gap-4",children:[i.jsx("div",{className:"relative",children:i.jsx("div",{className:"w-12 h-12 rounded-full border-2 border-[var(--border-default)] border-t-[var(--teal-500)] animate-spin"})}),i.jsx("p",{className:"text-sm text-[var(--text-muted)] animate-pulse",children:"Loading Codex..."})]})}):i.jsx(ay,{children:i.jsxs("div",{className:"flex h-screen bg-[var(--bg-primary)] text-[var(--text-primary)] overflow-hidden","data-testid":"app-container",children:[i.jsx(vv,{activeTab:y,onTabChange:x}),i.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[y!=="chat"&&i.jsx(gv,{activeTab:y,agents:r,onSettingsClick:()=>x("settings")}),i.jsx("main",{className:`flex-1 overflow-hidden animate-fadeIn ${y==="chat"?"":"bg-[var(--bg-primary)]"}`,"data-testid":"main-content",children:i.jsxs($h,{children:[i.jsx(ot,{path:"/",element:i.jsx(Gx,{agents:r,providers:h,skills:s,onCreateAgent:j})}),i.jsx(ot,{path:"/agents",element:i.jsx(yv,{agents:r,providers:h,skills:s,onCreateAgent:j,onDeleteAgent:E})}),i.jsx(ot,{path:"/code",element:i.jsx(Wg,{rootPath:"/"})}),i.jsx(ot,{path:"/worktrees",element:i.jsx(wv,{worktrees:a,onCreateWorktree:T})}),i.jsx(ot,{path:"/skills",element:i.jsx(bv,{skills:s,onCreateSkill:$})}),i.jsx(ot,{path:"/automations",element:i.jsx(kv,{automations:u,agents:r,skills:s,onCreateAutomation:M})}),i.jsx(ot,{path:"/audit",element:i.jsx(Yx,{})}),i.jsx(ot,{path:"/settings",element:i.jsx(jv,{settings:p,providers:h,onSettingsChange:b})})]})})]})]})})}"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").then(e=>{console.log("SW registered:",e)}).catch(e=>{console.log("SW registration failed:",e)})});Gl.createRoot(document.getElementById("root")).render(i.jsx(pt.StrictMode,{children:i.jsx(Vh,{children:i.jsx(ly,{})})}));
|