projax 3.3.69 → 3.3.71
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/agent-runner.d.ts +60 -0
- package/dist/agent-runner.js +382 -0
- package/dist/api/database.d.ts +38 -1
- package/dist/api/database.d.ts.map +1 -1
- package/dist/api/database.js +327 -0
- package/dist/api/database.js.map +1 -1
- package/dist/api/routes/agents.d.ts +4 -0
- package/dist/api/routes/agents.d.ts.map +1 -0
- package/dist/api/routes/agents.js +375 -0
- package/dist/api/routes/agents.js.map +1 -0
- package/dist/api/routes/index.d.ts.map +1 -1
- package/dist/api/routes/index.js +4 -0
- package/dist/api/routes/index.js.map +1 -1
- package/dist/api/routes/todos.d.ts +4 -0
- package/dist/api/routes/todos.d.ts.map +1 -0
- package/dist/api/routes/todos.js +595 -0
- package/dist/api/routes/todos.js.map +1 -0
- package/dist/api/types.d.ts +67 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/core/database.d.ts +47 -0
- package/dist/core/database.js +48 -0
- package/dist/core-bridge.d.ts +1 -1
- package/dist/electron/core/database.d.ts +47 -0
- package/dist/electron/core/database.js +48 -0
- package/dist/electron/renderer/assets/index-6afBeDFD.js +66 -0
- package/dist/electron/renderer/assets/index-Bd3aFi7B.css +1 -0
- package/dist/electron/renderer/index.html +2 -2
- package/dist/index.js +6 -175
- package/dist/octopus-cli.d.ts +2 -0
- package/dist/octopus-cli.js +45 -0
- package/dist/octopus-show-tui.d.ts +1 -0
- package/dist/octopus-show-tui.js +802 -0
- package/dist/octopus-tui.d.ts +1 -0
- package/dist/octopus-tui.js +115 -0
- package/dist/prxi.js +373 -63
- package/dist/prxi.tsx +472 -65
- package/package.json +7 -2
- package/dist/electron/renderer/assets/index-BjZn_mEF.js +0 -66
- package/dist/electron/renderer/assets/index-CZmDxbJO.js +0 -66
- package/dist/electron/renderer/assets/index-Cd1mTO3s.js +0 -66
- package/dist/electron/renderer/assets/index-Cj4QON0s.js +0 -66
- package/dist/electron/renderer/assets/index-CmtZriN5.js +0 -66
- package/dist/electron/renderer/assets/index-DJDPi0kp.css +0 -1
- package/dist/electron/renderer/assets/index-DfocdjIj.css +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gf(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Au={exports:{}},ho={},Iu={exports:{}},X={};/**
|
|
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 Zr=Symbol.for("react.element"),vf=Symbol.for("react.portal"),yf=Symbol.for("react.fragment"),wf=Symbol.for("react.strict_mode"),Sf=Symbol.for("react.profiler"),xf=Symbol.for("react.provider"),kf=Symbol.for("react.context"),jf=Symbol.for("react.forward_ref"),Nf=Symbol.for("react.suspense"),Pf=Symbol.for("react.memo"),Ef=Symbol.for("react.lazy"),va=Symbol.iterator;function Cf(e){return e===null||typeof e!="object"?null:(e=va&&e[va]||e["@@iterator"],typeof e=="function"?e:null)}var Fu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wu=Object.assign,bu={};function ir(e,t,n){this.props=e,this.context=t,this.refs=bu,this.updater=n||Fu}ir.prototype.isReactComponent={};ir.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")};ir.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uu(){}Uu.prototype=ir.prototype;function fl(e,t,n){this.props=e,this.context=t,this.refs=bu,this.updater=n||Fu}var pl=fl.prototype=new Uu;pl.constructor=fl;Wu(pl,ir.prototype);pl.isPureReactComponent=!0;var ya=Array.isArray,$u=Object.prototype.hasOwnProperty,hl={current:null},Bu={key:!0,ref:!0,__self:!0,__source:!0};function Hu(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)$u.call(t,r)&&!Bu.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Zr,type:e,key:o,ref:i,props:s,_owner:hl.current}}function _f(e,t){return{$$typeof:Zr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ml(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zr}function zf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var wa=/\/+/g;function $o(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zf(""+e.key):t.toString(36)}function Ts(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Zr:case vf:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+$o(i,0):r,ya(s)?(n="",e!=null&&(n=e.replace(wa,"$&/")+"/"),Ts(s,t,n,"",function(c){return c})):s!=null&&(ml(s)&&(s=_f(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(wa,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",ya(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+$o(o,a);i+=Ts(o,t,n,u,s)}else if(u=Cf(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+$o(o,a++),i+=Ts(o,t,n,u,s);else if(o==="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 i}function as(e,t,n){if(e==null)return e;var r=[],s=0;return Ts(e,r,"","",function(o){return t.call(n,o,s++)}),r}function Tf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var be={current:null},Ds={transition:null},Df={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:Ds,ReactCurrentOwner:hl};function Vu(){throw Error("act(...) is not supported in production builds of React.")}X.Children={map:as,forEach:function(e,t,n){as(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return as(e,function(){t++}),t},toArray:function(e){return as(e,function(t){return t})||[]},only:function(e){if(!ml(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=ir;X.Fragment=yf;X.Profiler=Sf;X.PureComponent=fl;X.StrictMode=wf;X.Suspense=Nf;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Df;X.act=Vu;X.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Wu({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=hl.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)$u.call(t,u)&&!Bu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Zr,type:e.type,key:s,ref:o,props:r,_owner:i}};X.createContext=function(e){return e={$$typeof:kf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:xf,_context:e},e.Consumer=e};X.createElement=Hu;X.createFactory=function(e){var t=Hu.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:jf,render:e}};X.isValidElement=ml;X.lazy=function(e){return{$$typeof:Ef,_payload:{_status:-1,_result:e},_init:Tf}};X.memo=function(e,t){return{$$typeof:Pf,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=Ds.transition;Ds.transition={};try{e()}finally{Ds.transition=t}};X.unstable_act=Vu;X.useCallback=function(e,t){return be.current.useCallback(e,t)};X.useContext=function(e){return be.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return be.current.useDeferredValue(e)};X.useEffect=function(e,t){return be.current.useEffect(e,t)};X.useId=function(){return be.current.useId()};X.useImperativeHandle=function(e,t,n){return be.current.useImperativeHandle(e,t,n)};X.useInsertionEffect=function(e,t){return be.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return be.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return be.current.useMemo(e,t)};X.useReducer=function(e,t,n){return be.current.useReducer(e,t,n)};X.useRef=function(e){return be.current.useRef(e)};X.useState=function(e){return be.current.useState(e)};X.useSyncExternalStore=function(e,t,n){return be.current.useSyncExternalStore(e,t,n)};X.useTransition=function(){return be.current.useTransition()};X.version="18.3.1";Iu.exports=X;var k=Iu.exports;const mo=Lu(k);/**
|
|
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 Rf=k,Of=Symbol.for("react.element"),Mf=Symbol.for("react.fragment"),Lf=Object.prototype.hasOwnProperty,Af=Rf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,If={key:!0,ref:!0,__self:!0,__source:!0};function Xu(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Lf.call(t,r)&&!If.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Of,type:e,key:o,ref:i,props:s,_owner:Af.current}}ho.Fragment=Mf;ho.jsx=Xu;ho.jsxs=Xu;Au.exports=ho;var l=Au.exports,yi={},Qu={exports:{}},et={},Yu={exports:{}},Ku={};/**
|
|
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(T,F){var O=T.length;T.push(F);e:for(;0<O;){var Y=O-1>>>1,J=T[Y];if(0<s(J,F))T[Y]=F,T[O]=J,O=Y;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var F=T[0],O=T.pop();if(O!==F){T[0]=O;e:for(var Y=0,J=T.length,me=J>>>1;Y<me;){var ne=2*(Y+1)-1,nt=T[ne],D=ne+1,Q=T[D];if(0>s(nt,O))D<J&&0>s(Q,nt)?(T[Y]=Q,T[D]=O,Y=D):(T[Y]=nt,T[ne]=O,Y=ne);else if(D<J&&0>s(Q,O))T[Y]=Q,T[D]=O,Y=D;else break e}}return F}function s(T,F){var O=T.sortIndex-F.sortIndex;return O!==0?O:T.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],c=[],h=1,m=null,g=3,S=!1,x=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(T){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=T)r(c),F.sortIndex=F.expirationTime,t(u,F);else break;F=n(c)}}function v(T){if(w=!1,f(T),!x)if(n(u)!==null)x=!0,b(y);else{var F=n(c);F!==null&&te(v,F.startTime-T)}}function y(T,F){x=!1,w&&(w=!1,p(E),E=-1),S=!0;var O=g;try{for(f(F),m=n(u);m!==null&&(!(m.expirationTime>F)||T&&!$());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,g=m.priorityLevel;var J=Y(m.expirationTime<=F);F=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(u)&&r(u),f(F)}else r(u);m=n(u)}if(m!==null)var me=!0;else{var ne=n(c);ne!==null&&te(v,ne.startTime-F),me=!1}return me}finally{m=null,g=O,S=!1}}var P=!1,j=null,E=-1,I=5,M=-1;function $(){return!(e.unstable_now()-M<I)}function H(){if(j!==null){var T=e.unstable_now();M=T;var F=!0;try{F=j(!0,T)}finally{F?Z():(P=!1,j=null)}}else P=!1}var Z;if(typeof d=="function")Z=function(){d(H)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,G=le.port2;le.port1.onmessage=H,Z=function(){G.postMessage(null)}}else Z=function(){C(H,0)};function b(T){j=T,P||(P=!0,Z())}function te(T,F){E=C(function(){T(e.unstable_now())},F)}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(T){T.callback=null},e.unstable_continueExecution=function(){x||S||(x=!0,b(y))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g}var O=g;g=F;try{return T()}finally{g=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,F){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var O=g;g=T;try{return F()}finally{g=O}},e.unstable_scheduleCallback=function(T,F,O){var Y=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?Y+O:Y):O=Y,T){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=O+J,T={id:h++,callback:F,priorityLevel:T,startTime:O,expirationTime:J,sortIndex:-1},O>Y?(T.sortIndex=O,t(c,T),n(u)===null&&T===n(c)&&(w?(p(E),E=-1):w=!0,te(v,O-Y))):(T.sortIndex=J,t(u,T),x||S||(x=!0,b(y))),T},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(T){var F=g;return function(){var O=g;g=F;try{return T.apply(this,arguments)}finally{g=O}}}})(Ku);Yu.exports=Ku;var Ff=Yu.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 Wf=k,qe=Ff;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Gu=new Set,Lr={};function Pn(e,t){qn(e,t),qn(e+"Capture",t)}function qn(e,t){for(Lr[e]=t,e=0;e<t.length;e++)Gu.add(t[e])}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wi=Object.prototype.hasOwnProperty,bf=/^[: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]*$/,Sa={},xa={};function Uf(e){return wi.call(xa,e)?!0:wi.call(Sa,e)?!1:bf.test(e)?xa[e]=!0:(Sa[e]=!0,!1)}function $f(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Bf(e,t,n,r){if(t===null||typeof t>"u"||$f(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Ue(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new Ue(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){_e[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var gl=/[\-:]([a-z])/g;function vl(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(gl,vl);_e[t]=new Ue(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(gl,vl);_e[t]=new Ue(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(gl,vl);_e[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function yl(e,t,n,r){var s=_e.hasOwnProperty(t)?_e[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Bf(t,n,s,r)&&(n=null),r||s===null?Uf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ut=Wf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,us=Symbol.for("react.element"),Mn=Symbol.for("react.portal"),Ln=Symbol.for("react.fragment"),wl=Symbol.for("react.strict_mode"),Si=Symbol.for("react.profiler"),Ju=Symbol.for("react.provider"),Zu=Symbol.for("react.context"),Sl=Symbol.for("react.forward_ref"),xi=Symbol.for("react.suspense"),ki=Symbol.for("react.suspense_list"),xl=Symbol.for("react.memo"),Vt=Symbol.for("react.lazy"),qu=Symbol.for("react.offscreen"),ka=Symbol.iterator;function dr(e){return e===null||typeof e!="object"?null:(e=ka&&e[ka]||e["@@iterator"],typeof e=="function"?e:null)}var de=Object.assign,Bo;function kr(e){if(Bo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bo=t&&t[1]||""}return`
|
|
34
|
+
`+Bo+e}var Ho=!1;function Vo(e,t){if(!e||Ho)return"";Ho=!0;var n=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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var u=`
|
|
37
|
+
`+s[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{Ho=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?kr(e):""}function Hf(e){switch(e.tag){case 5:return kr(e.type);case 16:return kr("Lazy");case 13:return kr("Suspense");case 19:return kr("SuspenseList");case 0:case 2:case 15:return e=Vo(e.type,!1),e;case 11:return e=Vo(e.type.render,!1),e;case 1:return e=Vo(e.type,!0),e;default:return""}}function ji(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 Ln:return"Fragment";case Mn:return"Portal";case Si:return"Profiler";case wl:return"StrictMode";case xi:return"Suspense";case ki:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zu:return(e.displayName||"Context")+".Consumer";case Ju:return(e._context.displayName||"Context")+".Provider";case Sl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xl:return t=e.displayName||null,t!==null?t:ji(e.type)||"Memo";case Vt:t=e._payload,e=e._init;try{return ji(e(t))}catch{}}return null}function Vf(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 ji(t);case 8:return t===wl?"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 on(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ec(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xf(e){var t=ec(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cs(e){e._valueTracker||(e._valueTracker=Xf(e))}function tc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ec(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bs(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 Ni(e,t){var n=t.checked;return de({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ja(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=on(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nc(e,t){t=t.checked,t!=null&&yl(e,"checked",t,!1)}function Pi(e,t){nc(e,t);var n=on(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ei(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ei(e,t.type,on(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Na(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ei(e,t,n){(t!=="number"||Bs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var jr=Array.isArray;function Qn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+on(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ci(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return de({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pa(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(jr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:on(n)}}function rc(e,t){var n=on(t.value),r=on(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ea(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sc(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 _i(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ds,oc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ds=ds||document.createElement("div"),ds.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ds.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ar(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Er={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},Qf=["Webkit","ms","Moz","O"];Object.keys(Er).forEach(function(e){Qf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Er[t]=Er[e]})});function ic(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Er.hasOwnProperty(e)&&Er[e]?(""+t).trim():t+"px"}function lc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=ic(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Yf=de({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 zi(e,t){if(t){if(Yf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Ti(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 Di=null;function kl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ri=null,Yn=null,Kn=null;function Ca(e){if(e=ts(e)){if(typeof Ri!="function")throw Error(_(280));var t=e.stateNode;t&&(t=So(t),Ri(e.stateNode,e.type,t))}}function ac(e){Yn?Kn?Kn.push(e):Kn=[e]:Yn=e}function uc(){if(Yn){var e=Yn,t=Kn;if(Kn=Yn=null,Ca(e),t)for(e=0;e<t.length;e++)Ca(t[e])}}function cc(e,t){return e(t)}function dc(){}var Xo=!1;function fc(e,t,n){if(Xo)return e(t,n);Xo=!0;try{return cc(e,t,n)}finally{Xo=!1,(Yn!==null||Kn!==null)&&(dc(),uc())}}function Ir(e,t){var n=e.stateNode;if(n===null)return null;var r=So(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var Oi=!1;if(It)try{var fr={};Object.defineProperty(fr,"passive",{get:function(){Oi=!0}}),window.addEventListener("test",fr,fr),window.removeEventListener("test",fr,fr)}catch{Oi=!1}function Kf(e,t,n,r,s,o,i,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var Cr=!1,Hs=null,Vs=!1,Mi=null,Gf={onError:function(e){Cr=!0,Hs=e}};function Jf(e,t,n,r,s,o,i,a,u){Cr=!1,Hs=null,Kf.apply(Gf,arguments)}function Zf(e,t,n,r,s,o,i,a,u){if(Jf.apply(this,arguments),Cr){if(Cr){var c=Hs;Cr=!1,Hs=null}else throw Error(_(198));Vs||(Vs=!0,Mi=c)}}function En(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pc(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 _a(e){if(En(e)!==e)throw Error(_(188))}function qf(e){var t=e.alternate;if(!t){if(t=En(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return _a(s),e;if(o===r)return _a(s),t;o=o.sibling}throw Error(_(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function hc(e){return e=qf(e),e!==null?mc(e):null}function mc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mc(e);if(t!==null)return t;e=e.sibling}return null}var gc=qe.unstable_scheduleCallback,za=qe.unstable_cancelCallback,ep=qe.unstable_shouldYield,tp=qe.unstable_requestPaint,he=qe.unstable_now,np=qe.unstable_getCurrentPriorityLevel,jl=qe.unstable_ImmediatePriority,vc=qe.unstable_UserBlockingPriority,Xs=qe.unstable_NormalPriority,rp=qe.unstable_LowPriority,yc=qe.unstable_IdlePriority,go=null,Ct=null;function sp(e){if(Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(go,e,void 0,(e.current.flags&128)===128)}catch{}}var wt=Math.clz32?Math.clz32:lp,op=Math.log,ip=Math.LN2;function lp(e){return e>>>=0,e===0?32:31-(op(e)/ip|0)|0}var fs=64,ps=4194304;function Nr(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 Qs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Nr(a):(o&=i,o!==0&&(r=Nr(o)))}else i=n&~s,i!==0?r=Nr(i):o!==0&&(r=Nr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-wt(t),s=1<<n,r|=e[n],t&=~s;return r}function ap(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 up(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-wt(o),a=1<<i,u=s[i];u===-1?(!(a&n)||a&r)&&(s[i]=ap(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function Li(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function wc(){var e=fs;return fs<<=1,!(fs&4194240)&&(fs=64),e}function Qo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function cp(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-wt(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Nl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ee=0;function Sc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xc,Pl,kc,jc,Nc,Ai=!1,hs=[],Jt=null,Zt=null,qt=null,Fr=new Map,Wr=new Map,Qt=[],dp="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 Ta(e,t){switch(e){case"focusin":case"focusout":Jt=null;break;case"dragenter":case"dragleave":Zt=null;break;case"mouseover":case"mouseout":qt=null;break;case"pointerover":case"pointerout":Fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wr.delete(t.pointerId)}}function pr(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=ts(t),t!==null&&Pl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function fp(e,t,n,r,s){switch(t){case"focusin":return Jt=pr(Jt,e,t,n,r,s),!0;case"dragenter":return Zt=pr(Zt,e,t,n,r,s),!0;case"mouseover":return qt=pr(qt,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Fr.set(o,pr(Fr.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Wr.set(o,pr(Wr.get(o)||null,e,t,n,r,s)),!0}return!1}function Pc(e){var t=mn(e.target);if(t!==null){var n=En(t);if(n!==null){if(t=n.tag,t===13){if(t=pc(n),t!==null){e.blockedOn=t,Nc(e.priority,function(){kc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ii(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Di=r,n.target.dispatchEvent(r),Di=null}else return t=ts(n),t!==null&&Pl(t),e.blockedOn=n,!1;t.shift()}return!0}function Da(e,t,n){Rs(e)&&n.delete(t)}function pp(){Ai=!1,Jt!==null&&Rs(Jt)&&(Jt=null),Zt!==null&&Rs(Zt)&&(Zt=null),qt!==null&&Rs(qt)&&(qt=null),Fr.forEach(Da),Wr.forEach(Da)}function hr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ai||(Ai=!0,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,pp)))}function br(e){function t(s){return hr(s,e)}if(0<hs.length){hr(hs[0],e);for(var n=1;n<hs.length;n++){var r=hs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jt!==null&&hr(Jt,e),Zt!==null&&hr(Zt,e),qt!==null&&hr(qt,e),Fr.forEach(t),Wr.forEach(t),n=0;n<Qt.length;n++)r=Qt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qt.length&&(n=Qt[0],n.blockedOn===null);)Pc(n),n.blockedOn===null&&Qt.shift()}var Gn=Ut.ReactCurrentBatchConfig,Ys=!0;function hp(e,t,n,r){var s=ee,o=Gn.transition;Gn.transition=null;try{ee=1,El(e,t,n,r)}finally{ee=s,Gn.transition=o}}function mp(e,t,n,r){var s=ee,o=Gn.transition;Gn.transition=null;try{ee=4,El(e,t,n,r)}finally{ee=s,Gn.transition=o}}function El(e,t,n,r){if(Ys){var s=Ii(e,t,n,r);if(s===null)ri(e,t,r,Ks,n),Ta(e,r);else if(fp(s,e,t,n,r))r.stopPropagation();else if(Ta(e,r),t&4&&-1<dp.indexOf(e)){for(;s!==null;){var o=ts(s);if(o!==null&&xc(o),o=Ii(e,t,n,r),o===null&&ri(e,t,r,Ks,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else ri(e,t,r,null,n)}}var Ks=null;function Ii(e,t,n,r){if(Ks=null,e=kl(r),e=mn(e),e!==null)if(t=En(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ks=e,null}function Ec(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(np()){case jl:return 1;case vc:return 4;case Xs:case rp:return 16;case yc:return 536870912;default:return 16}default:return 16}}var Kt=null,Cl=null,Os=null;function Cc(){if(Os)return Os;var e,t=Cl,n=t.length,r,s="value"in Kt?Kt.value:Kt.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return Os=s.slice(e,1<r?1-r:void 0)}function Ms(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 ms(){return!0}function Ra(){return!1}function tt(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ms:Ra,this.isPropagationStopped=Ra,this}return de(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ms)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ms)},persist:function(){},isPersistent:ms}),t}var lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_l=tt(lr),es=de({},lr,{view:0,detail:0}),gp=tt(es),Yo,Ko,mr,vo=de({},es,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zl,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!==mr&&(mr&&e.type==="mousemove"?(Yo=e.screenX-mr.screenX,Ko=e.screenY-mr.screenY):Ko=Yo=0,mr=e),Yo)},movementY:function(e){return"movementY"in e?e.movementY:Ko}}),Oa=tt(vo),vp=de({},vo,{dataTransfer:0}),yp=tt(vp),wp=de({},es,{relatedTarget:0}),Go=tt(wp),Sp=de({},lr,{animationName:0,elapsedTime:0,pseudoElement:0}),xp=tt(Sp),kp=de({},lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jp=tt(kp),Np=de({},lr,{data:0}),Ma=tt(Np),Pp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ep={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"},Cp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _p(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Cp[e])?!!t[e]:!1}function zl(){return _p}var zp=de({},es,{key:function(e){if(e.key){var t=Pp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ms(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ep[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zl,charCode:function(e){return e.type==="keypress"?Ms(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ms(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tp=tt(zp),Dp=de({},vo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),La=tt(Dp),Rp=de({},es,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zl}),Op=tt(Rp),Mp=de({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lp=tt(Mp),Ap=de({},vo,{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}),Ip=tt(Ap),Fp=[9,13,27,32],Tl=It&&"CompositionEvent"in window,_r=null;It&&"documentMode"in document&&(_r=document.documentMode);var Wp=It&&"TextEvent"in window&&!_r,_c=It&&(!Tl||_r&&8<_r&&11>=_r),Aa=" ",Ia=!1;function zc(e,t){switch(e){case"keyup":return Fp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var An=!1;function bp(e,t){switch(e){case"compositionend":return Tc(t);case"keypress":return t.which!==32?null:(Ia=!0,Aa);case"textInput":return e=t.data,e===Aa&&Ia?null:e;default:return null}}function Up(e,t){if(An)return e==="compositionend"||!Tl&&zc(e,t)?(e=Cc(),Os=Cl=Kt=null,An=!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 _c&&t.locale!=="ko"?null:t.data;default:return null}}var $p={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 Fa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$p[e.type]:t==="textarea"}function Dc(e,t,n,r){ac(r),t=Gs(t,"onChange"),0<t.length&&(n=new _l("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var zr=null,Ur=null;function Bp(e){$c(e,0)}function yo(e){var t=Wn(e);if(tc(t))return e}function Hp(e,t){if(e==="change")return t}var Rc=!1;if(It){var Jo;if(It){var Zo="oninput"in document;if(!Zo){var Wa=document.createElement("div");Wa.setAttribute("oninput","return;"),Zo=typeof Wa.oninput=="function"}Jo=Zo}else Jo=!1;Rc=Jo&&(!document.documentMode||9<document.documentMode)}function ba(){zr&&(zr.detachEvent("onpropertychange",Oc),Ur=zr=null)}function Oc(e){if(e.propertyName==="value"&&yo(Ur)){var t=[];Dc(t,Ur,e,kl(e)),fc(Bp,t)}}function Vp(e,t,n){e==="focusin"?(ba(),zr=t,Ur=n,zr.attachEvent("onpropertychange",Oc)):e==="focusout"&&ba()}function Xp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yo(Ur)}function Qp(e,t){if(e==="click")return yo(t)}function Yp(e,t){if(e==="input"||e==="change")return yo(t)}function Kp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:Kp;function $r(e,t){if(xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!wi.call(t,s)||!xt(e[s],t[s]))return!1}return!0}function Ua(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $a(e,t){var n=Ua(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ua(n)}}function Mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lc(){for(var e=window,t=Bs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bs(e.document)}return t}function Dl(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 Gp(e){var t=Lc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mc(n.ownerDocument.documentElement,n)){if(r!==null&&Dl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=$a(n,o);var i=$a(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Jp=It&&"documentMode"in document&&11>=document.documentMode,In=null,Fi=null,Tr=null,Wi=!1;function Ba(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wi||In==null||In!==Bs(r)||(r=In,"selectionStart"in r&&Dl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tr&&$r(Tr,r)||(Tr=r,r=Gs(Fi,"onSelect"),0<r.length&&(t=new _l("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=In)))}function gs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fn={animationend:gs("Animation","AnimationEnd"),animationiteration:gs("Animation","AnimationIteration"),animationstart:gs("Animation","AnimationStart"),transitionend:gs("Transition","TransitionEnd")},qo={},Ac={};It&&(Ac=document.createElement("div").style,"AnimationEvent"in window||(delete Fn.animationend.animation,delete Fn.animationiteration.animation,delete Fn.animationstart.animation),"TransitionEvent"in window||delete Fn.transitionend.transition);function wo(e){if(qo[e])return qo[e];if(!Fn[e])return e;var t=Fn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ac)return qo[e]=t[n];return e}var Ic=wo("animationend"),Fc=wo("animationiteration"),Wc=wo("animationstart"),bc=wo("transitionend"),Uc=new Map,Ha="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 an(e,t){Uc.set(e,t),Pn(t,[e])}for(var ei=0;ei<Ha.length;ei++){var ti=Ha[ei],Zp=ti.toLowerCase(),qp=ti[0].toUpperCase()+ti.slice(1);an(Zp,"on"+qp)}an(Ic,"onAnimationEnd");an(Fc,"onAnimationIteration");an(Wc,"onAnimationStart");an("dblclick","onDoubleClick");an("focusin","onFocus");an("focusout","onBlur");an(bc,"onTransitionEnd");qn("onMouseEnter",["mouseout","mouseover"]);qn("onMouseLeave",["mouseout","mouseover"]);qn("onPointerEnter",["pointerout","pointerover"]);qn("onPointerLeave",["pointerout","pointerover"]);Pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Pn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pr));function Va(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Zf(r,t,void 0,e),e.currentTarget=null}function $c(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],u=a.instance,c=a.currentTarget;if(a=a.listener,u!==o&&s.isPropagationStopped())break e;Va(s,a,c),o=u}else for(i=0;i<r.length;i++){if(a=r[i],u=a.instance,c=a.currentTarget,a=a.listener,u!==o&&s.isPropagationStopped())break e;Va(s,a,c),o=u}}}if(Vs)throw e=Mi,Vs=!1,Mi=null,e}function oe(e,t){var n=t[Hi];n===void 0&&(n=t[Hi]=new Set);var r=e+"__bubble";n.has(r)||(Bc(t,e,2,!1),n.add(r))}function ni(e,t,n){var r=0;t&&(r|=4),Bc(n,e,r,t)}var vs="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[vs]){e[vs]=!0,Gu.forEach(function(n){n!=="selectionchange"&&(eh.has(n)||ni(n,!1,e),ni(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vs]||(t[vs]=!0,ni("selectionchange",!1,t))}}function Bc(e,t,n,r){switch(Ec(t)){case 1:var s=hp;break;case 4:s=mp;break;default:s=El}n=s.bind(null,t,n,e),s=void 0,!Oi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function ri(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var u=i.tag;if((u===3||u===4)&&(u=i.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;i=i.return}for(;a!==null;){if(i=mn(a),i===null)return;if(u=i.tag,u===5||u===6){r=o=i;continue e}a=a.parentNode}}r=r.return}fc(function(){var c=o,h=kl(n),m=[];e:{var g=Uc.get(e);if(g!==void 0){var S=_l,x=e;switch(e){case"keypress":if(Ms(n)===0)break e;case"keydown":case"keyup":S=Tp;break;case"focusin":x="focus",S=Go;break;case"focusout":x="blur",S=Go;break;case"beforeblur":case"afterblur":S=Go;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=Oa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=yp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=Op;break;case Ic:case Fc:case Wc:S=xp;break;case bc:S=Lp;break;case"scroll":S=gp;break;case"wheel":S=Ip;break;case"copy":case"cut":case"paste":S=jp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=La}var w=(t&4)!==0,C=!w&&e==="scroll",p=w?g!==null?g+"Capture":null:g;w=[];for(var d=c,f;d!==null;){f=d;var v=f.stateNode;if(f.tag===5&&v!==null&&(f=v,p!==null&&(v=Ir(d,p),v!=null&&w.push(Hr(d,v,f)))),C)break;d=d.return}0<w.length&&(g=new S(g,x,null,n,h),m.push({event:g,listeners:w}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",g&&n!==Di&&(x=n.relatedTarget||n.fromElement)&&(mn(x)||x[Ft]))break e;if((S||g)&&(g=h.window===h?h:(g=h.ownerDocument)?g.defaultView||g.parentWindow:window,S?(x=n.relatedTarget||n.toElement,S=c,x=x?mn(x):null,x!==null&&(C=En(x),x!==C||x.tag!==5&&x.tag!==6)&&(x=null)):(S=null,x=c),S!==x)){if(w=Oa,v="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(w=La,v="onPointerLeave",p="onPointerEnter",d="pointer"),C=S==null?g:Wn(S),f=x==null?g:Wn(x),g=new w(v,d+"leave",S,n,h),g.target=C,g.relatedTarget=f,v=null,mn(h)===c&&(w=new w(p,d+"enter",x,n,h),w.target=f,w.relatedTarget=C,v=w),C=v,S&&x)t:{for(w=S,p=x,d=0,f=w;f;f=Dn(f))d++;for(f=0,v=p;v;v=Dn(v))f++;for(;0<d-f;)w=Dn(w),d--;for(;0<f-d;)p=Dn(p),f--;for(;d--;){if(w===p||p!==null&&w===p.alternate)break t;w=Dn(w),p=Dn(p)}w=null}else w=null;S!==null&&Xa(m,g,S,w,!1),x!==null&&C!==null&&Xa(m,C,x,w,!0)}}e:{if(g=c?Wn(c):window,S=g.nodeName&&g.nodeName.toLowerCase(),S==="select"||S==="input"&&g.type==="file")var y=Hp;else if(Fa(g))if(Rc)y=Yp;else{y=Xp;var P=Vp}else(S=g.nodeName)&&S.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(y=Qp);if(y&&(y=y(e,c))){Dc(m,y,n,h);break e}P&&P(e,g,c),e==="focusout"&&(P=g._wrapperState)&&P.controlled&&g.type==="number"&&Ei(g,"number",g.value)}switch(P=c?Wn(c):window,e){case"focusin":(Fa(P)||P.contentEditable==="true")&&(In=P,Fi=c,Tr=null);break;case"focusout":Tr=Fi=In=null;break;case"mousedown":Wi=!0;break;case"contextmenu":case"mouseup":case"dragend":Wi=!1,Ba(m,n,h);break;case"selectionchange":if(Jp)break;case"keydown":case"keyup":Ba(m,n,h)}var j;if(Tl)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else An?zc(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(_c&&n.locale!=="ko"&&(An||E!=="onCompositionStart"?E==="onCompositionEnd"&&An&&(j=Cc()):(Kt=h,Cl="value"in Kt?Kt.value:Kt.textContent,An=!0)),P=Gs(c,E),0<P.length&&(E=new Ma(E,e,null,n,h),m.push({event:E,listeners:P}),j?E.data=j:(j=Tc(n),j!==null&&(E.data=j)))),(j=Wp?bp(e,n):Up(e,n))&&(c=Gs(c,"onBeforeInput"),0<c.length&&(h=new Ma("onBeforeInput","beforeinput",null,n,h),m.push({event:h,listeners:c}),h.data=j))}$c(m,t)})}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gs(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Ir(e,n),o!=null&&r.unshift(Hr(e,o,s)),o=Ir(e,t),o!=null&&r.push(Hr(e,o,s))),e=e.return}return r}function Dn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Xa(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&c!==null&&(a=c,s?(u=Ir(n,o),u!=null&&i.unshift(Hr(n,u,a))):s||(u=Ir(n,o),u!=null&&i.push(Hr(n,u,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var th=/\r\n?/g,nh=/\u0000|\uFFFD/g;function Qa(e){return(typeof e=="string"?e:""+e).replace(th,`
|
|
38
|
+
`).replace(nh,"")}function ys(e,t,n){if(t=Qa(t),Qa(e)!==t&&n)throw Error(_(425))}function Js(){}var bi=null,Ui=null;function $i(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 Bi=typeof setTimeout=="function"?setTimeout:void 0,rh=typeof clearTimeout=="function"?clearTimeout:void 0,Ya=typeof Promise=="function"?Promise:void 0,sh=typeof queueMicrotask=="function"?queueMicrotask:typeof Ya<"u"?function(e){return Ya.resolve(null).then(e).catch(oh)}:Bi;function oh(e){setTimeout(function(){throw e})}function si(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),br(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);br(t)}function en(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 Ka(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ar=Math.random().toString(36).slice(2),Et="__reactFiber$"+ar,Vr="__reactProps$"+ar,Ft="__reactContainer$"+ar,Hi="__reactEvents$"+ar,ih="__reactListeners$"+ar,lh="__reactHandles$"+ar;function mn(e){var t=e[Et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ft]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ka(e);e!==null;){if(n=e[Et])return n;e=Ka(e)}return t}e=n,n=e.parentNode}return null}function ts(e){return e=e[Et]||e[Ft],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function So(e){return e[Vr]||null}var Vi=[],bn=-1;function un(e){return{current:e}}function ie(e){0>bn||(e.current=Vi[bn],Vi[bn]=null,bn--)}function se(e,t){bn++,Vi[bn]=e.current,e.current=t}var ln={},Le=un(ln),Ve=un(!1),Sn=ln;function er(e,t){var n=e.type.contextTypes;if(!n)return ln;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Xe(e){return e=e.childContextTypes,e!=null}function Zs(){ie(Ve),ie(Le)}function Ga(e,t,n){if(Le.current!==ln)throw Error(_(168));se(Le,t),se(Ve,n)}function Hc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(_(108,Vf(e)||"Unknown",s));return de({},n,r)}function qs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,Sn=Le.current,se(Le,e),se(Ve,Ve.current),!0}function Ja(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Hc(e,t,Sn),r.__reactInternalMemoizedMergedChildContext=e,ie(Ve),ie(Le),se(Le,e)):ie(Ve),se(Ve,n)}var Ot=null,xo=!1,oi=!1;function Vc(e){Ot===null?Ot=[e]:Ot.push(e)}function ah(e){xo=!0,Vc(e)}function cn(){if(!oi&&Ot!==null){oi=!0;var e=0,t=ee;try{var n=Ot;for(ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ot=null,xo=!1}catch(s){throw Ot!==null&&(Ot=Ot.slice(e+1)),gc(jl,cn),s}finally{ee=t,oi=!1}}return null}var Un=[],$n=0,eo=null,to=0,it=[],lt=0,xn=null,Mt=1,Lt="";function pn(e,t){Un[$n++]=to,Un[$n++]=eo,eo=e,to=t}function Xc(e,t,n){it[lt++]=Mt,it[lt++]=Lt,it[lt++]=xn,xn=e;var r=Mt;e=Lt;var s=32-wt(r)-1;r&=~(1<<s),n+=1;var o=32-wt(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Mt=1<<32-wt(t)+s|n<<s|r,Lt=o+e}else Mt=1<<o|n<<s|r,Lt=e}function Rl(e){e.return!==null&&(pn(e,1),Xc(e,1,0))}function Ol(e){for(;e===eo;)eo=Un[--$n],Un[$n]=null,to=Un[--$n],Un[$n]=null;for(;e===xn;)xn=it[--lt],it[lt]=null,Lt=it[--lt],it[lt]=null,Mt=it[--lt],it[lt]=null}var Je=null,Ge=null,ae=!1,yt=null;function Qc(e,t){var n=at(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Za(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Je=e,Ge=en(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Je=e,Ge=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=xn!==null?{id:Mt,overflow:Lt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=at(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Je=e,Ge=null,!0):!1;default:return!1}}function Xi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qi(e){if(ae){var t=Ge;if(t){var n=t;if(!Za(e,t)){if(Xi(e))throw Error(_(418));t=en(n.nextSibling);var r=Je;t&&Za(e,t)?Qc(r,n):(e.flags=e.flags&-4097|2,ae=!1,Je=e)}}else{if(Xi(e))throw Error(_(418));e.flags=e.flags&-4097|2,ae=!1,Je=e}}}function qa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Je=e}function ws(e){if(e!==Je)return!1;if(!ae)return qa(e),ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$i(e.type,e.memoizedProps)),t&&(t=Ge)){if(Xi(e))throw Yc(),Error(_(418));for(;t;)Qc(e,t),t=en(t.nextSibling)}if(qa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ge=en(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ge=null}}else Ge=Je?en(e.stateNode.nextSibling):null;return!0}function Yc(){for(var e=Ge;e;)e=en(e.nextSibling)}function tr(){Ge=Je=null,ae=!1}function Ml(e){yt===null?yt=[e]:yt.push(e)}var uh=Ut.ReactCurrentBatchConfig;function gr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function Ss(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function eu(e){var t=e._init;return t(e._payload)}function Kc(e){function t(p,d){if(e){var f=p.deletions;f===null?(p.deletions=[d],p.flags|=16):f.push(d)}}function n(p,d){if(!e)return null;for(;d!==null;)t(p,d),d=d.sibling;return null}function r(p,d){for(p=new Map;d!==null;)d.key!==null?p.set(d.key,d):p.set(d.index,d),d=d.sibling;return p}function s(p,d){return p=sn(p,d),p.index=0,p.sibling=null,p}function o(p,d,f){return p.index=f,e?(f=p.alternate,f!==null?(f=f.index,f<d?(p.flags|=2,d):f):(p.flags|=2,d)):(p.flags|=1048576,d)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,d,f,v){return d===null||d.tag!==6?(d=fi(f,p.mode,v),d.return=p,d):(d=s(d,f),d.return=p,d)}function u(p,d,f,v){var y=f.type;return y===Ln?h(p,d,f.props.children,v,f.key):d!==null&&(d.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===Vt&&eu(y)===d.type)?(v=s(d,f.props),v.ref=gr(p,d,f),v.return=p,v):(v=Us(f.type,f.key,f.props,null,p.mode,v),v.ref=gr(p,d,f),v.return=p,v)}function c(p,d,f,v){return d===null||d.tag!==4||d.stateNode.containerInfo!==f.containerInfo||d.stateNode.implementation!==f.implementation?(d=pi(f,p.mode,v),d.return=p,d):(d=s(d,f.children||[]),d.return=p,d)}function h(p,d,f,v,y){return d===null||d.tag!==7?(d=wn(f,p.mode,v,y),d.return=p,d):(d=s(d,f),d.return=p,d)}function m(p,d,f){if(typeof d=="string"&&d!==""||typeof d=="number")return d=fi(""+d,p.mode,f),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case us:return f=Us(d.type,d.key,d.props,null,p.mode,f),f.ref=gr(p,null,d),f.return=p,f;case Mn:return d=pi(d,p.mode,f),d.return=p,d;case Vt:var v=d._init;return m(p,v(d._payload),f)}if(jr(d)||dr(d))return d=wn(d,p.mode,f,null),d.return=p,d;Ss(p,d)}return null}function g(p,d,f,v){var y=d!==null?d.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return y!==null?null:a(p,d,""+f,v);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case us:return f.key===y?u(p,d,f,v):null;case Mn:return f.key===y?c(p,d,f,v):null;case Vt:return y=f._init,g(p,d,y(f._payload),v)}if(jr(f)||dr(f))return y!==null?null:h(p,d,f,v,null);Ss(p,f)}return null}function S(p,d,f,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return p=p.get(f)||null,a(d,p,""+v,y);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case us:return p=p.get(v.key===null?f:v.key)||null,u(d,p,v,y);case Mn:return p=p.get(v.key===null?f:v.key)||null,c(d,p,v,y);case Vt:var P=v._init;return S(p,d,f,P(v._payload),y)}if(jr(v)||dr(v))return p=p.get(f)||null,h(d,p,v,y,null);Ss(d,v)}return null}function x(p,d,f,v){for(var y=null,P=null,j=d,E=d=0,I=null;j!==null&&E<f.length;E++){j.index>E?(I=j,j=null):I=j.sibling;var M=g(p,j,f[E],v);if(M===null){j===null&&(j=I);break}e&&j&&M.alternate===null&&t(p,j),d=o(M,d,E),P===null?y=M:P.sibling=M,P=M,j=I}if(E===f.length)return n(p,j),ae&&pn(p,E),y;if(j===null){for(;E<f.length;E++)j=m(p,f[E],v),j!==null&&(d=o(j,d,E),P===null?y=j:P.sibling=j,P=j);return ae&&pn(p,E),y}for(j=r(p,j);E<f.length;E++)I=S(j,p,E,f[E],v),I!==null&&(e&&I.alternate!==null&&j.delete(I.key===null?E:I.key),d=o(I,d,E),P===null?y=I:P.sibling=I,P=I);return e&&j.forEach(function($){return t(p,$)}),ae&&pn(p,E),y}function w(p,d,f,v){var y=dr(f);if(typeof y!="function")throw Error(_(150));if(f=y.call(f),f==null)throw Error(_(151));for(var P=y=null,j=d,E=d=0,I=null,M=f.next();j!==null&&!M.done;E++,M=f.next()){j.index>E?(I=j,j=null):I=j.sibling;var $=g(p,j,M.value,v);if($===null){j===null&&(j=I);break}e&&j&&$.alternate===null&&t(p,j),d=o($,d,E),P===null?y=$:P.sibling=$,P=$,j=I}if(M.done)return n(p,j),ae&&pn(p,E),y;if(j===null){for(;!M.done;E++,M=f.next())M=m(p,M.value,v),M!==null&&(d=o(M,d,E),P===null?y=M:P.sibling=M,P=M);return ae&&pn(p,E),y}for(j=r(p,j);!M.done;E++,M=f.next())M=S(j,p,E,M.value,v),M!==null&&(e&&M.alternate!==null&&j.delete(M.key===null?E:M.key),d=o(M,d,E),P===null?y=M:P.sibling=M,P=M);return e&&j.forEach(function(H){return t(p,H)}),ae&&pn(p,E),y}function C(p,d,f,v){if(typeof f=="object"&&f!==null&&f.type===Ln&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case us:e:{for(var y=f.key,P=d;P!==null;){if(P.key===y){if(y=f.type,y===Ln){if(P.tag===7){n(p,P.sibling),d=s(P,f.props.children),d.return=p,p=d;break e}}else if(P.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===Vt&&eu(y)===P.type){n(p,P.sibling),d=s(P,f.props),d.ref=gr(p,P,f),d.return=p,p=d;break e}n(p,P);break}else t(p,P);P=P.sibling}f.type===Ln?(d=wn(f.props.children,p.mode,v,f.key),d.return=p,p=d):(v=Us(f.type,f.key,f.props,null,p.mode,v),v.ref=gr(p,d,f),v.return=p,p=v)}return i(p);case Mn:e:{for(P=f.key;d!==null;){if(d.key===P)if(d.tag===4&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){n(p,d.sibling),d=s(d,f.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=pi(f,p.mode,v),d.return=p,p=d}return i(p);case Vt:return P=f._init,C(p,d,P(f._payload),v)}if(jr(f))return x(p,d,f,v);if(dr(f))return w(p,d,f,v);Ss(p,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,d!==null&&d.tag===6?(n(p,d.sibling),d=s(d,f),d.return=p,p=d):(n(p,d),d=fi(f,p.mode,v),d.return=p,p=d),i(p)):n(p,d)}return C}var nr=Kc(!0),Gc=Kc(!1),no=un(null),ro=null,Bn=null,Ll=null;function Al(){Ll=Bn=ro=null}function Il(e){var t=no.current;ie(no),e._currentValue=t}function Yi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Jn(e,t){ro=e,Ll=Bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(He=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(Ll!==e)if(e={context:e,memoizedValue:t,next:null},Bn===null){if(ro===null)throw Error(_(308));Bn=e,ro.dependencies={lanes:0,firstContext:e}}else Bn=Bn.next=e;return t}var gn=null;function Fl(e){gn===null?gn=[e]:gn.push(e)}function Jc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Fl(t)):(n.next=s.next,s.next=n),t.interleaved=n,Wt(e,r)}function Wt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xt=!1;function Wl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zc(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 At(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Wt(e,n)}return s=r.interleaved,s===null?(t.next=t,Fl(r)):(t.next=s.next,s.next=t),r.interleaved=t,Wt(e,n)}function Ls(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nl(e,n)}}function tu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function so(e,t,n,r){var s=e.updateQueue;Xt=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var u=a,c=u.next;u.next=null,i===null?o=c:i.next=c,i=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==i&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=u))}if(o!==null){var m=s.baseState;i=0,h=c=u=null,a=o;do{var g=a.lane,S=a.eventTime;if((r&g)===g){h!==null&&(h=h.next={eventTime:S,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,w=a;switch(g=t,S=n,w.tag){case 1:if(x=w.payload,typeof x=="function"){m=x.call(S,m,g);break e}m=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=w.payload,g=typeof x=="function"?x.call(S,m,g):x,g==null)break e;m=de({},m,g);break e;case 2:Xt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=s.effects,g===null?s.effects=[a]:g.push(a))}else S={eventTime:S,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=S,u=m):h=h.next=S,i|=g;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;g=a,a=g.next,g.next=null,s.lastBaseUpdate=g,s.shared.pending=null}}while(!0);if(h===null&&(u=m),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);jn|=i,e.lanes=i,e.memoizedState=m}}function nu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(_(191,s));s.call(r)}}}var ns={},_t=un(ns),Xr=un(ns),Qr=un(ns);function vn(e){if(e===ns)throw Error(_(174));return e}function bl(e,t){switch(se(Qr,t),se(Xr,e),se(_t,ns),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_i(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_i(t,e)}ie(_t),se(_t,t)}function rr(){ie(_t),ie(Xr),ie(Qr)}function qc(e){vn(Qr.current);var t=vn(_t.current),n=_i(t,e.type);t!==n&&(se(Xr,e),se(_t,n))}function Ul(e){Xr.current===e&&(ie(_t),ie(Xr))}var ue=un(0);function oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 ii=[];function $l(){for(var e=0;e<ii.length;e++)ii[e]._workInProgressVersionPrimary=null;ii.length=0}var As=Ut.ReactCurrentDispatcher,li=Ut.ReactCurrentBatchConfig,kn=0,ce=null,xe=null,Ne=null,io=!1,Dr=!1,Yr=0,ch=0;function De(){throw Error(_(321))}function Bl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xt(e[n],t[n]))return!1;return!0}function Hl(e,t,n,r,s,o){if(kn=o,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,As.current=e===null||e.memoizedState===null?hh:mh,e=n(r,s),Dr){o=0;do{if(Dr=!1,Yr=0,25<=o)throw Error(_(301));o+=1,Ne=xe=null,t.updateQueue=null,As.current=gh,e=n(r,s)}while(Dr)}if(As.current=lo,t=xe!==null&&xe.next!==null,kn=0,Ne=xe=ce=null,io=!1,t)throw Error(_(300));return e}function Vl(){var e=Yr!==0;return Yr=0,e}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ne===null?ce.memoizedState=Ne=e:Ne=Ne.next=e,Ne}function dt(){if(xe===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=xe.next;var t=Ne===null?ce.memoizedState:Ne.next;if(t!==null)Ne=t,xe=e;else{if(e===null)throw Error(_(310));xe=e,e={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},Ne===null?ce.memoizedState=Ne=e:Ne=Ne.next=e}return Ne}function Kr(e,t){return typeof t=="function"?t(e):t}function ai(e){var t=dt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=xe,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,u=null,c=o;do{var h=c.lane;if((kn&h)===h)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var m={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=m,i=r):u=u.next=m,ce.lanes|=h,jn|=h}c=c.next}while(c!==null&&c!==o);u===null?i=r:u.next=a,xt(r,t.memoizedState)||(He=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,ce.lanes|=o,jn|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ui(e){var t=dt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);xt(o,t.memoizedState)||(He=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ed(){}function td(e,t){var n=ce,r=dt(),s=t(),o=!xt(r.memoizedState,s);if(o&&(r.memoizedState=s,He=!0),r=r.queue,Xl(sd.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ne!==null&&Ne.memoizedState.tag&1){if(n.flags|=2048,Gr(9,rd.bind(null,n,r,s,t),void 0,null),Pe===null)throw Error(_(349));kn&30||nd(n,t,s)}return s}function nd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rd(e,t,n,r){t.value=n,t.getSnapshot=r,od(t)&&id(e)}function sd(e,t,n){return n(function(){od(t)&&id(e)})}function od(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xt(e,n)}catch{return!0}}function id(e){var t=Wt(e,1);t!==null&&St(t,e,1,-1)}function ru(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:Kr,lastRenderedState:e},t.queue=e,e=e.dispatch=ph.bind(null,ce,e),[t.memoizedState,e]}function Gr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ld(){return dt().memoizedState}function Is(e,t,n,r){var s=Nt();ce.flags|=e,s.memoizedState=Gr(1|t,n,void 0,r===void 0?null:r)}function ko(e,t,n,r){var s=dt();r=r===void 0?null:r;var o=void 0;if(xe!==null){var i=xe.memoizedState;if(o=i.destroy,r!==null&&Bl(r,i.deps)){s.memoizedState=Gr(t,n,o,r);return}}ce.flags|=e,s.memoizedState=Gr(1|t,n,o,r)}function su(e,t){return Is(8390656,8,e,t)}function Xl(e,t){return ko(2048,8,e,t)}function ad(e,t){return ko(4,2,e,t)}function ud(e,t){return ko(4,4,e,t)}function cd(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 dd(e,t,n){return n=n!=null?n.concat([e]):null,ko(4,4,cd.bind(null,t,e),n)}function Ql(){}function fd(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pd(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function hd(e,t,n){return kn&21?(xt(n,t)||(n=wc(),ce.lanes|=n,jn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,He=!0),e.memoizedState=n)}function dh(e,t){var n=ee;ee=n!==0&&4>n?n:4,e(!0);var r=li.transition;li.transition={};try{e(!1),t()}finally{ee=n,li.transition=r}}function md(){return dt().memoizedState}function fh(e,t,n){var r=rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gd(e))vd(t,n);else if(n=Jc(e,t,n,r),n!==null){var s=We();St(n,e,r,s),yd(n,t,r)}}function ph(e,t,n){var r=rn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gd(e))vd(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,xt(a,i)){var u=t.interleaved;u===null?(s.next=s,Fl(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Jc(e,t,s,r),n!==null&&(s=We(),St(n,e,r,s),yd(n,t,r))}}function gd(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function vd(e,t){Dr=io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nl(e,n)}}var lo={readContext:ct,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},hh={readContext:ct,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:su,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Is(4194308,4,cd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){return Is(4,2,e,t)},useMemo:function(e,t){var n=Nt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=fh.bind(null,ce,e),[r.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:ru,useDebugValue:Ql,useDeferredValue:function(e){return Nt().memoizedState=e},useTransition:function(){var e=ru(!1),t=e[0];return e=dh.bind(null,e[1]),Nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ce,s=Nt();if(ae){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),Pe===null)throw Error(_(349));kn&30||nd(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,su(sd.bind(null,r,o,e),[e]),r.flags|=2048,Gr(9,rd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Nt(),t=Pe.identifierPrefix;if(ae){var n=Lt,r=Mt;n=(r&~(1<<32-wt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ch++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mh={readContext:ct,useCallback:fd,useContext:ct,useEffect:Xl,useImperativeHandle:dd,useInsertionEffect:ad,useLayoutEffect:ud,useMemo:pd,useReducer:ai,useRef:ld,useState:function(){return ai(Kr)},useDebugValue:Ql,useDeferredValue:function(e){var t=dt();return hd(t,xe.memoizedState,e)},useTransition:function(){var e=ai(Kr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:ed,useSyncExternalStore:td,useId:md,unstable_isNewReconciler:!1},gh={readContext:ct,useCallback:fd,useContext:ct,useEffect:Xl,useImperativeHandle:dd,useInsertionEffect:ad,useLayoutEffect:ud,useMemo:pd,useReducer:ui,useRef:ld,useState:function(){return ui(Kr)},useDebugValue:Ql,useDeferredValue:function(e){var t=dt();return xe===null?t.memoizedState=e:hd(t,xe.memoizedState,e)},useTransition:function(){var e=ui(Kr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:ed,useSyncExternalStore:td,useId:md,unstable_isNewReconciler:!1};function gt(e,t){if(e&&e.defaultProps){t=de({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ki(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:de({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var jo={isMounted:function(e){return(e=e._reactInternals)?En(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=We(),s=rn(e),o=At(r,s);o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,s),t!==null&&(St(t,e,s,r),Ls(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=We(),s=rn(e),o=At(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,s),t!==null&&(St(t,e,s,r),Ls(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=We(),r=rn(e),s=At(n,r);s.tag=2,t!=null&&(s.callback=t),t=tn(e,s,r),t!==null&&(St(t,e,r,n),Ls(t,e,r))}};function ou(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!$r(n,r)||!$r(s,o):!0}function wd(e,t,n){var r=!1,s=ln,o=t.contextType;return typeof o=="object"&&o!==null?o=ct(o):(s=Xe(t)?Sn:Le.current,r=t.contextTypes,o=(r=r!=null)?er(e,s):ln),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=jo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function iu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&jo.enqueueReplaceState(t,t.state,null)}function Gi(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Wl(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=ct(o):(o=Xe(t)?Sn:Le.current,s.context=er(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ki(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&jo.enqueueReplaceState(s,s.state,null),so(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function sr(e,t){try{var n="",r=t;do n+=Hf(r),r=r.return;while(r);var s=n}catch(o){s=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function ci(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ji(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var vh=typeof WeakMap=="function"?WeakMap:Map;function Sd(e,t,n){n=At(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uo||(uo=!0,ll=r),Ji(e,t)},n}function xd(e,t,n){n=At(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Ji(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Ji(e,t),typeof r!="function"&&(nn===null?nn=new Set([this]):nn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function lu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new vh;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Dh.bind(null,e,t,n),t.then(e,e))}function au(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 uu(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=At(-1,1),t.tag=2,tn(n,t,1))),n.lanes|=1),e)}var yh=Ut.ReactCurrentOwner,He=!1;function Fe(e,t,n,r){t.child=e===null?Gc(t,null,n,r):nr(t,e.child,n,r)}function cu(e,t,n,r,s){n=n.render;var o=t.ref;return Jn(t,s),r=Hl(e,t,n,r,o,s),n=Vl(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,bt(e,t,s)):(ae&&n&&Rl(t),t.flags|=1,Fe(e,t,r,s),t.child)}function du(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!ta(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,kd(e,t,o,r,s)):(e=Us(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:$r,n(i,r)&&e.ref===t.ref)return bt(e,t,s)}return t.flags|=1,e=sn(o,r),e.ref=t.ref,e.return=t,t.child=e}function kd(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if($r(o,r)&&e.ref===t.ref)if(He=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(He=!0);else return t.lanes=e.lanes,bt(e,t,s)}return Zi(e,t,n,r,s)}function jd(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(Vn,Ke),Ke|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(Vn,Ke),Ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,se(Vn,Ke),Ke|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,se(Vn,Ke),Ke|=r;return Fe(e,t,s,n),t.child}function Nd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Zi(e,t,n,r,s){var o=Xe(n)?Sn:Le.current;return o=er(t,o),Jn(t,s),n=Hl(e,t,n,r,o,s),r=Vl(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,bt(e,t,s)):(ae&&r&&Rl(t),t.flags|=1,Fe(e,t,n,s),t.child)}function fu(e,t,n,r,s){if(Xe(n)){var o=!0;qs(t)}else o=!1;if(Jn(t,s),t.stateNode===null)Fs(e,t),wd(t,n,r),Gi(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var u=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=ct(c):(c=Xe(n)?Sn:Le.current,c=er(t,c));var h=n.getDerivedStateFromProps,m=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==c)&&iu(t,i,r,c),Xt=!1;var g=t.memoizedState;i.state=g,so(t,r,i,s),u=t.memoizedState,a!==r||g!==u||Ve.current||Xt?(typeof h=="function"&&(Ki(t,n,h,r),u=t.memoizedState),(a=Xt||ou(t,n,a,r,g,u,c))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Zc(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:gt(t.type,a),i.props=c,m=t.pendingProps,g=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=ct(u):(u=Xe(n)?Sn:Le.current,u=er(t,u));var S=n.getDerivedStateFromProps;(h=typeof S=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==m||g!==u)&&iu(t,i,r,u),Xt=!1,g=t.memoizedState,i.state=g,so(t,r,i,s);var x=t.memoizedState;a!==m||g!==x||Ve.current||Xt?(typeof S=="function"&&(Ki(t,n,S,r),x=t.memoizedState),(c=Xt||ou(t,n,c,r,g,x,u)||!1)?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=u,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return qi(e,t,n,r,o,s)}function qi(e,t,n,r,s,o){Nd(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&Ja(t,n,!1),bt(e,t,o);r=t.stateNode,yh.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=nr(t,e.child,null,o),t.child=nr(t,null,a,o)):Fe(e,t,a,o),t.memoizedState=r.state,s&&Ja(t,n,!0),t.child}function Pd(e){var t=e.stateNode;t.pendingContext?Ga(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ga(e,t.context,!1),bl(e,t.containerInfo)}function pu(e,t,n,r,s){return tr(),Ml(s),t.flags|=256,Fe(e,t,n,r),t.child}var el={dehydrated:null,treeContext:null,retryLane:0};function tl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ed(e,t,n){var r=t.pendingProps,s=ue.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),se(ue,s&1),e===null)return Qi(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):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Eo(i,r,0,null),e=wn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=tl(n),t.memoizedState=el,e):Yl(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return wh(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=sn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=sn(a,o):(o=wn(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?tl(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=el,r}return o=e.child,e=o.sibling,r=sn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Yl(e,t){return t=Eo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xs(e,t,n,r){return r!==null&&Ml(r),nr(t,e.child,null,n),e=Yl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wh(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=ci(Error(_(422))),xs(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Eo({mode:"visible",children:r.children},s,0,null),o=wn(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&nr(t,e.child,null,i),t.child.memoizedState=tl(i),t.memoizedState=el,o);if(!(t.mode&1))return xs(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(_(419)),r=ci(o,r,void 0),xs(e,t,i,r)}if(a=(i&e.childLanes)!==0,He||a){if(r=Pe,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Wt(e,s),St(r,e,s,-1))}return ea(),r=ci(Error(_(421))),xs(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Rh.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Ge=en(s.nextSibling),Je=t,ae=!0,yt=null,e!==null&&(it[lt++]=Mt,it[lt++]=Lt,it[lt++]=xn,Mt=e.id,Lt=e.overflow,xn=t),t=Yl(t,r.children),t.flags|=4096,t)}function hu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yi(e.return,t,n)}function di(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function Cd(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Fe(e,t,r.children,n),r=ue.current,r&2)r=r&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&&hu(e,n,t);else if(e.tag===19)hu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(se(ue,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&oo(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),di(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&oo(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}di(t,!0,n,null,o);break;case"together":di(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function bt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=sn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sh(e,t,n){switch(t.tag){case 3:Pd(t),tr();break;case 5:qc(t);break;case 1:Xe(t.type)&&qs(t);break;case 4:bl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;se(no,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(ue,ue.current&1),t.flags|=128,null):n&t.child.childLanes?Ed(e,t,n):(se(ue,ue.current&1),e=bt(e,t,n),e!==null?e.sibling:null);se(ue,ue.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cd(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),se(ue,ue.current),r)break;return null;case 22:case 23:return t.lanes=0,jd(e,t,n)}return bt(e,t,n)}var _d,nl,zd,Td;_d=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};nl=function(){};zd=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,vn(_t.current);var o=null;switch(n){case"input":s=Ni(e,s),r=Ni(e,r),o=[];break;case"select":s=de({},s,{value:void 0}),r=de({},r,{value:void 0}),o=[];break;case"textarea":s=Ci(e,s),r=Ci(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Js)}zi(n,r);var i;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Lr.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&a[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(o||(o=[]),o.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Lr.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&oe("scroll",e),o||a===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Td=function(e,t,n,r){n!==r&&(t.flags|=4)};function vr(e,t){if(!ae)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xh(e,t,n){var r=t.pendingProps;switch(Ol(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Xe(t.type)&&Zs(),Re(t),null;case 3:return r=t.stateNode,rr(),ie(Ve),ie(Le),$l(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ws(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yt!==null&&(cl(yt),yt=null))),nl(e,t),Re(t),null;case 5:Ul(t);var s=vn(Qr.current);if(n=t.type,e!==null&&t.stateNode!=null)zd(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Re(t),null}if(e=vn(_t.current),ws(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Et]=t,r[Vr]=o,e=(t.mode&1)!==0,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(s=0;s<Pr.length;s++)oe(Pr[s],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":ja(r,o),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},oe("invalid",r);break;case"textarea":Pa(r,o),oe("invalid",r)}zi(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&ys(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&ys(r.textContent,a,e),s=["children",""+a]):Lr.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&oe("scroll",r)}switch(n){case"input":cs(r),Na(r,o,!0);break;case"textarea":cs(r),Ea(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Js)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Et]=t,e[Vr]=r,_d(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ti(n,r),n){case"dialog":oe("cancel",e),oe("close",e),s=r;break;case"iframe":case"object":case"embed":oe("load",e),s=r;break;case"video":case"audio":for(s=0;s<Pr.length;s++)oe(Pr[s],e);s=r;break;case"source":oe("error",e),s=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),s=r;break;case"details":oe("toggle",e),s=r;break;case"input":ja(e,r),s=Ni(e,r),oe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=de({},r,{value:void 0}),oe("invalid",e);break;case"textarea":Pa(e,r),s=Ci(e,r),oe("invalid",e);break;default:s=r}zi(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?lc(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&oc(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Ar(e,u):typeof u=="number"&&Ar(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Lr.hasOwnProperty(o)?u!=null&&o==="onScroll"&&oe("scroll",e):u!=null&&yl(e,o,u,i))}switch(n){case"input":cs(e),Na(e,r,!1);break;case"textarea":cs(e),Ea(e);break;case"option":r.value!=null&&e.setAttribute("value",""+on(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Qn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Qn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Js)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Re(t),null;case 6:if(e&&t.stateNode!=null)Td(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=vn(Qr.current),vn(_t.current),ws(t)){if(r=t.stateNode,n=t.memoizedProps,r[Et]=t,(o=r.nodeValue!==n)&&(e=Je,e!==null))switch(e.tag){case 3:ys(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ys(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Et]=t,t.stateNode=r}return Re(t),null;case 13:if(ie(ue),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ae&&Ge!==null&&t.mode&1&&!(t.flags&128))Yc(),tr(),t.flags|=98560,o=!1;else if(o=ws(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(_(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(_(317));o[Et]=t}else tr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),o=!1}else yt!==null&&(cl(yt),yt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ue.current&1?ke===0&&(ke=3):ea())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return rr(),nl(e,t),e===null&&Br(t.stateNode.containerInfo),Re(t),null;case 10:return Il(t.type._context),Re(t),null;case 17:return Xe(t.type)&&Zs(),Re(t),null;case 19:if(ie(ue),o=t.memoizedState,o===null)return Re(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)vr(o,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=oo(e),i!==null){for(t.flags|=128,vr(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return se(ue,ue.current&1|2),t.child}e=e.sibling}o.tail!==null&&he()>or&&(t.flags|=128,r=!0,vr(o,!1),t.lanes=4194304)}else{if(!r)if(e=oo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ae)return Re(t),null}else 2*he()-o.renderingStartTime>or&&n!==1073741824&&(t.flags|=128,r=!0,vr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=he(),t.sibling=null,n=ue.current,se(ue,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return ql(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ke&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function kh(e,t){switch(Ol(t),t.tag){case 1:return Xe(t.type)&&Zs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rr(),ie(Ve),ie(Le),$l(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ul(t),null;case 13:if(ie(ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));tr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(ue),null;case 4:return rr(),null;case 10:return Il(t.type._context),null;case 22:case 23:return ql(),null;case 24:return null;default:return null}}var ks=!1,Me=!1,jh=typeof WeakSet=="function"?WeakSet:Set,L=null;function Hn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function rl(e,t,n){try{n()}catch(r){fe(e,t,r)}}var mu=!1;function Nh(e,t){if(bi=Ys,e=Lc(),Dl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,c=0,h=0,m=e,g=null;t:for(;;){for(var S;m!==n||s!==0&&m.nodeType!==3||(a=i+s),m!==o||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(S=m.firstChild)!==null;)g=m,m=S;for(;;){if(m===e)break t;if(g===n&&++c===s&&(a=i),g===o&&++h===r&&(u=i),(S=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=S}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ui={focusedElem:e,selectionRange:n},Ys=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var w=x.memoizedProps,C=x.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:gt(t.type,w),C);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(v){fe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return x=mu,mu=!1,x}function Rr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&rl(t,n,o)}s=s.next}while(s!==r)}}function No(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Dd(e){var t=e.alternate;t!==null&&(e.alternate=null,Dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Et],delete t[Vr],delete t[Hi],delete t[ih],delete t[lh])),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 Rd(e){return e.tag===5||e.tag===3||e.tag===4}function gu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rd(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 ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Js));else if(r!==4&&(e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}var Ee=null,vt=!1;function $t(e,t,n){for(n=n.child;n!==null;)Od(e,t,n),n=n.sibling}function Od(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(go,n)}catch{}switch(n.tag){case 5:Me||Hn(n,t);case 6:var r=Ee,s=vt;Ee=null,$t(e,t,n),Ee=r,vt=s,Ee!==null&&(vt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(vt?(e=Ee,n=n.stateNode,e.nodeType===8?si(e.parentNode,n):e.nodeType===1&&si(e,n),br(e)):si(Ee,n.stateNode));break;case 4:r=Ee,s=vt,Ee=n.stateNode.containerInfo,vt=!0,$t(e,t,n),Ee=r,vt=s;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&rl(n,t,i),s=s.next}while(s!==r)}$t(e,t,n);break;case 1:if(!Me&&(Hn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){fe(n,t,a)}$t(e,t,n);break;case 21:$t(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,$t(e,t,n),Me=r):$t(e,t,n);break;default:$t(e,t,n)}}function vu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jh),t.forEach(function(r){var s=Oh.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Ee=a.stateNode,vt=!1;break e;case 3:Ee=a.stateNode.containerInfo,vt=!0;break e;case 4:Ee=a.stateNode.containerInfo,vt=!0;break e}a=a.return}if(Ee===null)throw Error(_(160));Od(o,i,s),Ee=null,vt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){fe(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Md(t,e),t=t.sibling}function Md(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pt(t,e),kt(e),r&4){try{Rr(3,e,e.return),No(3,e)}catch(w){fe(e,e.return,w)}try{Rr(5,e,e.return)}catch(w){fe(e,e.return,w)}}break;case 1:pt(t,e),kt(e),r&512&&n!==null&&Hn(n,n.return);break;case 5:if(pt(t,e),kt(e),r&512&&n!==null&&Hn(n,n.return),e.flags&32){var s=e.stateNode;try{Ar(s,"")}catch(w){fe(e,e.return,w)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&nc(s,o),Ti(a,i);var c=Ti(a,o);for(i=0;i<u.length;i+=2){var h=u[i],m=u[i+1];h==="style"?lc(s,m):h==="dangerouslySetInnerHTML"?oc(s,m):h==="children"?Ar(s,m):yl(s,h,m,c)}switch(a){case"input":Pi(s,o);break;case"textarea":rc(s,o);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var S=o.value;S!=null?Qn(s,!!o.multiple,S,!1):g!==!!o.multiple&&(o.defaultValue!=null?Qn(s,!!o.multiple,o.defaultValue,!0):Qn(s,!!o.multiple,o.multiple?[]:"",!1))}s[Vr]=o}catch(w){fe(e,e.return,w)}}break;case 6:if(pt(t,e),kt(e),r&4){if(e.stateNode===null)throw Error(_(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(w){fe(e,e.return,w)}}break;case 3:if(pt(t,e),kt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{br(t.containerInfo)}catch(w){fe(e,e.return,w)}break;case 4:pt(t,e),kt(e);break;case 13:pt(t,e),kt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Jl=he())),r&4&&vu(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Me=(c=Me)||h,pt(t,e),Me=c):pt(t,e),kt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(L=e,h=e.child;h!==null;){for(m=L=h;L!==null;){switch(g=L,S=g.child,g.tag){case 0:case 11:case 14:case 15:Rr(4,g,g.return);break;case 1:Hn(g,g.return);var x=g.stateNode;if(typeof x.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(w){fe(r,n,w)}}break;case 5:Hn(g,g.return);break;case 22:if(g.memoizedState!==null){wu(m);continue}}S!==null?(S.return=g,L=S):wu(m)}h=h.sibling}e:for(h=null,m=e;;){if(m.tag===5){if(h===null){h=m;try{s=m.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=m.stateNode,u=m.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=ic("display",i))}catch(w){fe(e,e.return,w)}}}else if(m.tag===6){if(h===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(w){fe(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:pt(t,e),kt(e),r&4&&vu(e);break;case 21:break;default:pt(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Rd(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ar(s,""),r.flags&=-33);var o=gu(e);il(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=gu(e);ol(e,a,i);break;default:throw Error(_(161))}}catch(u){fe(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ph(e,t,n){L=e,Ld(e)}function Ld(e,t,n){for(var r=(e.mode&1)!==0;L!==null;){var s=L,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||ks;if(!i){var a=s.alternate,u=a!==null&&a.memoizedState!==null||Me;a=ks;var c=Me;if(ks=i,(Me=u)&&!c)for(L=s;L!==null;)i=L,u=i.child,i.tag===22&&i.memoizedState!==null?Su(s):u!==null?(u.return=i,L=u):Su(s);for(;o!==null;)L=o,Ld(o),o=o.sibling;L=s,ks=a,Me=c}yu(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,L=o):yu(e)}}function yu(e){for(;L!==null;){var t=L;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Me||No(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Me)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:gt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&nu(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}nu(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var m=h.dehydrated;m!==null&&br(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Me||t.flags&512&&sl(t)}catch(g){fe(t,t.return,g)}}if(t===e){L=null;break}if(n=t.sibling,n!==null){n.return=t.return,L=n;break}L=t.return}}function wu(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var n=t.sibling;if(n!==null){n.return=t.return,L=n;break}L=t.return}}function Su(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{No(4,t)}catch(u){fe(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){fe(t,s,u)}}var o=t.return;try{sl(t)}catch(u){fe(t,o,u)}break;case 5:var i=t.return;try{sl(t)}catch(u){fe(t,i,u)}}}catch(u){fe(t,t.return,u)}if(t===e){L=null;break}var a=t.sibling;if(a!==null){a.return=t.return,L=a;break}L=t.return}}var Eh=Math.ceil,ao=Ut.ReactCurrentDispatcher,Kl=Ut.ReactCurrentOwner,ut=Ut.ReactCurrentBatchConfig,K=0,Pe=null,ve=null,Ce=0,Ke=0,Vn=un(0),ke=0,Jr=null,jn=0,Po=0,Gl=0,Or=null,Be=null,Jl=0,or=1/0,Rt=null,uo=!1,ll=null,nn=null,js=!1,Gt=null,co=0,Mr=0,al=null,Ws=-1,bs=0;function We(){return K&6?he():Ws!==-1?Ws:Ws=he()}function rn(e){return e.mode&1?K&2&&Ce!==0?Ce&-Ce:uh.transition!==null?(bs===0&&(bs=wc()),bs):(e=ee,e!==0||(e=window.event,e=e===void 0?16:Ec(e.type)),e):1}function St(e,t,n,r){if(50<Mr)throw Mr=0,al=null,Error(_(185));qr(e,n,r),(!(K&2)||e!==Pe)&&(e===Pe&&(!(K&2)&&(Po|=n),ke===4&&Yt(e,Ce)),Qe(e,r),n===1&&K===0&&!(t.mode&1)&&(or=he()+500,xo&&cn()))}function Qe(e,t){var n=e.callbackNode;up(e,t);var r=Qs(e,e===Pe?Ce:0);if(r===0)n!==null&&za(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&za(n),t===1)e.tag===0?ah(xu.bind(null,e)):Vc(xu.bind(null,e)),sh(function(){!(K&6)&&cn()}),n=null;else{switch(Sc(r)){case 1:n=jl;break;case 4:n=vc;break;case 16:n=Xs;break;case 536870912:n=yc;break;default:n=Xs}n=Bd(n,Ad.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ad(e,t){if(Ws=-1,bs=0,K&6)throw Error(_(327));var n=e.callbackNode;if(Zn()&&e.callbackNode!==n)return null;var r=Qs(e,e===Pe?Ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=fo(e,r);else{t=r;var s=K;K|=2;var o=Fd();(Pe!==e||Ce!==t)&&(Rt=null,or=he()+500,yn(e,t));do try{zh();break}catch(a){Id(e,a)}while(!0);Al(),ao.current=o,K=s,ve!==null?t=0:(Pe=null,Ce=0,t=ke)}if(t!==0){if(t===2&&(s=Li(e),s!==0&&(r=s,t=ul(e,s))),t===1)throw n=Jr,yn(e,0),Yt(e,r),Qe(e,he()),n;if(t===6)Yt(e,r);else{if(s=e.current.alternate,!(r&30)&&!Ch(s)&&(t=fo(e,r),t===2&&(o=Li(e),o!==0&&(r=o,t=ul(e,o))),t===1))throw n=Jr,yn(e,0),Yt(e,r),Qe(e,he()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:hn(e,Be,Rt);break;case 3:if(Yt(e,r),(r&130023424)===r&&(t=Jl+500-he(),10<t)){if(Qs(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){We(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Bi(hn.bind(null,e,Be,Rt),t);break}hn(e,Be,Rt);break;case 4:if(Yt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-wt(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Eh(r/1960))-r,10<r){e.timeoutHandle=Bi(hn.bind(null,e,Be,Rt),r);break}hn(e,Be,Rt);break;case 5:hn(e,Be,Rt);break;default:throw Error(_(329))}}}return Qe(e,he()),e.callbackNode===n?Ad.bind(null,e):null}function ul(e,t){var n=Or;return e.current.memoizedState.isDehydrated&&(yn(e,t).flags|=256),e=fo(e,t),e!==2&&(t=Be,Be=n,t!==null&&cl(t)),e}function cl(e){Be===null?Be=e:Be.push.apply(Be,e)}function Ch(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!xt(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yt(e,t){for(t&=~Gl,t&=~Po,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),r=1<<n;e[n]=-1,t&=~r}}function xu(e){if(K&6)throw Error(_(327));Zn();var t=Qs(e,0);if(!(t&1))return Qe(e,he()),null;var n=fo(e,t);if(e.tag!==0&&n===2){var r=Li(e);r!==0&&(t=r,n=ul(e,r))}if(n===1)throw n=Jr,yn(e,0),Yt(e,t),Qe(e,he()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,hn(e,Be,Rt),Qe(e,he()),null}function Zl(e,t){var n=K;K|=1;try{return e(t)}finally{K=n,K===0&&(or=he()+500,xo&&cn())}}function Nn(e){Gt!==null&&Gt.tag===0&&!(K&6)&&Zn();var t=K;K|=1;var n=ut.transition,r=ee;try{if(ut.transition=null,ee=1,e)return e()}finally{ee=r,ut.transition=n,K=t,!(K&6)&&cn()}}function ql(){Ke=Vn.current,ie(Vn)}function yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,rh(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(Ol(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zs();break;case 3:rr(),ie(Ve),ie(Le),$l();break;case 5:Ul(r);break;case 4:rr();break;case 13:ie(ue);break;case 19:ie(ue);break;case 10:Il(r.type._context);break;case 22:case 23:ql()}n=n.return}if(Pe=e,ve=e=sn(e.current,null),Ce=Ke=t,ke=0,Jr=null,Gl=Po=jn=0,Be=Or=null,gn!==null){for(t=0;t<gn.length;t++)if(n=gn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}gn=null}return e}function Id(e,t){do{var n=ve;try{if(Al(),As.current=lo,io){for(var r=ce.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}io=!1}if(kn=0,Ne=xe=ce=null,Dr=!1,Yr=0,Kl.current=null,n===null||n.return===null){ke=1,Jr=t,ve=null;break}e:{var o=e,i=n.return,a=n,u=t;if(t=Ce,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,h=a,m=h.tag;if(!(h.mode&1)&&(m===0||m===11||m===15)){var g=h.alternate;g?(h.updateQueue=g.updateQueue,h.memoizedState=g.memoizedState,h.lanes=g.lanes):(h.updateQueue=null,h.memoizedState=null)}var S=au(i);if(S!==null){S.flags&=-257,uu(S,i,a,o,t),S.mode&1&&lu(o,c,t),t=S,u=c;var x=t.updateQueue;if(x===null){var w=new Set;w.add(u),t.updateQueue=w}else x.add(u);break e}else{if(!(t&1)){lu(o,c,t),ea();break e}u=Error(_(426))}}else if(ae&&a.mode&1){var C=au(i);if(C!==null){!(C.flags&65536)&&(C.flags|=256),uu(C,i,a,o,t),Ml(sr(u,a));break e}}o=u=sr(u,a),ke!==4&&(ke=2),Or===null?Or=[o]:Or.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=Sd(o,u,t);tu(o,p);break e;case 1:a=u;var d=o.type,f=o.stateNode;if(!(o.flags&128)&&(typeof d.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(nn===null||!nn.has(f)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=xd(o,a,t);tu(o,v);break e}}o=o.return}while(o!==null)}bd(n)}catch(y){t=y,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(!0)}function Fd(){var e=ao.current;return ao.current=lo,e===null?lo:e}function ea(){(ke===0||ke===3||ke===2)&&(ke=4),Pe===null||!(jn&268435455)&&!(Po&268435455)||Yt(Pe,Ce)}function fo(e,t){var n=K;K|=2;var r=Fd();(Pe!==e||Ce!==t)&&(Rt=null,yn(e,t));do try{_h();break}catch(s){Id(e,s)}while(!0);if(Al(),K=n,ao.current=r,ve!==null)throw Error(_(261));return Pe=null,Ce=0,ke}function _h(){for(;ve!==null;)Wd(ve)}function zh(){for(;ve!==null&&!ep();)Wd(ve)}function Wd(e){var t=$d(e.alternate,e,Ke);e.memoizedProps=e.pendingProps,t===null?bd(e):ve=t,Kl.current=null}function bd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=kh(n,t),n!==null){n.flags&=32767,ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,ve=null;return}}else if(n=xh(n,t,Ke),n!==null){ve=n;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);ke===0&&(ke=5)}function hn(e,t,n){var r=ee,s=ut.transition;try{ut.transition=null,ee=1,Th(e,t,n,r)}finally{ut.transition=s,ee=r}return null}function Th(e,t,n,r){do Zn();while(Gt!==null);if(K&6)throw Error(_(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(cp(e,o),e===Pe&&(ve=Pe=null,Ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||js||(js=!0,Bd(Xs,function(){return Zn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=ut.transition,ut.transition=null;var i=ee;ee=1;var a=K;K|=4,Kl.current=null,Nh(e,n),Md(n,e),Gp(Ui),Ys=!!bi,Ui=bi=null,e.current=n,Ph(n),tp(),K=a,ee=i,ut.transition=o}else e.current=n;if(js&&(js=!1,Gt=e,co=s),o=e.pendingLanes,o===0&&(nn=null),sp(n.stateNode),Qe(e,he()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(uo)throw uo=!1,e=ll,ll=null,e;return co&1&&e.tag!==0&&Zn(),o=e.pendingLanes,o&1?e===al?Mr++:(Mr=0,al=e):Mr=0,cn(),null}function Zn(){if(Gt!==null){var e=Sc(co),t=ut.transition,n=ee;try{if(ut.transition=null,ee=16>e?16:e,Gt===null)var r=!1;else{if(e=Gt,Gt=null,co=0,K&6)throw Error(_(331));var s=K;for(K|=4,L=e.current;L!==null;){var o=L,i=o.child;if(L.flags&16){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(L=c;L!==null;){var h=L;switch(h.tag){case 0:case 11:case 15:Rr(8,h,o)}var m=h.child;if(m!==null)m.return=h,L=m;else for(;L!==null;){h=L;var g=h.sibling,S=h.return;if(Dd(h),h===c){L=null;break}if(g!==null){g.return=S,L=g;break}L=S}}}var x=o.alternate;if(x!==null){var w=x.child;if(w!==null){x.child=null;do{var C=w.sibling;w.sibling=null,w=C}while(w!==null)}}L=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,L=i;else e:for(;L!==null;){if(o=L,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Rr(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,L=p;break e}L=o.return}}var d=e.current;for(L=d;L!==null;){i=L;var f=i.child;if(i.subtreeFlags&2064&&f!==null)f.return=i,L=f;else e:for(i=d;L!==null;){if(a=L,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:No(9,a)}}catch(y){fe(a,a.return,y)}if(a===i){L=null;break e}var v=a.sibling;if(v!==null){v.return=a.return,L=v;break e}L=a.return}}if(K=s,cn(),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(go,e)}catch{}r=!0}return r}finally{ee=n,ut.transition=t}}return!1}function ku(e,t,n){t=sr(n,t),t=Sd(e,t,1),e=tn(e,t,1),t=We(),e!==null&&(qr(e,1,t),Qe(e,t))}function fe(e,t,n){if(e.tag===3)ku(e,e,n);else for(;t!==null;){if(t.tag===3){ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(nn===null||!nn.has(r))){e=sr(n,e),e=xd(t,e,1),t=tn(t,e,1),e=We(),t!==null&&(qr(t,1,e),Qe(t,e));break}}t=t.return}}function Dh(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=We(),e.pingedLanes|=e.suspendedLanes&n,Pe===e&&(Ce&n)===n&&(ke===4||ke===3&&(Ce&130023424)===Ce&&500>he()-Jl?yn(e,0):Gl|=n),Qe(e,t)}function Ud(e,t){t===0&&(e.mode&1?(t=ps,ps<<=1,!(ps&130023424)&&(ps=4194304)):t=1);var n=We();e=Wt(e,t),e!==null&&(qr(e,t,n),Qe(e,n))}function Rh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ud(e,n)}function Oh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Ud(e,n)}var $d;$d=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ve.current)He=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return He=!1,Sh(e,t,n);He=!!(e.flags&131072)}else He=!1,ae&&t.flags&1048576&&Xc(t,to,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fs(e,t),e=t.pendingProps;var s=er(t,Le.current);Jn(t,n),s=Hl(null,t,r,e,s,n);var o=Vl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xe(r)?(o=!0,qs(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Wl(t),s.updater=jo,t.stateNode=s,s._reactInternals=t,Gi(t,r,e,n),t=qi(null,t,r,!0,o,n)):(t.tag=0,ae&&o&&Rl(t),Fe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Lh(r),e=gt(r,e),s){case 0:t=Zi(null,t,r,e,n);break e;case 1:t=fu(null,t,r,e,n);break e;case 11:t=cu(null,t,r,e,n);break e;case 14:t=du(null,t,r,gt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),Zi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),fu(e,t,r,s,n);case 3:e:{if(Pd(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Zc(e,t),so(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=sr(Error(_(423)),t),t=pu(e,t,r,n,s);break e}else if(r!==s){s=sr(Error(_(424)),t),t=pu(e,t,r,n,s);break e}else for(Ge=en(t.stateNode.containerInfo.firstChild),Je=t,ae=!0,yt=null,n=Gc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tr(),r===s){t=bt(e,t,n);break e}Fe(e,t,r,n)}t=t.child}return t;case 5:return qc(t),e===null&&Qi(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,$i(r,s)?i=null:o!==null&&$i(r,o)&&(t.flags|=32),Nd(e,t),Fe(e,t,i,n),t.child;case 6:return e===null&&Qi(t),null;case 13:return Ed(e,t,n);case 4:return bl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nr(t,null,r,n):Fe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),cu(e,t,r,s,n);case 7:return Fe(e,t,t.pendingProps,n),t.child;case 8:return Fe(e,t,t.pendingProps.children,n),t.child;case 12:return Fe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,se(no,r._currentValue),r._currentValue=i,o!==null)if(xt(o.value,i)){if(o.children===s.children&&!Ve.current){t=bt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=At(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Yi(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(_(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Yi(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Fe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Jn(t,n),s=ct(s),r=r(s),t.flags|=1,Fe(e,t,r,n),t.child;case 14:return r=t.type,s=gt(r,t.pendingProps),s=gt(r.type,s),du(e,t,r,s,n);case 15:return kd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),Fs(e,t),t.tag=1,Xe(r)?(e=!0,qs(t)):e=!1,Jn(t,n),wd(t,r,s),Gi(t,r,s,n),qi(null,t,r,!0,e,n);case 19:return Cd(e,t,n);case 22:return jd(e,t,n)}throw Error(_(156,t.tag))};function Bd(e,t){return gc(e,t)}function Mh(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function at(e,t,n,r){return new Mh(e,t,n,r)}function ta(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lh(e){if(typeof e=="function")return ta(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Sl)return 11;if(e===xl)return 14}return 2}function sn(e,t){var n=e.alternate;return n===null?(n=at(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Us(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")ta(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ln:return wn(n.children,s,o,t);case wl:i=8,s|=8;break;case Si:return e=at(12,n,t,s|2),e.elementType=Si,e.lanes=o,e;case xi:return e=at(13,n,t,s),e.elementType=xi,e.lanes=o,e;case ki:return e=at(19,n,t,s),e.elementType=ki,e.lanes=o,e;case qu:return Eo(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ju:i=10;break e;case Zu:i=9;break e;case Sl:i=11;break e;case xl:i=14;break e;case Vt:i=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=at(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function wn(e,t,n,r){return e=at(7,e,r,t),e.lanes=n,e}function Eo(e,t,n,r){return e=at(22,e,r,t),e.elementType=qu,e.lanes=n,e.stateNode={isHidden:!1},e}function fi(e,t,n){return e=at(6,e,null,t),e.lanes=n,e}function pi(e,t,n){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ah(e,t,n,r,s){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=Qo(0),this.expirationTimes=Qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function na(e,t,n,r,s,o,i,a,u){return e=new Ah(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=at(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wl(o),e}function Ih(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Mn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hd(e){if(!e)return ln;e=e._reactInternals;e:{if(En(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(Xe(n))return Hc(e,n,t)}return t}function Vd(e,t,n,r,s,o,i,a,u){return e=na(n,r,!0,e,s,o,i,a,u),e.context=Hd(null),n=e.current,r=We(),s=rn(n),o=At(r,s),o.callback=t??null,tn(n,o,s),e.current.lanes=s,qr(e,s,r),Qe(e,r),e}function Co(e,t,n,r){var s=t.current,o=We(),i=rn(s);return n=Hd(n),t.context===null?t.context=n:t.pendingContext=n,t=At(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=tn(s,t,i),e!==null&&(St(e,s,i,o),Ls(e,s,i)),i}function po(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 ju(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ra(e,t){ju(e,t),(e=e.alternate)&&ju(e,t)}function Fh(){return null}var Xd=typeof reportError=="function"?reportError:function(e){console.error(e)};function sa(e){this._internalRoot=e}_o.prototype.render=sa.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));Co(e,t,null,null)};_o.prototype.unmount=sa.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nn(function(){Co(null,e,null,null)}),t[Ft]=null}};function _o(e){this._internalRoot=e}_o.prototype.unstable_scheduleHydration=function(e){if(e){var t=jc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qt.length&&t!==0&&t<Qt[n].priority;n++);Qt.splice(n,0,e),n===0&&Pc(e)}};function oa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Nu(){}function Wh(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var c=po(i);o.call(c)}}var i=Vd(t,r,e,0,null,!1,!1,"",Nu);return e._reactRootContainer=i,e[Ft]=i.current,Br(e.nodeType===8?e.parentNode:e),Nn(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=po(u);a.call(c)}}var u=na(e,0,!1,null,null,!1,!1,"",Nu);return e._reactRootContainer=u,e[Ft]=u.current,Br(e.nodeType===8?e.parentNode:e),Nn(function(){Co(t,u,n,r)}),u}function To(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var u=po(i);a.call(u)}}Co(t,i,e,s)}else i=Wh(n,t,e,s,r);return po(i)}xc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Nr(t.pendingLanes);n!==0&&(Nl(t,n|1),Qe(t,he()),!(K&6)&&(or=he()+500,cn()))}break;case 13:Nn(function(){var r=Wt(e,1);if(r!==null){var s=We();St(r,e,1,s)}}),ra(e,1)}};Pl=function(e){if(e.tag===13){var t=Wt(e,134217728);if(t!==null){var n=We();St(t,e,134217728,n)}ra(e,134217728)}};kc=function(e){if(e.tag===13){var t=rn(e),n=Wt(e,t);if(n!==null){var r=We();St(n,e,t,r)}ra(e,t)}};jc=function(){return ee};Nc=function(e,t){var n=ee;try{return ee=e,t()}finally{ee=n}};Ri=function(e,t,n){switch(t){case"input":if(Pi(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=So(r);if(!s)throw Error(_(90));tc(r),Pi(r,s)}}}break;case"textarea":rc(e,n);break;case"select":t=n.value,t!=null&&Qn(e,!!n.multiple,t,!1)}};cc=Zl;dc=Nn;var bh={usingClientEntryPoint:!1,Events:[ts,Wn,So,ac,uc,Zl]},yr={findFiberByHostInstance:mn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Uh={bundleType:yr.bundleType,version:yr.version,rendererPackageName:yr.rendererPackageName,rendererConfig:yr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ut.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hc(e),e===null?null:e.stateNode},findFiberByHostInstance:yr.findFiberByHostInstance||Fh,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 Ns=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ns.isDisabled&&Ns.supportsFiber)try{go=Ns.inject(Uh),Ct=Ns}catch{}}et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bh;et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!oa(t))throw Error(_(200));return Ih(e,t,null,n)};et.createRoot=function(e,t){if(!oa(e))throw Error(_(299));var n=!1,r="",s=Xd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=na(e,1,!1,null,null,n,!1,r,s),e[Ft]=t.current,Br(e.nodeType===8?e.parentNode:e),new sa(t)};et.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(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=hc(t),e=e===null?null:e.stateNode,e};et.flushSync=function(e){return Nn(e)};et.hydrate=function(e,t,n){if(!zo(t))throw Error(_(200));return To(null,e,t,!0,n)};et.hydrateRoot=function(e,t,n){if(!oa(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Xd;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Vd(t,null,e,1,n??null,s,!1,o,i),e[Ft]=t.current,Br(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new _o(t)};et.render=function(e,t,n){if(!zo(t))throw Error(_(200));return To(null,e,t,!1,n)};et.unmountComponentAtNode=function(e){if(!zo(e))throw Error(_(40));return e._reactRootContainer?(Nn(function(){To(null,null,e,!1,function(){e._reactRootContainer=null,e[Ft]=null})}),!0):!1};et.unstable_batchedUpdates=Zl;et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zo(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return To(e,t,n,!1,r)};et.version="18.3.1-next-f1338f8080-20240426";function Qd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qd)}catch(e){console.error(e)}}Qd(),Qu.exports=et;var rs=Qu.exports,Pu=rs;yi.createRoot=Pu.createRoot,yi.hydrateRoot=Pu.hydrateRoot;var Do={exports:{}},Yd={},Kd={exports:{}},$h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Bh=$h,Hh=Bh;function Gd(){}function Jd(){}Jd.resetWarningCache=Gd;var Vh=function(){function e(r,s,o,i,a,u){if(u!==Hh){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Jd,resetWarningCache:Gd};return n.PropTypes=n,n};Kd.exports=Vh();var Zd=Kd.exports;function qd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=qd(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Eu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qd(e))&&(r&&(r+=" "),r+=t);return r}const Xh=Object.freeze(Object.defineProperty({__proto__:null,clsx:Eu,default:Eu},Symbol.toStringTag,{value:"Module"})),Qh=gf(Xh);var pe={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.dontSetMe=Zh;zt.findInArray=Yh;zt.int=Jh;zt.isFunction=Kh;zt.isNum=Gh;function Yh(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function Kh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function Gh(e){return typeof e=="number"&&!isNaN(e)}function Jh(e){return parseInt(e,10)}function Zh(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.browserPrefixToKey=tf;Cn.browserPrefixToStyle=qh;Cn.default=void 0;Cn.getPrefix=ef;const hi=["Moz","Webkit","O","ms"];function ef(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const n=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!n||t in n)return"";for(let r=0;r<hi.length;r++)if(tf(t,hi[r])in n)return hi[r];return""}function tf(e,t){return t?"".concat(t).concat(em(e)):e}function qh(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function em(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]==="-"?n=!0:t+=e[r];return t}Cn.default=ef();Object.defineProperty(pe,"__esModule",{value:!0});pe.addClassName=sf;pe.addEvent=rm;pe.addUserSelectStyles=hm;pe.createCSSTransform=cm;pe.createSVGTransform=dm;pe.getTouch=fm;pe.getTouchIdentifier=pm;pe.getTranslation=ia;pe.innerHeight=lm;pe.innerWidth=am;pe.matchesSelector=rf;pe.matchesSelectorAndParentsTo=nm;pe.offsetXYFromParent=um;pe.outerHeight=om;pe.outerWidth=im;pe.removeClassName=of;pe.removeEvent=sm;pe.removeUserSelectStyles=mm;var Ze=zt,Cu=tm(Cn);function nf(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(nf=function(r){return r?n:t})(e)}function tm(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=nf(t);if(n&&n.has(e))return n.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}let Ps="";function rf(e,t){return Ps||(Ps=(0,Ze.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,Ze.isFunction)(e[n])})),(0,Ze.isFunction)(e[Ps])?e[Ps](t):!1}function nm(e,t,n){let r=e;do{if(rf(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function rm(e,t,n,r){if(!e)return;const s={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,s):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function sm(e,t,n,r){if(!e)return;const s={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,s):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function om(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ze.int)(n.borderTopWidth),t+=(0,Ze.int)(n.borderBottomWidth),t}function im(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ze.int)(n.borderLeftWidth),t+=(0,Ze.int)(n.borderRightWidth),t}function lm(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ze.int)(n.paddingTop),t-=(0,Ze.int)(n.paddingBottom),t}function am(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ze.int)(n.paddingLeft),t-=(0,Ze.int)(n.paddingRight),t}function um(e,t,n){const s=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-s.left)/n,i=(e.clientY+t.scrollTop-s.top)/n;return{x:o,y:i}}function cm(e,t){const n=ia(e,t,"px");return{[(0,Cu.browserPrefixToKey)("transform",Cu.default)]:n}}function dm(e,t){return ia(e,t,"")}function ia(e,t,n){let{x:r,y:s}=e,o="translate(".concat(r).concat(n,",").concat(s).concat(n,")");if(t){const i="".concat(typeof t.x=="string"?t.x:t.x+n),a="".concat(typeof t.y=="string"?t.y:t.y+n);o="translate(".concat(i,", ").concat(a,")")+o}return o}function fm(e,t){return e.targetTouches&&(0,Ze.findInArray)(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&(0,Ze.findInArray)(e.changedTouches,n=>t===n.identifier)}function pm(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function hm(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
41
|
+
`,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
42
|
+
`,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&sf(e.body,"react-draggable-transparent-selection")}function mm(e){if(e)try{if(e.body&&of(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function sf(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function of(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.canDragX=ym;Tt.canDragY=wm;Tt.createCoreData=xm;Tt.createDraggableData=km;Tt.getBoundPosition=gm;Tt.getControlPosition=Sm;Tt.snapToGrid=vm;var Ye=zt,Xn=pe;function gm(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:jm(r);const s=la(e);if(typeof r=="string"){const{ownerDocument:o}=s,i=o.defaultView;let a;if(r==="parent"?a=s.parentNode:a=o.querySelector(r),!(a instanceof i.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const u=a,c=i.getComputedStyle(s),h=i.getComputedStyle(u);r={left:-s.offsetLeft+(0,Ye.int)(h.paddingLeft)+(0,Ye.int)(c.marginLeft),top:-s.offsetTop+(0,Ye.int)(h.paddingTop)+(0,Ye.int)(c.marginTop),right:(0,Xn.innerWidth)(u)-(0,Xn.outerWidth)(s)-s.offsetLeft+(0,Ye.int)(h.paddingRight)-(0,Ye.int)(c.marginRight),bottom:(0,Xn.innerHeight)(u)-(0,Xn.outerHeight)(s)-s.offsetTop+(0,Ye.int)(h.paddingBottom)-(0,Ye.int)(c.marginBottom)}}return(0,Ye.isNum)(r.right)&&(t=Math.min(t,r.right)),(0,Ye.isNum)(r.bottom)&&(n=Math.min(n,r.bottom)),(0,Ye.isNum)(r.left)&&(t=Math.max(t,r.left)),(0,Ye.isNum)(r.top)&&(n=Math.max(n,r.top)),[t,n]}function vm(e,t,n){const r=Math.round(t/e[0])*e[0],s=Math.round(n/e[1])*e[1];return[r,s]}function ym(e){return e.props.axis==="both"||e.props.axis==="x"}function wm(e){return e.props.axis==="both"||e.props.axis==="y"}function Sm(e,t,n){const r=typeof t=="number"?(0,Xn.getTouch)(e,t):null;if(typeof t=="number"&&!r)return null;const s=la(n),o=n.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,Xn.offsetXYFromParent)(r||e,o,n.props.scale)}function xm(e,t,n){const r=!(0,Ye.isNum)(e.lastX),s=la(e);return r?{node:s,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:s,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function km(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function jm(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function la(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Ro={},Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.default=Nm;function Nm(){}Object.defineProperty(Ro,"__esModule",{value:!0});Ro.default=void 0;var mi=Em(k),$e=aa(Zd),Pm=aa(rs),Oe=pe,Bt=Tt,gi=zt,wr=aa(Oo);function aa(e){return e&&e.__esModule?e:{default:e}}function lf(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(lf=function(r){return r?n:t})(e)}function Em(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=lf(t);if(n&&n.has(e))return n.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function Ie(e,t,n){return t=Cm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cm(e){var t=_m(e,"string");return typeof t=="symbol"?t:String(t)}function _m(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const mt={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let Ht=mt.mouse,Mo=class extends mi.Component{constructor(){super(...arguments),Ie(this,"dragging",!1),Ie(this,"lastX",NaN),Ie(this,"lastY",NaN),Ie(this,"touchIdentifier",null),Ie(this,"mounted",!1),Ie(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const n=this.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=n;if(this.props.disabled||!(t.target instanceof r.defaultView.Node)||this.props.handle&&!(0,Oe.matchesSelectorAndParentsTo)(t.target,this.props.handle,n)||this.props.cancel&&(0,Oe.matchesSelectorAndParentsTo)(t.target,this.props.cancel,n))return;t.type==="touchstart"&&t.preventDefault();const s=(0,Oe.getTouchIdentifier)(t);this.touchIdentifier=s;const o=(0,Bt.getControlPosition)(t,s,this);if(o==null)return;const{x:i,y:a}=o,u=(0,Bt.createCoreData)(this,i,a);(0,wr.default)("DraggableCore: handleDragStart: %j",u),(0,wr.default)("calling",this.props.onStart),!(this.props.onStart(t,u)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Oe.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=a,(0,Oe.addEvent)(r,Ht.move,this.handleDrag),(0,Oe.addEvent)(r,Ht.stop,this.handleDragStop))}),Ie(this,"handleDrag",t=>{const n=(0,Bt.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:s}=n;if(Array.isArray(this.props.grid)){let a=r-this.lastX,u=s-this.lastY;if([a,u]=(0,Bt.snapToGrid)(this.props.grid,a,u),!a&&!u)return;r=this.lastX+a,s=this.lastY+u}const o=(0,Bt.createCoreData)(this,r,s);if((0,wr.default)("DraggableCore: handleDrag: %j",o),this.props.onDrag(t,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const u=document.createEvent("MouseEvents");u.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(u)}return}this.lastX=r,this.lastY=s}),Ie(this,"handleDragStop",t=>{if(!this.dragging)return;const n=(0,Bt.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:s}=n;if(Array.isArray(this.props.grid)){let u=r-this.lastX||0,c=s-this.lastY||0;[u,c]=(0,Bt.snapToGrid)(this.props.grid,u,c),r=this.lastX+u,s=this.lastY+c}const o=(0,Bt.createCoreData)(this,r,s);if(this.props.onStop(t,o)===!1||this.mounted===!1)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,Oe.removeUserSelectStyles)(a.ownerDocument),(0,wr.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,wr.default)("DraggableCore: Removing handlers"),(0,Oe.removeEvent)(a.ownerDocument,Ht.move,this.handleDrag),(0,Oe.removeEvent)(a.ownerDocument,Ht.stop,this.handleDragStop))}),Ie(this,"onMouseDown",t=>(Ht=mt.mouse,this.handleDragStart(t))),Ie(this,"onMouseUp",t=>(Ht=mt.mouse,this.handleDragStop(t))),Ie(this,"onTouchStart",t=>(Ht=mt.touch,this.handleDragStart(t))),Ie(this,"onTouchEnd",t=>(Ht=mt.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,Oe.addEvent)(t,mt.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:n}=t;(0,Oe.removeEvent)(n,mt.mouse.move,this.handleDrag),(0,Oe.removeEvent)(n,mt.touch.move,this.handleDrag),(0,Oe.removeEvent)(n,mt.mouse.stop,this.handleDragStop),(0,Oe.removeEvent)(n,mt.touch.stop,this.handleDragStop),(0,Oe.removeEvent)(t,mt.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Oe.removeUserSelectStyles)(n)}}findDOMNode(){var t,n;return(t=this.props)!==null&&t!==void 0&&t.nodeRef?(n=this.props)===null||n===void 0||(n=n.nodeRef)===null||n===void 0?void 0:n.current:Pm.default.findDOMNode(this)}render(){return mi.cloneElement(mi.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Ro.default=Mo;Ie(Mo,"displayName","DraggableCore");Ie(Mo,"propTypes",{allowAnyClick:$e.default.bool,children:$e.default.node.isRequired,disabled:$e.default.bool,enableUserSelectHack:$e.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:$e.default.arrayOf($e.default.number),handle:$e.default.string,cancel:$e.default.string,nodeRef:$e.default.object,onStart:$e.default.func,onDrag:$e.default.func,onStop:$e.default.func,onMouseDown:$e.default.func,scale:$e.default.number,className:gi.dontSetMe,style:gi.dontSetMe,transform:gi.dontSetMe});Ie(Mo,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var t=g(k),n=h(Zd),r=h(rs),s=h(Qh),o=pe,i=Tt,a=zt,u=h(Ro),c=h(Oo);function h(d){return d&&d.__esModule?d:{default:d}}function m(d){if(typeof WeakMap!="function")return null;var f=new WeakMap,v=new WeakMap;return(m=function(y){return y?v:f})(d)}function g(d,f){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var v=m(f);if(v&&v.has(d))return v.get(d);var y={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var j in d)if(j!=="default"&&Object.prototype.hasOwnProperty.call(d,j)){var E=P?Object.getOwnPropertyDescriptor(d,j):null;E&&(E.get||E.set)?Object.defineProperty(y,j,E):y[j]=d[j]}return y.default=d,v&&v.set(d,y),y}function S(){return S=Object.assign?Object.assign.bind():function(d){for(var f=1;f<arguments.length;f++){var v=arguments[f];for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(d[y]=v[y])}return d},S.apply(this,arguments)}function x(d,f,v){return f=w(f),f in d?Object.defineProperty(d,f,{value:v,enumerable:!0,configurable:!0,writable:!0}):d[f]=v,d}function w(d){var f=C(d,"string");return typeof f=="symbol"?f:String(f)}function C(d,f){if(typeof d!="object"||d===null)return d;var v=d[Symbol.toPrimitive];if(v!==void 0){var y=v.call(d,f);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(d)}class p extends t.Component{static getDerivedStateFromProps(f,v){let{position:y}=f,{prevPropsPosition:P}=v;return y&&(!P||y.x!==P.x||y.y!==P.y)?((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:y,prevPropsPosition:P}),{x:y.x,y:y.y,prevPropsPosition:{...y}}):null}constructor(f){super(f),x(this,"onDragStart",(v,y)=>{if((0,c.default)("Draggable: onDragStart: %j",y),this.props.onStart(v,(0,i.createDraggableData)(this,y))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),x(this,"onDrag",(v,y)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",y);const P=(0,i.createDraggableData)(this,y),j={x:P.x,y:P.y,slackX:0,slackY:0};if(this.props.bounds){const{x:I,y:M}=j;j.x+=this.state.slackX,j.y+=this.state.slackY;const[$,H]=(0,i.getBoundPosition)(this,j.x,j.y);j.x=$,j.y=H,j.slackX=this.state.slackX+(I-j.x),j.slackY=this.state.slackY+(M-j.y),P.x=j.x,P.y=j.y,P.deltaX=j.x-this.state.x,P.deltaY=j.y-this.state.y}if(this.props.onDrag(v,P)===!1)return!1;this.setState(j)}),x(this,"onDragStop",(v,y)=>{if(!this.state.dragging||this.props.onStop(v,(0,i.createDraggableData)(this,y))===!1)return!1;(0,c.default)("Draggable: onDragStop: %j",y);const j={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:I,y:M}=this.props.position;j.x=I,j.y=M}this.setState(j)}),this.state={dragging:!1,dragged:!1,x:f.position?f.position.x:f.defaultPosition.x,y:f.position?f.position.y:f.defaultPosition.y,prevPropsPosition:{...f.position},slackX:0,slackY:0,isElementSVG:!1},f.position&&!(f.onDrag||f.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var f,v;return(f=(v=this.props)===null||v===void 0||(v=v.nodeRef)===null||v===void 0?void 0:v.current)!==null&&f!==void 0?f:r.default.findDOMNode(this)}render(){const{axis:f,bounds:v,children:y,defaultPosition:P,defaultClassName:j,defaultClassNameDragging:E,defaultClassNameDragged:I,position:M,positionOffset:$,scale:H,...Z}=this.props;let le={},G=null;const te=!!!M||this.state.dragging,T=M||P,F={x:(0,i.canDragX)(this)&&te?this.state.x:T.x,y:(0,i.canDragY)(this)&&te?this.state.y:T.y};this.state.isElementSVG?G=(0,o.createSVGTransform)(F,$):le=(0,o.createCSSTransform)(F,$);const O=(0,s.default)(y.props.className||"",j,{[E]:this.state.dragging,[I]:this.state.dragged});return t.createElement(u.default,S({},Z,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(y),{className:O,style:{...y.props.style,...le},transform:G}))}}e.default=p,x(p,"displayName","Draggable"),x(p,"propTypes",{...u.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),x(p,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(Yd);const{default:af,DraggableCore:zm}=Yd;Do.exports=af;Do.exports.default=af;Do.exports.DraggableCore=zm;var Tm=Do.exports;const Dm=Lu(Tm);var ge=function(){return ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},ge.apply(this,arguments)},_u={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},zu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Es={width:"20px",height:"20px",position:"absolute",zIndex:1},Rm={top:ge(ge({},_u),{top:"-5px"}),right:ge(ge({},zu),{left:void 0,right:"-5px"}),bottom:ge(ge({},_u),{top:void 0,bottom:"-5px"}),left:ge(ge({},zu),{left:"-5px"}),topRight:ge(ge({},Es),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ge(ge({},Es),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ge(ge({},Es),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ge(ge({},Es),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Om=k.memo(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,s=e.replaceStyles,o=e.className,i=k.useCallback(function(c){t(c,n)},[t,n]),a=k.useCallback(function(c){t(c,n)},[t,n]),u=k.useMemo(function(){return ge(ge({position:"absolute",userSelect:"none"},Rm[n]),s??{})},[s,n]);return l.jsx("div",{className:o||void 0,style:u,onMouseDown:i,onTouchStart:a,children:r})}),Mm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(r[o]=s[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Pt.apply(this,arguments)},Lm={width:"auto",height:"auto"},Cs=function(e,t,n){return Math.max(Math.min(e,n),t)},Tu=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},Rn=function(e,t){return new RegExp(e,"i").test(t)},_s=function(e){return!!(e.touches&&e.touches.length)},Am=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Du=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,i,a){return Math.abs(i-e)<Math.abs(t[o]-e)?a:o},0),s=Math.abs(t[r]-e);return n===0||s<n?t[r]:e},vi=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},zs=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var s=Number(e.replace("%",""))/100;return t*s}if(e.endsWith("vw")){var s=Number(e.replace("vw",""))/100;return n*s}if(e.endsWith("vh")){var s=Number(e.replace("vh",""))/100;return r*s}}return e},Im=function(e,t,n,r,s,o,i){return r=zs(r,e.width,t,n),s=zs(s,e.height,t,n),o=zs(o,e.width,t,n),i=zs(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof s>"u"?void 0:Number(s),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof i>"u"?void 0:Number(i)}},Fm=function(e){return Array.isArray(e)?e:[e,e]},Wm=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Ru="__resizable_base__",bm=function(e){Mm(t,e);function t(n){var r,s,o,i,a=e.call(this,n)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var u=a.parentNode;if(!u)return null;var c=a.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(Ru):c.className+=Ru,u.appendChild(c),c},a.removeBase=function(u){var c=a.parentNode;c&&c.removeChild(u)},a.state={isResizing:!1,width:(s=(r=a.propsSize)===null||r===void 0?void 0:r.width)!==null&&s!==void 0?s:"auto",height:(i=(o=a.propsSize)===null||o===void 0?void 0:o.height)!==null&&i!==void 0?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Lm},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var s=this.resizable.offsetWidth,o=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:s,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,s=function(a){var u;if(typeof n.state[a]>"u"||n.state[a]==="auto")return"auto";if(n.propsSize&&n.propsSize[a]&&(!((u=n.propsSize[a])===null||u===void 0)&&u.toString().endsWith("%"))){if(n.state[a].toString().endsWith("%"))return n.state[a].toString();var c=n.getParentSize(),h=Number(n.state[a].toString().replace("px","")),m=h/c[a]*100;return"".concat(m,"%")}return vi(n.state[a])},o=r&&typeof r.width<"u"&&!this.state.isResizing?vi(r.width):s("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?vi(r.height):s("height");return{width:o,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,s=this.parentNode.style.flexWrap;s!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=s),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var s=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof s>"u"||s==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var s=this.props.boundsByDirection,o=this.state.direction,i=s&&Rn("left",o),a=s&&Rn("top",o),u,c;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(u=i?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),c=a?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(u=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(u=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return u&&Number.isFinite(u)&&(n=n&&n<u?n:u),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var s=this.props.scale||1,o=Fm(this.props.resizeRatio||1),i=o[0],a=o[1],u=this.state,c=u.direction,h=u.original,m=this.props,g=m.lockAspectRatio,S=m.lockAspectRatioExtraHeight,x=m.lockAspectRatioExtraWidth,w=h.width,C=h.height,p=S||0,d=x||0;return Rn("right",c)&&(w=h.width+(n-h.x)*i/s,g&&(C=(w-d)/this.ratio+p)),Rn("left",c)&&(w=h.width-(n-h.x)*i/s,g&&(C=(w-d)/this.ratio+p)),Rn("bottom",c)&&(C=h.height+(r-h.y)*a/s,g&&(w=(C-p)*this.ratio+d)),Rn("top",c)&&(C=h.height-(r-h.y)*a/s,g&&(w=(C-p)*this.ratio+d)),{newWidth:w,newHeight:C}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,s,o){var i=this.props,a=i.lockAspectRatio,u=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,h=typeof o.width>"u"?10:o.width,m=typeof s.width>"u"||s.width<0?n:s.width,g=typeof o.height>"u"?10:o.height,S=typeof s.height>"u"||s.height<0?r:s.height,x=u||0,w=c||0;if(a){var C=(g-x)*this.ratio+w,p=(S-x)*this.ratio+w,d=(h-w)/this.ratio+x,f=(m-w)/this.ratio+x,v=Math.max(h,C),y=Math.min(m,p),P=Math.max(g,d),j=Math.min(S,f);n=Cs(n,v,y),r=Cs(r,P,j)}else n=Cs(n,h,m),r=Cs(r,g,S);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){var n=1/(this.props.scale||1);if(this.props.bounds==="parent"){var r=this.parentNode;if(r){var s=r.getBoundingClientRect();this.parentLeft=s.left*n,this.parentTop=s.top*n}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*n,this.targetTop=o.top*n}if(this.resizable){var i=this.resizable.getBoundingClientRect(),a=i.left,u=i.top,c=i.right,h=i.bottom;this.resizableLeft=a*n,this.resizableRight=c*n,this.resizableTop=u*n,this.resizableBottom=h*n}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var s=0,o=0;if(n.nativeEvent&&Am(n.nativeEvent)?(s=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&_s(n.nativeEvent)&&(s=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var a,u=this.window.getComputedStyle(this.resizable);if(u.flexBasis!=="auto"){var c=this.parentNode;if(c){var h=this.window.getComputedStyle(c).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",a=u.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var m={original:{x:s,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Pt(Pt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:a};this.setState(m)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&_s(n))try{n.preventDefault(),n.stopPropagation()}catch{}var s=this.props,o=s.maxWidth,i=s.maxHeight,a=s.minWidth,u=s.minHeight,c=_s(n)?n.touches[0].clientX:n.clientX,h=_s(n)?n.touches[0].clientY:n.clientY,m=this.state,g=m.direction,S=m.original,x=m.width,w=m.height,C=this.getParentSize(),p=Im(C,this.window.innerWidth,this.window.innerHeight,o,i,a,u);o=p.maxWidth,i=p.maxHeight,a=p.minWidth,u=p.minHeight;var d=this.calculateNewSizeFromDirection(c,h),f=d.newHeight,v=d.newWidth,y=this.calculateNewMaxFromBoundary(o,i);this.props.snap&&this.props.snap.x&&(v=Du(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(f=Du(f,this.props.snap.y,this.props.snapGap));var P=this.calculateNewSizeFromAspectRatio(v,f,{width:y.maxWidth,height:y.maxHeight},{width:a,height:u});if(v=P.newWidth,f=P.newHeight,this.props.grid){var j=Tu(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),E=Tu(f,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),I=this.props.snapGap||0,M=I===0||Math.abs(j-v)<=I?j:v,$=I===0||Math.abs(E-f)<=I?E:f;v=M,f=$}var H={width:v-S.width,height:f-S.height};if(this.delta=H,x&&typeof x=="string"){if(x.endsWith("%")){var Z=v/C.width*100;v="".concat(Z,"%")}else if(x.endsWith("vw")){var le=v/this.window.innerWidth*100;v="".concat(le,"vw")}else if(x.endsWith("vh")){var G=v/this.window.innerHeight*100;v="".concat(G,"vh")}}if(w&&typeof w=="string"){if(w.endsWith("%")){var Z=f/C.height*100;f="".concat(Z,"%")}else if(w.endsWith("vw")){var le=f/this.window.innerWidth*100;f="".concat(le,"vw")}else if(w.endsWith("vh")){var G=f/this.window.innerHeight*100;f="".concat(G,"vh")}}var b={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(f,"height")};this.flexDir==="row"?b.flexBasis=b.width:this.flexDir==="column"&&(b.flexBasis=b.height);var te=this.state.width!==b.width,T=this.state.height!==b.height,F=this.state.flexBasis!==b.flexBasis,O=te||T||F;O&&rs.flushSync(function(){r.setState(b)}),this.props.onResize&&O&&this.props.onResize(n,g,this.resizable,H)}},t.prototype.onMouseUp=function(n){var r,s,o=this.state,i=o.isResizing,a=o.direction;o.original,!(!i||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,this.delta),this.props.size&&this.setState({width:(r=this.props.size.width)!==null&&r!==void 0?r:"auto",height:(s=this.props.size.height)!==null&&s!==void 0?s:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Pt(Pt({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(n){var r,s;this.setState({width:(r=n.width)!==null&&r!==void 0?r:"auto",height:(s=n.height)!==null&&s!==void 0?s:"auto"})},t.prototype.renderResizer=function(){var n=this,r=this.props,s=r.enable,o=r.handleStyles,i=r.handleClasses,a=r.handleWrapperStyle,u=r.handleWrapperClass,c=r.handleComponent;if(!s)return null;var h=Object.keys(s).map(function(m){return s[m]!==!1?l.jsx(Om,{direction:m,onResizeStart:n.onResizeStart,replaceStyles:o&&o[m],className:i&&i[m],children:c&&c[m]?c[m]:null},m):null});return l.jsx("div",{className:u,style:a,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,a){return Wm.indexOf(a)!==-1||(i[a]=n.props[a]),i},{}),s=Pt(Pt(Pt({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(s.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return l.jsxs(o,Pt({style:s,className:this.props.className},r,{ref:function(i){i&&(n.resizable=i)},children:[this.state.isResizing&&l.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(k.PureComponent);/*! *****************************************************************************
|
|
43
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
44
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
45
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
46
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
47
|
+
|
|
48
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
49
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
50
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
51
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
52
|
+
|
|
53
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
54
|
+
and limitations under the License.
|
|
55
|
+
***************************************************************************** */var dl=function(e,t){return dl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)r.hasOwnProperty(s)&&(n[s]=r[s])},dl(e,t)};function Um(e,t){dl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Se=function(){return Se=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Se.apply(this,arguments)};function $m(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}var Bm={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},Hm=function(e){return{bottom:e,bottomLeft:e,bottomRight:e,left:e,right:e,top:e,topLeft:e,topRight:e}},Vm=function(e){Um(t,e);function t(n){var r=e.call(this,n)||this;return r.resizingPosition={x:0,y:0},r.offsetFromParent={left:0,top:0},r.resizableElement={current:null},r.originalPosition={x:0,y:0},r.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:n.maxWidth,maxHeight:n.maxHeight},r.onResizeStart=r.onResizeStart.bind(r),r.onResize=r.onResize.bind(r),r.onResizeStop=r.onResizeStop.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrag=r.onDrag.bind(r),r.onDragStop=r.onDragStop.bind(r),r.getMaxSizesFromProps=r.getMaxSizesFromProps.bind(r),r}return t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var n=this.offsetFromParent,r=n.left,s=n.top,o=this.getDraggablePosition(),i=o.x,a=o.y;this.draggable.setState({x:i-r,y:a-s}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var n=this.draggable.state,r=n.x,s=n.y;return{x:r,y:s}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){var n=typeof this.props.maxWidth>"u"?Number.MAX_SAFE_INTEGER:this.props.maxWidth,r=typeof this.props.maxHeight>"u"?Number.MAX_SAFE_INTEGER:this.props.maxHeight;return{maxWidth:n,maxHeight:r}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(n){var r=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/r;case"body":return document.body.offsetHeight/r;default:return n.offsetHeight}},t.prototype.getOffsetWidth=function(n){var r=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/r;case"body":return document.body.offsetWidth/r;default:return n.offsetWidth}},t.prototype.onDragStart=function(n,r){this.props.onDragStart&&this.props.onDragStart(n,r);var s=this.getDraggablePosition();if(this.originalPosition=s,!!this.props.bounds){var o=this.getParent(),i=this.props.scale,a;if(this.props.bounds==="parent")a=o;else if(this.props.bounds==="body"){var u=o.getBoundingClientRect(),c=u.left,h=u.top,m=document.body.getBoundingClientRect(),g=-(c-o.offsetLeft*i-m.left)/i,S=-(h-o.offsetTop*i-m.top)/i,x=(document.body.offsetWidth-this.resizable.size.width*i)/i+g,w=(document.body.offsetHeight-this.resizable.size.height*i)/i+S;return this.setState({bounds:{top:S,right:x,bottom:w,left:g}})}else if(this.props.bounds==="window"){if(!this.resizable)return;var C=o.getBoundingClientRect(),p=C.left,d=C.top,f=-(p-o.offsetLeft*i)/i,v=-(d-o.offsetTop*i)/i,x=(window.innerWidth-this.resizable.size.width*i)/i+f,w=(window.innerHeight-this.resizable.size.height*i)/i+v;return this.setState({bounds:{top:v,right:x,bottom:w,left:f}})}else typeof this.props.bounds=="string"?a=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(a=this.props.bounds);if(!(!(a instanceof HTMLElement)||!(o instanceof HTMLElement))){var y=a.getBoundingClientRect(),P=y.left,j=y.top,E=o.getBoundingClientRect(),I=E.left,M=E.top,$=(P-I)/i,H=j-M;if(this.resizable){this.updateOffsetFromParent();var Z=this.offsetFromParent;this.setState({bounds:{top:H-Z.top,right:$+(a.offsetWidth-this.resizable.size.width)-Z.left/i,bottom:H+(a.offsetHeight-this.resizable.size.height)-Z.top,left:$-Z.left/i}})}}}},t.prototype.onDrag=function(n,r){if(this.props.onDrag){var s=this.offsetFromParent,o=s.left,i=s.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDrag(n,Se(Se({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDrag(n,Se(Se({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDrag(n,Se(Se({},r),{x:this.originalPosition.x+o,y:r.y+i,deltaX:0}))}},t.prototype.onDragStop=function(n,r){if(this.props.onDragStop){var s=this.offsetFromParent,o=s.left,i=s.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDragStop(n,Se(Se({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDragStop(n,Se(Se({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDragStop(n,Se(Se({},r),{x:this.originalPosition.x+o,y:r.y+i,deltaX:0}))}},t.prototype.onResizeStart=function(n,r,s){n.stopPropagation(),this.setState({resizing:!0});var o=this.props.scale,i=this.offsetFromParent,a=this.getDraggablePosition();if(this.resizingPosition={x:a.x+i.left,y:a.y+i.top},this.originalPosition=a,this.props.bounds){var u=this.getParent(),c=void 0;this.props.bounds==="parent"?c=u:this.props.bounds==="body"?c=document.body:this.props.bounds==="window"?c=window:typeof this.props.bounds=="string"?c=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(c=this.props.bounds);var h=this.getSelfElement();if(h instanceof Element&&(c instanceof HTMLElement||c===window)&&u instanceof HTMLElement){var m=this.getMaxSizesFromProps(),g=m.maxWidth,S=m.maxHeight,x=this.getParentSize();if(g&&typeof g=="string")if(g.endsWith("%")){var w=Number(g.replace("%",""))/100;g=x.width*w}else g.endsWith("px")&&(g=Number(g.replace("px","")));if(S&&typeof S=="string")if(S.endsWith("%")){var w=Number(S.replace("%",""))/100;S=x.height*w}else S.endsWith("px")&&(S=Number(S.replace("px","")));var C=h.getBoundingClientRect(),p=C.left,d=C.top,f=this.props.bounds==="window"?{left:0,top:0}:c.getBoundingClientRect(),v=f.left,y=f.top,P=this.getOffsetWidth(c),j=this.getOffsetHeight(c),E=r.toLowerCase().endsWith("left"),I=r.toLowerCase().endsWith("right"),M=r.startsWith("top"),$=r.startsWith("bottom");if((E||M)&&this.resizable){var H=(p-v)/o+this.resizable.size.width;this.setState({maxWidth:H>Number(g)?g:H})}if(I||this.props.lockAspectRatio&&!E&&!M){var H=P+(v-p)/o;this.setState({maxWidth:H>Number(g)?g:H})}if((M||E)&&this.resizable){var H=(d-y)/o+this.resizable.size.height;this.setState({maxHeight:H>Number(S)?S:H})}if($||this.props.lockAspectRatio&&!M&&!E){var H=j+(y-d)/o;this.setState({maxHeight:H>Number(S)?S:H})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(n,r,s)},t.prototype.onResize=function(n,r,s,o){var i=this,a={x:this.originalPosition.x,y:this.originalPosition.y},u=-o.width,c=-o.height,h=["top","left","topLeft","bottomLeft","topRight"];h.includes(r)&&(r==="bottomLeft"?a.x+=u:(r==="topRight"||(a.x+=u),a.y+=c));var m=this.draggable.state;(a.x!==m.x||a.y!==m.y)&&rs.flushSync(function(){i.draggable.setState(a)}),this.updateOffsetFromParent();var g=this.offsetFromParent,S=this.getDraggablePosition().x+g.left,x=this.getDraggablePosition().y+g.top;this.resizingPosition={x:S,y:x},this.props.onResize&&this.props.onResize(n,r,s,o,{x:S,y:x})},t.prototype.onResizeStop=function(n,r,s,o){this.setState({resizing:!1});var i=this.getMaxSizesFromProps(),a=i.maxWidth,u=i.maxHeight;this.setState({maxWidth:a,maxHeight:u}),this.props.onResizeStop&&this.props.onResizeStop(n,r,s,o,this.resizingPosition)},t.prototype.updateSize=function(n){this.resizable&&this.resizable.updateSize({width:n.width,height:n.height})},t.prototype.updatePosition=function(n){this.draggable.setState(n)},t.prototype.updateOffsetFromParent=function(){var n=this.props.scale,r=this.getParent(),s=this.getSelfElement();if(!r||s===null)return{top:0,left:0};var o=r.getBoundingClientRect(),i=o.left,a=o.top,u=s.getBoundingClientRect(),c=this.getDraggablePosition(),h=r.scrollLeft,m=r.scrollTop;this.offsetFromParent={left:u.left-i+h-c.x*n,top:u.top-a+m-c.y*n}},t.prototype.render=function(){var n=this,r=this.props,s=r.disableDragging,o=r.style,i=r.dragHandleClassName,a=r.position,u=r.onMouseDown,c=r.onMouseUp,h=r.dragAxis,m=r.dragGrid,g=r.bounds,S=r.enableUserSelectHack,x=r.cancel,w=r.children;r.onResizeStart,r.onResize,r.onResizeStop,r.onDragStart,r.onDrag,r.onDragStop;var C=r.resizeHandleStyles,p=r.resizeHandleClasses,d=r.resizeHandleComponent,f=r.enableResizing,v=r.resizeGrid,y=r.resizeHandleWrapperClass,P=r.resizeHandleWrapperStyle,j=r.scale,E=r.allowAnyClick,I=r.dragPositionOffset,M=$m(r,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),$=this.props.default?Se({},this.props.default):void 0;delete M.default;var H=s||i?{cursor:"auto"}:{cursor:"move"},Z=Se(Se(Se({},Bm),H),o),le=this.offsetFromParent,G=le.left,b=le.top,te;a&&(te={x:a.x-G,y:a.y-b});var T=this.state.resizing?void 0:te,F=this.state.resizing?"both":h;return k.createElement(Dm,{ref:function(O){O&&(n.draggable=O)},handle:i?".".concat(i):void 0,defaultPosition:$,onMouseDown:u,onMouseUp:c,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:F,disabled:s,grid:m,bounds:g?this.state.bounds:void 0,position:T,enableUserSelectHack:S,cancel:x,scale:j,allowAnyClick:E,nodeRef:this.resizableElement,positionOffset:I},k.createElement(bm,Se({},M,{ref:function(O){O&&(n.resizable=O,n.resizableElement.current=O.resizable)},defaultSize:$,size:this.props.size,enable:typeof f=="boolean"?Hm(f):f,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:Z,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:v,handleWrapperClass:y,handleWrapperStyle:P,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:C,handleClasses:p,handleComponent:d,scale:this.props.scale}),w))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(k.PureComponent);function Xm(e){const t=e.split("/").filter(Boolean);if(t.length===0)return e;const n=t[t.length-1];return n==="src"&&t.length>1?t[t.length-2]:n}const Qm=({projects:e,selectedProject:t,onSelectProject:n,loading:r,runningProcesses:s=[],keyboardFocusedIndex:o=-1,onKeyboardFocusChange:i,gitBranches:a})=>{if(r)return l.jsx("div",{className:"project-list-loading",children:l.jsx("p",{children:"Loading projects..."})});if(e.length===0)return l.jsxs("div",{className:"project-list-empty",children:[l.jsx("p",{children:"No projects yet"}),l.jsx("p",{className:"hint",children:"Add a project to get started"}),l.jsx("p",{className:"hint",style:{fontSize:"11px",marginTop:"0.5rem",opacity:.7},children:"Tip: Drag and drop a folder here to add it"})]});const u=mo.useRef(null);return l.jsx("div",{ref:u,className:"project-list",role:"listbox","aria-label":"Projects",tabIndex:0,onFocus:c=>{o<0&&e.length>0&&i&&i(0)},onBlur:c=>{var h;i&&!((h=u.current)!=null&&h.contains(c.relatedTarget))&&i(-1)},children:e.map((c,h)=>{const m=(t==null?void 0:t.id)===c.id,g=o===h,S=s.filter(C=>C.projectPath===c.path),x=S.length>0,w=Array.from(new Set(S.map(C=>C.port).filter(C=>C!=null))).sort((C,p)=>C-p);return l.jsxs("div",{className:`project-item ${m?"selected":""} ${x?"running":""} ${g?"keyboard-focused":""}`,onClick:()=>n(c),role:"option","aria-selected":m,tabIndex:h===0?0:-1,onFocus:C=>{C.currentTarget.scrollIntoView({block:"nearest",behavior:"smooth"}),i&&i(h)},ref:C=>{g&&C&&i&&C.scrollIntoView({block:"nearest",behavior:"smooth"})},children:[l.jsx("div",{className:"project-item-header",children:l.jsxs("h3",{className:"project-name",children:[x&&l.jsx("span",{className:"running-indicator-dot",children:"●"}),c.name,a&&a.has(c.id)&&a.get(c.id)&&l.jsx("span",{className:"git-branch-badge",children:a.get(c.id)})]})}),l.jsx("p",{className:"project-path",children:c.description||Xm(c.path)}),c.tags&&c.tags.length>0&&l.jsx("div",{className:"project-tags",children:c.tags.map(C=>l.jsx("span",{className:"project-tag",children:C},C))}),x&&l.jsxs("div",{className:"project-meta",children:[l.jsxs("span",{className:"running-count",children:[S.length," running"]}),w.length>0&&l.jsx("div",{className:"running-ports",children:w.map(C=>l.jsxs("span",{className:"port-badge",children:[":",C]},C))})]})]},c.id)})})},Ym=({urls:e,onOpenUrl:t})=>e.length===0?null:l.jsxs("div",{className:"project-urls-section",children:[l.jsx("div",{className:"section-header",children:l.jsxs("h3",{children:["Detected URLs (",e.length,")"]})}),l.jsx("div",{className:"urls-list",children:e.map((n,r)=>l.jsxs("div",{className:"url-item",children:[l.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"url-text",onClick:s=>{s.preventDefault(),window.electronAPI.openExternal(n)},children:n}),l.jsx("button",{onClick:()=>t(n),className:"btn btn-secondary btn-small",title:"Open in configured browser",children:"Open"})]},r))})]}),Km={claude:"Claude Code",gemini:"Gemini CLI",openai:"OpenAI CLI",xai:"xAI / Grok",ollama:"Ollama",aider:"Aider",continue:"Continue.dev",custom:"Custom"},Gm={claude:"C",gemini:"G",openai:"O",xai:"X",ollama:"L",aider:"A",continue:"c",custom:"*"},Jm=({projectId:e,projectPath:t,onAddAgent:n,onEditAgent:r})=>{const[s,o]=k.useState([]),[i,a]=k.useState([]),[u,c]=k.useState(!0),[h,m]=k.useState(null),[g,S]=k.useState(null),x=async()=>{const y=[38124,38125,38126,38127,38128,3001];for(const P of y)try{if((await fetch(`http://localhost:${P}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${P}/api`}catch{continue}return null},w=async()=>{try{const y=await x();if(!y){m("API server not found"),c(!1);return}const P=await fetch(`${y}/projects/${e}/agents`);if(P.ok){const j=await P.json();o(j)}else m("Failed to load agents")}catch(y){m(y instanceof Error?y.message:"Failed to load agents")}finally{c(!1)}},C=async()=>{try{const y=await x();if(!y)return;const P=await fetch(`${y}/agents/running`);if(P.ok){const j=await P.json();a(j)}}catch{}};k.useEffect(()=>{w(),C();const y=setInterval(C,5e3);return()=>clearInterval(y)},[e]);const p=async y=>{try{S(y.id);const P=await x();if(!P){alert("API server not found");return}const j=await fetch(`${P}/agents/${y.id}/launch`,{method:"POST"});if(j.ok)await C();else{const E=await j.json();alert(E.error||"Failed to launch agent")}}catch(P){alert(P instanceof Error?P.message:"Failed to launch agent")}finally{S(null)}},d=async y=>{try{S(y.id);const P=await x();if(!P){alert("API server not found");return}const j=await fetch(`${P}/agents/${y.id}/stop`,{method:"POST"});if(j.ok)await C();else{const E=await j.json();alert(E.error||"Failed to stop agent")}}catch(P){alert(P instanceof Error?P.message:"Failed to stop agent")}finally{S(null)}},f=async y=>{if(confirm(`Are you sure you want to delete "${y.name}"?`))try{S(y.id);const P=await x();if(!P){alert("API server not found");return}const j=await fetch(`${P}/agents/${y.id}`,{method:"DELETE"});if(j.ok)await w();else{const E=await j.json();alert(E.error||"Failed to delete agent")}}catch(P){alert(P instanceof Error?P.message:"Failed to delete agent")}finally{S(null)}},v=y=>i.some(P=>P.agentId===y);return u?l.jsxs("div",{className:"agent-list",children:[l.jsx("div",{className:"agent-list-header",children:l.jsx("h3",{children:"Agents"})}),l.jsx("div",{className:"agent-list-loading",children:"Loading agents..."})]}):l.jsxs("div",{className:"agent-list",children:[l.jsxs("div",{className:"agent-list-header",children:[l.jsxs("h3",{children:["Agents (",s.length,")"]}),l.jsx("button",{className:"btn-add-agent",onClick:n,title:"Add Agent",children:"+"})]}),h&&l.jsx("div",{className:"agent-list-error",children:h}),s.length===0?l.jsxs("div",{className:"agent-list-empty",children:["No agents configured",l.jsx("button",{className:"btn-link",onClick:n,children:"Add your first agent"})]}):l.jsx("div",{className:"agent-list-items",children:s.map(y=>{const P=v(y.id),j=g===y.id;return l.jsxs("div",{className:`agent-item ${P?"running":""}`,children:[l.jsx("div",{className:"agent-icon","data-cli":y.cli_type,children:Gm[y.cli_type]}),l.jsxs("div",{className:"agent-info",children:[l.jsx("div",{className:"agent-name",children:y.name}),l.jsxs("div",{className:"agent-meta",children:[l.jsx("span",{className:"agent-cli-type",children:Km[y.cli_type]}),y.model&&l.jsx("span",{className:"agent-model",children:y.model}),y.api_key&&l.jsx("span",{className:"agent-has-key",title:"API key configured",children:"key"})]})]}),l.jsx("div",{className:"agent-status",children:P&&l.jsx("span",{className:"status-indicator running",title:"Running"})}),l.jsxs("div",{className:"agent-actions",children:[P?l.jsx("button",{className:"btn-agent-action btn-stop",onClick:()=>d(y),disabled:j,title:"Stop",children:"Stop"}):l.jsx("button",{className:"btn-agent-action btn-launch",onClick:()=>p(y),disabled:j,title:"Launch",children:"Launch"}),l.jsx("button",{className:"btn-agent-action btn-edit",onClick:()=>r(y),disabled:j,title:"Edit",children:"Edit"}),l.jsx("button",{className:"btn-agent-action btn-delete",onClick:()=>f(y),disabled:j,title:"Delete",children:"×"})]})]},y.id)})})]})},Zm={claude:"Claude Code",gemini:"Gemini CLI",openai:"OpenAI CLI",xai:"xAI / Grok",ollama:"Ollama",aider:"Aider",continue:"Continue.dev",custom:"Custom"},qm=["claude","gemini","openai","xai","ollama","aider","continue","custom"],eg=({projectId:e,editAgent:t,onAdd:n,onClose:r})=>{var le,G;const s=!!t,[o,i]=k.useState((t==null?void 0:t.name)||""),[a,u]=k.useState((t==null?void 0:t.cli_type)||"claude"),[c,h]=k.useState((t==null?void 0:t.cli_command)||""),[m,g]=k.useState((t==null?void 0:t.model)||""),[S,x]=k.useState((t==null?void 0:t.api_key)||""),[w,C]=k.useState((t==null?void 0:t.system_prompt)||""),[p,d]=k.useState(((le=t==null?void 0:t.temperature)==null?void 0:le.toString())||""),[f,v]=k.useState(((G=t==null?void 0:t.max_tokens)==null?void 0:G.toString())||""),[y,P]=k.useState((t==null?void 0:t.additional_args)||""),[j,E]=k.useState(!1),[I,M]=k.useState(!1),[$,H]=k.useState(null),Z=async b=>{if(b.preventDefault(),H(null),!o.trim()){H("Name is required");return}try{M(!0);const te=[38124,38125,38126,38127,38128,3001];let T="";for(const J of te)try{if((await fetch(`http://localhost:${J}/health`,{signal:AbortSignal.timeout(500)})).ok){T=`http://localhost:${J}/api`;break}}catch{continue}if(!T)throw new Error("PROJAX API server not found");const F={name:o.trim(),cli_type:a,cli_command:a==="custom"&&c.trim()?c.trim():null,model:m.trim()||null,api_key:S.trim()||null,system_prompt:w.trim()||null,temperature:p?parseFloat(p):null,max_tokens:f?parseInt(f,10):null,additional_args:y.trim()||null};let O;if(s&&t?O=await fetch(`${T}/agents/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}):O=await fetch(`${T}/projects/${e}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}),!O.ok){const J=O.headers.get("content-type");if(J&&J.includes("application/json")){const me=await O.json();throw new Error(me.error||`Failed to ${s?"update":"create"} agent`)}else{const me=await O.text();throw new Error(`Server returned ${O.status}: ${me.substring(0,100)}`)}}const Y=await O.json();n(Y)}catch(te){H(te instanceof Error?te.message:"Unknown error occurred")}finally{M(!1)}};return l.jsx("div",{className:"modal-overlay",onClick:r,children:l.jsxs("div",{className:"modal-content agent-modal",onClick:b=>b.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsx("h2",{children:s?"Edit Agent":"Add Agent"}),l.jsx("button",{className:"modal-close",onClick:r,children:"×"})]}),$&&l.jsx("div",{className:"error-message",children:$}),l.jsxs("form",{onSubmit:Z,children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"agent-name",children:"Name *"}),l.jsx("input",{id:"agent-name",type:"text",value:o,onChange:b=>i(b.target.value),placeholder:"e.g., Claude for Code Review",disabled:I,required:!0,className:"form-input"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"agent-cli-type",children:"CLI Type *"}),l.jsx("select",{id:"agent-cli-type",value:a,onChange:b=>u(b.target.value),disabled:I,className:"form-select",children:qm.map(b=>l.jsx("option",{value:b,children:Zm[b]},b))})]}),a==="custom"&&l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"agent-cli-command",children:"Custom Command"}),l.jsx("input",{id:"agent-cli-command",type:"text",value:c,onChange:b=>h(b.target.value),placeholder:"e.g., /usr/local/bin/my-ai-cli",disabled:I,className:"form-input"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"agent-model",children:"Model"}),l.jsx("input",{id:"agent-model",type:"text",value:m,onChange:b=>g(b.target.value),placeholder:"e.g., claude-3-opus, gpt-4, gemini-pro",disabled:I,className:"form-input"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"agent-api-key",children:"API Key"}),l.jsxs("div",{className:"api-key-input",children:[l.jsx("input",{id:"agent-api-key",type:j?"text":"password",value:S,onChange:b=>x(b.target.value),placeholder:"sk-...",disabled:I,className:"form-input"}),l.jsx("button",{type:"button",className:"toggle-visibility",onClick:()=>E(!j),tabIndex:-1,children:j?"Hide":"Show"})]}),l.jsx("p",{className:"form-hint",children:"Stored locally in ~/.projax/data.json"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"agent-system-prompt",children:"System Prompt"}),l.jsx("textarea",{id:"agent-system-prompt",value:w,onChange:b=>C(b.target.value),placeholder:"Custom system prompt for this agent",disabled:I,rows:3,className:"form-input"})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"form-group half",children:[l.jsx("label",{htmlFor:"agent-temperature",children:"Temperature"}),l.jsx("input",{id:"agent-temperature",type:"number",step:"0.1",min:"0",max:"2",value:p,onChange:b=>d(b.target.value),placeholder:"0.0 - 2.0",disabled:I,className:"form-input"})]}),l.jsxs("div",{className:"form-group half",children:[l.jsx("label",{htmlFor:"agent-max-tokens",children:"Max Tokens"}),l.jsx("input",{id:"agent-max-tokens",type:"number",min:"1",value:f,onChange:b=>v(b.target.value),placeholder:"e.g., 4096",disabled:I,className:"form-input"})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"agent-additional-args",children:"Additional Arguments"}),l.jsx("input",{id:"agent-additional-args",type:"text",value:y,onChange:b=>P(b.target.value),placeholder:"e.g., --verbose --no-stream",disabled:I,className:"form-input"})]}),l.jsxs("div",{className:"modal-actions",children:[l.jsx("button",{type:"button",onClick:r,disabled:I,className:"btn btn-secondary",children:"Cancel"}),l.jsx("button",{type:"submit",disabled:I,className:"btn btn-primary",children:I?s?"Updating...":"Adding...":s?"Update":"Add Agent"})]})]})]})})},tg=({project:e,workspace:t,onProjectUpdate:n,onRemoveProject:r,onOpenTerminal:s,onNavigateBack:o})=>{var ca,da,fa;const[i,a]=k.useState(!1),[u,c]=k.useState(e.name),[h,m]=k.useState(!1),[g,S]=k.useState(e.description||""),[x,w]=k.useState(null),[C,p]=k.useState(!1),[d,f]=k.useState(null),[v,y]=k.useState([]),[P,j]=k.useState(!1),[E,I]=k.useState(new Set),[M,$]=k.useState([]),[H,Z]=k.useState(!1),[le,G]=k.useState(!1),[b,te]=k.useState(""),[T,F]=k.useState([]),[O,Y]=k.useState(e.tags||[]),[J,me]=k.useState(null),[ne,nt]=k.useState(null),[D,Q]=k.useState(!1),[ye,rt]=k.useState("default"),[je,st]=k.useState(new Map),[re,ft]=k.useState(null),[_n,dn]=k.useState(!1),[fn,ss]=k.useState(!1),[Lo,zn]=k.useState(!1),[Ao,Dt]=k.useState(null),[Io,Fo]=k.useState(0);k.useEffect(()=>{c(e.name),S(e.description||""),Y(e.tags||[]),z(),R(),is(),ur(),cr(),A(),Wo(),U();const N=setInterval(()=>{is(),A()},5e3);return()=>clearInterval(N)},[e]);const Wo=async()=>{try{const N=await Tn();if(!N)return;const W=await fetch(`${N}/projects/${e.id}/settings`);if(W.ok){const B=await W.json();rt(B.script_sort_order||"default")}}catch(N){console.error("Error loading project settings:",N)}},bo=async N=>{try{const W=await Tn();if(!W)return;(await fetch(`${W}/projects/${e.id}/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({script_sort_order:N})})).ok&&rt(N)}catch(W){console.error("Error saving project settings:",W)}},Tn=async()=>{const N=[38124,38125,38126,38127,38128,3001];for(const W of N)try{if((await fetch(`http://localhost:${W}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${W}/api`}catch{continue}return null},ur=async()=>{try{const N=await Tn();if(!N){F([]);return}const W=await fetch(`${N}/projects/tags`);if(!W.ok){console.error("Failed to load tags:",W.status),F([]);return}const B=await W.json();F(Array.isArray(B)?B:[])}catch(N){console.error("Error loading tags:",N),F([])}},cr=async()=>{try{const N=await window.electronAPI.getSettings();me(N.editor)}catch(N){console.error("Error loading editor settings:",N)}},z=async()=>{try{p(!0),f(null);const N=await window.electronAPI.getProjectScripts(e.path);w(N)}catch(N){console.error("Error loading scripts:",N),w(null),f(N instanceof Error?N.message:String(N))}finally{p(!1)}},R=async()=>{try{j(!0);const N=await window.electronAPI.getProjectPorts(e.id);y(N)}catch(N){console.error("Error loading ports:",N),y([])}finally{j(!1)}},A=async()=>{try{Q(!0);const N=await window.electronAPI.getLatestTestResult(e.id);nt(N)}catch{nt(null)}finally{Q(!1)}},U=async()=>{try{dn(!0);const N=await Tn();if(!N)return;const W=await fetch(`${N}/projects/${e.id}/safety`);if(W.ok){const B=await W.json();ft(B)}}catch(N){console.error("Error loading safety data:",N),ft(null)}finally{dn(!1)}},V=async()=>{if(!u.trim()||u===e.name){a(!1),c(e.name);return}try{const N=await window.electronAPI.renameProject(e.id,u.trim());a(!1),n&&n(N)}catch(N){console.error("Error renaming project:",N),alert("Failed to rename project"),c(e.name)}},we=async()=>{const N=g.trim()||null;if(N===(e.description||"")){m(!1),S(e.description||"");return}try{const W=await window.electronAPI.updateProject(e.id,{description:N});m(!1),n&&n(W)}catch(W){console.error("Error updating description:",W),alert("Failed to update description"),S(e.description||"")}},Ae=async()=>{const N=b.trim();if(!N||O.includes(N)){te("");return}const W=[...O,N];try{const B=await window.electronAPI.updateProject(e.id,{tags:W});Y(W),te(""),n&&n(B),await ur(),cr()}catch(B){console.error("Error adding tag:",B),alert("Failed to add tag")}},ze=async N=>{const W=O.filter(B=>B!==N);try{const B=await window.electronAPI.updateProject(e.id,{tags:W});Y(W),n&&n(B),await ur(),cr()}catch(B){console.error("Error removing tag:",B),alert("Failed to remove tag")}},os=T.filter(N=>!O.includes(N)&&N.toLowerCase().includes(b.toLowerCase())),is=async()=>{try{Z(!0);const W=(await window.electronAPI.getRunningProcesses()).filter(ot=>ot.projectPath===e.path);$(W);const B=new Set(W.map(ot=>ot.scriptName));I(B)}catch(N){console.error("Error loading running processes:",N)}finally{Z(!1)}},df=async(N,W=!0)=>{try{I(B=>new Set(B).add(N)),st(B=>new Map(B).set(N,Date.now())),await window.electronAPI.runScript(e.path,N,[],W),W&&setTimeout(()=>{is()},1e3)}catch(B){console.error("Error running script:",B),alert(`Failed to run script: ${B instanceof Error?B.message:String(B)}`)}finally{I(B=>{const ot=new Set(B);return ot.delete(N),ot})}},ff=async N=>{try{await window.electronAPI.stopScript(N)?await is():alert("Failed to stop script")}catch(W){console.error("Error stopping script:",W),alert(`Failed to stop script: ${W instanceof Error?W.message:String(W)}`)}},pf=async N=>{try{await window.electronAPI.openUrl(N)}catch(W){console.error("Error opening URL:",W),alert(`Failed to open URL: ${W instanceof Error?W.message:String(W)}`)}},ua=k.useMemo(()=>{const N=new Set;for(const W of M)if(W.detectedUrls&&Array.isArray(W.detectedUrls))for(const B of W.detectedUrls)N.add(B);for(const W of v){const B=`http://localhost:${W.port}`;N.add(B)}return Array.from(N).sort()},[M,v]),hf=k.useMemo(()=>{if(!(x!=null&&x.scripts))return[];const N=[...x.scripts];return ye==="alphabetical"?N.sort((W,B)=>W.name.localeCompare(B.name)):ye==="last-used"&&N.sort((W,B)=>{const ot=je.get(W.name)||0;return(je.get(B.name)||0)-ot}),N},[x==null?void 0:x.scripts,ye,je]);return l.jsxs("div",{className:"project-details",children:[t&&o&&l.jsxs("div",{className:"breadcrumb",children:[l.jsx("button",{className:"breadcrumb-link",onClick:o,children:t.name}),l.jsx("span",{className:"breadcrumb-separator",children:"/"}),l.jsx("span",{className:"breadcrumb-current",children:e.name})]}),l.jsxs("div",{className:"project-details-header",children:[l.jsxs("div",{children:[i?l.jsx("div",{className:"project-name-edit",children:l.jsx("input",{type:"text",value:u,onChange:N=>c(N.target.value),onBlur:V,onKeyDown:N=>{N.key==="Enter"?V():N.key==="Escape"&&(a(!1),c(e.name))},className:"project-name-input",autoFocus:!0})}):l.jsx("h2",{onClick:()=>a(!0),className:"project-name-editable",title:"Click to rename",children:e.name}),h?l.jsx("div",{className:"project-description-edit",children:l.jsx("textarea",{value:g,onChange:N=>S(N.target.value),onBlur:we,onKeyDown:N=>{N.key==="Enter"&&(N.metaKey||N.ctrlKey)?we():N.key==="Escape"&&(m(!1),S(e.description||""))},className:"project-description-input",placeholder:"Add a description for this project... (⌘+Enter to save, Esc to cancel)",autoFocus:!0})}):l.jsxs("div",{children:[l.jsx("p",{className:"project-description",onClick:()=>m(!0),title:"Click to edit description",children:e.description||"Click to add a description..."}),l.jsx("p",{className:"project-path",children:e.path})]})]}),l.jsxs("div",{className:"header-actions-group",children:[l.jsx("button",{onClick:async()=>{try{await window.electronAPI.openInEditor(e.path)}catch(N){console.error("Error opening in editor:",N),alert(`Failed to open in editor: ${N instanceof Error?N.message:String(N)}`)}},className:"btn btn-secondary",title:"Open in editor",children:"Editor"}),l.jsx("button",{onClick:async()=>{try{await window.electronAPI.openInFiles(e.path)}catch(N){console.error("Error opening directory:",N),alert(`Failed to open directory: ${N instanceof Error?N.message:String(N)}`)}},className:"btn btn-secondary",title:"Open in file manager",children:"Files"})]})]}),l.jsxs("div",{className:"project-stats",children:[l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-value",children:v.length}),l.jsx("div",{className:"stat-label",children:"Ports"})]}),l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-value",children:((ca=x==null?void 0:x.scripts)==null?void 0:ca.length)||0}),l.jsx("div",{className:"stat-label",children:"Scripts"})]}),l.jsxs("div",{className:`stat-card ${re?re.exposed>0?"stat-card-danger":"stat-card-safe":""}`,children:[l.jsx("div",{className:"stat-value",children:_n?"...":re?re.exposed:"-"}),l.jsx("div",{className:"stat-label",children:"Exposed"})]})]}),ne&&l.jsxs("div",{className:"test-results-section",children:[l.jsxs("div",{className:"section-header",children:[l.jsx("h3",{children:"Latest Test Results"}),l.jsx("span",{className:"test-timestamp",children:new Date(ne.timestamp*1e3).toLocaleString()})]}),l.jsxs("div",{className:"test-results-content",children:[l.jsxs("div",{className:"test-stats-grid",children:[l.jsxs("div",{className:"test-stat passed",children:[l.jsx("div",{className:"test-stat-icon",children:"✓"}),l.jsxs("div",{className:"test-stat-info",children:[l.jsx("div",{className:"test-stat-value",children:ne.passed}),l.jsx("div",{className:"test-stat-label",children:"Passed"})]})]}),l.jsxs("div",{className:"test-stat failed",children:[l.jsx("div",{className:"test-stat-icon",children:"✗"}),l.jsxs("div",{className:"test-stat-info",children:[l.jsx("div",{className:"test-stat-value",children:ne.failed}),l.jsx("div",{className:"test-stat-label",children:"Failed"})]})]}),ne.skipped>0&&l.jsxs("div",{className:"test-stat skipped",children:[l.jsx("div",{className:"test-stat-icon",children:"⊘"}),l.jsxs("div",{className:"test-stat-info",children:[l.jsx("div",{className:"test-stat-value",children:ne.skipped}),l.jsx("div",{className:"test-stat-label",children:"Skipped"})]})]}),l.jsxs("div",{className:"test-stat total",children:[l.jsx("div",{className:"test-stat-icon",children:"∑"}),l.jsxs("div",{className:"test-stat-info",children:[l.jsx("div",{className:"test-stat-value",children:ne.total}),l.jsx("div",{className:"test-stat-label",children:"Total"})]})]})]}),l.jsxs("div",{className:"test-meta",children:[ne.framework&&l.jsx("span",{className:"test-framework-badge",children:ne.framework}),ne.duration&&l.jsxs("span",{className:"test-duration",children:["⏱ ",(ne.duration/1e3).toFixed(2),"s"]}),ne.coverage&&l.jsxs("span",{className:"test-coverage",children:["📊 ",ne.coverage.toFixed(1),"% coverage"]}),l.jsxs("span",{className:"test-script-name",children:["Script: ",ne.script_name]})]})]})]}),l.jsxs("div",{className:"tags-section",children:[l.jsx("div",{className:"section-header",children:l.jsx("h3",{children:"Tags"})}),l.jsx("div",{className:"tags-content",children:l.jsxs("div",{className:"tags-list",children:[O.map(N=>l.jsxs("span",{className:"tag-item",children:[N,l.jsx("button",{onClick:()=>ze(N),className:"tag-remove",title:"Remove tag",children:"×"})]},N)),le?l.jsxs("div",{className:"tag-input-wrapper",children:[l.jsx("input",{type:"text",value:b,onChange:N=>te(N.target.value),onKeyDown:N=>{N.key==="Enter"?Ae():N.key==="Escape"&&(G(!1),te(""))},onBlur:()=>{Ae(),G(!1)},className:"tag-input",placeholder:"Add tag...",autoFocus:!0}),os.length>0&&b&&l.jsx("div",{className:"tag-suggestions",children:os.slice(0,5).map(N=>l.jsx("div",{className:"tag-suggestion",onMouseDown:W=>{W.preventDefault(),te(N)},children:N},N))})]}):l.jsx("button",{onClick:()=>G(!0),className:"tag-add-btn",title:"Add tag",children:"+ Add Tag"})]})})]}),re&&l.jsxs("div",{className:"security-section",children:[l.jsxs("div",{className:"section-header",children:[l.jsx("h3",{children:"Security"}),l.jsx("button",{className:"btn btn-secondary btn-small",onClick:()=>ss(!fn),children:fn?"Collapse":"Expand"})]}),l.jsxs("div",{className:"security-summary",children:[l.jsxs("span",{className:"security-badge security-safe",children:[re.safe," safe"]}),l.jsxs("span",{className:`security-badge ${re.exposed>0?"security-exposed":"security-safe"}`,children:[re.exposed," exposed"]}),l.jsxs("span",{className:"security-badge security-missing",children:[re.missing," missing"]}),re.channels&&re.channels.length>0&&l.jsxs("span",{className:"security-channels",children:["Channels: ",re.channels.join(", ")]})]}),fn&&re.items&&re.items.length>0&&l.jsx("div",{className:"security-items",children:re.items.map((N,W)=>l.jsxs("div",{className:"security-item",children:[l.jsxs("div",{className:"security-item-header",children:[l.jsx("span",{className:`security-category security-category-${N.category}`,children:N.category}),l.jsx("span",{className:"security-pattern",children:N.pattern})]}),l.jsx("div",{className:"security-item-description",children:N.description}),l.jsx("div",{className:"security-item-files",children:N.files.map((B,ot)=>l.jsx("span",{className:"security-file",children:B},ot))})]},W))}),fn&&(!re.items||re.items.length===0)&&l.jsx("div",{className:"security-clean",children:"No exposed files detected."})]}),ua.length>0&&l.jsx(Ym,{urls:ua,onOpenUrl:pf}),l.jsxs("div",{className:"scripts-section",children:[l.jsxs("div",{className:"section-header",children:[l.jsxs("h3",{children:["Available Scripts (",((da=x==null?void 0:x.scripts)==null?void 0:da.length)??0,")"]}),l.jsxs("div",{className:"section-header-right",children:[l.jsx("span",{className:"project-type-badge",children:(x==null?void 0:x.type)??"unknown"}),l.jsxs("select",{value:ye,onChange:N=>bo(N.target.value),className:"script-sort-select",disabled:C,children:[l.jsx("option",{value:"default",children:"Default"}),l.jsx("option",{value:"alphabetical",children:"Alphabetically"}),l.jsx("option",{value:"last-used",children:"Last Used"})]})]})]}),C?l.jsx("div",{className:"loading-state",children:"Loading scripts..."}):d?l.jsxs("div",{className:"no-scripts",children:[l.jsxs("div",{style:{marginBottom:8},children:["Failed to load scripts: ",d]}),l.jsx("button",{onClick:z,className:"btn btn-secondary btn-small",children:"Retry"})]}):(((fa=x==null?void 0:x.scripts)==null?void 0:fa.length)??0)===0?l.jsx("div",{className:"no-scripts",children:"No scripts found in this project."}):l.jsx("div",{className:"scripts-list",children:hf.map(N=>{const W=M.filter(Te=>Te.scriptName===N.name),B=W.length>0,ot=v.filter(Te=>Te.script_name===N.name).map(Te=>Te.port),pa=Array.from(new Set(ot)).sort((Te,ls)=>Te-ls);return l.jsxs("div",{className:`script-item ${B?"running":""}`,children:[l.jsxs("div",{className:"script-info",children:[l.jsxs("div",{className:"script-header",children:[l.jsx("span",{className:"script-name",children:N.name}),l.jsx("span",{className:"script-command",children:N.command}),l.jsx("span",{className:"script-runner",children:N.runner})]}),B&&l.jsx("div",{className:"script-process-info",children:W.map(Te=>{const ls=Math.floor((Date.now()-Te.startedAt)/1e3),ha=Math.floor(ls/60),ma=ls%60,mf=ha>0?`${ha}m ${ma}s`:`${ma}s`,ga=Te.detectedPorts&&Te.detectedPorts.length>0?Te.detectedPorts:pa;return l.jsxs("div",{className:"process-badge",children:[l.jsx("span",{className:"process-indicator",children:"●"}),l.jsxs("span",{className:"process-pid",children:["PID: ",Te.pid]}),l.jsx("span",{className:"process-uptime",children:mf}),ga.length>0&&l.jsxs("span",{className:"process-port",children:[":",ga.join(", ")]}),l.jsx("button",{onClick:Uo=>{Uo.stopPropagation(),s&&s(Te.pid,N.name,e.name)},className:"btn btn-secondary btn-tiny",title:"View terminal output",children:l.jsx("span",{className:"terminal-icon",children:"⌘"})}),l.jsx("button",{onClick:Uo=>{Uo.stopPropagation(),ff(Te.pid)},className:"btn btn-danger btn-tiny",title:"Stop process",children:"Stop"})]},Te.pid)})})]}),l.jsx("div",{className:"script-actions",children:!B&&l.jsx("button",{onClick:()=>df(N.name,!0),className:"btn btn-secondary btn-small",title:"Run in background",children:"Run"})})]},N.name)})})]}),l.jsx(Jm,{projectId:e.id,projectPath:e.path,onAddAgent:()=>{Dt(null),zn(!0)},onEditAgent:N=>{Dt(N),zn(!0)}},Io),Lo&&l.jsx(eg,{projectId:e.id,editAgent:Ao,onAdd:()=>{zn(!1),Dt(null),Fo(N=>N+1)},onClose:()=>{zn(!1),Dt(null)}}),l.jsxs("div",{className:"jenkins-placeholder",children:[l.jsx("h3",{children:"Jenkins Integration"}),l.jsx("p",{className:"placeholder-text",children:"Jenkins integration will be available in a future update. This section will display Jenkins job statuses and build information for your projects."})]}),r&&l.jsxs("div",{className:"danger-zone",children:[l.jsx("h3",{children:"Danger Zone"}),l.jsx("p",{className:"danger-zone-text",children:"Once you delete a project, there is no going back. Please be certain."}),l.jsx("button",{onClick:async()=>{confirm(`Are you sure you want to remove "${e.name}"?
|
|
56
|
+
|
|
57
|
+
This will delete the project from PROJAX (not from your filesystem).
|
|
58
|
+
|
|
59
|
+
This action cannot be undone.`)&&await r(e.id)},className:"btn btn-danger",title:"Remove project",children:"Delete Project"})]})]})},ng=({onAdd:e,onClose:t})=>{const[n,r]=k.useState(""),[s,o]=k.useState(!1),i=async()=>{try{const u=await window.electronAPI.selectDirectory();u&&r(u)}catch(u){console.error("Error selecting directory:",u)}},a=async u=>{if(u.preventDefault(),!n.trim()){alert("Please select a project directory");return}try{o(!0),await e(n)}catch{}finally{o(!1)}};return l.jsx("div",{className:"modal-overlay",onClick:t,children:l.jsxs("div",{className:"modal-content",onClick:u=>u.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsx("h2",{children:"Add Project"}),l.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),l.jsxs("form",{onSubmit:a,children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"project-path",children:"Project Directory"}),l.jsxs("div",{className:"path-input-group",children:[l.jsx("input",{id:"project-path",type:"text",value:n,onChange:u=>r(u.target.value),placeholder:"Select or enter project directory path",disabled:s}),l.jsx("button",{type:"button",onClick:i,disabled:s,className:"btn btn-secondary",children:"Browse"})]})]}),l.jsxs("div",{className:"modal-actions",children:[l.jsx("button",{type:"button",onClick:t,disabled:s,className:"btn btn-secondary",children:"Cancel"}),l.jsx("button",{type:"submit",disabled:s||!n.trim(),className:"btn btn-primary",children:s?"Adding...":"Add Project"})]})]})]})})},rg=({onSearchChange:e,onSortChange:t,searchInputRef:n})=>{const[r,s]=k.useState(""),[o,i]=k.useState("all"),[a,u]=k.useState("name-asc"),[c,h]=k.useState(!1),m=k.useRef(null),g=k.useRef(null),S=n||g,x=p=>{const d=p.target.value;s(d),e(d,"all")},w=p=>{u(p),h(!1),t&&t(p)};k.useEffect(()=>{const p=d=>{m.current&&!m.current.contains(d.target)&&h(!1)};if(c)return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[c]);const C=[{value:"name-asc",label:"Name (A-Z)"},{value:"name-desc",label:"Name (Z-A)"},{value:"recent",label:"Recently Scanned"},{value:"oldest",label:"Oldest First"},{value:"running",label:"Running First"}];return l.jsx("div",{className:"project-search",children:l.jsxs("div",{className:"search-input-group",ref:m,children:[l.jsxs("div",{className:"search-input-wrapper",children:[l.jsx("input",{ref:S,type:"text",placeholder:"Search projects... (⌘/)",value:r,onChange:x,className:"search-input"}),l.jsx("button",{className:"sort-icon-btn",onClick:()=>h(!c),title:"Sort options",tabIndex:0,children:l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:l.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),c&&l.jsx("div",{className:"sort-menu",children:C.map(p=>l.jsxs("div",{className:`sort-menu-item ${a===p.value?"active":""}`,onClick:()=>w(p.value),children:[p.label,a===p.value&&l.jsx("span",{className:"checkmark",children:"✓"})]},p.value))})]})})},sg=({onClose:e})=>{const[t,n]=k.useState({editor:{type:"vscode"},browser:{type:"chrome"}}),[r,s]=k.useState(!0),[o,i]=k.useState(!1),[a,u]=k.useState(!1),[c,h]=k.useState(!1);k.useEffect(()=>{const w=C=>{C.key==="Escape"&&e()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[e]),k.useEffect(()=>{m()},[]);const m=async()=>{try{s(!0);const w=await window.electronAPI.getSettings();n({editor:{type:w.editor.type,customPath:w.editor.customPath},browser:{type:w.browser.type,customPath:w.browser.customPath}})}catch(w){console.error("Error loading settings:",w)}finally{s(!1)}},g=async()=>{try{i(!0),await window.electronAPI.saveSettings(t),e()}catch(w){console.error("Error saving settings:",w),alert(`Failed to save settings: ${w instanceof Error?w.message:String(w)}`)}finally{i(!1)}},S=w=>{n({...t,editor:{type:w,customPath:w==="custom"?t.editor.customPath:void 0}})},x=w=>{n({...t,browser:{type:w,customPath:w==="custom"?t.browser.customPath:void 0}})};return r?l.jsx("div",{className:"settings-overlay",children:l.jsx("div",{className:"settings-modal",children:l.jsx("div",{className:"loading-state",children:"Loading settings..."})})}):l.jsxs("div",{className:"settings-container",children:[l.jsxs("div",{className:"settings-header",children:[l.jsx("h2",{children:"Settings"}),l.jsx("button",{type:"button",onClick:e,className:"btn btn-secondary",children:"Close"})]}),l.jsxs("div",{className:"settings-content",children:[l.jsxs("div",{className:"settings-section",children:[l.jsx("h3",{children:"Editor"}),l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{children:"Editor Type"}),l.jsxs("select",{value:t.editor.type,onChange:w=>S(w.target.value),className:"settings-select",children:[l.jsx("option",{value:"vscode",children:"VS Code"}),l.jsx("option",{value:"cursor",children:"Cursor"}),l.jsx("option",{value:"windsurf",children:"Windsurf"}),l.jsx("option",{value:"zed",children:"Zed"}),l.jsx("option",{value:"custom",children:"Custom"})]})]}),t.editor.type==="custom"&&l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{children:"Custom Editor Path"}),l.jsx("input",{type:"text",value:t.editor.customPath||"",onChange:w=>n({...t,editor:{...t.editor,customPath:w.target.value}}),placeholder:"/path/to/editor",className:"settings-input"})]})]}),l.jsxs("div",{className:"settings-section",children:[l.jsx("h3",{children:"Browser"}),l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{children:"Browser Type"}),l.jsxs("select",{value:t.browser.type,onChange:w=>x(w.target.value),className:"settings-select",children:[l.jsx("option",{value:"chrome",children:"Chrome"}),l.jsx("option",{value:"firefox",children:"Firefox"}),l.jsx("option",{value:"safari",children:"Safari"}),l.jsx("option",{value:"edge",children:"Edge"}),l.jsx("option",{value:"custom",children:"Custom"})]})]}),t.browser.type==="custom"&&l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{children:"Custom Browser Path"}),l.jsx("input",{type:"text",value:t.browser.customPath||"",onChange:w=>n({...t,browser:{...t.browser,customPath:w.target.value}}),placeholder:"/path/to/browser",className:"settings-input"})]})]}),l.jsxs("div",{className:"settings-section",children:[l.jsx("h3",{children:"Backup & Restore"}),l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{children:"Create Backup"}),l.jsx("p",{className:"settings-description",children:"Create a backup of all PROJAX data"}),l.jsx("button",{onClick:async()=>{try{u(!0);const w=await window.electronAPI.selectDirectory();if(w){const C=await window.electronAPI.createBackup(w);alert(`Backup created successfully!
|
|
60
|
+
${C.backup_path}`)}}catch(w){alert(`Failed to create backup: ${w instanceof Error?w.message:String(w)}`)}finally{u(!1)}},disabled:a,className:"btn btn-secondary",children:a?"Creating...":"Create Backup"})]}),l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{children:"Restore from Backup"}),l.jsx("p",{className:"settings-description",children:"Restore PROJAX data from a backup file"}),l.jsx("button",{onClick:async()=>{if(confirm("This will overwrite your current PROJAX data. Continue?"))try{h(!0);const w=await window.electronAPI.selectFile({filters:[{name:"PROJAX Backup",extensions:["pbz"]}]});w&&(await window.electronAPI.restoreBackup(w),alert("Backup restored successfully! The app will refresh."),window.location.reload())}catch(w){alert(`Failed to restore backup: ${w instanceof Error?w.message:String(w)}`)}finally{h(!1)}},disabled:c,className:"btn btn-danger",children:c?"Restoring...":"Restore from Backup"})]})]})]}),l.jsx("div",{className:"settings-footer",children:l.jsx("button",{type:"button",onClick:g,disabled:o,className:"btn btn-primary",children:o?"Saving...":"Save Settings"})})]})},og=({children:e})=>l.jsxs("div",{className:"app-header",children:[l.jsx("h1",{className:"app-logo",children:"PROJAX"}),e]}),ig=({apiPort:e})=>{const[t,n]=k.useState(!1),[r,s]=k.useState(e||null),[o,i]=k.useState("...");return k.useEffect(()=>{(async()=>{try{const m=await window.electronAPI.getAppVersion();i(m)}catch(m){console.error("Failed to get app version:",m),i("3.3.24")}})();const u=async()=>{if(r)c(r);else try{const m=[38124,38125,38126,38127,38128];for(const g of m)try{if((await fetch(`http://localhost:${g}/health`)).ok){s(g),c(g);return}}catch{}}catch(m){console.error("Failed to detect API port:",m)}},c=async m=>{try{const g=await fetch(`http://localhost:${m}/health`);n(g.ok)}catch{n(!1)}};u();const h=setInterval(()=>{r&&c(r)},5e3);return()=>clearInterval(h)},[r]),l.jsx("div",{className:"status-bar",children:l.jsxs("div",{className:"status-bar-content",children:[l.jsxs("div",{className:"status-version",children:["v",o]}),l.jsxs("div",{className:"status-right",children:[l.jsxs("div",{className:"status-indicator",children:[l.jsx("span",{className:`status-dot ${t?"connected":"disconnected"}`}),l.jsx("span",{className:"status-text",children:t?"API Connected":"API Disconnected"})]}),r&&l.jsxs("div",{className:"api-port",children:["Port: ",r]})]})]})})},lg=({pid:e,scriptName:t,projectName:n,onClose:r})=>{const[s,o]=k.useState([]),[i,a]=k.useState(!1),u=k.useRef(null),[c,h]=k.useState(!0);k.useEffect(()=>{const x=w=>{w.key==="Escape"&&r()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),k.useEffect(()=>{(async()=>{try{await window.electronAPI.watchProcessOutput(e),a(!0)}catch(p){console.error("Failed to start watching process:",p),o(d=>[...d,`Error: Failed to connect to process ${e}`])}})();const w=(p,d)=>{d.pid===e&&o(f=>[...f,d.data])},C=(p,d)=>{d.pid===e&&(o(f=>[...f,`
|
|
61
|
+
[Process exited with code ${d.code}]`]),a(!1))};return window.electronAPI.onProcessOutput(w),window.electronAPI.onProcessExit(C),()=>{window.electronAPI.unwatchProcessOutput(e),window.electronAPI.removeProcessOutputListener(w),window.electronAPI.removeProcessExitListener(C)}},[e]),k.useEffect(()=>{c&&u.current&&(u.current.scrollTop=u.current.scrollHeight)},[s,c]);const m=()=>{if(u.current){const{scrollTop:x,scrollHeight:w,clientHeight:C}=u.current,p=w-x-C<50;h(p)}},g=()=>{o([])},S=()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight,h(!0))};return l.jsxs("div",{className:"terminal-sidebar",children:[l.jsxs("div",{className:"terminal-header",children:[l.jsxs("div",{className:"terminal-title-row",children:[l.jsxs("div",{className:"terminal-title-content",children:[l.jsx("span",{className:`terminal-status-indicator ${i?"running":"stopped"}`,children:i?"●":"○"}),l.jsxs("div",{className:"terminal-info",children:[l.jsx("span",{className:"terminal-script",children:t}),l.jsx("span",{className:"terminal-project",children:n})]})]}),l.jsxs("div",{className:"terminal-meta",children:[l.jsx("span",{className:`terminal-status-badge ${i?"running":"stopped"}`,children:i?"Running":"Stopped"}),l.jsxs("span",{className:"terminal-pid",children:["PID: ",e]})]})]}),l.jsxs("div",{className:"terminal-toolbar",children:[l.jsx("button",{onClick:g,className:"btn btn-secondary btn-tiny",title:"Clear output",children:"Clear"}),!c&&l.jsx("button",{onClick:S,className:"btn btn-secondary btn-tiny",title:"Scroll to bottom",children:"↓ Bottom"}),l.jsx("button",{onClick:r,className:"btn btn-danger btn-tiny",title:"Close terminal",children:"Close"})]})]}),l.jsx("div",{ref:u,className:"terminal-output",onScroll:m,children:s.length===0?l.jsxs("div",{className:"terminal-empty",children:[l.jsx("div",{className:"terminal-empty-icon",children:"⌘"}),l.jsx("div",{className:"terminal-empty-text",children:"Waiting for output..."}),l.jsxs("div",{className:"terminal-empty-hint",children:["Process PID ",e]})]}):s.map((x,w)=>l.jsx("div",{className:"terminal-line",children:x},w))})]})},ag=({activeTab:e,onTabChange:t})=>l.jsxs("div",{className:"tab-bar",children:[l.jsx("button",{className:`tab-button ${e==="projects"?"active":""}`,onClick:()=>t("projects"),children:"Projects"}),l.jsx("button",{className:`tab-button ${e==="workspaces"?"active":""}`,onClick:()=>t("workspaces"),children:"Workspaces"})]});function ug(e){const t=e.split("/").filter(Boolean);return t.length===0?e:t[t.length-1]}const cg=({workspaces:e,selectedWorkspace:t,onSelectWorkspace:n,loading:r,keyboardFocusedIndex:s=-1,onKeyboardFocusChange:o,workspaceProjects:i})=>{if(r)return l.jsx("div",{className:"workspace-list-loading",children:l.jsx("p",{children:"Loading workspaces..."})});if(e.length===0)return l.jsxs("div",{className:"workspace-list-empty",children:[l.jsx("p",{children:"No workspaces yet"}),l.jsx("p",{className:"hint",children:"Add a workspace to get started"})]});const a=mo.useRef(null);return l.jsx("div",{ref:a,className:"workspace-list",role:"listbox","aria-label":"Workspaces",tabIndex:0,onFocus:u=>{s<0&&e.length>0&&o&&o(0)},onBlur:u=>{var c;o&&!((c=a.current)!=null&&c.contains(u.relatedTarget))&&o(-1)},children:e.map((u,c)=>{const h=(t==null?void 0:t.id)===u.id,m=s===c,g=(i==null?void 0:i.get(u.id))||0;return l.jsxs("div",{className:`workspace-item ${h?"selected":""} ${m?"keyboard-focused":""}`,onClick:()=>n(u),role:"option","aria-selected":h,tabIndex:c===0?0:-1,onFocus:S=>{S.currentTarget.scrollIntoView({block:"nearest",behavior:"smooth"}),o&&o(c)},ref:S=>{m&&S&&o&&S.scrollIntoView({block:"nearest",behavior:"smooth"})},children:[l.jsxs("div",{className:"workspace-item-header",children:[l.jsx("div",{className:"workspace-name-wrapper",children:l.jsx("h3",{className:"workspace-name",children:u.name})}),g>0&&l.jsx("span",{className:"workspace-project-count",children:g})]}),u.description&&l.jsx("p",{className:"workspace-description",children:u.description}),l.jsx("p",{className:"workspace-path",children:ug(u.workspace_file_path)}),u.tags&&u.tags.length>0&&l.jsx("div",{className:"workspace-tags",children:u.tags.map(S=>l.jsx("span",{className:"workspace-tag",children:S},S))})]},u.id)})})},dg=({workspace:e,onWorkspaceUpdate:t,onRemoveWorkspace:n,onOpenWorkspace:r,onSelectProject:s})=>{const[o,i]=k.useState(!1),[a,u]=k.useState(""),[c,h]=k.useState(!1),[m,g]=k.useState(""),[S,x]=k.useState(!1),[w,C]=k.useState(""),[p,d]=k.useState([]),[f,v]=k.useState([]),[y,P]=k.useState([]),[j,E]=k.useState([]),[I,M]=k.useState(!1),[$,H]=k.useState(null),[Z,le]=k.useState(!1),[G,b]=k.useState("");k.useEffect(()=>{e&&(u(e.name),g(e.description||""),v(e.tags||[]),i(!1),h(!1),T(),te())},[e==null?void 0:e.id]);const te=async()=>{try{const D=await fetch("http://localhost:3001/api/projects/tags");if(D.ok){const Q=await D.json();d(Array.isArray(Q)?Q:[])}}catch(D){console.error("Error loading tags:",D)}},T=async()=>{if(e)try{M(!0);const D=[38124,38125,38126,38127,38128,3001];let Q="";for(const rt of D)try{if((await fetch(`http://localhost:${rt}/health`,{signal:AbortSignal.timeout(500)})).ok){Q=`http://localhost:${rt}/api`;break}}catch{continue}if(!Q){M(!1);return}const ye=await fetch(`${Q}/workspaces/${e.id}/projects`);if(ye.ok){const rt=await ye.json();P(rt);const je=await window.electronAPI.getProjects(),st=rt.map(re=>{const ft=je.find(_n=>_n.path===re.project_path);return{tracked:!!ft,project:ft,path:re.project_path}});E(st)}}catch(D){console.error("Error loading workspace projects:",D)}finally{M(!1)}};if(!e)return l.jsx("div",{className:"workspace-details-empty",children:l.jsx("p",{children:"Select a workspace to view details"})});const F=async()=>{const D=[38124,38125,38126,38127,38128,3001];for(const Q of D)try{if((await fetch(`http://localhost:${Q}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${Q}/api`}catch{continue}return null},O=async()=>{try{const D=await F();if(!D)return;const Q=await fetch(`${D}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a})});if(Q.ok){const ye=await Q.json();t&&t(ye),i(!1)}}catch(D){console.error("Error updating workspace name:",D)}},Y=async()=>{try{const D=await F();if(!D)return;const Q=await fetch(`${D}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:m})});if(Q.ok){const ye=await Q.json();t&&t(ye),h(!1)}}catch(D){console.error("Error updating workspace description:",D)}},J=()=>{const D="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";let Q="";for(let ye=0;ye<6;ye++)Q+=D.charAt(Math.floor(Math.random()*D.length));return Q},[me]=k.useState(J()),ne=()=>{e&&G===me&&(n&&n(e.id),le(!1),b(""))},nt=async D=>{try{H(D),await window.electronAPI.addProject(D),await T()}catch(Q){console.error("Error adding project to PROJAX:",Q),alert(`Failed to add project: ${Q instanceof Error?Q.message:"Unknown error"}`)}finally{H(null)}};return l.jsxs("div",{className:"workspace-details",children:[l.jsxs("div",{className:"workspace-details-header",children:[l.jsxs("div",{children:[o?l.jsx("div",{className:"workspace-name-edit",children:l.jsx("input",{type:"text",value:a,onChange:D=>u(D.target.value),onBlur:O,onKeyDown:D=>{D.key==="Enter"&&O(),D.key==="Escape"&&(u(e.name),i(!1))},autoFocus:!0,className:"workspace-name-input"})}):l.jsx("h2",{className:"workspace-name-editable",onClick:()=>i(!0),title:"Click to rename",children:e.name}),c?l.jsx("div",{className:"workspace-description-edit",children:l.jsx("textarea",{value:m,onChange:D=>g(D.target.value),onBlur:Y,onKeyDown:D=>{D.key==="Enter"&&(D.metaKey||D.ctrlKey)?Y():D.key==="Escape"&&(g(e.description||""),h(!1))},autoFocus:!0,className:"workspace-description-input",placeholder:"Add a description for this workspace... (⌘+Enter to save, Esc to cancel)"})}):l.jsxs("div",{children:[l.jsx("p",{className:"workspace-description",onClick:()=>h(!0),title:"Click to edit description",children:e.description||"Click to add a description..."}),l.jsx("p",{className:"workspace-path",children:e.workspace_file_path})]})]}),l.jsx("div",{className:"header-actions-group",children:l.jsx("button",{type:"button",onClick:()=>r&&r(e),className:"btn btn-secondary",title:"Open workspace in editor",children:"Editor"})})]}),l.jsxs("div",{className:"workspace-section",children:[l.jsxs("h3",{children:["Workspace Projects (",j.length,")"]}),I?l.jsxs("div",{className:"loading-spinner",children:[l.jsx("div",{className:"spinner"}),l.jsx("p",{children:"Loading projects..."})]}):j.length===0?l.jsx("div",{className:"empty-state",children:l.jsx("p",{children:"No projects in this workspace"})}):l.jsx("div",{className:"workspace-projects-list",children:j.map((D,Q)=>{const ye=je=>{const st=je.split("/").filter(Boolean);if(st.length===0)return je;const re=st[st.length-1];return re==="src"&&st.length>1?st[st.length-2]:re},rt=D.tracked&&D.project?D.project.name:D.path.split("/").filter(Boolean).pop()||D.path;return l.jsxs("div",{className:`workspace-project-tile ${D.tracked?"":"untracked"}`,onClick:()=>D.tracked&&D.project&&s&&s(D.project),children:[l.jsx("div",{className:"project-tile-header",children:l.jsxs("h3",{className:"project-tile-name",children:[!D.tracked&&l.jsx("span",{className:"untracked-badge",children:"Not in PROJAX"}),rt]})}),l.jsx("p",{className:"project-tile-path",children:D.tracked&&D.project?D.project.description||ye(D.project.path):D.path}),D.tracked&&D.project&&D.project.tags&&D.project.tags.length>0&&l.jsx("div",{className:"project-tile-tags",children:D.project.tags.map(je=>l.jsx("span",{className:"project-tile-tag",children:je},je))}),!D.tracked&&l.jsx("div",{className:"project-tile-actions",children:l.jsx("button",{type:"button",className:"btn-add-project",onClick:je=>{je.stopPropagation(),nt(D.path)},disabled:$===D.path,children:$===D.path?"Adding...":"Add to PROJAX"})})]},D.tracked?D.project.id:Q)})})]}),n&&l.jsxs("div",{className:"danger-zone",children:[l.jsx("h3",{children:"Danger Zone"}),l.jsx("p",{className:"danger-zone-text",children:"Once you delete this workspace, there is no going back. Please be certain."}),l.jsx("button",{type:"button",onClick:()=>le(!0),className:"btn btn-danger",title:"Delete workspace",children:"Delete Workspace"})]}),Z&&l.jsx("div",{className:"modal-overlay",onClick:()=>{le(!1),b("")},children:l.jsxs("div",{className:"modal-content",onClick:D=>D.stopPropagation(),children:[l.jsx("h3",{children:"Delete Workspace"}),l.jsxs("p",{className:"modal-warning",children:["This will permanently delete the workspace ",l.jsxs("strong",{children:['"',e.name,'"']})," from PROJAX.",l.jsx("br",{}),l.jsx("br",{}),"The workspace file will ",l.jsx("strong",{children:"not"})," be deleted from your filesystem."]}),l.jsxs("p",{className:"modal-instruction",children:["Type ",l.jsx("code",{className:"confirmation-code",children:me})," to confirm:"]}),l.jsx("input",{type:"text",value:G,onChange:D=>b(D.target.value),placeholder:"Enter confirmation code",className:"confirmation-input",autoFocus:!0}),l.jsxs("div",{className:"modal-actions",children:[l.jsx("button",{type:"button",onClick:()=>{le(!1),b("")},className:"btn btn-secondary",children:"Cancel"}),l.jsx("button",{type:"button",onClick:ne,className:"btn btn-danger",disabled:G!==me,children:"Delete Workspace"})]})]})})]})},fg=({onAdd:e,onClose:t,existingProjects:n=[]})=>{const[r,s]=k.useState("import"),[o,i]=k.useState(""),[a,u]=k.useState(""),[c,h]=k.useState(""),[m,g]=k.useState([]),[S,x]=k.useState(!1),w=async()=>{try{const d=await window.electronAPI.selectFile({filters:[{name:"Workspace Files",extensions:["code-workspace"]}]});d&&i(d)}catch(d){console.error("Error selecting workspace file:",d)}},C=d=>{g(f=>f.includes(d)?f.filter(v=>v!==d):[...f,d])},p=async d=>{d.preventDefault();try{if(x(!0),r==="import"){if(!o){alert("Please select a workspace file");return}const f=[38124,38125,38126,38127,38128,3001];let v="";for(const j of f)try{if((await fetch(`http://localhost:${j}/health`,{signal:AbortSignal.timeout(500)})).ok){v=`http://localhost:${j}/api`;break}}catch{continue}if(!v)throw new Error("PROJAX API server not found");const y=await fetch(`${v}/workspaces/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_file_path:o})});if(!y.ok){const j=y.headers.get("content-type");if(j&&j.includes("application/json")){const E=await y.json();throw new Error(E.error||"Failed to import workspace")}else{const E=await y.text();throw new Error(`Server returned ${y.status}: ${E.substring(0,100)}`)}}const P=await y.json();await e(P)}else{if(!a){alert("Please provide workspace name");return}const f=[38124,38125,38126,38127,38128,3001];let v="";for(const j of f)try{if((await fetch(`http://localhost:${j}/health`,{signal:AbortSignal.timeout(500)})).ok){v=`http://localhost:${j}/api`;break}}catch{continue}if(!v)throw new Error("PROJAX API server not found");const y=await fetch(`${v}/workspaces/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,description:c,projects:m})});if(!y.ok){const j=y.headers.get("content-type");if(j&&j.includes("application/json")){const E=await y.json();throw new Error(E.error||"Failed to create workspace")}else{const E=await y.text();throw new Error(`Server returned ${y.status}: ${E.substring(0,100)}`)}}const P=await y.json();await e(P)}}catch(f){alert(f instanceof Error?f.message:"Failed to add workspace")}finally{x(!1)}};return l.jsx("div",{className:"modal-overlay",onClick:t,children:l.jsxs("div",{className:"modal-content workspace-modal",onClick:d=>d.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsx("h2",{children:"Add Workspace"}),l.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),l.jsxs("div",{className:"workspace-mode-selector",children:[l.jsx("button",{type:"button",className:`mode-button ${r==="import"?"active":""}`,onClick:()=>s("import"),children:"Import from File"}),l.jsx("button",{type:"button",className:`mode-button ${r==="create"?"active":""}`,onClick:()=>s("create"),children:"Create New"})]}),l.jsxs("form",{onSubmit:p,children:[r==="import"?l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"workspace-file",children:"Workspace File (.code-workspace)"}),l.jsxs("div",{className:"path-input-group",children:[l.jsx("input",{id:"workspace-file",type:"text",value:o,onChange:d=>i(d.target.value),placeholder:"Select workspace file",disabled:S}),l.jsx("button",{type:"button",onClick:w,disabled:S,className:"btn btn-secondary",children:"Browse"})]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"workspace-name",children:"Workspace Name *"}),l.jsx("input",{id:"workspace-name",type:"text",value:a,onChange:d=>u(d.target.value),placeholder:"My Workspace",disabled:S,required:!0,className:"form-input"})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{htmlFor:"workspace-description",children:"Description"}),l.jsx("textarea",{id:"workspace-description",value:c,onChange:d=>h(d.target.value),placeholder:"Optional description",disabled:S,rows:3,className:"form-input"})]}),l.jsx("div",{className:"form-group",children:l.jsx("p",{className:"form-hint",style:{fontSize:"12px",color:"var(--text-secondary)",marginTop:"0.5rem"},children:"Workspace files are automatically stored in ~/.projax/workspaces/"})}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{children:"Add Projects"}),l.jsx("div",{className:"projects-selector",children:n.length===0?l.jsx("p",{className:"empty-state",children:"No projects available"}):n.map(d=>l.jsxs("label",{className:"project-checkbox",children:[l.jsx("input",{type:"checkbox",checked:m.includes(d.path),onChange:()=>C(d.path),disabled:S}),l.jsx("span",{children:d.name})]},d.id))})]})]}),l.jsxs("div",{className:"modal-actions",children:[l.jsx("button",{type:"button",onClick:t,disabled:S,className:"btn btn-secondary",children:"Cancel"}),l.jsx("button",{type:"submit",disabled:S,className:"btn btn-primary",children:S?"Adding...":r==="import"?"Import":"Create"})]})]})]})})},pg=({onSearchChange:e,onSortChange:t})=>{const[n,r]=k.useState(""),[s,o]=k.useState("name-asc"),[i,a]=k.useState(!1),u=k.useRef(null),c=k.useRef(null),h=S=>{const x=S.target.value;r(x),e(x)},m=S=>{o(S),a(!1),t&&t(S)};k.useEffect(()=>{const S=x=>{u.current&&!u.current.contains(x.target)&&a(!1)};if(i)return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[i]);const g=[{value:"name-asc",label:"Name (A-Z)"},{value:"name-desc",label:"Name (Z-A)"},{value:"recent",label:"Recently Created"},{value:"projects",label:"Most Projects"}];return l.jsx("div",{className:"project-search",children:l.jsxs("div",{className:"search-input-group",ref:u,children:[l.jsxs("div",{className:"search-input-wrapper",children:[l.jsx("input",{ref:c,type:"text",placeholder:"Search workspaces...",value:n,onChange:h,className:"search-input"}),l.jsx("button",{type:"button",className:"sort-icon-btn",onClick:()=>a(!i),title:"Sort options",tabIndex:0,children:l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:l.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),i&&l.jsx("div",{className:"sort-menu",children:g.map(S=>l.jsxs("div",{className:`sort-menu-item ${s===S.value?"active":""}`,onClick:()=>m(S.value),children:[S.label,s===S.value&&l.jsx("span",{className:"checkmark",children:"✓"})]},S.value))})]})})};function hg(){const[e,t]=k.useState([]),[n,r]=k.useState(null),[s,o]=k.useState(!0),[i,a]=k.useState(!1),[u,c]=k.useState(""),[h,m]=k.useState("all"),[g,S]=k.useState("name-asc"),[x,w]=k.useState(!1),[C,p]=k.useState([]),[d,f]=k.useState(-1),v=mo.useRef(null),[y,P]=k.useState(280),[j,E]=k.useState(550),[I,M]=k.useState(null),[$,H]=k.useState("projects"),[Z,le]=k.useState([]),[G,b]=k.useState(null),[te,T]=k.useState(!1),[F,O]=k.useState(!1),[Y,J]=k.useState(new Map),[me,ne]=k.useState(new Map),[nt,D]=k.useState(""),[Q,ye]=k.useState("name-asc"),[rt,je]=k.useState(!1),[st,re]=k.useState(!1);k.useEffect(()=>{r(null)},[$]),k.useEffect(()=>{ft(),dn(),_n();const z=setInterval(()=>{_n(),fn()},5e3);return()=>clearInterval(z)},[]),k.useEffect(()=>{e.length>0&&fn()},[e]);const ft=async()=>{try{o(!0);const z=await window.electronAPI.getProjects();t(z),z.length===0&&console.log('No projects found. Use "Add Project" to add one.')}catch(z){console.error("Error loading projects:",z),alert(`Error loading projects: ${z instanceof Error?z.message:String(z)}
|
|
62
|
+
|
|
63
|
+
Check the console for more details.`)}finally{o(!1)}},_n=async()=>{try{const z=await window.electronAPI.getRunningProcesses();p(z)}catch(z){console.error("Error loading running processes:",z)}},dn=async()=>{try{T(!0);const z=[38124,38125,38126,38127,38128,3001];let R="";for(const U of z)try{if((await fetch(`http://localhost:${U}/health`,{signal:AbortSignal.timeout(500)})).ok){R=`http://localhost:${U}/api`;break}}catch{continue}if(!R){T(!1);return}const A=await fetch(`${R}/workspaces`);if(A.ok){const U=A.headers.get("content-type");if(U&&U.includes("application/json")){const V=await A.json();le(V);const we=new Map;await Promise.all(V.map(async Ae=>{try{const ze=await fetch(`${R}/workspaces/${Ae.id}/projects`);if(ze.ok){const os=await ze.json();we.set(Ae.id,os.length)}}catch(ze){console.error(`Error loading projects for workspace ${Ae.id}:`,ze)}})),ne(we)}else{const V=await A.text();throw console.error("API returned non-JSON response:",V.substring(0,200)),new Error("API server returned invalid response (not JSON)")}}else{const U=A.headers.get("content-type");if(U&&U.includes("application/json")){const V=await A.json();console.error("API error:",V)}else{const V=await A.text();console.error("API error (non-JSON):",V.substring(0,200))}}}catch(z){console.error("Error loading workspaces:",z)}finally{T(!1)}},fn=async()=>{try{const z=new Map,R=[38124,38125,38126,38127,38128,3001];let A="";for(const U of R)try{if((await fetch(`http://localhost:${U}/health`,{signal:AbortSignal.timeout(500)})).ok){A=`http://localhost:${U}/api`;break}}catch{continue}if(!A){for(const U of e)z.set(U.id,null);J(z);return}for(const U of e)try{const V=await fetch(`${A}/projects/${U.id}/git-branch`);if(V.ok){const we=await V.json();z.set(U.id,we.branch)}else z.set(U.id,null)}catch{z.set(U.id,null)}J(z)}catch(z){console.error("Error updating git branches:",z)}},ss=async z=>{try{const R=await window.electronAPI.addProject(z);await ft(),a(!1),await window.electronAPI.scanProject(R.id),await ft()}catch(R){throw console.error("Error adding project:",R),alert(R instanceof Error?R.message:"Failed to add project"),R}},Lo=async z=>{re(!0);const R={success:0,errors:[]};for(const A of z)try{await ss(A),R.success++}catch(U){const V=U instanceof Error?U.message:"Unknown error";R.errors.push(`${A}: ${V}`)}re(!1),R.errors.length>0&&alert(`Added ${R.success} project(s). Errors:
|
|
64
|
+
${R.errors.join(`
|
|
65
|
+
`)}`)},zn=async z=>{if(confirm("Are you sure you want to remove this project?"))try{await window.electronAPI.removeProject(z),(n==null?void 0:n.id)===z&&r(null),await ft()}catch(R){console.error("Error removing project:",R),alert("Failed to remove project")}},Ao=(z,R)=>{c(z),m(R)},Dt=k.useMemo(()=>{let z=e;if(u.trim()){const A=u.toLowerCase().trim();z=e.filter(U=>{switch(h){case"name":return U.name.toLowerCase().includes(A);case"path":return U.path.toLowerCase().includes(A);case"ports":return!1;case"running":return A==="running"||A==="not running";case"all":default:return U.name.toLowerCase().includes(A)||U.path.toLowerCase().includes(A)||U.tags&&U.tags.some(V=>V.toLowerCase().includes(A))}})}const R=[...z];switch(g){case"name-asc":R.sort((A,U)=>A.name.localeCompare(U.name));break;case"name-desc":R.sort((A,U)=>U.name.localeCompare(A.name));break;case"recent":R.sort((A,U)=>(U.last_scanned||0)-(A.last_scanned||0));break;case"oldest":R.sort((A,U)=>A.created_at-U.created_at);break;case"running":R.sort((A,U)=>{const V=C.filter(Ae=>Ae.projectPath===A.path).length;return C.filter(Ae=>Ae.projectPath===U.path).length-V});break}return R},[e,u,h,g,C]),Io=k.useMemo(()=>{let z=Z;if(nt.trim()){const R=nt.toLowerCase().trim();z=Z.filter(A=>A.name.toLowerCase().includes(R)||A.description&&A.description.toLowerCase().includes(R)||A.workspace_file_path.toLowerCase().includes(R))}return z=[...z].sort((R,A)=>{switch(Q){case"name-asc":return R.name.localeCompare(A.name);case"name-desc":return A.name.localeCompare(R.name);case"recent":return(A.id||0)-(R.id||0);case"projects":{const U=me.get(R.id)||0;return(me.get(A.id)||0)-U}default:return 0}}),z},[Z,nt,Q,me]);k.useEffect(()=>{const z=R=>{var Ae;if((R.metaKey||R.ctrlKey)&&R.key===","){R.preventDefault(),w(!0);return}if((R.metaKey||R.ctrlKey)&&R.key==="/"){R.preventDefault(),(Ae=v.current)==null||Ae.focus();return}const A=R.target;if(A.tagName==="INPUT"||A.tagName==="TEXTAREA")return;const U=document.querySelector(".project-list"),V=U&&(U===A||U.contains(A)||A.closest(".project-item")!==null);if(!V&&(R.key==="ArrowDown"||R.key==="ArrowUp"))return;const we=Dt;if(R.key==="ArrowDown"&&V){R.preventDefault();const ze=d<we.length-1?d+1:we.length>0?0:-1;ze>=0&&(f(ze),r(we[ze]))}else if(R.key==="ArrowUp"&&V){R.preventDefault();const ze=d>0?d-1:we.length>0?we.length-1:-1;ze>=0&&(f(ze),r(we[ze]))}else R.key==="Enter"&&d>=0&&d<we.length&&V?(R.preventDefault(),r(we[d])):R.key==="Escape"&&V&&f(-1)};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[d,Dt]),k.useEffect(()=>{f(-1)},[Dt.length,u]);const Fo=(z,R,A)=>{M({pid:z,scriptName:R,projectName:A})},Wo=()=>{M(null)},bo=z=>{z.preventDefault(),z.stopPropagation(),z.dataTransfer.types.includes("Files")&&je(!0)},Tn=z=>{z.preventDefault(),z.stopPropagation(),z.dataTransfer.types.includes("Files")&&(z.dataTransfer.dropEffect="copy")},ur=z=>{z.preventDefault(),z.stopPropagation(),z.currentTarget.contains(z.relatedTarget)||je(!1)},cr=async z=>{if(z.preventDefault(),z.stopPropagation(),je(!1),$!=="projects"||st)return;const R=Array.from(z.dataTransfer.files);if(R.length===0)return;const A=[];for(const U of R){const V=U;V.path&&A.push(V.path)}A.length>0?await Lo(A):alert('Could not extract file paths. Please try using the "Add Project" button instead.')};return l.jsxs("div",{className:`app ${rt?"drag-over":""}`,onDragEnter:bo,onDragOver:Tn,onDragLeave:ur,onDrop:cr,children:[l.jsx(og,{children:l.jsxs("div",{className:"header-actions",children:[l.jsx("button",{type:"button",onClick:()=>w(!0),className:"btn-link",title:"Settings",children:"Settings"}),$==="projects"?l.jsx("button",{type:"button",onClick:()=>a(!0),className:"btn-link btn-link-primary",children:"+ Add Project"}):l.jsx("button",{type:"button",onClick:()=>O(!0),className:"btn-link btn-link-primary",children:"+ Add Workspace"})]})}),l.jsxs("div",{className:"app-content",children:[l.jsx(Vm,{size:{width:y,height:"100%"},minWidth:200,maxWidth:600,disableDragging:!0,enableResizing:{right:!0},onResizeStop:(z,R,A,U)=>{const V=y+U.width;P(Math.max(200,Math.min(600,V)))},style:{position:"relative",display:"flex",flexDirection:"column"},resizeHandleStyles:{right:{width:"4px",right:"-2px",cursor:"col-resize",backgroundColor:"transparent"}},children:l.jsxs("aside",{className:"sidebar",style:{width:"100%",height:"100%"},children:[l.jsx(ag,{activeTab:$,onTabChange:H}),$==="projects"?l.jsxs(l.Fragment,{children:[l.jsx(rg,{onSearchChange:Ao,onSortChange:S,searchInputRef:v}),l.jsx(Qm,{projects:Dt,selectedProject:n,onSelectProject:r,loading:s,runningProcesses:C,keyboardFocusedIndex:d,onKeyboardFocusChange:f,gitBranches:Y})]}):l.jsxs(l.Fragment,{children:[l.jsx(pg,{onSearchChange:D,onSortChange:ye}),l.jsx(cg,{workspaces:Io,selectedWorkspace:G,onSelectWorkspace:z=>{r(null),setTimeout(()=>{b(z)},0)},loading:te,keyboardFocusedIndex:d,onKeyboardFocusChange:f,workspaceProjects:me})]})]})}),l.jsx("main",{className:"main-content",children:x?l.jsx(sg,{onClose:()=>w(!1)}):n?l.jsx(tg,{project:n,workspace:$==="workspaces"?G:void 0,onProjectUpdate:z=>{r(z),ft()},onRemoveProject:zn,onOpenTerminal:Fo,onNavigateBack:$==="workspaces"&&G?()=>{r(null)}:void 0}):$==="workspaces"&&G?l.jsx(dg,{workspace:G,onWorkspaceUpdate:z=>{b(z),dn()},onRemoveWorkspace:async z=>{try{const R=[38124,38125,38126,38127,38128,3001];let A="";for(const U of R)try{if((await fetch(`http://localhost:${U}/health`,{signal:AbortSignal.timeout(500)})).ok){A=`http://localhost:${U}/api`;break}}catch{continue}A&&await fetch(`${A}/workspaces/${z}`,{method:"DELETE"}),(G==null?void 0:G.id)===z&&b(null),await dn()}catch(R){console.error("Error removing workspace:",R),alert("Failed to remove workspace")}},onOpenWorkspace:async z=>{try{await window.electronAPI.openWorkspace(z.id)}catch(R){console.error("Error opening workspace:",R),alert(`Failed to open workspace: ${R instanceof Error?R.message:"Unknown error"}`)}},onSelectProject:z=>{r(z)}}):l.jsxs("div",{className:"empty-state",children:[l.jsxs("h2",{children:["Select ",$==="projects"?"a project":"a workspace"," to view details"]}),l.jsxs("p",{children:["Choose ",$==="projects"?"a project":"a workspace"," from the sidebar to see its information."]}),$==="projects"&&l.jsx("p",{style:{fontSize:"12px",marginTop:"1rem",opacity:.7},children:"💡 Tip: You can also drag and drop folders here to add projects"})]})}),I&&l.jsxs("div",{style:{width:`${j}px`,minWidth:"350px",maxWidth:"800px",height:"100%",position:"relative",flexShrink:0,display:"flex",flexDirection:"column"},children:[l.jsx("div",{style:{position:"absolute",left:"-2px",top:0,bottom:0,width:"4px",cursor:"col-resize",zIndex:10},onMouseDown:z=>{z.preventDefault();const R=z.clientX,A=j,U=we=>{const Ae=R-we.clientX,ze=Math.max(350,Math.min(800,A+Ae));E(ze)},V=()=>{document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",V)};document.addEventListener("mousemove",U),document.addEventListener("mouseup",V)}}),l.jsx(lg,{pid:I.pid,scriptName:I.scriptName,projectName:I.projectName,onClose:Wo})]})]}),i&&l.jsx(ng,{onAdd:ss,onClose:()=>a(!1)}),F&&l.jsx(fg,{onAdd:async z=>{await dn(),O(!1),b(z)},onClose:()=>O(!1),existingProjects:e}),l.jsx(ig,{})]})}const uf=[{id:1,name:"My React App",path:"/Users/dev/my-react-app",description:"A modern React application with TypeScript",tags:["react","typescript","frontend"],framework:"react",last_scanned:Date.now()-864e4,created_at:Date.now()-864e5*30},{id:2,name:"Node API Server",path:"/Users/dev/node-api",description:"RESTful API built with Express",tags:["node","express","backend","api"],framework:"node",last_scanned:Date.now()-864e3,created_at:Date.now()-864e5*60},{id:3,name:"Vue Dashboard",path:"/Users/dev/vue-dashboard",description:"Admin dashboard built with Vue 3",tags:["vue","frontend","dashboard"],framework:"vue",last_scanned:Date.now()-36e5,created_at:Date.now()-864e5*15}],cf=[{id:1,name:"Frontend Projects",description:"All frontend-related projects",tags:["frontend"],created_at:Date.now()-864e5*20},{id:2,name:"Backend Services",description:"API and microservices",tags:["backend","api"],created_at:Date.now()-864e5*45}],mg=[{pid:12345,projectPath:"/Users/dev/my-react-app",projectName:"My React App",scriptName:"dev",command:"npm run dev",startedAt:Date.now()-36e5,logFile:"/tmp/projax-12345.log",detectedUrls:["http://localhost:3000"],detectedPorts:[3e3]}],gg={type:"npm",scripts:[{name:"dev",command:"vite",runner:"npm",projectType:"react"},{name:"build",command:"vite build",runner:"npm",projectType:"react"},{name:"test",command:"vitest",runner:"npm",projectType:"react"},{name:"lint",command:"eslint .",runner:"npm",projectType:"react"}]},vg=[{id:1,project_id:1,port:3e3,script_name:"dev",config_source:"package.json",last_detected:Date.now()-3e5,created_at:Date.now()-864e5}],Sr=[{id:1,project_id:1,file_path:"/Users/dev/my-react-app/src/App.test.tsx",framework:"vitest",status:null,last_run:null,created_at:Date.now()-864e5*5},{id:2,project_id:1,file_path:"/Users/dev/my-react-app/src/components/Button.test.tsx",framework:"vitest",status:null,last_run:null,created_at:Date.now()-864e5*5}];let jt=[...uf],xr=[...cf],ht=[...mg];const $s=new Map;$s.set(1,vg);const q=(e=300)=>new Promise(t=>setTimeout(t,e)),yg=()=>({getProjects:async()=>(await q(),[...jt]),addProject:async e=>{await q();const t={id:Math.max(...jt.map(n=>n.id),0)+1,name:e.split("/").pop()||"New Project",path:e,description:null,tags:[],framework:null,last_scanned:null,created_at:Date.now()};return jt.push(t),t},removeProject:async e=>{await q(),jt=jt.filter(t=>t.id!==e)},scanProject:async e=>{await q(1e3);const t=jt.find(n=>n.id===e);if(!t)throw new Error("Project not found");return{project:t,testsFound:Sr.filter(n=>n.project_id===e).length,tests:Sr.filter(n=>n.project_id===e)}},scanAllProjects:async()=>(await q(2e3),jt.map(e=>({project:e,testsFound:Sr.filter(t=>t.project_id===e.id).length,tests:Sr.filter(t=>t.project_id===e.id)}))),getTests:async e=>(await q(),Sr.filter(t=>t.project_id===e)),selectDirectory:async()=>(await q(),prompt("Enter a project path (mock):")||null),minimizeWindow:async()=>{console.log("[MOCK] minimizeWindow")},maximizeWindow:async()=>{console.log("[MOCK] maximizeWindow")},closeWindow:async()=>{console.log("[MOCK] closeWindow")},renameProject:async(e,t)=>{await q();const n=jt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return n.name=t,{...n}},updateProject:async(e,t)=>{await q();const n=jt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return t.description!==void 0&&(n.description=t.description),t.tags!==void 0&&(n.tags=t.tags),{...n}},getProjectScripts:async e=>(await q(),gg),runScript:async(e,t,n,r)=>{await q(500);const s=jt.find(o=>o.path===e);if(r){const o={pid:Math.floor(Math.random()*9e4)+1e4,projectPath:e,projectName:(s==null?void 0:s.name)||"Unknown",scriptName:t,command:`npm run ${t}`,startedAt:Date.now(),logFile:`/tmp/projax-${Date.now()}.log`,detectedUrls:[],detectedPorts:[]};ht.push(o)}return{success:!0,background:r||!1}},scanProjectPorts:async e=>(await q(1e3),$s.get(e)||[]),scanAllPorts:async()=>{await q(2e3);const e={};return $s.forEach((t,n)=>{e[n]=t}),e},getProjectPorts:async e=>(await q(),$s.get(e)||[]),getRunningProcesses:async()=>(await q(),[...ht]),stopScript:async e=>(await q(),ht=ht.filter(t=>t.pid!==e),!0),stopProject:async e=>{await q();const t=ht.filter(n=>n.projectPath===e).length;return ht=ht.filter(n=>n.projectPath!==e),t},openUrl:async e=>{console.log("[MOCK] openUrl:",e),window.open(e,"_blank")},openInEditor:async e=>{console.log("[MOCK] openInEditor:",e)},openInFiles:async e=>{console.log("[MOCK] openInFiles:",e)},getSettings:async()=>(await q(),{editor:{type:"vscode"},browser:{type:"default"}}),saveSettings:async e=>{await q(),console.log("[MOCK] saveSettings:",e)},openExternal:e=>{window.open(e,"_blank")},watchProcessOutput:async e=>(console.log("[MOCK] watchProcessOutput:",e),{success:!0}),unwatchProcessOutput:async e=>(console.log("[MOCK] unwatchProcessOutput:",e),{success:!0}),onProcessOutput:e=>{setTimeout(()=>{ht.length>0&&e(null,{pid:ht[0].pid,data:`[MOCK] Process output line
|
|
66
|
+
`})},2e3)},onProcessExit:e=>{setTimeout(()=>{ht.length>0&&e(null,{pid:ht[0].pid,code:0})},1e4)},removeProcessOutputListener:e=>{console.log("[MOCK] removeProcessOutputListener")},removeProcessExitListener:e=>{console.log("[MOCK] removeProcessExitListener")},getAppVersion:async()=>(await q(),"3.3.38"),getLatestTestResult:async e=>(await q(),{id:1,project_id:e,passed:10,failed:2,skipped:1,duration:1234,timestamp:Date.now()}),getWorkspaces:async()=>(await q(),[...xr]),addWorkspace:async e=>{await q();const t={id:Math.max(...xr.map(n=>n.id),0)+1,...e,created_at:Date.now()};return xr.push(t),t},removeWorkspace:async e=>{await q(),xr=xr.filter(t=>t.id!==e)},createBackup:async e=>(await q(1e3),{success:!0,backup_path:e}),restoreBackup:async e=>(await q(1e3),{success:!0}),showSaveDialog:async e=>(await q(),{canceled:!1,filePath:"/tmp/backup.json"}),showOpenDialog:async e=>(await q(),{canceled:!1,filePaths:["/tmp/backup.json"]}),selectFile:async e=>(await q(),"/tmp/selected-file.json"),openWorkspace:async e=>{console.log("[MOCK] openWorkspace:",e)}});let On=[...cf];const Ou=[...uf],Mu=new Map,wg=new Map,Sg=(e=200)=>new Promise(t=>setTimeout(t,e)),xg=()=>{const e=window.fetch;window.fetch=async(t,n)=>{const r=typeof t=="string"?t:t instanceof URL?t.toString():t.url;if(!r.includes("localhost:3001/api")&&!r.includes("localhost:3001/health"))return e(t,n);await Sg();const o=new URL(r,"http://localhost:3001").pathname,i=(n==null?void 0:n.method)||"GET";if(console.log(`[MOCK API] ${i} ${o}`),o==="/api/workspaces"&&i==="GET")return new Response(JSON.stringify(On),{status:200,headers:{"Content-Type":"application/json"}});if(o==="/api/workspaces/create"&&i==="POST"){const a=JSON.parse((n==null?void 0:n.body)||"{}"),u={id:Math.max(...On.map(c=>c.id),0)+1,...a,created_at:Date.now()};return On.push(u),new Response(JSON.stringify(u),{status:201,headers:{"Content-Type":"application/json"}})}if(o==="/api/workspaces/import"&&i==="POST")return n==null||n.body,new Response(JSON.stringify({success:!0,imported:1}),{status:200,headers:{"Content-Type":"application/json"}});if(o.startsWith("/api/workspaces/")&&o.endsWith("/projects")&&i==="GET"){const a=parseInt(o.split("/")[3]),u=wg.get(a)||[],c=Ou.filter(h=>u.includes(h.id));return new Response(JSON.stringify(c),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/workspaces/")&&i==="PUT"){const a=parseInt(o.split("/")[3]),u=JSON.parse((n==null?void 0:n.body)||"{}"),c=On.find(h=>h.id===a);return c?(Object.assign(c,u),new Response(JSON.stringify(c),{status:200,headers:{"Content-Type":"application/json"}})):new Response(JSON.stringify({error:"Not found"}),{status:404})}if(o.startsWith("/api/workspaces/")&&i==="DELETE"){const a=parseInt(o.split("/")[3]);return On=On.filter(u=>u.id!==a),new Response(JSON.stringify({success:!0}),{status:200,headers:{"Content-Type":"application/json"}})}if(o==="/api/projects/tags"&&i==="GET"){const a=new Set;return Ou.forEach(u=>{(u.tags||[]).forEach(c=>a.add(c))}),new Response(JSON.stringify(Array.from(a)),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/settings")&&i==="GET"){const a=parseInt(o.split("/")[3]),u=Mu.get(a)||{script_sort_order:"default"};return new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/settings")&&i==="PUT"){const a=parseInt(o.split("/")[3]),u=JSON.parse((n==null?void 0:n.body)||"{}");return Mu.set(a,u),new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/git-branch")&&i==="GET"){const a=parseInt(o.split("/")[3]),u=["main","develop","feature/new-feature"];return new Response(JSON.stringify({branch:u[a%u.length]}),{status:200,headers:{"Content-Type":"application/json"}})}return o==="/health"?new Response(JSON.stringify({status:"ok"}),{status:200,headers:{"Content-Type":"application/json"}}):(console.warn(`[MOCK API] Unhandled route: ${i} ${o}`),new Response(JSON.stringify({error:"Not found"}),{status:404,headers:{"Content-Type":"application/json"}}))}},kg=()=>{var r,s;if(typeof window>"u")return;const e=typeof window.electronAPI<"u",t=typeof window.process<"u",n=(r=window.process)==null?void 0:r.type;if(console.log("[MOCK SETUP] Environment check:",{hasElectronAPI:e,hasProcess:t,processType:n,electronAPIType:typeof window.electronAPI}),e){console.log("⚡ Running in Electron - using real APIs");return}e||(console.log("🔧 Setting up mocks for browser development..."),Object.defineProperty(window,"electronAPI",{value:yg(),writable:!1,configurable:!1}),console.log("✅ Mock ElectronAPI initialized"),xg(),console.log("✅ Mock fetch interceptor initialized"),console.log("✅ All mocks initialized. You can now develop in the browser!"),console.log("📦 Mock data includes:",{projects:3,workspaces:2,runningProcesses:1}),typeof((s=window.electronAPI)==null?void 0:s.getProjects)=="function"?console.log("✅ Verified: electronAPI.getProjects is available"):console.error("❌ ERROR: electronAPI.getProjects is not available!"))};kg();yi.createRoot(document.getElementById("root")).render(l.jsx(mo.StrictMode,{children:l.jsx(hg,{})}));
|