projax 3.3.39 → 3.3.41
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/api/database.d.ts +12 -1
- package/dist/api/database.d.ts.map +1 -1
- package/dist/api/database.js +139 -1
- package/dist/api/database.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/routes/backup.d.ts +3 -0
- package/dist/api/routes/backup.d.ts.map +1 -0
- package/dist/api/routes/backup.js +51 -0
- package/dist/api/routes/backup.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/mcp.d.ts +3 -0
- package/dist/api/routes/mcp.d.ts.map +1 -0
- package/dist/api/routes/mcp.js +147 -0
- package/dist/api/routes/mcp.js.map +1 -0
- package/dist/api/routes/projects.d.ts.map +1 -1
- package/dist/api/routes/projects.js +20 -0
- package/dist/api/routes/projects.js.map +1 -1
- package/dist/api/routes/settings.d.ts.map +1 -1
- package/dist/api/routes/settings.js +64 -11
- package/dist/api/routes/settings.js.map +1 -1
- package/dist/api/routes/workspaces.d.ts +3 -0
- package/dist/api/routes/workspaces.d.ts.map +1 -0
- package/dist/api/routes/workspaces.js +429 -0
- package/dist/api/routes/workspaces.js.map +1 -0
- package/dist/api/types.d.ts +26 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/core/backup-utils.d.ts +17 -0
- package/dist/core/backup-utils.js +166 -0
- package/dist/core/database.d.ts +1 -0
- package/dist/core/git-utils.d.ts +12 -0
- package/dist/core/git-utils.js +96 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +3 -0
- package/dist/core/workspace-utils.d.ts +37 -0
- package/dist/core/workspace-utils.js +152 -0
- package/dist/electron/core/backup-utils.d.ts +17 -0
- package/dist/electron/core/backup-utils.js +166 -0
- package/dist/electron/core/database.d.ts +1 -0
- package/dist/electron/core/git-utils.d.ts +12 -0
- package/dist/electron/core/git-utils.js +96 -0
- package/dist/electron/core/index.d.ts +3 -0
- package/dist/electron/core/index.js +3 -0
- package/dist/electron/core/workspace-utils.d.ts +37 -0
- package/dist/electron/core/workspace-utils.js +152 -0
- package/dist/electron/main.js +324 -9
- package/dist/electron/preload.d.ts +14 -0
- package/dist/electron/preload.js +9 -0
- package/dist/electron/renderer/assets/index-B-etDnj2.js +64 -0
- package/dist/electron/renderer/assets/index-Bx18Cyic.js +64 -0
- package/dist/electron/renderer/assets/index-C8f5yNYe.js +64 -0
- package/dist/electron/renderer/assets/index-CIZ3Wl6c.css +1 -0
- package/dist/electron/renderer/assets/index-CJbsU9y8.css +1 -0
- package/dist/electron/renderer/assets/index-CWxXs5M7.css +1 -0
- package/dist/electron/renderer/assets/index-CopVNRnR.js +64 -0
- package/dist/electron/renderer/assets/index-CtXtIMer.js +64 -0
- package/dist/electron/renderer/assets/index-DUvcepWm.js +64 -0
- package/dist/electron/renderer/assets/index-DWe2TQFv.css +1 -0
- package/dist/electron/renderer/assets/index-DZzB20Xf.css +1 -0
- package/dist/electron/renderer/assets/index-DknLdADV.js +63 -0
- package/dist/electron/renderer/assets/index-DocuD8Lk.js +64 -0
- package/dist/electron/renderer/assets/index-DyU-xfd8.css +1 -0
- package/dist/electron/renderer/assets/index-GwC-JVUy.css +1 -0
- package/dist/electron/renderer/assets/index-fehviker.js +63 -0
- package/dist/electron/renderer/index.html +2 -2
- package/dist/index.js +281 -4
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
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 gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gd(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 vu={exports:{}},eo={},yu={exports:{}},V={};/**
|
|
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 Br=Symbol.for("react.element"),Jd=Symbol.for("react.portal"),Zd=Symbol.for("react.fragment"),qd=Symbol.for("react.strict_mode"),ef=Symbol.for("react.profiler"),tf=Symbol.for("react.provider"),nf=Symbol.for("react.context"),rf=Symbol.for("react.forward_ref"),sf=Symbol.for("react.suspense"),of=Symbol.for("react.memo"),lf=Symbol.for("react.lazy"),Zl=Symbol.iterator;function af(e){return e===null||typeof e!="object"?null:(e=Zl&&e[Zl]||e["@@iterator"],typeof e=="function"?e:null)}var wu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Su=Object.assign,xu={};function Kn(e,t,n){this.props=e,this.context=t,this.refs=xu,this.updater=n||wu}Kn.prototype.isReactComponent={};Kn.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")};Kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ku(){}ku.prototype=Kn.prototype;function Ki(e,t,n){this.props=e,this.context=t,this.refs=xu,this.updater=n||wu}var Gi=Ki.prototype=new ku;Gi.constructor=Ki;Su(Gi,Kn.prototype);Gi.isPureReactComponent=!0;var ql=Array.isArray,Nu=Object.prototype.hasOwnProperty,Ji={current:null},Pu={key:!0,ref:!0,__self:!0,__source:!0};function ju(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)Nu.call(t,r)&&!Pu.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var a=Array(l),c=0;c<l;c++)a[c]=arguments[c+2];s.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Br,type:e,key:o,ref:i,props:s,_owner:Ji.current}}function uf(e,t){return{$$typeof:Br,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zi(e){return typeof e=="object"&&e!==null&&e.$$typeof===Br}function cf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ea=/\/+/g;function jo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?cf(""+e.key):t.toString(36)}function vs(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 Br:case Jd:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+jo(i,0):r,ql(s)?(n="",e!=null&&(n=e.replace(ea,"$&/")+"/"),vs(s,t,n,"",function(c){return c})):s!=null&&(Zi(s)&&(s=uf(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(ea,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",ql(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+jo(o,l);i+=vs(o,t,n,a,s)}else if(a=af(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+jo(o,l++),i+=vs(o,t,n,a,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 Kr(e,t,n){if(e==null)return e;var r=[],s=0;return vs(e,r,"","",function(o){return t.call(n,o,s++)}),r}function df(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 De={current:null},ys={transition:null},ff={ReactCurrentDispatcher:De,ReactCurrentBatchConfig:ys,ReactCurrentOwner:Ji};function Eu(){throw Error("act(...) is not supported in production builds of React.")}V.Children={map:Kr,forEach:function(e,t,n){Kr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Kr(e,function(){t++}),t},toArray:function(e){return Kr(e,function(t){return t})||[]},only:function(e){if(!Zi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};V.Component=Kn;V.Fragment=Zd;V.Profiler=ef;V.PureComponent=Ki;V.StrictMode=qd;V.Suspense=sf;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ff;V.act=Eu;V.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=Su({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Ji.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Nu.call(t,a)&&!Pu.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:Br,type:e.type,key:s,ref:o,props:r,_owner:i}};V.createContext=function(e){return e={$$typeof:nf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:tf,_context:e},e.Consumer=e};V.createElement=ju;V.createFactory=function(e){var t=ju.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:rf,render:e}};V.isValidElement=Zi;V.lazy=function(e){return{$$typeof:lf,_payload:{_status:-1,_result:e},_init:df}};V.memo=function(e,t){return{$$typeof:of,type:e,compare:t===void 0?null:t}};V.startTransition=function(e){var t=ys.transition;ys.transition={};try{e()}finally{ys.transition=t}};V.unstable_act=Eu;V.useCallback=function(e,t){return De.current.useCallback(e,t)};V.useContext=function(e){return De.current.useContext(e)};V.useDebugValue=function(){};V.useDeferredValue=function(e){return De.current.useDeferredValue(e)};V.useEffect=function(e,t){return De.current.useEffect(e,t)};V.useId=function(){return De.current.useId()};V.useImperativeHandle=function(e,t,n){return De.current.useImperativeHandle(e,t,n)};V.useInsertionEffect=function(e,t){return De.current.useInsertionEffect(e,t)};V.useLayoutEffect=function(e,t){return De.current.useLayoutEffect(e,t)};V.useMemo=function(e,t){return De.current.useMemo(e,t)};V.useReducer=function(e,t,n){return De.current.useReducer(e,t,n)};V.useRef=function(e){return De.current.useRef(e)};V.useState=function(e){return De.current.useState(e)};V.useSyncExternalStore=function(e,t,n){return De.current.useSyncExternalStore(e,t,n)};V.useTransition=function(){return De.current.useTransition()};V.version="18.3.1";yu.exports=V;var j=yu.exports;const to=gu(j);/**
|
|
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 pf=j,hf=Symbol.for("react.element"),mf=Symbol.for("react.fragment"),gf=Object.prototype.hasOwnProperty,vf=pf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yf={key:!0,ref:!0,__self:!0,__source:!0};function Cu(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)gf.call(t,r)&&!yf.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:hf,type:e,key:o,ref:i,props:s,_owner:vf.current}}eo.Fragment=mf;eo.jsx=Cu;eo.jsxs=Cu;vu.exports=eo;var u=vu.exports,ti={},_u={exports:{}},Ye={},zu={exports:{}},Tu={};/**
|
|
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(z,I){var R=z.length;z.push(I);e:for(;0<R;){var J=R-1>>>1,le=z[J];if(0<s(le,I))z[J]=I,z[R]=le,R=J;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var I=z[0],R=z.pop();if(R!==I){z[0]=R;e:for(var J=0,le=z.length,Be=le>>>1;J<Be;){var _e=2*(J+1)-1,rt=z[_e],Me=_e+1,Mt=z[Me];if(0>s(rt,R))Me<le&&0>s(Mt,rt)?(z[J]=Mt,z[Me]=R,J=Me):(z[J]=rt,z[_e]=R,J=_e);else if(Me<le&&0>s(Mt,R))z[J]=Mt,z[Me]=R,J=Me;else break e}}return I}function s(z,I){var R=z.sortIndex-I.sortIndex;return R!==0?R:z.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var a=[],c=[],m=1,h=null,g=3,S=!1,x=!1,v=!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(z){for(var I=n(c);I!==null;){if(I.callback===null)r(c);else if(I.startTime<=z)r(c),I.sortIndex=I.expirationTime,t(a,I);else break;I=n(c)}}function y(z){if(v=!1,f(z),!x)if(n(a)!==null)x=!0,X(w);else{var I=n(c);I!==null&&ie(y,I.startTime-z)}}function w(z,I){x=!1,v&&(v=!1,p(_),_=-1),S=!0;var R=g;try{for(f(I),h=n(a);h!==null&&(!(h.expirationTime>I)||z&&!$());){var J=h.callback;if(typeof J=="function"){h.callback=null,g=h.priorityLevel;var le=J(h.expirationTime<=I);I=e.unstable_now(),typeof le=="function"?h.callback=le:h===n(a)&&r(a),f(I)}else r(a);h=n(a)}if(h!==null)var Be=!0;else{var _e=n(c);_e!==null&&ie(y,_e.startTime-I),Be=!1}return Be}finally{h=null,g=R,S=!1}}var P=!1,k=null,_=-1,A=5,T=-1;function $(){return!(e.unstable_now()-T<A)}function b(){if(k!==null){var z=e.unstable_now();T=z;var I=!0;try{I=k(!0,z)}finally{I?G():(P=!1,k=null)}}else P=!1}var G;if(typeof d=="function")G=function(){d(b)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,H=F.port2;F.port1.onmessage=b,G=function(){H.postMessage(null)}}else G=function(){C(b,0)};function X(z){k=z,P||(P=!0,G())}function ie(z,I){_=C(function(){z(e.unstable_now())},I)}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(z){z.callback=null},e.unstable_continueExecution=function(){x||S||(x=!0,X(w))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(z){switch(g){case 1:case 2:case 3:var I=3;break;default:I=g}var R=g;g=I;try{return z()}finally{g=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,I){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var R=g;g=z;try{return I()}finally{g=R}},e.unstable_scheduleCallback=function(z,I,R){var J=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?J+R:J):R=J,z){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=R+le,z={id:m++,callback:I,priorityLevel:z,startTime:R,expirationTime:le,sortIndex:-1},R>J?(z.sortIndex=R,t(c,z),n(a)===null&&z===n(c)&&(v?(p(_),_=-1):v=!0,ie(y,R-J))):(z.sortIndex=le,t(a,z),x||S||(x=!0,X(w))),z},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(z){var I=g;return function(){var R=g;g=I;try{return z.apply(this,arguments)}finally{g=R}}}})(Tu);zu.exports=Tu;var wf=zu.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 Sf=j,Qe=wf;function E(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 Ru=new Set,Pr={};function vn(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(Pr[e]=t,e=0;e<t.length;e++)Ru.add(t[e])}var zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ni=Object.prototype.hasOwnProperty,xf=/^[: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]*$/,ta={},na={};function kf(e){return ni.call(na,e)?!0:ni.call(ta,e)?!1:xf.test(e)?na[e]=!0:(ta[e]=!0,!1)}function Nf(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 Pf(e,t,n,r){if(t===null||typeof t>"u"||Nf(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 Oe(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 Se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Se[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Se[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Se[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Se[e]=new Oe(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){Se[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Se[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Se[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Se[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Se[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var qi=/[\-:]([a-z])/g;function el(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(qi,el);Se[t]=new Oe(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(qi,el);Se[t]=new Oe(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(qi,el);Se[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Se[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});Se.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Se[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function tl(e,t,n,r){var s=Se.hasOwnProperty(t)?Se[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Pf(t,n,s,r)&&(n=null),r||s===null?kf(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 Ot=Sf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Gr=Symbol.for("react.element"),Nn=Symbol.for("react.portal"),Pn=Symbol.for("react.fragment"),nl=Symbol.for("react.strict_mode"),ri=Symbol.for("react.profiler"),Du=Symbol.for("react.provider"),Ou=Symbol.for("react.context"),rl=Symbol.for("react.forward_ref"),si=Symbol.for("react.suspense"),oi=Symbol.for("react.suspense_list"),sl=Symbol.for("react.memo"),Wt=Symbol.for("react.lazy"),Mu=Symbol.for("react.offscreen"),ra=Symbol.iterator;function er(e){return e===null||typeof e!="object"?null:(e=ra&&e[ra]||e["@@iterator"],typeof e=="function"?e:null)}var oe=Object.assign,Eo;function dr(e){if(Eo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Eo=t&&t[1]||""}return`
|
|
34
|
+
`+Eo+e}var Co=!1;function _o(e,t){if(!e||Co)return"";Co=!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,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){var a=`
|
|
37
|
+
`+s[i].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=i&&0<=l);break}}}finally{Co=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?dr(e):""}function jf(e){switch(e.tag){case 5:return dr(e.type);case 16:return dr("Lazy");case 13:return dr("Suspense");case 19:return dr("SuspenseList");case 0:case 2:case 15:return e=_o(e.type,!1),e;case 11:return e=_o(e.type.render,!1),e;case 1:return e=_o(e.type,!0),e;default:return""}}function ii(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 Pn:return"Fragment";case Nn:return"Portal";case ri:return"Profiler";case nl:return"StrictMode";case si:return"Suspense";case oi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ou:return(e.displayName||"Context")+".Consumer";case Du:return(e._context.displayName||"Context")+".Provider";case rl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sl:return t=e.displayName||null,t!==null?t:ii(e.type)||"Memo";case Wt:t=e._payload,e=e._init;try{return ii(e(t))}catch{}}return null}function Ef(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 ii(t);case 8:return t===nl?"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 qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Cf(e){var t=Lu(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 Jr(e){e._valueTracker||(e._valueTracker=Cf(e))}function Au(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Lu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ts(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 li(e,t){var n=t.checked;return oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qt(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 Iu(e,t){t=t.checked,t!=null&&tl(e,"checked",t,!1)}function ai(e,t){Iu(e,t);var n=qt(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")?ui(e,t.type,n):t.hasOwnProperty("defaultValue")&&ui(e,t.type,qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function oa(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 ui(e,t,n){(t!=="number"||Ts(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fr=Array.isArray;function An(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=""+qt(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(E(91));return oe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ia(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(fr(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:qt(n)}}function Fu(e,t){var n=qt(t.value),r=qt(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 la(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Wu(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 di(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Wu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zr,Uu=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(Zr=Zr||document.createElement("div"),Zr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mr={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},_f=["Webkit","ms","Moz","O"];Object.keys(mr).forEach(function(e){_f.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mr[t]=mr[e]})});function Bu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mr.hasOwnProperty(e)&&mr[e]?(""+t).trim():t+"px"}function $u(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Bu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var zf=oe({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 fi(e,t){if(t){if(zf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function pi(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 hi=null;function ol(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mi=null,In=null,Fn=null;function aa(e){if(e=br(e)){if(typeof mi!="function")throw Error(E(280));var t=e.stateNode;t&&(t=io(t),mi(e.stateNode,e.type,t))}}function Hu(e){In?Fn?Fn.push(e):Fn=[e]:In=e}function bu(){if(In){var e=In,t=Fn;if(Fn=In=null,aa(e),t)for(e=0;e<t.length;e++)aa(t[e])}}function Vu(e,t){return e(t)}function Xu(){}var zo=!1;function Qu(e,t,n){if(zo)return e(t,n);zo=!0;try{return Vu(e,t,n)}finally{zo=!1,(In!==null||Fn!==null)&&(Xu(),bu())}}function Er(e,t){var n=e.stateNode;if(n===null)return null;var r=io(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(E(231,t,typeof n));return n}var gi=!1;if(zt)try{var tr={};Object.defineProperty(tr,"passive",{get:function(){gi=!0}}),window.addEventListener("test",tr,tr),window.removeEventListener("test",tr,tr)}catch{gi=!1}function Tf(e,t,n,r,s,o,i,l,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(m){this.onError(m)}}var gr=!1,Rs=null,Ds=!1,vi=null,Rf={onError:function(e){gr=!0,Rs=e}};function Df(e,t,n,r,s,o,i,l,a){gr=!1,Rs=null,Tf.apply(Rf,arguments)}function Of(e,t,n,r,s,o,i,l,a){if(Df.apply(this,arguments),gr){if(gr){var c=Rs;gr=!1,Rs=null}else throw Error(E(198));Ds||(Ds=!0,vi=c)}}function yn(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 Yu(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 ua(e){if(yn(e)!==e)throw Error(E(188))}function Mf(e){var t=e.alternate;if(!t){if(t=yn(e),t===null)throw Error(E(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 ua(s),e;if(o===r)return ua(s),t;o=o.sibling}throw Error(E(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function Ku(e){return e=Mf(e),e!==null?Gu(e):null}function Gu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Gu(e);if(t!==null)return t;e=e.sibling}return null}var Ju=Qe.unstable_scheduleCallback,ca=Qe.unstable_cancelCallback,Lf=Qe.unstable_shouldYield,Af=Qe.unstable_requestPaint,ce=Qe.unstable_now,If=Qe.unstable_getCurrentPriorityLevel,il=Qe.unstable_ImmediatePriority,Zu=Qe.unstable_UserBlockingPriority,Os=Qe.unstable_NormalPriority,Ff=Qe.unstable_LowPriority,qu=Qe.unstable_IdlePriority,no=null,St=null;function Wf(e){if(St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(no,e,void 0,(e.current.flags&128)===128)}catch{}}var ct=Math.clz32?Math.clz32:$f,Uf=Math.log,Bf=Math.LN2;function $f(e){return e>>>=0,e===0?32:31-(Uf(e)/Bf|0)|0}var qr=64,es=4194304;function pr(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 Ms(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 l=i&~s;l!==0?r=pr(l):(o&=i,o!==0&&(r=pr(o)))}else i=n&~s,i!==0?r=pr(i):o!==0&&(r=pr(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-ct(t),s=1<<n,r|=e[n],t&=~s;return r}function Hf(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 bf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-ct(o),l=1<<i,a=s[i];a===-1?(!(l&n)||l&r)&&(s[i]=Hf(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function yi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ec(){var e=qr;return qr<<=1,!(qr&4194240)&&(qr=64),e}function To(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $r(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function Vf(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-ct(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function ll(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ct(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var K=0;function tc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var nc,al,rc,sc,oc,wi=!1,ts=[],Vt=null,Xt=null,Qt=null,Cr=new Map,_r=new Map,Bt=[],Xf="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 da(e,t){switch(e){case"focusin":case"focusout":Vt=null;break;case"dragenter":case"dragleave":Xt=null;break;case"mouseover":case"mouseout":Qt=null;break;case"pointerover":case"pointerout":Cr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_r.delete(t.pointerId)}}function nr(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=br(t),t!==null&&al(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Qf(e,t,n,r,s){switch(t){case"focusin":return Vt=nr(Vt,e,t,n,r,s),!0;case"dragenter":return Xt=nr(Xt,e,t,n,r,s),!0;case"mouseover":return Qt=nr(Qt,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Cr.set(o,nr(Cr.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,_r.set(o,nr(_r.get(o)||null,e,t,n,r,s)),!0}return!1}function ic(e){var t=ln(e.target);if(t!==null){var n=yn(t);if(n!==null){if(t=n.tag,t===13){if(t=Yu(n),t!==null){e.blockedOn=t,oc(e.priority,function(){rc(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 ws(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Si(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);hi=r,n.target.dispatchEvent(r),hi=null}else return t=br(n),t!==null&&al(t),e.blockedOn=n,!1;t.shift()}return!0}function fa(e,t,n){ws(e)&&n.delete(t)}function Yf(){wi=!1,Vt!==null&&ws(Vt)&&(Vt=null),Xt!==null&&ws(Xt)&&(Xt=null),Qt!==null&&ws(Qt)&&(Qt=null),Cr.forEach(fa),_r.forEach(fa)}function rr(e,t){e.blockedOn===t&&(e.blockedOn=null,wi||(wi=!0,Qe.unstable_scheduleCallback(Qe.unstable_NormalPriority,Yf)))}function zr(e){function t(s){return rr(s,e)}if(0<ts.length){rr(ts[0],e);for(var n=1;n<ts.length;n++){var r=ts[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Vt!==null&&rr(Vt,e),Xt!==null&&rr(Xt,e),Qt!==null&&rr(Qt,e),Cr.forEach(t),_r.forEach(t),n=0;n<Bt.length;n++)r=Bt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Bt.length&&(n=Bt[0],n.blockedOn===null);)ic(n),n.blockedOn===null&&Bt.shift()}var Wn=Ot.ReactCurrentBatchConfig,Ls=!0;function Kf(e,t,n,r){var s=K,o=Wn.transition;Wn.transition=null;try{K=1,ul(e,t,n,r)}finally{K=s,Wn.transition=o}}function Gf(e,t,n,r){var s=K,o=Wn.transition;Wn.transition=null;try{K=4,ul(e,t,n,r)}finally{K=s,Wn.transition=o}}function ul(e,t,n,r){if(Ls){var s=Si(e,t,n,r);if(s===null)Uo(e,t,r,As,n),da(e,r);else if(Qf(s,e,t,n,r))r.stopPropagation();else if(da(e,r),t&4&&-1<Xf.indexOf(e)){for(;s!==null;){var o=br(s);if(o!==null&&nc(o),o=Si(e,t,n,r),o===null&&Uo(e,t,r,As,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Uo(e,t,r,null,n)}}var As=null;function Si(e,t,n,r){if(As=null,e=ol(r),e=ln(e),e!==null)if(t=yn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Yu(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 As=e,null}function lc(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(If()){case il:return 1;case Zu:return 4;case Os:case Ff:return 16;case qu:return 536870912;default:return 16}default:return 16}}var Ht=null,cl=null,Ss=null;function ac(){if(Ss)return Ss;var e,t=cl,n=t.length,r,s="value"in Ht?Ht.value:Ht.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 Ss=s.slice(e,1<r?1-r:void 0)}function xs(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 ns(){return!0}function pa(){return!1}function Ke(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 l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ns:pa,this.isPropagationStopped=pa,this}return oe(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=ns)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ns)},persist:function(){},isPersistent:ns}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dl=Ke(Gn),Hr=oe({},Gn,{view:0,detail:0}),Jf=Ke(Hr),Ro,Do,sr,ro=oe({},Hr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fl,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!==sr&&(sr&&e.type==="mousemove"?(Ro=e.screenX-sr.screenX,Do=e.screenY-sr.screenY):Do=Ro=0,sr=e),Ro)},movementY:function(e){return"movementY"in e?e.movementY:Do}}),ha=Ke(ro),Zf=oe({},ro,{dataTransfer:0}),qf=Ke(Zf),ep=oe({},Hr,{relatedTarget:0}),Oo=Ke(ep),tp=oe({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0}),np=Ke(tp),rp=oe({},Gn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sp=Ke(rp),op=oe({},Gn,{data:0}),ma=Ke(op),ip={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lp={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ap={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function up(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ap[e])?!!t[e]:!1}function fl(){return up}var cp=oe({},Hr,{key:function(e){if(e.key){var t=ip[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fl,charCode:function(e){return e.type==="keypress"?xs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dp=Ke(cp),fp=oe({},ro,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ga=Ke(fp),pp=oe({},Hr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fl}),hp=Ke(pp),mp=oe({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0}),gp=Ke(mp),vp=oe({},ro,{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}),yp=Ke(vp),wp=[9,13,27,32],pl=zt&&"CompositionEvent"in window,vr=null;zt&&"documentMode"in document&&(vr=document.documentMode);var Sp=zt&&"TextEvent"in window&&!vr,uc=zt&&(!pl||vr&&8<vr&&11>=vr),va=" ",ya=!1;function cc(e,t){switch(e){case"keyup":return wp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jn=!1;function xp(e,t){switch(e){case"compositionend":return dc(t);case"keypress":return t.which!==32?null:(ya=!0,va);case"textInput":return e=t.data,e===va&&ya?null:e;default:return null}}function kp(e,t){if(jn)return e==="compositionend"||!pl&&cc(e,t)?(e=ac(),Ss=cl=Ht=null,jn=!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 uc&&t.locale!=="ko"?null:t.data;default:return null}}var Np={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 wa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Np[e.type]:t==="textarea"}function fc(e,t,n,r){Hu(r),t=Is(t,"onChange"),0<t.length&&(n=new dl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var yr=null,Tr=null;function Pp(e){Nc(e,0)}function so(e){var t=_n(e);if(Au(t))return e}function jp(e,t){if(e==="change")return t}var pc=!1;if(zt){var Mo;if(zt){var Lo="oninput"in document;if(!Lo){var Sa=document.createElement("div");Sa.setAttribute("oninput","return;"),Lo=typeof Sa.oninput=="function"}Mo=Lo}else Mo=!1;pc=Mo&&(!document.documentMode||9<document.documentMode)}function xa(){yr&&(yr.detachEvent("onpropertychange",hc),Tr=yr=null)}function hc(e){if(e.propertyName==="value"&&so(Tr)){var t=[];fc(t,Tr,e,ol(e)),Qu(Pp,t)}}function Ep(e,t,n){e==="focusin"?(xa(),yr=t,Tr=n,yr.attachEvent("onpropertychange",hc)):e==="focusout"&&xa()}function Cp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return so(Tr)}function _p(e,t){if(e==="click")return so(t)}function zp(e,t){if(e==="input"||e==="change")return so(t)}function Tp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ft=typeof Object.is=="function"?Object.is:Tp;function Rr(e,t){if(ft(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(!ni.call(t,s)||!ft(e[s],t[s]))return!1}return!0}function ka(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Na(e,t){var n=ka(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=ka(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 gc(){for(var e=window,t=Ts();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ts(e.document)}return t}function hl(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 Rp(e){var t=gc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mc(n.ownerDocument.documentElement,n)){if(r!==null&&hl(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=Na(n,o);var i=Na(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 Dp=zt&&"documentMode"in document&&11>=document.documentMode,En=null,xi=null,wr=null,ki=!1;function Pa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ki||En==null||En!==Ts(r)||(r=En,"selectionStart"in r&&hl(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}),wr&&Rr(wr,r)||(wr=r,r=Is(xi,"onSelect"),0<r.length&&(t=new dl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=En)))}function rs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cn={animationend:rs("Animation","AnimationEnd"),animationiteration:rs("Animation","AnimationIteration"),animationstart:rs("Animation","AnimationStart"),transitionend:rs("Transition","TransitionEnd")},Ao={},vc={};zt&&(vc=document.createElement("div").style,"AnimationEvent"in window||(delete Cn.animationend.animation,delete Cn.animationiteration.animation,delete Cn.animationstart.animation),"TransitionEvent"in window||delete Cn.transitionend.transition);function oo(e){if(Ao[e])return Ao[e];if(!Cn[e])return e;var t=Cn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vc)return Ao[e]=t[n];return e}var yc=oo("animationend"),wc=oo("animationiteration"),Sc=oo("animationstart"),xc=oo("transitionend"),kc=new Map,ja="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 tn(e,t){kc.set(e,t),vn(t,[e])}for(var Io=0;Io<ja.length;Io++){var Fo=ja[Io],Op=Fo.toLowerCase(),Mp=Fo[0].toUpperCase()+Fo.slice(1);tn(Op,"on"+Mp)}tn(yc,"onAnimationEnd");tn(wc,"onAnimationIteration");tn(Sc,"onAnimationStart");tn("dblclick","onDoubleClick");tn("focusin","onFocus");tn("focusout","onBlur");tn(xc,"onTransitionEnd");$n("onMouseEnter",["mouseout","mouseover"]);$n("onMouseLeave",["mouseout","mouseover"]);$n("onPointerEnter",["pointerout","pointerover"]);$n("onPointerLeave",["pointerout","pointerover"]);vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vn("onBeforeInput",["compositionend","keypress","textInput","paste"]);vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hr="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(" "),Lp=new Set("cancel close invalid load scroll toggle".split(" ").concat(hr));function Ea(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Of(r,t,void 0,e),e.currentTarget=null}function Nc(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 l=r[i],a=l.instance,c=l.currentTarget;if(l=l.listener,a!==o&&s.isPropagationStopped())break e;Ea(s,l,c),o=a}else for(i=0;i<r.length;i++){if(l=r[i],a=l.instance,c=l.currentTarget,l=l.listener,a!==o&&s.isPropagationStopped())break e;Ea(s,l,c),o=a}}}if(Ds)throw e=vi,Ds=!1,vi=null,e}function q(e,t){var n=t[Ci];n===void 0&&(n=t[Ci]=new Set);var r=e+"__bubble";n.has(r)||(Pc(t,e,2,!1),n.add(r))}function Wo(e,t,n){var r=0;t&&(r|=4),Pc(n,e,r,t)}var ss="_reactListening"+Math.random().toString(36).slice(2);function Dr(e){if(!e[ss]){e[ss]=!0,Ru.forEach(function(n){n!=="selectionchange"&&(Lp.has(n)||Wo(n,!1,e),Wo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ss]||(t[ss]=!0,Wo("selectionchange",!1,t))}}function Pc(e,t,n,r){switch(lc(t)){case 1:var s=Kf;break;case 4:s=Gf;break;default:s=ul}n=s.bind(null,t,n,e),s=void 0,!gi||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 Uo(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 l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var a=i.tag;if((a===3||a===4)&&(a=i.stateNode.containerInfo,a===s||a.nodeType===8&&a.parentNode===s))return;i=i.return}for(;l!==null;){if(i=ln(l),i===null)return;if(a=i.tag,a===5||a===6){r=o=i;continue e}l=l.parentNode}}r=r.return}Qu(function(){var c=o,m=ol(n),h=[];e:{var g=kc.get(e);if(g!==void 0){var S=dl,x=e;switch(e){case"keypress":if(xs(n)===0)break e;case"keydown":case"keyup":S=dp;break;case"focusin":x="focus",S=Oo;break;case"focusout":x="blur",S=Oo;break;case"beforeblur":case"afterblur":S=Oo;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=ha;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=qf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=hp;break;case yc:case wc:case Sc:S=np;break;case xc:S=gp;break;case"scroll":S=Jf;break;case"wheel":S=yp;break;case"copy":case"cut":case"paste":S=sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=ga}var v=(t&4)!==0,C=!v&&e==="scroll",p=v?g!==null?g+"Capture":null:g;v=[];for(var d=c,f;d!==null;){f=d;var y=f.stateNode;if(f.tag===5&&y!==null&&(f=y,p!==null&&(y=Er(d,p),y!=null&&v.push(Or(d,y,f)))),C)break;d=d.return}0<v.length&&(g=new S(g,x,null,n,m),h.push({event:g,listeners:v}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",g&&n!==hi&&(x=n.relatedTarget||n.fromElement)&&(ln(x)||x[Tt]))break e;if((S||g)&&(g=m.window===m?m:(g=m.ownerDocument)?g.defaultView||g.parentWindow:window,S?(x=n.relatedTarget||n.toElement,S=c,x=x?ln(x):null,x!==null&&(C=yn(x),x!==C||x.tag!==5&&x.tag!==6)&&(x=null)):(S=null,x=c),S!==x)){if(v=ha,y="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(v=ga,y="onPointerLeave",p="onPointerEnter",d="pointer"),C=S==null?g:_n(S),f=x==null?g:_n(x),g=new v(y,d+"leave",S,n,m),g.target=C,g.relatedTarget=f,y=null,ln(m)===c&&(v=new v(p,d+"enter",x,n,m),v.target=f,v.relatedTarget=C,y=v),C=y,S&&x)t:{for(v=S,p=x,d=0,f=v;f;f=Sn(f))d++;for(f=0,y=p;y;y=Sn(y))f++;for(;0<d-f;)v=Sn(v),d--;for(;0<f-d;)p=Sn(p),f--;for(;d--;){if(v===p||p!==null&&v===p.alternate)break t;v=Sn(v),p=Sn(p)}v=null}else v=null;S!==null&&Ca(h,g,S,v,!1),x!==null&&C!==null&&Ca(h,C,x,v,!0)}}e:{if(g=c?_n(c):window,S=g.nodeName&&g.nodeName.toLowerCase(),S==="select"||S==="input"&&g.type==="file")var w=jp;else if(wa(g))if(pc)w=zp;else{w=Cp;var P=Ep}else(S=g.nodeName)&&S.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(w=_p);if(w&&(w=w(e,c))){fc(h,w,n,m);break e}P&&P(e,g,c),e==="focusout"&&(P=g._wrapperState)&&P.controlled&&g.type==="number"&&ui(g,"number",g.value)}switch(P=c?_n(c):window,e){case"focusin":(wa(P)||P.contentEditable==="true")&&(En=P,xi=c,wr=null);break;case"focusout":wr=xi=En=null;break;case"mousedown":ki=!0;break;case"contextmenu":case"mouseup":case"dragend":ki=!1,Pa(h,n,m);break;case"selectionchange":if(Dp)break;case"keydown":case"keyup":Pa(h,n,m)}var k;if(pl)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else jn?cc(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(uc&&n.locale!=="ko"&&(jn||_!=="onCompositionStart"?_==="onCompositionEnd"&&jn&&(k=ac()):(Ht=m,cl="value"in Ht?Ht.value:Ht.textContent,jn=!0)),P=Is(c,_),0<P.length&&(_=new ma(_,e,null,n,m),h.push({event:_,listeners:P}),k?_.data=k:(k=dc(n),k!==null&&(_.data=k)))),(k=Sp?xp(e,n):kp(e,n))&&(c=Is(c,"onBeforeInput"),0<c.length&&(m=new ma("onBeforeInput","beforeinput",null,n,m),h.push({event:m,listeners:c}),m.data=k))}Nc(h,t)})}function Or(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Is(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Er(e,n),o!=null&&r.unshift(Or(e,o,s)),o=Er(e,t),o!=null&&r.push(Or(e,o,s))),e=e.return}return r}function Sn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ca(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var l=n,a=l.alternate,c=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&c!==null&&(l=c,s?(a=Er(n,o),a!=null&&i.unshift(Or(n,a,l))):s||(a=Er(n,o),a!=null&&i.push(Or(n,a,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Ap=/\r\n?/g,Ip=/\u0000|\uFFFD/g;function _a(e){return(typeof e=="string"?e:""+e).replace(Ap,`
|
|
38
|
+
`).replace(Ip,"")}function os(e,t,n){if(t=_a(t),_a(e)!==t&&n)throw Error(E(425))}function Fs(){}var Ni=null,Pi=null;function ji(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 Ei=typeof setTimeout=="function"?setTimeout:void 0,Fp=typeof clearTimeout=="function"?clearTimeout:void 0,za=typeof Promise=="function"?Promise:void 0,Wp=typeof queueMicrotask=="function"?queueMicrotask:typeof za<"u"?function(e){return za.resolve(null).then(e).catch(Up)}:Ei;function Up(e){setTimeout(function(){throw e})}function Bo(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),zr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);zr(t)}function Yt(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 Ta(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 Jn=Math.random().toString(36).slice(2),wt="__reactFiber$"+Jn,Mr="__reactProps$"+Jn,Tt="__reactContainer$"+Jn,Ci="__reactEvents$"+Jn,Bp="__reactListeners$"+Jn,$p="__reactHandles$"+Jn;function ln(e){var t=e[wt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ta(e);e!==null;){if(n=e[wt])return n;e=Ta(e)}return t}e=n,n=e.parentNode}return null}function br(e){return e=e[wt]||e[Tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function _n(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function io(e){return e[Mr]||null}var _i=[],zn=-1;function nn(e){return{current:e}}function ee(e){0>zn||(e.current=_i[zn],_i[zn]=null,zn--)}function Z(e,t){zn++,_i[zn]=e.current,e.current=t}var en={},Ce=nn(en),Fe=nn(!1),fn=en;function Hn(e,t){var n=e.type.contextTypes;if(!n)return en;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 We(e){return e=e.childContextTypes,e!=null}function Ws(){ee(Fe),ee(Ce)}function Ra(e,t,n){if(Ce.current!==en)throw Error(E(168));Z(Ce,t),Z(Fe,n)}function jc(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(E(108,Ef(e)||"Unknown",s));return oe({},n,r)}function Us(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||en,fn=Ce.current,Z(Ce,e),Z(Fe,Fe.current),!0}function Da(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=jc(e,t,fn),r.__reactInternalMemoizedMergedChildContext=e,ee(Fe),ee(Ce),Z(Ce,e)):ee(Fe),Z(Fe,n)}var jt=null,lo=!1,$o=!1;function Ec(e){jt===null?jt=[e]:jt.push(e)}function Hp(e){lo=!0,Ec(e)}function rn(){if(!$o&&jt!==null){$o=!0;var e=0,t=K;try{var n=jt;for(K=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jt=null,lo=!1}catch(s){throw jt!==null&&(jt=jt.slice(e+1)),Ju(il,rn),s}finally{K=t,$o=!1}}return null}var Tn=[],Rn=0,Bs=null,$s=0,Je=[],Ze=0,pn=null,Et=1,Ct="";function sn(e,t){Tn[Rn++]=$s,Tn[Rn++]=Bs,Bs=e,$s=t}function Cc(e,t,n){Je[Ze++]=Et,Je[Ze++]=Ct,Je[Ze++]=pn,pn=e;var r=Et;e=Ct;var s=32-ct(r)-1;r&=~(1<<s),n+=1;var o=32-ct(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Et=1<<32-ct(t)+s|n<<s|r,Ct=o+e}else Et=1<<o|n<<s|r,Ct=e}function ml(e){e.return!==null&&(sn(e,1),Cc(e,1,0))}function gl(e){for(;e===Bs;)Bs=Tn[--Rn],Tn[Rn]=null,$s=Tn[--Rn],Tn[Rn]=null;for(;e===pn;)pn=Je[--Ze],Je[Ze]=null,Ct=Je[--Ze],Je[Ze]=null,Et=Je[--Ze],Je[Ze]=null}var Ve=null,be=null,te=!1,ut=null;function _c(e,t){var n=qe(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 Oa(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,Ve=e,be=Yt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ve=e,be=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=pn!==null?{id:Et,overflow:Ct}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=qe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ve=e,be=null,!0):!1;default:return!1}}function zi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ti(e){if(te){var t=be;if(t){var n=t;if(!Oa(e,t)){if(zi(e))throw Error(E(418));t=Yt(n.nextSibling);var r=Ve;t&&Oa(e,t)?_c(r,n):(e.flags=e.flags&-4097|2,te=!1,Ve=e)}}else{if(zi(e))throw Error(E(418));e.flags=e.flags&-4097|2,te=!1,Ve=e}}}function Ma(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ve=e}function is(e){if(e!==Ve)return!1;if(!te)return Ma(e),te=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ji(e.type,e.memoizedProps)),t&&(t=be)){if(zi(e))throw zc(),Error(E(418));for(;t;)_c(e,t),t=Yt(t.nextSibling)}if(Ma(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){be=Yt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}be=null}}else be=Ve?Yt(e.stateNode.nextSibling):null;return!0}function zc(){for(var e=be;e;)e=Yt(e.nextSibling)}function bn(){be=Ve=null,te=!1}function vl(e){ut===null?ut=[e]:ut.push(e)}var bp=Ot.ReactCurrentBatchConfig;function or(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(E(309));var r=n.stateNode}if(!r)throw Error(E(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 l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function ls(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function La(e){var t=e._init;return t(e._payload)}function Tc(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=Zt(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 l(p,d,f,y){return d===null||d.tag!==6?(d=Ko(f,p.mode,y),d.return=p,d):(d=s(d,f),d.return=p,d)}function a(p,d,f,y){var w=f.type;return w===Pn?m(p,d,f.props.children,y,f.key):d!==null&&(d.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Wt&&La(w)===d.type)?(y=s(d,f.props),y.ref=or(p,d,f),y.return=p,y):(y=_s(f.type,f.key,f.props,null,p.mode,y),y.ref=or(p,d,f),y.return=p,y)}function c(p,d,f,y){return d===null||d.tag!==4||d.stateNode.containerInfo!==f.containerInfo||d.stateNode.implementation!==f.implementation?(d=Go(f,p.mode,y),d.return=p,d):(d=s(d,f.children||[]),d.return=p,d)}function m(p,d,f,y,w){return d===null||d.tag!==7?(d=dn(f,p.mode,y,w),d.return=p,d):(d=s(d,f),d.return=p,d)}function h(p,d,f){if(typeof d=="string"&&d!==""||typeof d=="number")return d=Ko(""+d,p.mode,f),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Gr:return f=_s(d.type,d.key,d.props,null,p.mode,f),f.ref=or(p,null,d),f.return=p,f;case Nn:return d=Go(d,p.mode,f),d.return=p,d;case Wt:var y=d._init;return h(p,y(d._payload),f)}if(fr(d)||er(d))return d=dn(d,p.mode,f,null),d.return=p,d;ls(p,d)}return null}function g(p,d,f,y){var w=d!==null?d.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return w!==null?null:l(p,d,""+f,y);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Gr:return f.key===w?a(p,d,f,y):null;case Nn:return f.key===w?c(p,d,f,y):null;case Wt:return w=f._init,g(p,d,w(f._payload),y)}if(fr(f)||er(f))return w!==null?null:m(p,d,f,y,null);ls(p,f)}return null}function S(p,d,f,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return p=p.get(f)||null,l(d,p,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Gr:return p=p.get(y.key===null?f:y.key)||null,a(d,p,y,w);case Nn:return p=p.get(y.key===null?f:y.key)||null,c(d,p,y,w);case Wt:var P=y._init;return S(p,d,f,P(y._payload),w)}if(fr(y)||er(y))return p=p.get(f)||null,m(d,p,y,w,null);ls(d,y)}return null}function x(p,d,f,y){for(var w=null,P=null,k=d,_=d=0,A=null;k!==null&&_<f.length;_++){k.index>_?(A=k,k=null):A=k.sibling;var T=g(p,k,f[_],y);if(T===null){k===null&&(k=A);break}e&&k&&T.alternate===null&&t(p,k),d=o(T,d,_),P===null?w=T:P.sibling=T,P=T,k=A}if(_===f.length)return n(p,k),te&&sn(p,_),w;if(k===null){for(;_<f.length;_++)k=h(p,f[_],y),k!==null&&(d=o(k,d,_),P===null?w=k:P.sibling=k,P=k);return te&&sn(p,_),w}for(k=r(p,k);_<f.length;_++)A=S(k,p,_,f[_],y),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?_:A.key),d=o(A,d,_),P===null?w=A:P.sibling=A,P=A);return e&&k.forEach(function($){return t(p,$)}),te&&sn(p,_),w}function v(p,d,f,y){var w=er(f);if(typeof w!="function")throw Error(E(150));if(f=w.call(f),f==null)throw Error(E(151));for(var P=w=null,k=d,_=d=0,A=null,T=f.next();k!==null&&!T.done;_++,T=f.next()){k.index>_?(A=k,k=null):A=k.sibling;var $=g(p,k,T.value,y);if($===null){k===null&&(k=A);break}e&&k&&$.alternate===null&&t(p,k),d=o($,d,_),P===null?w=$:P.sibling=$,P=$,k=A}if(T.done)return n(p,k),te&&sn(p,_),w;if(k===null){for(;!T.done;_++,T=f.next())T=h(p,T.value,y),T!==null&&(d=o(T,d,_),P===null?w=T:P.sibling=T,P=T);return te&&sn(p,_),w}for(k=r(p,k);!T.done;_++,T=f.next())T=S(k,p,_,T.value,y),T!==null&&(e&&T.alternate!==null&&k.delete(T.key===null?_:T.key),d=o(T,d,_),P===null?w=T:P.sibling=T,P=T);return e&&k.forEach(function(b){return t(p,b)}),te&&sn(p,_),w}function C(p,d,f,y){if(typeof f=="object"&&f!==null&&f.type===Pn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case Gr:e:{for(var w=f.key,P=d;P!==null;){if(P.key===w){if(w=f.type,w===Pn){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===w||typeof w=="object"&&w!==null&&w.$$typeof===Wt&&La(w)===P.type){n(p,P.sibling),d=s(P,f.props),d.ref=or(p,P,f),d.return=p,p=d;break e}n(p,P);break}else t(p,P);P=P.sibling}f.type===Pn?(d=dn(f.props.children,p.mode,y,f.key),d.return=p,p=d):(y=_s(f.type,f.key,f.props,null,p.mode,y),y.ref=or(p,d,f),y.return=p,p=y)}return i(p);case Nn: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=Go(f,p.mode,y),d.return=p,p=d}return i(p);case Wt:return P=f._init,C(p,d,P(f._payload),y)}if(fr(f))return x(p,d,f,y);if(er(f))return v(p,d,f,y);ls(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=Ko(f,p.mode,y),d.return=p,p=d),i(p)):n(p,d)}return C}var Vn=Tc(!0),Rc=Tc(!1),Hs=nn(null),bs=null,Dn=null,yl=null;function wl(){yl=Dn=bs=null}function Sl(e){var t=Hs.current;ee(Hs),e._currentValue=t}function Ri(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 Un(e,t){bs=e,yl=Dn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ie=!0),e.firstContext=null)}function tt(e){var t=e._currentValue;if(yl!==e)if(e={context:e,memoizedValue:t,next:null},Dn===null){if(bs===null)throw Error(E(308));Dn=e,bs.dependencies={lanes:0,firstContext:e}}else Dn=Dn.next=e;return t}var an=null;function xl(e){an===null?an=[e]:an.push(e)}function Dc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,xl(t)):(n.next=s.next,s.next=n),t.interleaved=n,Rt(e,r)}function Rt(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 Ut=!1;function kl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Oc(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 _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Rt(e,n)}return s=r.interleaved,s===null?(t.next=t,xl(r)):(t.next=s.next,s.next=t),r.interleaved=t,Rt(e,n)}function ks(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,ll(e,n)}}function Aa(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 Vs(e,t,n,r){var s=e.updateQueue;Ut=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var a=l,c=a.next;a.next=null,i===null?o=c:i.next=c,i=a;var m=e.alternate;m!==null&&(m=m.updateQueue,l=m.lastBaseUpdate,l!==i&&(l===null?m.firstBaseUpdate=c:l.next=c,m.lastBaseUpdate=a))}if(o!==null){var h=s.baseState;i=0,m=c=a=null,l=o;do{var g=l.lane,S=l.eventTime;if((r&g)===g){m!==null&&(m=m.next={eventTime:S,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,v=l;switch(g=t,S=n,v.tag){case 1:if(x=v.payload,typeof x=="function"){h=x.call(S,h,g);break e}h=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,g=typeof x=="function"?x.call(S,h,g):x,g==null)break e;h=oe({},h,g);break e;case 2:Ut=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,g=s.effects,g===null?s.effects=[l]:g.push(l))}else S={eventTime:S,lane:g,tag:l.tag,payload:l.payload,callback:l.callback,next:null},m===null?(c=m=S,a=h):m=m.next=S,i|=g;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;g=l,l=g.next,g.next=null,s.lastBaseUpdate=g,s.shared.pending=null}}while(!0);if(m===null&&(a=h),s.baseState=a,s.firstBaseUpdate=c,s.lastBaseUpdate=m,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);mn|=i,e.lanes=i,e.memoizedState=h}}function Ia(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(E(191,s));s.call(r)}}}var Vr={},xt=nn(Vr),Lr=nn(Vr),Ar=nn(Vr);function un(e){if(e===Vr)throw Error(E(174));return e}function Nl(e,t){switch(Z(Ar,t),Z(Lr,e),Z(xt,Vr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:di(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=di(t,e)}ee(xt),Z(xt,t)}function Xn(){ee(xt),ee(Lr),ee(Ar)}function Mc(e){un(Ar.current);var t=un(xt.current),n=di(t,e.type);t!==n&&(Z(Lr,e),Z(xt,n))}function Pl(e){Lr.current===e&&(ee(xt),ee(Lr))}var re=nn(0);function Xs(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 Ho=[];function jl(){for(var e=0;e<Ho.length;e++)Ho[e]._workInProgressVersionPrimary=null;Ho.length=0}var Ns=Ot.ReactCurrentDispatcher,bo=Ot.ReactCurrentBatchConfig,hn=0,se=null,he=null,ge=null,Qs=!1,Sr=!1,Ir=0,Vp=0;function Ne(){throw Error(E(321))}function El(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ft(e[n],t[n]))return!1;return!0}function Cl(e,t,n,r,s,o){if(hn=o,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ns.current=e===null||e.memoizedState===null?Kp:Gp,e=n(r,s),Sr){o=0;do{if(Sr=!1,Ir=0,25<=o)throw Error(E(301));o+=1,ge=he=null,t.updateQueue=null,Ns.current=Jp,e=n(r,s)}while(Sr)}if(Ns.current=Ys,t=he!==null&&he.next!==null,hn=0,ge=he=se=null,Qs=!1,t)throw Error(E(300));return e}function _l(){var e=Ir!==0;return Ir=0,e}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ge===null?se.memoizedState=ge=e:ge=ge.next=e,ge}function nt(){if(he===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=he.next;var t=ge===null?se.memoizedState:ge.next;if(t!==null)ge=t,he=e;else{if(e===null)throw Error(E(310));he=e,e={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},ge===null?se.memoizedState=ge=e:ge=ge.next=e}return ge}function Fr(e,t){return typeof t=="function"?t(e):t}function Vo(e){var t=nt(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=he,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 l=i=null,a=null,c=o;do{var m=c.lane;if((hn&m)===m)a!==null&&(a=a.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 h={lane:m,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(l=a=h,i=r):a=a.next=h,se.lanes|=m,mn|=m}c=c.next}while(c!==null&&c!==o);a===null?i=r:a.next=l,ft(r,t.memoizedState)||(Ie=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,se.lanes|=o,mn|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Xo(e){var t=nt(),n=t.queue;if(n===null)throw Error(E(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);ft(o,t.memoizedState)||(Ie=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lc(){}function Ac(e,t){var n=se,r=nt(),s=t(),o=!ft(r.memoizedState,s);if(o&&(r.memoizedState=s,Ie=!0),r=r.queue,zl(Wc.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ge!==null&&ge.memoizedState.tag&1){if(n.flags|=2048,Wr(9,Fc.bind(null,n,r,s,t),void 0,null),ve===null)throw Error(E(349));hn&30||Ic(n,t,s)}return s}function Ic(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fc(e,t,n,r){t.value=n,t.getSnapshot=r,Uc(t)&&Bc(e)}function Wc(e,t,n){return n(function(){Uc(t)&&Bc(e)})}function Uc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ft(e,n)}catch{return!0}}function Bc(e){var t=Rt(e,1);t!==null&&dt(t,e,1,-1)}function Fa(e){var t=vt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:e},t.queue=e,e=e.dispatch=Yp.bind(null,se,e),[t.memoizedState,e]}function Wr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.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 $c(){return nt().memoizedState}function Ps(e,t,n,r){var s=vt();se.flags|=e,s.memoizedState=Wr(1|t,n,void 0,r===void 0?null:r)}function ao(e,t,n,r){var s=nt();r=r===void 0?null:r;var o=void 0;if(he!==null){var i=he.memoizedState;if(o=i.destroy,r!==null&&El(r,i.deps)){s.memoizedState=Wr(t,n,o,r);return}}se.flags|=e,s.memoizedState=Wr(1|t,n,o,r)}function Wa(e,t){return Ps(8390656,8,e,t)}function zl(e,t){return ao(2048,8,e,t)}function Hc(e,t){return ao(4,2,e,t)}function bc(e,t){return ao(4,4,e,t)}function Vc(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 Xc(e,t,n){return n=n!=null?n.concat([e]):null,ao(4,4,Vc.bind(null,t,e),n)}function Tl(){}function Qc(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&El(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yc(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&El(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Kc(e,t,n){return hn&21?(ft(n,t)||(n=ec(),se.lanes|=n,mn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ie=!0),e.memoizedState=n)}function Xp(e,t){var n=K;K=n!==0&&4>n?n:4,e(!0);var r=bo.transition;bo.transition={};try{e(!1),t()}finally{K=n,bo.transition=r}}function Gc(){return nt().memoizedState}function Qp(e,t,n){var r=Jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Jc(e))Zc(t,n);else if(n=Dc(e,t,n,r),n!==null){var s=Re();dt(n,e,r,s),qc(n,t,r)}}function Yp(e,t,n){var r=Jt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jc(e))Zc(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,l=o(i,n);if(s.hasEagerState=!0,s.eagerState=l,ft(l,i)){var a=t.interleaved;a===null?(s.next=s,xl(t)):(s.next=a.next,a.next=s),t.interleaved=s;return}}catch{}finally{}n=Dc(e,t,s,r),n!==null&&(s=Re(),dt(n,e,r,s),qc(n,t,r))}}function Jc(e){var t=e.alternate;return e===se||t!==null&&t===se}function Zc(e,t){Sr=Qs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ll(e,n)}}var Ys={readContext:tt,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},Kp={readContext:tt,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:tt,useEffect:Wa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ps(4194308,4,Vc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ps(4,2,e,t)},useMemo:function(e,t){var n=vt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vt();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=Qp.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:Fa,useDebugValue:Tl,useDeferredValue:function(e){return vt().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Xp.bind(null,e[1]),vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,s=vt();if(te){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),ve===null)throw Error(E(349));hn&30||Ic(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Wa(Wc.bind(null,r,o,e),[e]),r.flags|=2048,Wr(9,Fc.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=vt(),t=ve.identifierPrefix;if(te){var n=Ct,r=Et;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ir++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Vp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gp={readContext:tt,useCallback:Qc,useContext:tt,useEffect:zl,useImperativeHandle:Xc,useInsertionEffect:Hc,useLayoutEffect:bc,useMemo:Yc,useReducer:Vo,useRef:$c,useState:function(){return Vo(Fr)},useDebugValue:Tl,useDeferredValue:function(e){var t=nt();return Kc(t,he.memoizedState,e)},useTransition:function(){var e=Vo(Fr)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Lc,useSyncExternalStore:Ac,useId:Gc,unstable_isNewReconciler:!1},Jp={readContext:tt,useCallback:Qc,useContext:tt,useEffect:zl,useImperativeHandle:Xc,useInsertionEffect:Hc,useLayoutEffect:bc,useMemo:Yc,useReducer:Xo,useRef:$c,useState:function(){return Xo(Fr)},useDebugValue:Tl,useDeferredValue:function(e){var t=nt();return he===null?t.memoizedState=e:Kc(t,he.memoizedState,e)},useTransition:function(){var e=Xo(Fr)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Lc,useSyncExternalStore:Ac,useId:Gc,unstable_isNewReconciler:!1};function lt(e,t){if(e&&e.defaultProps){t=oe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Di(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uo={isMounted:function(e){return(e=e._reactInternals)?yn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Re(),s=Jt(e),o=_t(r,s);o.payload=t,n!=null&&(o.callback=n),t=Kt(e,o,s),t!==null&&(dt(t,e,s,r),ks(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Re(),s=Jt(e),o=_t(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Kt(e,o,s),t!==null&&(dt(t,e,s,r),ks(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Re(),r=Jt(e),s=_t(n,r);s.tag=2,t!=null&&(s.callback=t),t=Kt(e,s,r),t!==null&&(dt(t,e,r,n),ks(t,e,r))}};function Ua(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?!Rr(n,r)||!Rr(s,o):!0}function ed(e,t,n){var r=!1,s=en,o=t.contextType;return typeof o=="object"&&o!==null?o=tt(o):(s=We(t)?fn:Ce.current,r=t.contextTypes,o=(r=r!=null)?Hn(e,s):en),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ba(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&&uo.enqueueReplaceState(t,t.state,null)}function Oi(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},kl(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=tt(o):(o=We(t)?fn:Ce.current,s.context=Hn(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Di(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&&uo.enqueueReplaceState(s,s.state,null),Vs(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Qn(e,t){try{var n="",r=t;do n+=jf(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 Qo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Mi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zp=typeof WeakMap=="function"?WeakMap:Map;function td(e,t,n){n=_t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gs||(Gs=!0,bi=r),Mi(e,t)},n}function nd(e,t,n){n=_t(-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(){Mi(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Mi(e,t),typeof r!="function"&&(Gt===null?Gt=new Set([this]):Gt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function $a(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zp;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=fh.bind(null,e,t,n),t.then(e,e))}function Ha(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 ba(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=_t(-1,1),t.tag=2,Kt(n,t,1))),n.lanes|=1),e)}var qp=Ot.ReactCurrentOwner,Ie=!1;function Te(e,t,n,r){t.child=e===null?Rc(t,null,n,r):Vn(t,e.child,n,r)}function Va(e,t,n,r,s){n=n.render;var o=t.ref;return Un(t,s),r=Cl(e,t,n,r,o,s),n=_l(),e!==null&&!Ie?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(te&&n&&ml(t),t.flags|=1,Te(e,t,r,s),t.child)}function Xa(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Fl(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,rd(e,t,o,r,s)):(e=_s(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:Rr,n(i,r)&&e.ref===t.ref)return Dt(e,t,s)}return t.flags|=1,e=Zt(o,r),e.ref=t.ref,e.return=t,t.child=e}function rd(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Rr(o,r)&&e.ref===t.ref)if(Ie=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(Ie=!0);else return t.lanes=e.lanes,Dt(e,t,s)}return Li(e,t,n,r,s)}function sd(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},Z(Mn,He),He|=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,Z(Mn,He),He|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Z(Mn,He),He|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Z(Mn,He),He|=r;return Te(e,t,s,n),t.child}function od(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Li(e,t,n,r,s){var o=We(n)?fn:Ce.current;return o=Hn(t,o),Un(t,s),n=Cl(e,t,n,r,o,s),r=_l(),e!==null&&!Ie?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(te&&r&&ml(t),t.flags|=1,Te(e,t,n,s),t.child)}function Qa(e,t,n,r,s){if(We(n)){var o=!0;Us(t)}else o=!1;if(Un(t,s),t.stateNode===null)js(e,t),ed(t,n,r),Oi(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var a=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=tt(c):(c=We(n)?fn:Ce.current,c=Hn(t,c));var m=n.getDerivedStateFromProps,h=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||a!==c)&&Ba(t,i,r,c),Ut=!1;var g=t.memoizedState;i.state=g,Vs(t,r,i,s),a=t.memoizedState,l!==r||g!==a||Fe.current||Ut?(typeof m=="function"&&(Di(t,n,m,r),a=t.memoizedState),(l=Ut||Ua(t,n,l,r,g,a,c))?(h||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=a),i.props=r,i.state=a,i.context=c,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Oc(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:lt(t.type,l),i.props=c,h=t.pendingProps,g=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=tt(a):(a=We(n)?fn:Ce.current,a=Hn(t,a));var S=n.getDerivedStateFromProps;(m=typeof S=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==h||g!==a)&&Ba(t,i,r,a),Ut=!1,g=t.memoizedState,i.state=g,Vs(t,r,i,s);var x=t.memoizedState;l!==h||g!==x||Fe.current||Ut?(typeof S=="function"&&(Di(t,n,S,r),x=t.memoizedState),(c=Ut||Ua(t,n,c,r,g,x,a)||!1)?(m||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,a)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=a,r=c):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Ai(e,t,n,r,o,s)}function Ai(e,t,n,r,s,o){od(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&Da(t,n,!1),Dt(e,t,o);r=t.stateNode,qp.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Vn(t,e.child,null,o),t.child=Vn(t,null,l,o)):Te(e,t,l,o),t.memoizedState=r.state,s&&Da(t,n,!0),t.child}function id(e){var t=e.stateNode;t.pendingContext?Ra(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ra(e,t.context,!1),Nl(e,t.containerInfo)}function Ya(e,t,n,r,s){return bn(),vl(s),t.flags|=256,Te(e,t,n,r),t.child}var Ii={dehydrated:null,treeContext:null,retryLane:0};function Fi(e){return{baseLanes:e,cachePool:null,transitions:null}}function ld(e,t,n){var r=t.pendingProps,s=re.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Z(re,s&1),e===null)return Ti(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=po(i,r,0,null),e=dn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Fi(n),t.memoizedState=Ii,e):Rl(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return eh(e,t,i,r,l,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,l=s.sibling;var a={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Zt(s,a),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=Zt(l,o):(o=dn(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?Fi(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Ii,r}return o=e.child,e=o.sibling,r=Zt(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 Rl(e,t){return t=po({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function as(e,t,n,r){return r!==null&&vl(r),Vn(t,e.child,null,n),e=Rl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function eh(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Qo(Error(E(422))),as(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=po({mode:"visible",children:r.children},s,0,null),o=dn(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Vn(t,e.child,null,i),t.child.memoizedState=Fi(i),t.memoizedState=Ii,o);if(!(t.mode&1))return as(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(E(419)),r=Qo(o,r,void 0),as(e,t,i,r)}if(l=(i&e.childLanes)!==0,Ie||l){if(r=ve,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,Rt(e,s),dt(r,e,s,-1))}return Il(),r=Qo(Error(E(421))),as(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=ph.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,be=Yt(s.nextSibling),Ve=t,te=!0,ut=null,e!==null&&(Je[Ze++]=Et,Je[Ze++]=Ct,Je[Ze++]=pn,Et=e.id,Ct=e.overflow,pn=t),t=Rl(t,r.children),t.flags|=4096,t)}function Ka(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ri(e.return,t,n)}function Yo(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 ad(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Te(e,t,r.children,n),r=re.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&&Ka(e,n,t);else if(e.tag===19)Ka(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(Z(re,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&&Xs(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Yo(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&&Xs(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Yo(t,!0,n,null,o);break;case"together":Yo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function js(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=Zt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function th(e,t,n){switch(t.tag){case 3:id(t),bn();break;case 5:Mc(t);break;case 1:We(t.type)&&Us(t);break;case 4:Nl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Z(Hs,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Z(re,re.current&1),t.flags|=128,null):n&t.child.childLanes?ld(e,t,n):(Z(re,re.current&1),e=Dt(e,t,n),e!==null?e.sibling:null);Z(re,re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ad(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Z(re,re.current),r)break;return null;case 22:case 23:return t.lanes=0,sd(e,t,n)}return Dt(e,t,n)}var ud,Wi,cd,dd;ud=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}};Wi=function(){};cd=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,un(xt.current);var o=null;switch(n){case"input":s=li(e,s),r=li(e,r),o=[];break;case"select":s=oe({},s,{value:void 0}),r=oe({},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=Fs)}fi(n,r);var i;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Pr.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var a=r[c];if(l=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(i in l)!l.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&l[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Pr.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&q("scroll",e),o||l===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};dd=function(e,t,n,r){n!==r&&(t.flags|=4)};function ir(e,t){if(!te)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 Pe(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 nh(e,t,n){var r=t.pendingProps;switch(gl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return We(t.type)&&Ws(),Pe(t),null;case 3:return r=t.stateNode,Xn(),ee(Fe),ee(Ce),jl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(is(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ut!==null&&(Qi(ut),ut=null))),Wi(e,t),Pe(t),null;case 5:Pl(t);var s=un(Ar.current);if(n=t.type,e!==null&&t.stateNode!=null)cd(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return Pe(t),null}if(e=un(xt.current),is(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[wt]=t,r[Mr]=o,e=(t.mode&1)!==0,n){case"dialog":q("cancel",r),q("close",r);break;case"iframe":case"object":case"embed":q("load",r);break;case"video":case"audio":for(s=0;s<hr.length;s++)q(hr[s],r);break;case"source":q("error",r);break;case"img":case"image":case"link":q("error",r),q("load",r);break;case"details":q("toggle",r);break;case"input":sa(r,o),q("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},q("invalid",r);break;case"textarea":ia(r,o),q("invalid",r)}fi(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&os(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&os(r.textContent,l,e),s=["children",""+l]):Pr.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&q("scroll",r)}switch(n){case"input":Jr(r),oa(r,o,!0);break;case"textarea":Jr(r),la(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Fs)}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=Wu(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[wt]=t,e[Mr]=r,ud(e,t,!1,!1),t.stateNode=e;e:{switch(i=pi(n,r),n){case"dialog":q("cancel",e),q("close",e),s=r;break;case"iframe":case"object":case"embed":q("load",e),s=r;break;case"video":case"audio":for(s=0;s<hr.length;s++)q(hr[s],e);s=r;break;case"source":q("error",e),s=r;break;case"img":case"image":case"link":q("error",e),q("load",e),s=r;break;case"details":q("toggle",e),s=r;break;case"input":sa(e,r),s=li(e,r),q("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=oe({},r,{value:void 0}),q("invalid",e);break;case"textarea":ia(e,r),s=ci(e,r),q("invalid",e);break;default:s=r}fi(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?$u(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Uu(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&jr(e,a):typeof a=="number"&&jr(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Pr.hasOwnProperty(o)?a!=null&&o==="onScroll"&&q("scroll",e):a!=null&&tl(e,o,a,i))}switch(n){case"input":Jr(e),oa(e,r,!1);break;case"textarea":Jr(e),la(e);break;case"option":r.value!=null&&e.setAttribute("value",""+qt(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?An(e,!!r.multiple,o,!1):r.defaultValue!=null&&An(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Fs)}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 Pe(t),null;case 6:if(e&&t.stateNode!=null)dd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=un(Ar.current),un(xt.current),is(t)){if(r=t.stateNode,n=t.memoizedProps,r[wt]=t,(o=r.nodeValue!==n)&&(e=Ve,e!==null))switch(e.tag){case 3:os(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&os(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wt]=t,t.stateNode=r}return Pe(t),null;case 13:if(ee(re),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(te&&be!==null&&t.mode&1&&!(t.flags&128))zc(),bn(),t.flags|=98560,o=!1;else if(o=is(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(E(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(E(317));o[wt]=t}else bn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pe(t),o=!1}else ut!==null&&(Qi(ut),ut=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||re.current&1?me===0&&(me=3):Il())),t.updateQueue!==null&&(t.flags|=4),Pe(t),null);case 4:return Xn(),Wi(e,t),e===null&&Dr(t.stateNode.containerInfo),Pe(t),null;case 10:return Sl(t.type._context),Pe(t),null;case 17:return We(t.type)&&Ws(),Pe(t),null;case 19:if(ee(re),o=t.memoizedState,o===null)return Pe(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)ir(o,!1);else{if(me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Xs(e),i!==null){for(t.flags|=128,ir(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 Z(re,re.current&1|2),t.child}e=e.sibling}o.tail!==null&&ce()>Yn&&(t.flags|=128,r=!0,ir(o,!1),t.lanes=4194304)}else{if(!r)if(e=Xs(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ir(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!te)return Pe(t),null}else 2*ce()-o.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,ir(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=ce(),t.sibling=null,n=re.current,Z(re,r?n&1|2:n&1),t):(Pe(t),null);case 22:case 23:return Al(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?He&1073741824&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function rh(e,t){switch(gl(t),t.tag){case 1:return We(t.type)&&Ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(),ee(Fe),ee(Ce),jl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pl(t),null;case 13:if(ee(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(re),null;case 4:return Xn(),null;case 10:return Sl(t.type._context),null;case 22:case 23:return Al(),null;case 24:return null;default:return null}}var us=!1,Ee=!1,sh=typeof WeakSet=="function"?WeakSet:Set,D=null;function On(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ae(e,t,r)}else n.current=null}function Ui(e,t,n){try{n()}catch(r){ae(e,t,r)}}var Ga=!1;function oh(e,t){if(Ni=Ls,e=gc(),hl(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,l=-1,a=-1,c=0,m=0,h=e,g=null;t:for(;;){for(var S;h!==n||s!==0&&h.nodeType!==3||(l=i+s),h!==o||r!==0&&h.nodeType!==3||(a=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(S=h.firstChild)!==null;)g=h,h=S;for(;;){if(h===e)break t;if(g===n&&++c===s&&(l=i),g===o&&++m===r&&(a=i),(S=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=S}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pi={focusedElem:e,selectionRange:n},Ls=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;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 v=x.memoizedProps,C=x.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:lt(t.type,v),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(E(163))}}catch(y){ae(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return x=Ga,Ga=!1,x}function xr(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&&Ui(t,n,o)}s=s.next}while(s!==r)}}function co(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 Bi(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 fd(e){var t=e.alternate;t!==null&&(e.alternate=null,fd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wt],delete t[Mr],delete t[Ci],delete t[Bp],delete t[$p])),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 pd(e){return e.tag===5||e.tag===3||e.tag===4}function Ja(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $i(e,t,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=Fs));else if(r!==4&&(e=e.child,e!==null))for($i(e,t,n),e=e.sibling;e!==null;)$i(e,t,n),e=e.sibling}function Hi(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(Hi(e,t,n),e=e.sibling;e!==null;)Hi(e,t,n),e=e.sibling}var ye=null,at=!1;function At(e,t,n){for(n=n.child;n!==null;)hd(e,t,n),n=n.sibling}function hd(e,t,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(no,n)}catch{}switch(n.tag){case 5:Ee||On(n,t);case 6:var r=ye,s=at;ye=null,At(e,t,n),ye=r,at=s,ye!==null&&(at?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(at?(e=ye,n=n.stateNode,e.nodeType===8?Bo(e.parentNode,n):e.nodeType===1&&Bo(e,n),zr(e)):Bo(ye,n.stateNode));break;case 4:r=ye,s=at,ye=n.stateNode.containerInfo,at=!0,At(e,t,n),ye=r,at=s;break;case 0:case 11:case 14:case 15:if(!Ee&&(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)&&Ui(n,t,i),s=s.next}while(s!==r)}At(e,t,n);break;case 1:if(!Ee&&(On(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ae(n,t,l)}At(e,t,n);break;case 21:At(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,At(e,t,n),Ee=r):At(e,t,n);break;default:At(e,t,n)}}function Za(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new sh),t.forEach(function(r){var s=hh.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function st(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,l=i;e:for(;l!==null;){switch(l.tag){case 5:ye=l.stateNode,at=!1;break e;case 3:ye=l.stateNode.containerInfo,at=!0;break e;case 4:ye=l.stateNode.containerInfo,at=!0;break e}l=l.return}if(ye===null)throw Error(E(160));hd(o,i,s),ye=null,at=!1;var a=s.alternate;a!==null&&(a.return=null),s.return=null}catch(c){ae(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(st(t,e),mt(e),r&4){try{xr(3,e,e.return),co(3,e)}catch(v){ae(e,e.return,v)}try{xr(5,e,e.return)}catch(v){ae(e,e.return,v)}}break;case 1:st(t,e),mt(e),r&512&&n!==null&&On(n,n.return);break;case 5:if(st(t,e),mt(e),r&512&&n!==null&&On(n,n.return),e.flags&32){var s=e.stateNode;try{jr(s,"")}catch(v){ae(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Iu(s,o),pi(l,i);var c=pi(l,o);for(i=0;i<a.length;i+=2){var m=a[i],h=a[i+1];m==="style"?$u(s,h):m==="dangerouslySetInnerHTML"?Uu(s,h):m==="children"?jr(s,h):tl(s,m,h,c)}switch(l){case"input":ai(s,o);break;case"textarea":Fu(s,o);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var S=o.value;S!=null?An(s,!!o.multiple,S,!1):g!==!!o.multiple&&(o.defaultValue!=null?An(s,!!o.multiple,o.defaultValue,!0):An(s,!!o.multiple,o.multiple?[]:"",!1))}s[Mr]=o}catch(v){ae(e,e.return,v)}}break;case 6:if(st(t,e),mt(e),r&4){if(e.stateNode===null)throw Error(E(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){ae(e,e.return,v)}}break;case 3:if(st(t,e),mt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zr(t.containerInfo)}catch(v){ae(e,e.return,v)}break;case 4:st(t,e),mt(e);break;case 13:st(t,e),mt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Ml=ce())),r&4&&Za(e);break;case 22:if(m=n!==null&&n.memoizedState!==null,e.mode&1?(Ee=(c=Ee)||m,st(t,e),Ee=c):st(t,e),mt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!m&&e.mode&1)for(D=e,m=e.child;m!==null;){for(h=D=m;D!==null;){switch(g=D,S=g.child,g.tag){case 0:case 11:case 14:case 15:xr(4,g,g.return);break;case 1:On(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(v){ae(r,n,v)}}break;case 5:On(g,g.return);break;case 22:if(g.memoizedState!==null){eu(h);continue}}S!==null?(S.return=g,D=S):eu(h)}m=m.sibling}e:for(m=null,h=e;;){if(h.tag===5){if(m===null){m=h;try{s=h.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,a=h.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Bu("display",i))}catch(v){ae(e,e.return,v)}}}else if(h.tag===6){if(m===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(v){ae(e,e.return,v)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;m===h&&(m=null),h=h.return}m===h&&(m=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:st(t,e),mt(e),r&4&&Za(e);break;case 21:break;default:st(t,e),mt(e)}}function mt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(pd(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(jr(s,""),r.flags&=-33);var o=Ja(e);Hi(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,l=Ja(e);$i(e,l,i);break;default:throw Error(E(161))}}catch(a){ae(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ih(e,t,n){D=e,gd(e)}function gd(e,t,n){for(var r=(e.mode&1)!==0;D!==null;){var s=D,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||us;if(!i){var l=s.alternate,a=l!==null&&l.memoizedState!==null||Ee;l=us;var c=Ee;if(us=i,(Ee=a)&&!c)for(D=s;D!==null;)i=D,a=i.child,i.tag===22&&i.memoizedState!==null?tu(s):a!==null?(a.return=i,D=a):tu(s);for(;o!==null;)D=o,gd(o),o=o.sibling;D=s,us=l,Ee=c}qa(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,D=o):qa(e)}}function qa(e){for(;D!==null;){var t=D;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ee||co(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ee)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:lt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Ia(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}Ia(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.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 m=c.memoizedState;if(m!==null){var h=m.dehydrated;h!==null&&zr(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}Ee||t.flags&512&&Bi(t)}catch(g){ae(t,t.return,g)}}if(t===e){D=null;break}if(n=t.sibling,n!==null){n.return=t.return,D=n;break}D=t.return}}function eu(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var n=t.sibling;if(n!==null){n.return=t.return,D=n;break}D=t.return}}function tu(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{co(4,t)}catch(a){ae(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(a){ae(t,s,a)}}var o=t.return;try{Bi(t)}catch(a){ae(t,o,a)}break;case 5:var i=t.return;try{Bi(t)}catch(a){ae(t,i,a)}}}catch(a){ae(t,t.return,a)}if(t===e){D=null;break}var l=t.sibling;if(l!==null){l.return=t.return,D=l;break}D=t.return}}var lh=Math.ceil,Ks=Ot.ReactCurrentDispatcher,Dl=Ot.ReactCurrentOwner,et=Ot.ReactCurrentBatchConfig,Q=0,ve=null,fe=null,we=0,He=0,Mn=nn(0),me=0,Ur=null,mn=0,fo=0,Ol=0,kr=null,Ae=null,Ml=0,Yn=1/0,Pt=null,Gs=!1,bi=null,Gt=null,cs=!1,bt=null,Js=0,Nr=0,Vi=null,Es=-1,Cs=0;function Re(){return Q&6?ce():Es!==-1?Es:Es=ce()}function Jt(e){return e.mode&1?Q&2&&we!==0?we&-we:bp.transition!==null?(Cs===0&&(Cs=ec()),Cs):(e=K,e!==0||(e=window.event,e=e===void 0?16:lc(e.type)),e):1}function dt(e,t,n,r){if(50<Nr)throw Nr=0,Vi=null,Error(E(185));$r(e,n,r),(!(Q&2)||e!==ve)&&(e===ve&&(!(Q&2)&&(fo|=n),me===4&&$t(e,we)),Ue(e,r),n===1&&Q===0&&!(t.mode&1)&&(Yn=ce()+500,lo&&rn()))}function Ue(e,t){var n=e.callbackNode;bf(e,t);var r=Ms(e,e===ve?we:0);if(r===0)n!==null&&ca(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ca(n),t===1)e.tag===0?Hp(nu.bind(null,e)):Ec(nu.bind(null,e)),Wp(function(){!(Q&6)&&rn()}),n=null;else{switch(tc(r)){case 1:n=il;break;case 4:n=Zu;break;case 16:n=Os;break;case 536870912:n=qu;break;default:n=Os}n=Pd(n,vd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function vd(e,t){if(Es=-1,Cs=0,Q&6)throw Error(E(327));var n=e.callbackNode;if(Bn()&&e.callbackNode!==n)return null;var r=Ms(e,e===ve?we:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Zs(e,r);else{t=r;var s=Q;Q|=2;var o=wd();(ve!==e||we!==t)&&(Pt=null,Yn=ce()+500,cn(e,t));do try{ch();break}catch(l){yd(e,l)}while(!0);wl(),Ks.current=o,Q=s,fe!==null?t=0:(ve=null,we=0,t=me)}if(t!==0){if(t===2&&(s=yi(e),s!==0&&(r=s,t=Xi(e,s))),t===1)throw n=Ur,cn(e,0),$t(e,r),Ue(e,ce()),n;if(t===6)$t(e,r);else{if(s=e.current.alternate,!(r&30)&&!ah(s)&&(t=Zs(e,r),t===2&&(o=yi(e),o!==0&&(r=o,t=Xi(e,o))),t===1))throw n=Ur,cn(e,0),$t(e,r),Ue(e,ce()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:on(e,Ae,Pt);break;case 3:if($t(e,r),(r&130023424)===r&&(t=Ml+500-ce(),10<t)){if(Ms(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Re(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ei(on.bind(null,e,Ae,Pt),t);break}on(e,Ae,Pt);break;case 4:if($t(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-ct(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lh(r/1960))-r,10<r){e.timeoutHandle=Ei(on.bind(null,e,Ae,Pt),r);break}on(e,Ae,Pt);break;case 5:on(e,Ae,Pt);break;default:throw Error(E(329))}}}return Ue(e,ce()),e.callbackNode===n?vd.bind(null,e):null}function Xi(e,t){var n=kr;return e.current.memoizedState.isDehydrated&&(cn(e,t).flags|=256),e=Zs(e,t),e!==2&&(t=Ae,Ae=n,t!==null&&Qi(t)),e}function Qi(e){Ae===null?Ae=e:Ae.push.apply(Ae,e)}function ah(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(!ft(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 $t(e,t){for(t&=~Ol,t&=~fo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ct(t),r=1<<n;e[n]=-1,t&=~r}}function nu(e){if(Q&6)throw Error(E(327));Bn();var t=Ms(e,0);if(!(t&1))return Ue(e,ce()),null;var n=Zs(e,t);if(e.tag!==0&&n===2){var r=yi(e);r!==0&&(t=r,n=Xi(e,r))}if(n===1)throw n=Ur,cn(e,0),$t(e,t),Ue(e,ce()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,on(e,Ae,Pt),Ue(e,ce()),null}function Ll(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(Yn=ce()+500,lo&&rn())}}function gn(e){bt!==null&&bt.tag===0&&!(Q&6)&&Bn();var t=Q;Q|=1;var n=et.transition,r=K;try{if(et.transition=null,K=1,e)return e()}finally{K=r,et.transition=n,Q=t,!(Q&6)&&rn()}}function Al(){He=Mn.current,ee(Mn)}function cn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Fp(n)),fe!==null)for(n=fe.return;n!==null;){var r=n;switch(gl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ws();break;case 3:Xn(),ee(Fe),ee(Ce),jl();break;case 5:Pl(r);break;case 4:Xn();break;case 13:ee(re);break;case 19:ee(re);break;case 10:Sl(r.type._context);break;case 22:case 23:Al()}n=n.return}if(ve=e,fe=e=Zt(e.current,null),we=He=t,me=0,Ur=null,Ol=fo=mn=0,Ae=kr=null,an!==null){for(t=0;t<an.length;t++)if(n=an[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}an=null}return e}function yd(e,t){do{var n=fe;try{if(wl(),Ns.current=Ys,Qs){for(var r=se.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Qs=!1}if(hn=0,ge=he=se=null,Sr=!1,Ir=0,Dl.current=null,n===null||n.return===null){me=1,Ur=t,fe=null;break}e:{var o=e,i=n.return,l=n,a=t;if(t=we,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,m=l,h=m.tag;if(!(m.mode&1)&&(h===0||h===11||h===15)){var g=m.alternate;g?(m.updateQueue=g.updateQueue,m.memoizedState=g.memoizedState,m.lanes=g.lanes):(m.updateQueue=null,m.memoizedState=null)}var S=Ha(i);if(S!==null){S.flags&=-257,ba(S,i,l,o,t),S.mode&1&&$a(o,c,t),t=S,a=c;var x=t.updateQueue;if(x===null){var v=new Set;v.add(a),t.updateQueue=v}else x.add(a);break e}else{if(!(t&1)){$a(o,c,t),Il();break e}a=Error(E(426))}}else if(te&&l.mode&1){var C=Ha(i);if(C!==null){!(C.flags&65536)&&(C.flags|=256),ba(C,i,l,o,t),vl(Qn(a,l));break e}}o=a=Qn(a,l),me!==4&&(me=2),kr===null?kr=[o]:kr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=td(o,a,t);Aa(o,p);break e;case 1:l=a;var d=o.type,f=o.stateNode;if(!(o.flags&128)&&(typeof d.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Gt===null||!Gt.has(f)))){o.flags|=65536,t&=-t,o.lanes|=t;var y=nd(o,l,t);Aa(o,y);break e}}o=o.return}while(o!==null)}xd(n)}catch(w){t=w,fe===n&&n!==null&&(fe=n=n.return);continue}break}while(!0)}function wd(){var e=Ks.current;return Ks.current=Ys,e===null?Ys:e}function Il(){(me===0||me===3||me===2)&&(me=4),ve===null||!(mn&268435455)&&!(fo&268435455)||$t(ve,we)}function Zs(e,t){var n=Q;Q|=2;var r=wd();(ve!==e||we!==t)&&(Pt=null,cn(e,t));do try{uh();break}catch(s){yd(e,s)}while(!0);if(wl(),Q=n,Ks.current=r,fe!==null)throw Error(E(261));return ve=null,we=0,me}function uh(){for(;fe!==null;)Sd(fe)}function ch(){for(;fe!==null&&!Lf();)Sd(fe)}function Sd(e){var t=Nd(e.alternate,e,He);e.memoizedProps=e.pendingProps,t===null?xd(e):fe=t,Dl.current=null}function xd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=rh(n,t),n!==null){n.flags&=32767,fe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{me=6,fe=null;return}}else if(n=nh(n,t,He),n!==null){fe=n;return}if(t=t.sibling,t!==null){fe=t;return}fe=t=e}while(t!==null);me===0&&(me=5)}function on(e,t,n){var r=K,s=et.transition;try{et.transition=null,K=1,dh(e,t,n,r)}finally{et.transition=s,K=r}return null}function dh(e,t,n,r){do Bn();while(bt!==null);if(Q&6)throw Error(E(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(E(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Vf(e,o),e===ve&&(fe=ve=null,we=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cs||(cs=!0,Pd(Os,function(){return Bn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=et.transition,et.transition=null;var i=K;K=1;var l=Q;Q|=4,Dl.current=null,oh(e,n),md(n,e),Rp(Pi),Ls=!!Ni,Pi=Ni=null,e.current=n,ih(n),Af(),Q=l,K=i,et.transition=o}else e.current=n;if(cs&&(cs=!1,bt=e,Js=s),o=e.pendingLanes,o===0&&(Gt=null),Wf(n.stateNode),Ue(e,ce()),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(Gs)throw Gs=!1,e=bi,bi=null,e;return Js&1&&e.tag!==0&&Bn(),o=e.pendingLanes,o&1?e===Vi?Nr++:(Nr=0,Vi=e):Nr=0,rn(),null}function Bn(){if(bt!==null){var e=tc(Js),t=et.transition,n=K;try{if(et.transition=null,K=16>e?16:e,bt===null)var r=!1;else{if(e=bt,bt=null,Js=0,Q&6)throw Error(E(331));var s=Q;for(Q|=4,D=e.current;D!==null;){var o=D,i=o.child;if(D.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var c=l[a];for(D=c;D!==null;){var m=D;switch(m.tag){case 0:case 11:case 15:xr(8,m,o)}var h=m.child;if(h!==null)h.return=m,D=h;else for(;D!==null;){m=D;var g=m.sibling,S=m.return;if(fd(m),m===c){D=null;break}if(g!==null){g.return=S,D=g;break}D=S}}}var x=o.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var C=v.sibling;v.sibling=null,v=C}while(v!==null)}}D=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,D=i;else e:for(;D!==null;){if(o=D,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xr(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,D=p;break e}D=o.return}}var d=e.current;for(D=d;D!==null;){i=D;var f=i.child;if(i.subtreeFlags&2064&&f!==null)f.return=i,D=f;else e:for(i=d;D!==null;){if(l=D,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:co(9,l)}}catch(w){ae(l,l.return,w)}if(l===i){D=null;break e}var y=l.sibling;if(y!==null){y.return=l.return,D=y;break e}D=l.return}}if(Q=s,rn(),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(no,e)}catch{}r=!0}return r}finally{K=n,et.transition=t}}return!1}function ru(e,t,n){t=Qn(n,t),t=td(e,t,1),e=Kt(e,t,1),t=Re(),e!==null&&($r(e,1,t),Ue(e,t))}function ae(e,t,n){if(e.tag===3)ru(e,e,n);else for(;t!==null;){if(t.tag===3){ru(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Gt===null||!Gt.has(r))){e=Qn(n,e),e=nd(t,e,1),t=Kt(t,e,1),e=Re(),t!==null&&($r(t,1,e),Ue(t,e));break}}t=t.return}}function fh(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&n,ve===e&&(we&n)===n&&(me===4||me===3&&(we&130023424)===we&&500>ce()-Ml?cn(e,0):Ol|=n),Ue(e,t)}function kd(e,t){t===0&&(e.mode&1?(t=es,es<<=1,!(es&130023424)&&(es=4194304)):t=1);var n=Re();e=Rt(e,t),e!==null&&($r(e,t,n),Ue(e,n))}function ph(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kd(e,n)}function hh(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(E(314))}r!==null&&r.delete(t),kd(e,n)}var Nd;Nd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Ie=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ie=!1,th(e,t,n);Ie=!!(e.flags&131072)}else Ie=!1,te&&t.flags&1048576&&Cc(t,$s,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;js(e,t),e=t.pendingProps;var s=Hn(t,Ce.current);Un(t,n),s=Cl(null,t,r,e,s,n);var o=_l();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,We(r)?(o=!0,Us(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,kl(t),s.updater=uo,t.stateNode=s,s._reactInternals=t,Oi(t,r,e,n),t=Ai(null,t,r,!0,o,n)):(t.tag=0,te&&o&&ml(t),Te(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(js(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=gh(r),e=lt(r,e),s){case 0:t=Li(null,t,r,e,n);break e;case 1:t=Qa(null,t,r,e,n);break e;case 11:t=Va(null,t,r,e,n);break e;case 14:t=Xa(null,t,r,lt(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:lt(r,s),Li(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:lt(r,s),Qa(e,t,r,s,n);case 3:e:{if(id(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Oc(e,t),Vs(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=Qn(Error(E(423)),t),t=Ya(e,t,r,n,s);break e}else if(r!==s){s=Qn(Error(E(424)),t),t=Ya(e,t,r,n,s);break e}else for(be=Yt(t.stateNode.containerInfo.firstChild),Ve=t,te=!0,ut=null,n=Rc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bn(),r===s){t=Dt(e,t,n);break e}Te(e,t,r,n)}t=t.child}return t;case 5:return Mc(t),e===null&&Ti(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,ji(r,s)?i=null:o!==null&&ji(r,o)&&(t.flags|=32),od(e,t),Te(e,t,i,n),t.child;case 6:return e===null&&Ti(t),null;case 13:return ld(e,t,n);case 4:return Nl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vn(t,null,r,n):Te(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:lt(r,s),Va(e,t,r,s,n);case 7:return Te(e,t,t.pendingProps,n),t.child;case 8:return Te(e,t,t.pendingProps.children,n),t.child;case 12:return Te(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,Z(Hs,r._currentValue),r._currentValue=i,o!==null)if(ft(o.value,i)){if(o.children===s.children&&!Fe.current){t=Dt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=_t(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?a.next=a:(a.next=m.next,m.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ri(o.return,n,t),l.lanes|=n;break}a=a.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(E(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Ri(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}Te(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Un(t,n),s=tt(s),r=r(s),t.flags|=1,Te(e,t,r,n),t.child;case 14:return r=t.type,s=lt(r,t.pendingProps),s=lt(r.type,s),Xa(e,t,r,s,n);case 15:return rd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:lt(r,s),js(e,t),t.tag=1,We(r)?(e=!0,Us(t)):e=!1,Un(t,n),ed(t,r,s),Oi(t,r,s,n),Ai(null,t,r,!0,e,n);case 19:return ad(e,t,n);case 22:return sd(e,t,n)}throw Error(E(156,t.tag))};function Pd(e,t){return Ju(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 qe(e,t,n,r){return new mh(e,t,n,r)}function Fl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gh(e){if(typeof e=="function")return Fl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rl)return 11;if(e===sl)return 14}return 2}function Zt(e,t){var n=e.alternate;return n===null?(n=qe(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 _s(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Fl(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Pn:return dn(n.children,s,o,t);case nl:i=8,s|=8;break;case ri:return e=qe(12,n,t,s|2),e.elementType=ri,e.lanes=o,e;case si:return e=qe(13,n,t,s),e.elementType=si,e.lanes=o,e;case oi:return e=qe(19,n,t,s),e.elementType=oi,e.lanes=o,e;case Mu:return po(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Du:i=10;break e;case Ou:i=9;break e;case rl:i=11;break e;case sl:i=14;break e;case Wt:i=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=qe(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function dn(e,t,n,r){return e=qe(7,e,r,t),e.lanes=n,e}function po(e,t,n,r){return e=qe(22,e,r,t),e.elementType=Mu,e.lanes=n,e.stateNode={isHidden:!1},e}function Ko(e,t,n){return e=qe(6,e,null,t),e.lanes=n,e}function Go(e,t,n){return t=qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vh(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=To(0),this.expirationTimes=To(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=To(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Wl(e,t,n,r,s,o,i,l,a){return e=new vh(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kl(o),e}function yh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Nn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function jd(e){if(!e)return en;e=e._reactInternals;e:{if(yn(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(We(n))return jc(e,n,t)}return t}function Ed(e,t,n,r,s,o,i,l,a){return e=Wl(n,r,!0,e,s,o,i,l,a),e.context=jd(null),n=e.current,r=Re(),s=Jt(n),o=_t(r,s),o.callback=t??null,Kt(n,o,s),e.current.lanes=s,$r(e,s,r),Ue(e,r),e}function ho(e,t,n,r){var s=t.current,o=Re(),i=Jt(s);return n=jd(n),t.context===null?t.context=n:t.pendingContext=n,t=_t(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Kt(s,t,i),e!==null&&(dt(e,s,i,o),ks(e,s,i)),i}function qs(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 su(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ul(e,t){su(e,t),(e=e.alternate)&&su(e,t)}function wh(){return null}var Cd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bl(e){this._internalRoot=e}mo.prototype.render=Bl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));ho(e,t,null,null)};mo.prototype.unmount=Bl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gn(function(){ho(null,e,null,null)}),t[Tt]=null}};function mo(e){this._internalRoot=e}mo.prototype.unstable_scheduleHydration=function(e){if(e){var t=sc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bt.length&&t!==0&&t<Bt[n].priority;n++);Bt.splice(n,0,e),n===0&&ic(e)}};function $l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function go(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ou(){}function Sh(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var c=qs(i);o.call(c)}}var i=Ed(t,r,e,0,null,!1,!1,"",ou);return e._reactRootContainer=i,e[Tt]=i.current,Dr(e.nodeType===8?e.parentNode:e),gn(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var c=qs(a);l.call(c)}}var a=Wl(e,0,!1,null,null,!1,!1,"",ou);return e._reactRootContainer=a,e[Tt]=a.current,Dr(e.nodeType===8?e.parentNode:e),gn(function(){ho(t,a,n,r)}),a}function vo(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var a=qs(i);l.call(a)}}ho(t,i,e,s)}else i=Sh(n,t,e,s,r);return qs(i)}nc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=pr(t.pendingLanes);n!==0&&(ll(t,n|1),Ue(t,ce()),!(Q&6)&&(Yn=ce()+500,rn()))}break;case 13:gn(function(){var r=Rt(e,1);if(r!==null){var s=Re();dt(r,e,1,s)}}),Ul(e,1)}};al=function(e){if(e.tag===13){var t=Rt(e,134217728);if(t!==null){var n=Re();dt(t,e,134217728,n)}Ul(e,134217728)}};rc=function(e){if(e.tag===13){var t=Jt(e),n=Rt(e,t);if(n!==null){var r=Re();dt(n,e,t,r)}Ul(e,t)}};sc=function(){return K};oc=function(e,t){var n=K;try{return K=e,t()}finally{K=n}};mi=function(e,t,n){switch(t){case"input":if(ai(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=io(r);if(!s)throw Error(E(90));Au(r),ai(r,s)}}}break;case"textarea":Fu(e,n);break;case"select":t=n.value,t!=null&&An(e,!!n.multiple,t,!1)}};Vu=Ll;Xu=gn;var xh={usingClientEntryPoint:!1,Events:[br,_n,io,Hu,bu,Ll]},lr={findFiberByHostInstance:ln,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},kh={bundleType:lr.bundleType,version:lr.version,rendererPackageName:lr.rendererPackageName,rendererConfig:lr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ot.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ku(e),e===null?null:e.stateNode},findFiberByHostInstance:lr.findFiberByHostInstance||wh,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 ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ds.isDisabled&&ds.supportsFiber)try{no=ds.inject(kh),St=ds}catch{}}Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xh;Ye.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$l(t))throw Error(E(200));return yh(e,t,null,n)};Ye.createRoot=function(e,t){if(!$l(e))throw Error(E(299));var n=!1,r="",s=Cd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Wl(e,1,!1,null,null,n,!1,r,s),e[Tt]=t.current,Dr(e.nodeType===8?e.parentNode:e),new Bl(t)};Ye.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(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=Ku(t),e=e===null?null:e.stateNode,e};Ye.flushSync=function(e){return gn(e)};Ye.hydrate=function(e,t,n){if(!go(t))throw Error(E(200));return vo(null,e,t,!0,n)};Ye.hydrateRoot=function(e,t,n){if(!$l(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Cd;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Ed(t,null,e,1,n??null,s,!1,o,i),e[Tt]=t.current,Dr(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 mo(t)};Ye.render=function(e,t,n){if(!go(t))throw Error(E(200));return vo(null,e,t,!1,n)};Ye.unmountComponentAtNode=function(e){if(!go(e))throw Error(E(40));return e._reactRootContainer?(gn(function(){vo(null,null,e,!1,function(){e._reactRootContainer=null,e[Tt]=null})}),!0):!1};Ye.unstable_batchedUpdates=Ll;Ye.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!go(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return vo(e,t,n,!1,r)};Ye.version="18.3.1-next-f1338f8080-20240426";function _d(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_d)}catch(e){console.error(e)}}_d(),_u.exports=Ye;var Xr=_u.exports,iu=Xr;ti.createRoot=iu.createRoot,ti.hydrateRoot=iu.hydrateRoot;var yo={exports:{}},zd={},Td={exports:{}},Nh="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ph=Nh,jh=Ph;function Rd(){}function Dd(){}Dd.resetWarningCache=Rd;var Eh=function(){function e(r,s,o,i,l,a){if(a!==jh){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:Dd,resetWarningCache:Rd};return n.PropTypes=n,n};Td.exports=Eh();var Od=Td.exports;function Md(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=Md(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function lu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Md(e))&&(r&&(r+=" "),r+=t);return r}const Ch=Object.freeze(Object.defineProperty({__proto__:null,clsx:lu,default:lu},Symbol.toStringTag,{value:"Module"})),_h=Gd(Ch);var ue={},kt={};Object.defineProperty(kt,"__esModule",{value:!0});kt.dontSetMe=Oh;kt.findInArray=zh;kt.int=Dh;kt.isFunction=Th;kt.isNum=Rh;function zh(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function Th(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function Rh(e){return typeof e=="number"&&!isNaN(e)}function Dh(e){return parseInt(e,10)}function Oh(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 wn={};Object.defineProperty(wn,"__esModule",{value:!0});wn.browserPrefixToKey=Ad;wn.browserPrefixToStyle=Mh;wn.default=void 0;wn.getPrefix=Ld;const Jo=["Moz","Webkit","O","ms"];function Ld(){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<Jo.length;r++)if(Ad(t,Jo[r])in n)return Jo[r];return""}function Ad(e,t){return t?"".concat(t).concat(Lh(e)):e}function Mh(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function Lh(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}wn.default=Ld();Object.defineProperty(ue,"__esModule",{value:!0});ue.addClassName=Wd;ue.addEvent=Fh;ue.addUserSelectStyles=Kh;ue.createCSSTransform=Vh;ue.createSVGTransform=Xh;ue.getTouch=Qh;ue.getTouchIdentifier=Yh;ue.getTranslation=Hl;ue.innerHeight=$h;ue.innerWidth=Hh;ue.matchesSelector=Fd;ue.matchesSelectorAndParentsTo=Ih;ue.offsetXYFromParent=bh;ue.outerHeight=Uh;ue.outerWidth=Bh;ue.removeClassName=Ud;ue.removeEvent=Wh;ue.removeUserSelectStyles=Gh;var Xe=kt,au=Ah(wn);function Id(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Id=function(r){return r?n:t})(e)}function Ah(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Id(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 fs="";function Fd(e,t){return fs||(fs=(0,Xe.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,Xe.isFunction)(e[n])})),(0,Xe.isFunction)(e[fs])?e[fs](t):!1}function Ih(e,t,n){let r=e;do{if(Fd(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function Fh(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 Wh(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 Uh(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Xe.int)(n.borderTopWidth),t+=(0,Xe.int)(n.borderBottomWidth),t}function Bh(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Xe.int)(n.borderLeftWidth),t+=(0,Xe.int)(n.borderRightWidth),t}function $h(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Xe.int)(n.paddingTop),t-=(0,Xe.int)(n.paddingBottom),t}function Hh(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Xe.int)(n.paddingLeft),t-=(0,Xe.int)(n.paddingRight),t}function bh(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 Vh(e,t){const n=Hl(e,t,"px");return{[(0,au.browserPrefixToKey)("transform",au.default)]:n}}function Xh(e,t){return Hl(e,t,"")}function Hl(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),l="".concat(typeof t.y=="string"?t.y:t.y+n);o="translate(".concat(i,", ").concat(l,")")+o}return o}function Qh(e,t){return e.targetTouches&&(0,Xe.findInArray)(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&(0,Xe.findInArray)(e.changedTouches,n=>t===n.identifier)}function Yh(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function Kh(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&&Wd(e.body,"react-draggable-transparent-selection")}function Gh(e){if(e)try{if(e.body&&Ud(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 Wd(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Ud(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.canDragX=qh;Nt.canDragY=em;Nt.createCoreData=nm;Nt.createDraggableData=rm;Nt.getBoundPosition=Jh;Nt.getControlPosition=tm;Nt.snapToGrid=Zh;var $e=kt,Ln=ue;function Jh(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:sm(r);const s=bl(e);if(typeof r=="string"){const{ownerDocument:o}=s,i=o.defaultView;let l;if(r==="parent"?l=s.parentNode:l=o.querySelector(r),!(l instanceof i.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const a=l,c=i.getComputedStyle(s),m=i.getComputedStyle(a);r={left:-s.offsetLeft+(0,$e.int)(m.paddingLeft)+(0,$e.int)(c.marginLeft),top:-s.offsetTop+(0,$e.int)(m.paddingTop)+(0,$e.int)(c.marginTop),right:(0,Ln.innerWidth)(a)-(0,Ln.outerWidth)(s)-s.offsetLeft+(0,$e.int)(m.paddingRight)-(0,$e.int)(c.marginRight),bottom:(0,Ln.innerHeight)(a)-(0,Ln.outerHeight)(s)-s.offsetTop+(0,$e.int)(m.paddingBottom)-(0,$e.int)(c.marginBottom)}}return(0,$e.isNum)(r.right)&&(t=Math.min(t,r.right)),(0,$e.isNum)(r.bottom)&&(n=Math.min(n,r.bottom)),(0,$e.isNum)(r.left)&&(t=Math.max(t,r.left)),(0,$e.isNum)(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Zh(e,t,n){const r=Math.round(t/e[0])*e[0],s=Math.round(n/e[1])*e[1];return[r,s]}function qh(e){return e.props.axis==="both"||e.props.axis==="x"}function em(e){return e.props.axis==="both"||e.props.axis==="y"}function tm(e,t,n){const r=typeof t=="number"?(0,Ln.getTouch)(e,t):null;if(typeof t=="number"&&!r)return null;const s=bl(n),o=n.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,Ln.offsetXYFromParent)(r||e,o,n.props.scale)}function nm(e,t,n){const r=!(0,$e.isNum)(e.lastX),s=bl(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 rm(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 sm(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function bl(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var wo={},So={};Object.defineProperty(So,"__esModule",{value:!0});So.default=om;function om(){}Object.defineProperty(wo,"__esModule",{value:!0});wo.default=void 0;var Zo=lm(j),Le=Vl(Od),im=Vl(Xr),je=ue,It=Nt,qo=kt,ar=Vl(So);function Vl(e){return e&&e.__esModule?e:{default:e}}function Bd(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Bd=function(r){return r?n:t})(e)}function lm(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Bd(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 ze(e,t,n){return t=am(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function am(e){var t=um(e,"string");return typeof t=="symbol"?t:String(t)}function um(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 it={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let Ft=it.mouse,xo=class extends Zo.Component{constructor(){super(...arguments),ze(this,"dragging",!1),ze(this,"lastX",NaN),ze(this,"lastY",NaN),ze(this,"touchIdentifier",null),ze(this,"mounted",!1),ze(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,je.matchesSelectorAndParentsTo)(t.target,this.props.handle,n)||this.props.cancel&&(0,je.matchesSelectorAndParentsTo)(t.target,this.props.cancel,n))return;t.type==="touchstart"&&t.preventDefault();const s=(0,je.getTouchIdentifier)(t);this.touchIdentifier=s;const o=(0,It.getControlPosition)(t,s,this);if(o==null)return;const{x:i,y:l}=o,a=(0,It.createCoreData)(this,i,l);(0,ar.default)("DraggableCore: handleDragStart: %j",a),(0,ar.default)("calling",this.props.onStart),!(this.props.onStart(t,a)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,je.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=l,(0,je.addEvent)(r,Ft.move,this.handleDrag),(0,je.addEvent)(r,Ft.stop,this.handleDragStop))}),ze(this,"handleDrag",t=>{const n=(0,It.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:s}=n;if(Array.isArray(this.props.grid)){let l=r-this.lastX,a=s-this.lastY;if([l,a]=(0,It.snapToGrid)(this.props.grid,l,a),!l&&!a)return;r=this.lastX+l,s=this.lastY+a}const o=(0,It.createCoreData)(this,r,s);if((0,ar.default)("DraggableCore: handleDrag: %j",o),this.props.onDrag(t,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const a=document.createEvent("MouseEvents");a.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(a)}return}this.lastX=r,this.lastY=s}),ze(this,"handleDragStop",t=>{if(!this.dragging)return;const n=(0,It.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||0,c=s-this.lastY||0;[a,c]=(0,It.snapToGrid)(this.props.grid,a,c),r=this.lastX+a,s=this.lastY+c}const o=(0,It.createCoreData)(this,r,s);if(this.props.onStop(t,o)===!1||this.mounted===!1)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,je.removeUserSelectStyles)(l.ownerDocument),(0,ar.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,ar.default)("DraggableCore: Removing handlers"),(0,je.removeEvent)(l.ownerDocument,Ft.move,this.handleDrag),(0,je.removeEvent)(l.ownerDocument,Ft.stop,this.handleDragStop))}),ze(this,"onMouseDown",t=>(Ft=it.mouse,this.handleDragStart(t))),ze(this,"onMouseUp",t=>(Ft=it.mouse,this.handleDragStop(t))),ze(this,"onTouchStart",t=>(Ft=it.touch,this.handleDragStart(t))),ze(this,"onTouchEnd",t=>(Ft=it.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,je.addEvent)(t,it.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:n}=t;(0,je.removeEvent)(n,it.mouse.move,this.handleDrag),(0,je.removeEvent)(n,it.touch.move,this.handleDrag),(0,je.removeEvent)(n,it.mouse.stop,this.handleDragStop),(0,je.removeEvent)(n,it.touch.stop,this.handleDragStop),(0,je.removeEvent)(t,it.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,je.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:im.default.findDOMNode(this)}render(){return Zo.cloneElement(Zo.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};wo.default=xo;ze(xo,"displayName","DraggableCore");ze(xo,"propTypes",{allowAnyClick:Le.default.bool,children:Le.default.node.isRequired,disabled:Le.default.bool,enableUserSelectHack:Le.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:Le.default.arrayOf(Le.default.number),handle:Le.default.string,cancel:Le.default.string,nodeRef:Le.default.object,onStart:Le.default.func,onDrag:Le.default.func,onStop:Le.default.func,onMouseDown:Le.default.func,scale:Le.default.number,className:qo.dontSetMe,style:qo.dontSetMe,transform:qo.dontSetMe});ze(xo,"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 a.default}}),e.default=void 0;var t=g(j),n=m(Od),r=m(Xr),s=m(_h),o=ue,i=Nt,l=kt,a=m(wo),c=m(So);function m(d){return d&&d.__esModule?d:{default:d}}function h(d){if(typeof WeakMap!="function")return null;var f=new WeakMap,y=new WeakMap;return(h=function(w){return w?y: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 y=h(f);if(y&&y.has(d))return y.get(d);var w={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in d)if(k!=="default"&&Object.prototype.hasOwnProperty.call(d,k)){var _=P?Object.getOwnPropertyDescriptor(d,k):null;_&&(_.get||_.set)?Object.defineProperty(w,k,_):w[k]=d[k]}return w.default=d,y&&y.set(d,w),w}function S(){return S=Object.assign?Object.assign.bind():function(d){for(var f=1;f<arguments.length;f++){var y=arguments[f];for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(d[w]=y[w])}return d},S.apply(this,arguments)}function x(d,f,y){return f=v(f),f in d?Object.defineProperty(d,f,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[f]=y,d}function v(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 y=d[Symbol.toPrimitive];if(y!==void 0){var w=y.call(d,f);if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(d)}class p extends t.Component{static getDerivedStateFromProps(f,y){let{position:w}=f,{prevPropsPosition:P}=y;return w&&(!P||w.x!==P.x||w.y!==P.y)?((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:w,prevPropsPosition:P}),{x:w.x,y:w.y,prevPropsPosition:{...w}}):null}constructor(f){super(f),x(this,"onDragStart",(y,w)=>{if((0,c.default)("Draggable: onDragStart: %j",w),this.props.onStart(y,(0,i.createDraggableData)(this,w))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),x(this,"onDrag",(y,w)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",w);const P=(0,i.createDraggableData)(this,w),k={x:P.x,y:P.y,slackX:0,slackY:0};if(this.props.bounds){const{x:A,y:T}=k;k.x+=this.state.slackX,k.y+=this.state.slackY;const[$,b]=(0,i.getBoundPosition)(this,k.x,k.y);k.x=$,k.y=b,k.slackX=this.state.slackX+(A-k.x),k.slackY=this.state.slackY+(T-k.y),P.x=k.x,P.y=k.y,P.deltaX=k.x-this.state.x,P.deltaY=k.y-this.state.y}if(this.props.onDrag(y,P)===!1)return!1;this.setState(k)}),x(this,"onDragStop",(y,w)=>{if(!this.state.dragging||this.props.onStop(y,(0,i.createDraggableData)(this,w))===!1)return!1;(0,c.default)("Draggable: onDragStop: %j",w);const k={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:A,y:T}=this.props.position;k.x=A,k.y=T}this.setState(k)}),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,y;return(f=(y=this.props)===null||y===void 0||(y=y.nodeRef)===null||y===void 0?void 0:y.current)!==null&&f!==void 0?f:r.default.findDOMNode(this)}render(){const{axis:f,bounds:y,children:w,defaultPosition:P,defaultClassName:k,defaultClassNameDragging:_,defaultClassNameDragged:A,position:T,positionOffset:$,scale:b,...G}=this.props;let F={},H=null;const ie=!!!T||this.state.dragging,z=T||P,I={x:(0,i.canDragX)(this)&&ie?this.state.x:z.x,y:(0,i.canDragY)(this)&&ie?this.state.y:z.y};this.state.isElementSVG?H=(0,o.createSVGTransform)(I,$):F=(0,o.createCSSTransform)(I,$);const R=(0,s.default)(w.props.className||"",k,{[_]:this.state.dragging,[A]:this.state.dragged});return t.createElement(a.default,S({},G,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(w),{className:R,style:{...w.props.style,...F},transform:H}))}}e.default=p,x(p,"displayName","Draggable"),x(p,"propTypes",{...a.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:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),x(p,"defaultProps",{...a.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(zd);const{default:$d,DraggableCore:cm}=zd;yo.exports=$d;yo.exports.default=$d;yo.exports.DraggableCore=cm;var dm=yo.exports;const fm=gu(dm);var de=function(){return de=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},de.apply(this,arguments)},uu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},cu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ps={width:"20px",height:"20px",position:"absolute",zIndex:1},pm={top:de(de({},uu),{top:"-5px"}),right:de(de({},cu),{left:void 0,right:"-5px"}),bottom:de(de({},uu),{top:void 0,bottom:"-5px"}),left:de(de({},cu),{left:"-5px"}),topRight:de(de({},ps),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:de(de({},ps),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:de(de({},ps),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:de(de({},ps),{left:"-10px",top:"-10px",cursor:"nw-resize"})},hm=j.memo(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,s=e.replaceStyles,o=e.className,i=j.useCallback(function(c){t(c,n)},[t,n]),l=j.useCallback(function(c){t(c,n)},[t,n]),a=j.useMemo(function(){return de(de({position:"absolute",userSelect:"none"},pm[n]),s??{})},[s,n]);return u.jsx("div",{className:o||void 0,style:a,onMouseDown:i,onTouchStart:l,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)}}(),yt=function(){return yt=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},yt.apply(this,arguments)},gm={width:"auto",height:"auto"},hs=function(e,t,n){return Math.max(Math.min(e,n),t)},du=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},xn=function(e,t){return new RegExp(e,"i").test(t)},ms=function(e){return!!(e.touches&&e.touches.length)},vm=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},fu=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,i,l){return Math.abs(i-e)<Math.abs(t[o]-e)?l:o},0),s=Math.abs(t[r]-e);return n===0||s<n?t[r]:e},ei=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")},gs=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},ym=function(e,t,n,r,s,o,i){return r=gs(r,e.width,t,n),s=gs(s,e.height,t,n),o=gs(o,e.width,t,n),i=gs(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)}},wm=function(e){return Array.isArray(e)?e:[e,e]},Sm=["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"],pu="__resizable_base__",xm=function(e){mm(t,e);function t(n){var r,s,o,i,l=e.call(this,n)||this;return l.ratio=1,l.resizable=null,l.parentLeft=0,l.parentTop=0,l.resizableLeft=0,l.resizableRight=0,l.resizableTop=0,l.resizableBottom=0,l.targetLeft=0,l.targetTop=0,l.delta={width:0,height:0},l.appendBase=function(){if(!l.resizable||!l.window)return null;var a=l.parentNode;if(!a)return null;var c=l.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(pu):c.className+=pu,a.appendChild(c),c},l.removeBase=function(a){var c=l.parentNode;c&&c.removeChild(a)},l.state={isResizing:!1,width:(s=(r=l.propsSize)===null||r===void 0?void 0:r.width)!==null&&s!==void 0?s:"auto",height:(i=(o=l.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},l.onResizeStart=l.onResizeStart.bind(l),l.onMouseMove=l.onMouseMove.bind(l),l.onMouseUp=l.onMouseUp.bind(l),l}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||gm},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(l){var a;if(typeof n.state[l]>"u"||n.state[l]==="auto")return"auto";if(n.propsSize&&n.propsSize[l]&&(!((a=n.propsSize[l])===null||a===void 0)&&a.toString().endsWith("%"))){if(n.state[l].toString().endsWith("%"))return n.state[l].toString();var c=n.getParentSize(),m=Number(n.state[l].toString().replace("px","")),h=m/c[l]*100;return"".concat(h,"%")}return ei(n.state[l])},o=r&&typeof r.width<"u"&&!this.state.isResizing?ei(r.width):s("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?ei(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&&xn("left",o),l=s&&xn("top",o),a,c;if(this.props.bounds==="parent"){var m=this.parentNode;m&&(a=i?this.resizableRight-this.parentLeft:m.offsetWidth+(this.parentLeft-this.resizableLeft),c=l?this.resizableBottom-this.parentTop:m.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(a=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(a=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return a&&Number.isFinite(a)&&(n=n&&n<a?n:a),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=wm(this.props.resizeRatio||1),i=o[0],l=o[1],a=this.state,c=a.direction,m=a.original,h=this.props,g=h.lockAspectRatio,S=h.lockAspectRatioExtraHeight,x=h.lockAspectRatioExtraWidth,v=m.width,C=m.height,p=S||0,d=x||0;return xn("right",c)&&(v=m.width+(n-m.x)*i/s,g&&(C=(v-d)/this.ratio+p)),xn("left",c)&&(v=m.width-(n-m.x)*i/s,g&&(C=(v-d)/this.ratio+p)),xn("bottom",c)&&(C=m.height+(r-m.y)*l/s,g&&(v=(C-p)*this.ratio+d)),xn("top",c)&&(C=m.height-(r-m.y)*l/s,g&&(v=(C-p)*this.ratio+d)),{newWidth:v,newHeight:C}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,s,o){var i=this.props,l=i.lockAspectRatio,a=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,m=typeof o.width>"u"?10:o.width,h=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=a||0,v=c||0;if(l){var C=(g-x)*this.ratio+v,p=(S-x)*this.ratio+v,d=(m-v)/this.ratio+x,f=(h-v)/this.ratio+x,y=Math.max(m,C),w=Math.min(h,p),P=Math.max(g,d),k=Math.min(S,f);n=hs(n,y,w),r=hs(r,P,k)}else n=hs(n,m,h),r=hs(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(),l=i.left,a=i.top,c=i.right,m=i.bottom;this.resizableLeft=l*n,this.resizableRight=c*n,this.resizableTop=a*n,this.resizableBottom=m*n}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var s=0,o=0;if(n.nativeEvent&&vm(n.nativeEvent)?(s=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&ms(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 l,a=this.window.getComputedStyle(this.resizable);if(a.flexBasis!=="auto"){var c=this.parentNode;if(c){var m=this.window.getComputedStyle(c).flexDirection;this.flexDir=m.startsWith("row")?"row":"column",l=a.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:s,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:yt(yt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:l};this.setState(h)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&ms(n))try{n.preventDefault(),n.stopPropagation()}catch{}var s=this.props,o=s.maxWidth,i=s.maxHeight,l=s.minWidth,a=s.minHeight,c=ms(n)?n.touches[0].clientX:n.clientX,m=ms(n)?n.touches[0].clientY:n.clientY,h=this.state,g=h.direction,S=h.original,x=h.width,v=h.height,C=this.getParentSize(),p=ym(C,this.window.innerWidth,this.window.innerHeight,o,i,l,a);o=p.maxWidth,i=p.maxHeight,l=p.minWidth,a=p.minHeight;var d=this.calculateNewSizeFromDirection(c,m),f=d.newHeight,y=d.newWidth,w=this.calculateNewMaxFromBoundary(o,i);this.props.snap&&this.props.snap.x&&(y=fu(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(f=fu(f,this.props.snap.y,this.props.snapGap));var P=this.calculateNewSizeFromAspectRatio(y,f,{width:w.maxWidth,height:w.maxHeight},{width:l,height:a});if(y=P.newWidth,f=P.newHeight,this.props.grid){var k=du(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),_=du(f,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),A=this.props.snapGap||0,T=A===0||Math.abs(k-y)<=A?k:y,$=A===0||Math.abs(_-f)<=A?_:f;y=T,f=$}var b={width:y-S.width,height:f-S.height};if(this.delta=b,x&&typeof x=="string"){if(x.endsWith("%")){var G=y/C.width*100;y="".concat(G,"%")}else if(x.endsWith("vw")){var F=y/this.window.innerWidth*100;y="".concat(F,"vw")}else if(x.endsWith("vh")){var H=y/this.window.innerHeight*100;y="".concat(H,"vh")}}if(v&&typeof v=="string"){if(v.endsWith("%")){var G=f/C.height*100;f="".concat(G,"%")}else if(v.endsWith("vw")){var F=f/this.window.innerWidth*100;f="".concat(F,"vw")}else if(v.endsWith("vh")){var H=f/this.window.innerHeight*100;f="".concat(H,"vh")}}var X={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(f,"height")};this.flexDir==="row"?X.flexBasis=X.width:this.flexDir==="column"&&(X.flexBasis=X.height);var ie=this.state.width!==X.width,z=this.state.height!==X.height,I=this.state.flexBasis!==X.flexBasis,R=ie||z||I;R&&Xr.flushSync(function(){r.setState(X)}),this.props.onResize&&R&&this.props.onResize(n,g,this.resizable,b)}},t.prototype.onMouseUp=function(n){var r,s,o=this.state,i=o.isResizing,l=o.direction;o.original,!(!i||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(n,l,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:yt(yt({},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,l=r.handleWrapperStyle,a=r.handleWrapperClass,c=r.handleComponent;if(!s)return null;var m=Object.keys(s).map(function(h){return s[h]!==!1?u.jsx(hm,{direction:h,onResizeStart:n.onResizeStart,replaceStyles:o&&o[h],className:i&&i[h],children:c&&c[h]?c[h]:null},h):null});return u.jsx("div",{className:a,style:l,children:m})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,l){return Sm.indexOf(l)!==-1||(i[l]=n.props[l]),i},{}),s=yt(yt(yt({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 u.jsxs(o,yt({style:s,className:this.props.className},r,{ref:function(i){i&&(n.resizable=i)},children:[this.state.isResizing&&u.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}(j.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 Yi=function(e,t){return Yi=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])},Yi(e,t)};function km(e,t){Yi(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var pe=function(){return pe=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},pe.apply(this,arguments)};function Nm(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 Pm={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},jm=function(e){return{bottom:e,bottomLeft:e,bottomRight:e,left:e,right:e,top:e,topLeft:e,topRight:e}},Em=function(e){km(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,l=o.y;this.draggable.setState({x:i-r,y:l-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,l;if(this.props.bounds==="parent")l=o;else if(this.props.bounds==="body"){var a=o.getBoundingClientRect(),c=a.left,m=a.top,h=document.body.getBoundingClientRect(),g=-(c-o.offsetLeft*i-h.left)/i,S=-(m-o.offsetTop*i-h.top)/i,x=(document.body.offsetWidth-this.resizable.size.width*i)/i+g,v=(document.body.offsetHeight-this.resizable.size.height*i)/i+S;return this.setState({bounds:{top:S,right:x,bottom:v,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,y=-(d-o.offsetTop*i)/i,x=(window.innerWidth-this.resizable.size.width*i)/i+f,v=(window.innerHeight-this.resizable.size.height*i)/i+y;return this.setState({bounds:{top:y,right:x,bottom:v,left:f}})}else typeof this.props.bounds=="string"?l=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(l=this.props.bounds);if(!(!(l instanceof HTMLElement)||!(o instanceof HTMLElement))){var w=l.getBoundingClientRect(),P=w.left,k=w.top,_=o.getBoundingClientRect(),A=_.left,T=_.top,$=(P-A)/i,b=k-T;if(this.resizable){this.updateOffsetFromParent();var G=this.offsetFromParent;this.setState({bounds:{top:b-G.top,right:$+(l.offsetWidth-this.resizable.size.width)-G.left/i,bottom:b+(l.offsetHeight-this.resizable.size.height)-G.top,left:$-G.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,pe(pe({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDrag(n,pe(pe({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDrag(n,pe(pe({},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,pe(pe({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDragStop(n,pe(pe({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDragStop(n,pe(pe({},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,l=this.getDraggablePosition();if(this.resizingPosition={x:l.x+i.left,y:l.y+i.top},this.originalPosition=l,this.props.bounds){var a=this.getParent(),c=void 0;this.props.bounds==="parent"?c=a: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 m=this.getSelfElement();if(m instanceof Element&&(c instanceof HTMLElement||c===window)&&a instanceof HTMLElement){var h=this.getMaxSizesFromProps(),g=h.maxWidth,S=h.maxHeight,x=this.getParentSize();if(g&&typeof g=="string")if(g.endsWith("%")){var v=Number(g.replace("%",""))/100;g=x.width*v}else g.endsWith("px")&&(g=Number(g.replace("px","")));if(S&&typeof S=="string")if(S.endsWith("%")){var v=Number(S.replace("%",""))/100;S=x.height*v}else S.endsWith("px")&&(S=Number(S.replace("px","")));var C=m.getBoundingClientRect(),p=C.left,d=C.top,f=this.props.bounds==="window"?{left:0,top:0}:c.getBoundingClientRect(),y=f.left,w=f.top,P=this.getOffsetWidth(c),k=this.getOffsetHeight(c),_=r.toLowerCase().endsWith("left"),A=r.toLowerCase().endsWith("right"),T=r.startsWith("top"),$=r.startsWith("bottom");if((_||T)&&this.resizable){var b=(p-y)/o+this.resizable.size.width;this.setState({maxWidth:b>Number(g)?g:b})}if(A||this.props.lockAspectRatio&&!_&&!T){var b=P+(y-p)/o;this.setState({maxWidth:b>Number(g)?g:b})}if((T||_)&&this.resizable){var b=(d-w)/o+this.resizable.size.height;this.setState({maxHeight:b>Number(S)?S:b})}if($||this.props.lockAspectRatio&&!T&&!_){var b=k+(w-d)/o;this.setState({maxHeight:b>Number(S)?S:b})}}}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,l={x:this.originalPosition.x,y:this.originalPosition.y},a=-o.width,c=-o.height,m=["top","left","topLeft","bottomLeft","topRight"];m.includes(r)&&(r==="bottomLeft"?l.x+=a:(r==="topRight"||(l.x+=a),l.y+=c));var h=this.draggable.state;(l.x!==h.x||l.y!==h.y)&&Xr.flushSync(function(){i.draggable.setState(l)}),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(),l=i.maxWidth,a=i.maxHeight;this.setState({maxWidth:l,maxHeight:a}),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,l=o.top,a=s.getBoundingClientRect(),c=this.getDraggablePosition(),m=r.scrollLeft,h=r.scrollTop;this.offsetFromParent={left:a.left-i+m-c.x*n,top:a.top-l+h-c.y*n}},t.prototype.render=function(){var n=this,r=this.props,s=r.disableDragging,o=r.style,i=r.dragHandleClassName,l=r.position,a=r.onMouseDown,c=r.onMouseUp,m=r.dragAxis,h=r.dragGrid,g=r.bounds,S=r.enableUserSelectHack,x=r.cancel,v=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,y=r.resizeGrid,w=r.resizeHandleWrapperClass,P=r.resizeHandleWrapperStyle,k=r.scale,_=r.allowAnyClick,A=r.dragPositionOffset,T=Nm(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?pe({},this.props.default):void 0;delete T.default;var b=s||i?{cursor:"auto"}:{cursor:"move"},G=pe(pe(pe({},Pm),b),o),F=this.offsetFromParent,H=F.left,X=F.top,ie;l&&(ie={x:l.x-H,y:l.y-X});var z=this.state.resizing?void 0:ie,I=this.state.resizing?"both":m;return j.createElement(fm,{ref:function(R){R&&(n.draggable=R)},handle:i?".".concat(i):void 0,defaultPosition:$,onMouseDown:a,onMouseUp:c,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:I,disabled:s,grid:h,bounds:g?this.state.bounds:void 0,position:z,enableUserSelectHack:S,cancel:x,scale:k,allowAnyClick:_,nodeRef:this.resizableElement,positionOffset:A},j.createElement(xm,pe({},T,{ref:function(R){R&&(n.resizable=R,n.resizableElement.current=R.resizable)},defaultSize:$,size:this.props.size,enable:typeof f=="boolean"?jm(f):f,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:G,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:y,handleWrapperClass:w,handleWrapperStyle:P,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:C,handleClasses:p,handleComponent:d,scale:this.props.scale}),v))},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}(j.PureComponent);function Cm(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 _m=({projects:e,selectedProject:t,onSelectProject:n,loading:r,runningProcesses:s=[],keyboardFocusedIndex:o=-1,onKeyboardFocusChange:i,gitBranches:l})=>{if(r)return u.jsx("div",{className:"project-list-loading",children:u.jsx("p",{children:"Loading projects..."})});if(e.length===0)return u.jsxs("div",{className:"project-list-empty",children:[u.jsx("p",{children:"No projects yet"}),u.jsx("p",{className:"hint",children:"Add a project to get started"})]});const a=to.useRef(null);return u.jsx("div",{ref:a,className:"project-list",role:"listbox","aria-label":"Projects",tabIndex:0,onFocus:c=>{o<0&&e.length>0&&i&&i(0)},onBlur:c=>{var m;i&&!((m=a.current)!=null&&m.contains(c.relatedTarget))&&i(-1)},children:e.map((c,m)=>{const h=(t==null?void 0:t.id)===c.id,g=o===m,S=s.filter(C=>C.projectPath===c.path),x=S.length>0,v=Array.from(new Set(S.map(C=>C.port).filter(C=>C!=null))).sort((C,p)=>C-p);return u.jsxs("div",{className:`project-item ${h?"selected":""} ${x?"running":""} ${g?"keyboard-focused":""}`,onClick:()=>n(c),role:"option","aria-selected":h,tabIndex:m===0?0:-1,onFocus:C=>{C.currentTarget.scrollIntoView({block:"nearest",behavior:"smooth"}),i&&i(m)},ref:C=>{g&&C&&i&&C.scrollIntoView({block:"nearest",behavior:"smooth"})},children:[u.jsx("div",{className:"project-item-header",children:u.jsxs("h3",{className:"project-name",children:[x&&u.jsx("span",{className:"running-indicator-dot",children:"●"}),c.name,l&&l.has(c.id)&&l.get(c.id)&&u.jsx("span",{className:"git-branch-badge",children:l.get(c.id)})]})}),u.jsx("p",{className:"project-path",children:c.description||Cm(c.path)}),c.tags&&c.tags.length>0&&u.jsx("div",{className:"project-tags",children:c.tags.map(C=>u.jsx("span",{className:"project-tag",children:C},C))}),x&&u.jsxs("div",{className:"project-meta",children:[u.jsxs("span",{className:"running-count",children:[S.length," running"]}),v.length>0&&u.jsx("div",{className:"running-ports",children:v.map(C=>u.jsxs("span",{className:"port-badge",children:[":",C]},C))})]})]},c.id)})})},zm=({urls:e,onOpenUrl:t})=>e.length===0?null:u.jsxs("div",{className:"project-urls-section",children:[u.jsx("div",{className:"section-header",children:u.jsxs("h3",{children:["Detected URLs (",e.length,")"]})}),u.jsx("div",{className:"urls-list",children:e.map((n,r)=>u.jsxs("div",{className:"url-item",children:[u.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"url-text",onClick:s=>{s.preventDefault(),window.electronAPI.openExternal(n)},children:n}),u.jsx("button",{onClick:()=>t(n),className:"btn btn-secondary btn-small",title:"Open in configured browser",children:"Open"})]},r))})]}),Tm=({project:e,onProjectUpdate:t,onRemoveProject:n,onOpenTerminal:r})=>{var Ql;const[s,o]=j.useState(!1),[i,l]=j.useState(e.name),[a,c]=j.useState(!1),[m,h]=j.useState(e.description||""),[g,S]=j.useState(null),[x,v]=j.useState(!1),[C,p]=j.useState([]),[d,f]=j.useState(!1),[y,w]=j.useState(new Set),[P,k]=j.useState([]),[_,A]=j.useState(!1),[T,$]=j.useState(!1),[b,G]=j.useState(""),[F,H]=j.useState([]),[X,ie]=j.useState(e.tags||[]),[z,I]=j.useState(null),[R,J]=j.useState(null),[le,Be]=j.useState(!1),[_e,rt]=j.useState("default"),[Me,Mt]=j.useState(new Map);j.useEffect(()=>{l(e.name),h(e.description||""),ie(e.tags||[]),O(),L(),Qr(),Zn(),qn(),U(),ko();const N=setInterval(()=>{Qr(),U()},5e3);return()=>clearInterval(N)},[e]);const ko=async()=>{try{const N=await Lt();if(!N)return;const M=await fetch(`${N}/projects/${e.id}/settings`);if(M.ok){const B=await M.json();rt(B.script_sort_order||"default")}}catch(N){console.error("Error loading project settings:",N)}},No=async N=>{try{const M=await Lt();if(!M)return;(await fetch(`${M}/projects/${e.id}/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({script_sort_order:N})})).ok&&rt(N)}catch(M){console.error("Error saving project settings:",M)}},Lt=async()=>{const N=[38124,38125,38126,38127,38128,3001];for(const M of N)try{if((await fetch(`http://localhost:${M}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${M}/api`}catch{continue}return null},Zn=async()=>{try{const N=await Lt();if(!N){H([]);return}const M=await fetch(`${N}/projects/tags`);if(!M.ok){console.error("Failed to load tags:",M.status),H([]);return}const B=await M.json();H(Array.isArray(B)?B:[])}catch(N){console.error("Error loading tags:",N),H([])}},qn=async()=>{try{const N=await window.electronAPI.getSettings();I(N.editor)}catch(N){console.error("Error loading editor settings:",N)}},O=async()=>{try{v(!0);const N=await window.electronAPI.getProjectScripts(e.path);S(N)}catch(N){console.error("Error loading scripts:",N),S(null)}finally{v(!1)}},L=async()=>{try{f(!0);const N=await window.electronAPI.getProjectPorts(e.id);p(N)}catch(N){console.error("Error loading ports:",N),p([])}finally{f(!1)}},U=async()=>{try{Be(!0);const N=await window.electronAPI.getLatestTestResult(e.id);J(N)}catch{J(null)}finally{Be(!1)}},W=async()=>{if(!i.trim()||i===e.name){o(!1),l(e.name);return}try{const N=await window.electronAPI.renameProject(e.id,i.trim());o(!1),t&&t(N)}catch(N){console.error("Error renaming project:",N),alert("Failed to rename project"),l(e.name)}},ne=async()=>{const N=m.trim()||null;if(N===(e.description||"")){c(!1),h(e.description||"");return}try{const M=await window.electronAPI.updateProject(e.id,{description:N});c(!1),t&&t(M)}catch(M){console.error("Error updating description:",M),alert("Failed to update description"),h(e.description||"")}},xe=async()=>{const N=b.trim();if(!N||X.includes(N)){G("");return}const M=[...X,N];try{const B=await window.electronAPI.updateProject(e.id,{tags:M});ie(M),G(""),t&&t(B),await Zn(),qn()}catch(B){console.error("Error adding tag:",B),alert("Failed to add tag")}},pt=async N=>{const M=X.filter(B=>B!==N);try{const B=await window.electronAPI.updateProject(e.id,{tags:M});ie(M),t&&t(B),await Zn(),qn()}catch(B){console.error("Error removing tag:",B),alert("Failed to remove tag")}},Ge=F.filter(N=>!X.includes(N)&&N.toLowerCase().includes(b.toLowerCase())),Qr=async()=>{try{A(!0);const M=(await window.electronAPI.getRunningProcesses()).filter(ht=>ht.projectPath===e.path);k(M);const B=new Set(M.map(ht=>ht.scriptName));w(B)}catch(N){console.error("Error loading running processes:",N)}finally{A(!1)}},Vd=async(N,M=!0)=>{try{w(B=>new Set(B).add(N)),Mt(B=>new Map(B).set(N,Date.now())),await window.electronAPI.runScript(e.path,N,[],M),M&&setTimeout(()=>{Qr()},1e3)}catch(B){console.error("Error running script:",B),alert(`Failed to run script: ${B instanceof Error?B.message:String(B)}`)}finally{w(B=>{const ht=new Set(B);return ht.delete(N),ht})}},Xd=async N=>{try{await window.electronAPI.stopScript(N)?await Qr():alert("Failed to stop script")}catch(M){console.error("Error stopping script:",M),alert(`Failed to stop script: ${M instanceof Error?M.message:String(M)}`)}},Qd=async N=>{try{await window.electronAPI.openUrl(N)}catch(M){console.error("Error opening URL:",M),alert(`Failed to open URL: ${M instanceof Error?M.message:String(M)}`)}},Xl=j.useMemo(()=>{const N=new Set;for(const M of P)if(M.detectedUrls&&Array.isArray(M.detectedUrls))for(const B of M.detectedUrls)N.add(B);for(const M of C){const B=`http://localhost:${M.port}`;N.add(B)}return Array.from(N).sort()},[P,C]),Yd=j.useMemo(()=>{if(!(g!=null&&g.scripts))return[];const N=[...g.scripts];return _e==="alphabetical"?N.sort((M,B)=>M.name.localeCompare(B.name)):_e==="last-used"&&N.sort((M,B)=>{const ht=Me.get(M.name)||0;return(Me.get(B.name)||0)-ht}),N},[g==null?void 0:g.scripts,_e,Me]);return e.last_scanned&&new Date(e.last_scanned*1e3).toLocaleString(),u.jsxs("div",{className:"project-details",children:[u.jsxs("div",{className:"project-details-header",children:[u.jsxs("div",{children:[s?u.jsx("div",{className:"project-name-edit",children:u.jsx("input",{type:"text",value:i,onChange:N=>l(N.target.value),onBlur:W,onKeyDown:N=>{N.key==="Enter"?W():N.key==="Escape"&&(o(!1),l(e.name))},className:"project-name-input",autoFocus:!0})}):u.jsx("h2",{onClick:()=>o(!0),className:"project-name-editable",title:"Click to rename",children:e.name}),a?u.jsx("div",{className:"project-description-edit",children:u.jsx("textarea",{value:m,onChange:N=>h(N.target.value),onBlur:ne,onKeyDown:N=>{N.key==="Enter"&&(N.metaKey||N.ctrlKey)?ne():N.key==="Escape"&&(c(!1),h(e.description||""))},className:"project-description-input",placeholder:"Add a description...",autoFocus:!0,rows:2})}):u.jsxs("div",{children:[u.jsx("p",{className:"project-description",onClick:()=>c(!0),title:"Click to edit description",children:e.description||"Click to add a description..."}),u.jsx("p",{className:"project-path",children:e.path})]})]}),u.jsxs("div",{className:"header-actions-group",children:[u.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"}),u.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"})]})]}),u.jsxs("div",{className:"project-stats",children:[u.jsxs("div",{className:"stat-card",children:[u.jsx("div",{className:"stat-value",children:C.length}),u.jsx("div",{className:"stat-label",children:"Ports"})]}),u.jsxs("div",{className:"stat-card",children:[u.jsx("div",{className:"stat-value",children:((Ql=g==null?void 0:g.scripts)==null?void 0:Ql.length)||0}),u.jsx("div",{className:"stat-label",children:"Scripts"})]})]}),R&&u.jsxs("div",{className:"test-results-section",children:[u.jsxs("div",{className:"section-header",children:[u.jsx("h3",{children:"Latest Test Results"}),u.jsx("span",{className:"test-timestamp",children:new Date(R.timestamp*1e3).toLocaleString()})]}),u.jsxs("div",{className:"test-results-content",children:[u.jsxs("div",{className:"test-stats-grid",children:[u.jsxs("div",{className:"test-stat passed",children:[u.jsx("div",{className:"test-stat-icon",children:"✓"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:R.passed}),u.jsx("div",{className:"test-stat-label",children:"Passed"})]})]}),u.jsxs("div",{className:"test-stat failed",children:[u.jsx("div",{className:"test-stat-icon",children:"✗"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:R.failed}),u.jsx("div",{className:"test-stat-label",children:"Failed"})]})]}),R.skipped>0&&u.jsxs("div",{className:"test-stat skipped",children:[u.jsx("div",{className:"test-stat-icon",children:"⊘"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:R.skipped}),u.jsx("div",{className:"test-stat-label",children:"Skipped"})]})]}),u.jsxs("div",{className:"test-stat total",children:[u.jsx("div",{className:"test-stat-icon",children:"∑"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:R.total}),u.jsx("div",{className:"test-stat-label",children:"Total"})]})]})]}),u.jsxs("div",{className:"test-meta",children:[R.framework&&u.jsx("span",{className:"test-framework-badge",children:R.framework}),R.duration&&u.jsxs("span",{className:"test-duration",children:["⏱ ",(R.duration/1e3).toFixed(2),"s"]}),R.coverage&&u.jsxs("span",{className:"test-coverage",children:["📊 ",R.coverage.toFixed(1),"% coverage"]}),u.jsxs("span",{className:"test-script-name",children:["Script: ",R.script_name]})]})]})]}),u.jsxs("div",{className:"tags-section",children:[u.jsx("div",{className:"section-header",children:u.jsx("h3",{children:"Tags"})}),u.jsx("div",{className:"tags-content",children:u.jsxs("div",{className:"tags-list",children:[X.map(N=>u.jsxs("span",{className:"tag-item",children:[N,u.jsx("button",{onClick:()=>pt(N),className:"tag-remove",title:"Remove tag",children:"×"})]},N)),T?u.jsxs("div",{className:"tag-input-wrapper",children:[u.jsx("input",{type:"text",value:b,onChange:N=>G(N.target.value),onKeyDown:N=>{N.key==="Enter"?xe():N.key==="Escape"&&($(!1),G(""))},onBlur:()=>{xe(),$(!1)},className:"tag-input",placeholder:"Add tag...",autoFocus:!0}),Ge.length>0&&b&&u.jsx("div",{className:"tag-suggestions",children:Ge.slice(0,5).map(N=>u.jsx("div",{className:"tag-suggestion",onMouseDown:M=>{M.preventDefault(),G(N)},children:N},N))})]}):u.jsx("button",{onClick:()=>$(!0),className:"tag-add-btn",title:"Add tag",children:"+ Add Tag"})]})})]}),Xl.length>0&&u.jsx(zm,{urls:Xl,onOpenUrl:Qd}),g&&u.jsxs("div",{className:"scripts-section",children:[u.jsxs("div",{className:"section-header",children:[u.jsxs("h3",{children:["Available Scripts (",g.scripts.length,")"]}),u.jsxs("div",{className:"section-header-right",children:[u.jsx("span",{className:"project-type-badge",children:g.type}),u.jsxs("select",{value:_e,onChange:N=>No(N.target.value),className:"script-sort-select",children:[u.jsx("option",{value:"default",children:"Default"}),u.jsx("option",{value:"alphabetical",children:"Alphabetically"}),u.jsx("option",{value:"last-used",children:"Last Used"})]})]})]}),x?u.jsx("div",{className:"loading-state",children:"Loading scripts..."}):g.scripts.length===0?u.jsx("div",{className:"no-scripts",children:"No scripts found in this project."}):u.jsx("div",{className:"scripts-list",children:Yd.map(N=>{const M=P.filter(ke=>ke.scriptName===N.name),B=M.length>0,ht=C.filter(ke=>ke.script_name===N.name).map(ke=>ke.port),Yl=Array.from(new Set(ht)).sort((ke,Yr)=>ke-Yr);return u.jsxs("div",{className:`script-item ${B?"running":""}`,children:[u.jsxs("div",{className:"script-info",children:[u.jsxs("div",{className:"script-header",children:[u.jsx("span",{className:"script-name",children:N.name}),u.jsx("span",{className:"script-command",children:N.command}),u.jsx("span",{className:"script-runner",children:N.runner})]}),B&&u.jsx("div",{className:"script-process-info",children:M.map(ke=>{const Yr=Math.floor((Date.now()-ke.startedAt)/1e3),Kl=Math.floor(Yr/60),Gl=Yr%60,Kd=Kl>0?`${Kl}m ${Gl}s`:`${Gl}s`,Jl=ke.detectedPorts&&ke.detectedPorts.length>0?ke.detectedPorts:Yl;return u.jsxs("div",{className:"process-badge",children:[u.jsx("span",{className:"process-indicator",children:"●"}),u.jsxs("span",{className:"process-pid",children:["PID: ",ke.pid]}),u.jsx("span",{className:"process-uptime",children:Kd}),Jl.length>0&&u.jsxs("span",{className:"process-port",children:[":",Jl.join(", ")]}),u.jsx("button",{onClick:Po=>{Po.stopPropagation(),r&&r(ke.pid,N.name,e.name)},className:"btn btn-secondary btn-tiny",title:"View terminal output",children:u.jsx("span",{className:"terminal-icon",children:"⌘"})}),u.jsx("button",{onClick:Po=>{Po.stopPropagation(),Xd(ke.pid)},className:"btn btn-danger btn-tiny",title:"Stop process",children:"Stop"})]},ke.pid)})})]}),u.jsx("div",{className:"script-actions",children:!B&&u.jsx("button",{onClick:()=>Vd(N.name,!0),className:"btn btn-secondary btn-small",title:"Run in background",children:"Run"})})]},N.name)})})]}),u.jsxs("div",{className:"jenkins-placeholder",children:[u.jsx("h3",{children:"Jenkins Integration"}),u.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."})]}),n&&u.jsxs("div",{className:"danger-zone",children:[u.jsx("h3",{children:"Danger Zone"}),u.jsx("p",{className:"danger-zone-text",children:"Once you delete a project, there is no going back. Please be certain."}),u.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 n(e.id)},className:"btn btn-danger",title:"Remove project",children:"Delete Project"})]})]})},Rm=({onAdd:e,onClose:t})=>{const[n,r]=j.useState(""),[s,o]=j.useState(!1),i=async()=>{try{const a=await window.electronAPI.selectDirectory();a&&r(a)}catch(a){console.error("Error selecting directory:",a)}},l=async a=>{if(a.preventDefault(),!n.trim()){alert("Please select a project directory");return}try{o(!0),await e(n)}catch{}finally{o(!1)}};return u.jsx("div",{className:"modal-overlay",onClick:t,children:u.jsxs("div",{className:"modal-content",onClick:a=>a.stopPropagation(),children:[u.jsxs("div",{className:"modal-header",children:[u.jsx("h2",{children:"Add Project"}),u.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),u.jsxs("form",{onSubmit:l,children:[u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"project-path",children:"Project Directory"}),u.jsxs("div",{className:"path-input-group",children:[u.jsx("input",{id:"project-path",type:"text",value:n,onChange:a=>r(a.target.value),placeholder:"Select or enter project directory path",disabled:s}),u.jsx("button",{type:"button",onClick:i,disabled:s,className:"btn btn-secondary",children:"Browse"})]})]}),u.jsxs("div",{className:"modal-actions",children:[u.jsx("button",{type:"button",onClick:t,disabled:s,className:"btn btn-secondary",children:"Cancel"}),u.jsx("button",{type:"submit",disabled:s||!n.trim(),className:"btn btn-primary",children:s?"Adding...":"Add Project"})]})]})]})})},Dm=({onSearchChange:e,onSortChange:t,searchInputRef:n})=>{const[r,s]=j.useState(""),[o,i]=j.useState("all"),[l,a]=j.useState("name-asc"),[c,m]=j.useState(!1),h=j.useRef(null),g=j.useRef(null),S=n||g,x=p=>{const d=p.target.value;s(d),e(d,"all")},v=p=>{a(p),m(!1),t&&t(p)};j.useEffect(()=>{const p=d=>{h.current&&!h.current.contains(d.target)&&m(!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 u.jsx("div",{className:"project-search",children:u.jsxs("div",{className:"search-input-group",ref:h,children:[u.jsxs("div",{className:"search-input-wrapper",children:[u.jsx("input",{ref:S,type:"text",placeholder:"Search projects... (⌘/)",value:r,onChange:x,className:"search-input"}),u.jsx("button",{className:"sort-icon-btn",onClick:()=>m(!c),title:"Sort options",tabIndex:0,children:u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:u.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),c&&u.jsx("div",{className:"sort-menu",children:C.map(p=>u.jsxs("div",{className:`sort-menu-item ${l===p.value?"active":""}`,onClick:()=>v(p.value),children:[p.label,l===p.value&&u.jsx("span",{className:"checkmark",children:"✓"})]},p.value))})]})})},Om=({onClose:e})=>{const[t,n]=j.useState({editor:{type:"vscode"},browser:{type:"chrome"}}),[r,s]=j.useState(!0),[o,i]=j.useState(!1),[l,a]=j.useState(!1),[c,m]=j.useState(!1);j.useEffect(()=>{const v=C=>{C.key==="Escape"&&e()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[e]),j.useEffect(()=>{h()},[]);const h=async()=>{try{s(!0);const v=await window.electronAPI.getSettings();n(v)}catch(v){console.error("Error loading settings:",v)}finally{s(!1)}},g=async()=>{try{i(!0),await window.electronAPI.saveSettings(t),e()}catch(v){console.error("Error saving settings:",v),alert(`Failed to save settings: ${v instanceof Error?v.message:String(v)}`)}finally{i(!1)}},S=v=>{n({...t,editor:{type:v,customPath:v==="custom"?t.editor.customPath:void 0}})},x=v=>{n({...t,browser:{type:v,customPath:v==="custom"?t.browser.customPath:void 0}})};return r?u.jsx("div",{className:"settings-overlay",children:u.jsx("div",{className:"settings-modal",children:u.jsx("div",{className:"loading-state",children:"Loading settings..."})})}):u.jsx("div",{className:"settings-overlay",onClick:e,children:u.jsxs("div",{className:"settings-modal",onClick:v=>v.stopPropagation(),children:[u.jsxs("div",{className:"settings-header",children:[u.jsx("h2",{children:"Settings"}),u.jsx("button",{onClick:e,className:"settings-close-btn",title:"Close",children:"×"})]}),u.jsxs("div",{className:"settings-content",children:[u.jsxs("div",{className:"settings-section",children:[u.jsx("h3",{children:"Editor"}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Editor Type"}),u.jsxs("select",{value:t.editor.type,onChange:v=>S(v.target.value),className:"settings-select",children:[u.jsx("option",{value:"vscode",children:"VS Code"}),u.jsx("option",{value:"cursor",children:"Cursor"}),u.jsx("option",{value:"windsurf",children:"Windsurf"}),u.jsx("option",{value:"zed",children:"Zed"}),u.jsx("option",{value:"custom",children:"Custom"})]})]}),t.editor.type==="custom"&&u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Custom Editor Path"}),u.jsx("input",{type:"text",value:t.editor.customPath||"",onChange:v=>n({...t,editor:{...t.editor,customPath:v.target.value}}),placeholder:"/path/to/editor",className:"settings-input"})]})]}),u.jsxs("div",{className:"settings-section",children:[u.jsx("h3",{children:"Browser"}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Browser Type"}),u.jsxs("select",{value:t.browser.type,onChange:v=>x(v.target.value),className:"settings-select",children:[u.jsx("option",{value:"chrome",children:"Chrome"}),u.jsx("option",{value:"firefox",children:"Firefox"}),u.jsx("option",{value:"safari",children:"Safari"}),u.jsx("option",{value:"edge",children:"Edge"}),u.jsx("option",{value:"custom",children:"Custom"})]})]}),t.browser.type==="custom"&&u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Custom Browser Path"}),u.jsx("input",{type:"text",value:t.browser.customPath||"",onChange:v=>n({...t,browser:{...t.browser,customPath:v.target.value}}),placeholder:"/path/to/browser",className:"settings-input"})]})]}),u.jsxs("div",{className:"settings-section",children:[u.jsx("h3",{children:"Backup & Restore"}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Create Backup"}),u.jsx("p",{className:"settings-description",children:"Create a backup of all PROJAX data"}),u.jsx("button",{onClick:async()=>{try{a(!0);const v=await window.electronAPI.selectDirectory();if(v){const C=await window.electronAPI.createBackup(v);alert(`Backup created successfully!
|
|
60
|
+
${C.backup_path}`)}}catch(v){alert(`Failed to create backup: ${v instanceof Error?v.message:String(v)}`)}finally{a(!1)}},disabled:l,className:"btn btn-secondary",children:l?"Creating...":"Create Backup"})]}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Restore from Backup"}),u.jsx("p",{className:"settings-description",children:"Restore PROJAX data from a backup file"}),u.jsx("button",{onClick:async()=>{if(confirm("This will overwrite your current PROJAX data. Continue?"))try{m(!0);const v=await window.electronAPI.selectFile({filters:[{name:"PROJAX Backup",extensions:["pbz"]}]});v&&(await window.electronAPI.restoreBackup(v),alert("Backup restored successfully! The app will refresh."),window.location.reload())}catch(v){alert(`Failed to restore backup: ${v instanceof Error?v.message:String(v)}`)}finally{m(!1)}},disabled:c,className:"btn btn-danger",children:c?"Restoring...":"Restore from Backup"})]})]})]}),u.jsxs("div",{className:"settings-footer",children:[u.jsx("button",{onClick:e,className:"btn btn-secondary",children:"Cancel"}),u.jsx("button",{onClick:g,disabled:o,className:"btn btn-primary",children:o?"Saving...":"Save"})]})]})})},Mm=({children:e})=>u.jsxs("div",{className:"app-header",children:[u.jsx("h1",{className:"app-logo",children:"PROJAX"}),e]}),Lm=({apiPort:e})=>{const[t,n]=j.useState(!1),[r,s]=j.useState(e||null),[o,i]=j.useState("...");return j.useEffect(()=>{(async()=>{try{const h=await window.electronAPI.getAppVersion();i(h)}catch(h){console.error("Failed to get app version:",h),i("3.3.24")}})();const a=async()=>{if(r)c(r);else try{const h=[38124,38125,38126,38127,38128];for(const g of h)try{if((await fetch(`http://localhost:${g}/health`)).ok){s(g),c(g);return}}catch{}}catch(h){console.error("Failed to detect API port:",h)}},c=async h=>{try{const g=await fetch(`http://localhost:${h}/health`);n(g.ok)}catch{n(!1)}};a();const m=setInterval(()=>{r&&c(r)},5e3);return()=>clearInterval(m)},[r]),u.jsx("div",{className:"status-bar",children:u.jsxs("div",{className:"status-bar-content",children:[u.jsxs("div",{className:"status-version",children:["v",o]}),u.jsxs("div",{className:"status-right",children:[u.jsxs("div",{className:"status-indicator",children:[u.jsx("span",{className:`status-dot ${t?"connected":"disconnected"}`}),u.jsx("span",{className:"status-text",children:t?"API Connected":"API Disconnected"})]}),r&&u.jsxs("div",{className:"api-port",children:["Port: ",r]})]})]})})},Am=({pid:e,scriptName:t,projectName:n,onClose:r})=>{const[s,o]=j.useState([]),[i,l]=j.useState(!1),a=j.useRef(null),[c,m]=j.useState(!0);j.useEffect(()=>{const x=v=>{v.key==="Escape"&&r()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),j.useEffect(()=>{(async()=>{try{await window.electronAPI.watchProcessOutput(e),l(!0)}catch(p){console.error("Failed to start watching process:",p),o(d=>[...d,`Error: Failed to connect to process ${e}`])}})();const v=(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}]`]),l(!1))};return window.electronAPI.onProcessOutput(v),window.electronAPI.onProcessExit(C),()=>{window.electronAPI.unwatchProcessOutput(e),window.electronAPI.removeProcessOutputListener(v),window.electronAPI.removeProcessExitListener(C)}},[e]),j.useEffect(()=>{c&&a.current&&(a.current.scrollTop=a.current.scrollHeight)},[s,c]);const h=()=>{if(a.current){const{scrollTop:x,scrollHeight:v,clientHeight:C}=a.current,p=v-x-C<50;m(p)}},g=()=>{o([])},S=()=>{a.current&&(a.current.scrollTop=a.current.scrollHeight,m(!0))};return u.jsxs("div",{className:"terminal-sidebar",children:[u.jsxs("div",{className:"terminal-header",children:[u.jsxs("div",{className:"terminal-title-row",children:[u.jsxs("div",{className:"terminal-title-content",children:[u.jsx("span",{className:`terminal-status-indicator ${i?"running":"stopped"}`,children:i?"●":"○"}),u.jsxs("div",{className:"terminal-info",children:[u.jsx("span",{className:"terminal-script",children:t}),u.jsx("span",{className:"terminal-project",children:n})]})]}),u.jsxs("div",{className:"terminal-meta",children:[u.jsx("span",{className:`terminal-status-badge ${i?"running":"stopped"}`,children:i?"Running":"Stopped"}),u.jsxs("span",{className:"terminal-pid",children:["PID: ",e]})]})]}),u.jsxs("div",{className:"terminal-toolbar",children:[u.jsx("button",{onClick:g,className:"btn btn-secondary btn-tiny",title:"Clear output",children:"Clear"}),!c&&u.jsx("button",{onClick:S,className:"btn btn-secondary btn-tiny",title:"Scroll to bottom",children:"↓ Bottom"}),u.jsx("button",{onClick:r,className:"btn btn-danger btn-tiny",title:"Close terminal",children:"Close"})]})]}),u.jsx("div",{ref:a,className:"terminal-output",onScroll:h,children:s.length===0?u.jsxs("div",{className:"terminal-empty",children:[u.jsx("div",{className:"terminal-empty-icon",children:"⌘"}),u.jsx("div",{className:"terminal-empty-text",children:"Waiting for output..."}),u.jsxs("div",{className:"terminal-empty-hint",children:["Process PID ",e]})]}):s.map((x,v)=>u.jsx("div",{className:"terminal-line",children:x},v))})]})},Im=({activeTab:e,onTabChange:t})=>u.jsxs("div",{className:"tab-bar",children:[u.jsx("button",{className:`tab-button ${e==="projects"?"active":""}`,onClick:()=>t("projects"),children:"Projects"}),u.jsx("button",{className:`tab-button ${e==="workspaces"?"active":""}`,onClick:()=>t("workspaces"),children:"Workspaces"})]});function Fm(e){const t=e.split("/").filter(Boolean);return t.length===0?e:t[t.length-1]}const Wm=({workspaces:e,selectedWorkspace:t,onSelectWorkspace:n,loading:r,keyboardFocusedIndex:s=-1,onKeyboardFocusChange:o})=>{if(r)return u.jsx("div",{className:"workspace-list-loading",children:u.jsx("p",{children:"Loading workspaces..."})});if(e.length===0)return u.jsxs("div",{className:"workspace-list-empty",children:[u.jsx("p",{children:"No workspaces yet"}),u.jsx("p",{className:"hint",children:"Add a workspace to get started"})]});const i=to.useRef(null);return u.jsx("div",{ref:i,className:"workspace-list",role:"listbox","aria-label":"Workspaces",tabIndex:0,onFocus:l=>{s<0&&e.length>0&&o&&o(0)},onBlur:l=>{var a;o&&!((a=i.current)!=null&&a.contains(l.relatedTarget))&&o(-1)},children:e.map((l,a)=>{const c=(t==null?void 0:t.id)===l.id,m=s===a;return u.jsxs("div",{className:`workspace-item ${c?"selected":""} ${m?"keyboard-focused":""}`,onClick:()=>n(l),role:"option","aria-selected":c,tabIndex:a===0?0:-1,onFocus:h=>{h.currentTarget.scrollIntoView({block:"nearest",behavior:"smooth"}),o&&o(a)},ref:h=>{m&&h&&o&&h.scrollIntoView({block:"nearest",behavior:"smooth"})},children:[u.jsx("div",{className:"workspace-item-header",children:u.jsx("h3",{className:"workspace-name",children:l.name})}),u.jsx("p",{className:"workspace-path",children:l.description||Fm(l.workspace_file_path)}),l.tags&&l.tags.length>0&&u.jsx("div",{className:"workspace-tags",children:l.tags.map(h=>u.jsx("span",{className:"workspace-tag",children:h},h))})]},l.id)})})},Um=({workspace:e,onWorkspaceUpdate:t,onRemoveWorkspace:n,onOpenWorkspace:r})=>{const[s,o]=j.useState(!1),[i,l]=j.useState(""),[a,c]=j.useState(!1),[m,h]=j.useState(""),[g,S]=j.useState(!1),[x,v]=j.useState(""),[C,p]=j.useState([]),[d,f]=j.useState([]),[y,w]=j.useState([]),[P,k]=j.useState(!1);j.useEffect(()=>{e&&(l(e.name),h(e.description||""),f(e.tags||[]),A(),_())},[e]);const _=async()=>{try{const F=await fetch("http://localhost:3001/api/projects/tags");if(F.ok){const H=await F.json();p(Array.isArray(H)?H:[])}}catch(F){console.error("Error loading tags:",F)}},A=async()=>{if(e)try{k(!0);const F=[38124,38125,38126,38127,38128,3001];let H="";for(const ie of F)try{if((await fetch(`http://localhost:${ie}/health`,{signal:AbortSignal.timeout(500)})).ok){H=`http://localhost:${ie}/api`;break}}catch{continue}if(!H){k(!1);return}const X=await fetch(`${H}/workspaces/${e.id}/projects`);if(X.ok){const ie=await X.json();w(ie)}}catch(F){console.error("Error loading workspace projects:",F)}finally{k(!1)}};if(!e)return u.jsx("div",{className:"workspace-details-empty",children:u.jsx("p",{children:"Select a workspace to view details"})});const T=async()=>{const F=[38124,38125,38126,38127,38128,3001];for(const H of F)try{if((await fetch(`http://localhost:${H}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${H}/api`}catch{continue}return null},$=async()=>{try{const F=await T();if(!F)return;const H=await fetch(`${F}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})});if(H.ok){const X=await H.json();t&&t(X),o(!1)}}catch(F){console.error("Error updating workspace name:",F)}},b=async()=>{try{const F=await T();if(!F)return;const H=await fetch(`${F}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:m})});if(H.ok){const X=await H.json();t&&t(X),c(!1)}}catch(F){console.error("Error updating workspace description:",F)}},G=()=>{r&&r(e)};return u.jsxs("div",{className:"workspace-details",children:[u.jsx("div",{className:"workspace-details-header",children:s?u.jsx("input",{type:"text",value:i,onChange:F=>l(F.target.value),onBlur:$,onKeyDown:F=>{F.key==="Enter"&&$(),F.key==="Escape"&&(l(e.name),o(!1))},autoFocus:!0,className:"workspace-name-input"}):u.jsx("h2",{className:"workspace-name",onClick:()=>o(!0),children:e.name})}),u.jsxs("div",{className:"workspace-details-section",children:[u.jsx("label",{children:"Description"}),a?u.jsx("textarea",{value:m,onChange:F=>h(F.target.value),onBlur:b,onKeyDown:F=>{F.key==="Escape"&&(h(e.description||""),c(!1))},autoFocus:!0,className:"workspace-description-input"}):u.jsx("p",{className:"workspace-description",onClick:()=>c(!0),children:e.description||"Click to add description"})]}),u.jsxs("div",{className:"workspace-details-section",children:[u.jsx("label",{children:"Workspace File"}),u.jsx("p",{className:"workspace-file-path",children:e.workspace_file_path})]}),u.jsxs("div",{className:"workspace-details-section",children:[u.jsxs("label",{children:["Projects (",y.length,")"]}),P?u.jsx("p",{children:"Loading projects..."}):y.length===0?u.jsx("p",{className:"empty-state",children:"No projects in this workspace"}):u.jsx("ul",{className:"workspace-projects-list",children:y.map(F=>u.jsx("li",{className:"workspace-project-item",children:F.project_path},F.id))})]}),u.jsxs("div",{className:"workspace-details-actions",children:[u.jsx("button",{className:"btn-primary",onClick:G,children:"Open Workspace"}),n&&u.jsx("button",{className:"btn-danger",onClick:()=>{confirm("Are you sure you want to remove this workspace?")&&n(e.id)},children:"Remove Workspace"})]})]})},Bm=({onAdd:e,onClose:t,existingProjects:n=[]})=>{const[r,s]=j.useState("import"),[o,i]=j.useState(""),[l,a]=j.useState(""),[c,m]=j.useState(""),[h,g]=j.useState(""),[S,x]=j.useState([]),[v,C]=j.useState(!1),p=async()=>{try{const w=await window.electronAPI.selectFile({filters:[{name:"Workspace Files",extensions:["code-workspace"]}]});w&&i(w)}catch(w){console.error("Error selecting workspace file:",w)}},d=async()=>{try{const w=await window.electronAPI.selectDirectory();w&&g(w)}catch(w){console.error("Error selecting output directory:",w)}},f=w=>{x(P=>P.includes(w)?P.filter(k=>k!==w):[...P,w])},y=async w=>{w.preventDefault();try{if(C(!0),r==="import"){if(!o){alert("Please select a workspace file");return}const P=[38124,38125,38126,38127,38128,3001];let k="";for(const T of P)try{if((await fetch(`http://localhost:${T}/health`,{signal:AbortSignal.timeout(500)})).ok){k=`http://localhost:${T}/api`;break}}catch{continue}if(!k)throw new Error("PROJAX API server not found");const _=await fetch(`${k}/workspaces/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_file_path:o})});if(!_.ok){const T=await _.json();throw new Error(T.error||"Failed to import workspace")}const A=await _.json();await e(A)}else{if(!l||!h){alert("Please provide workspace name and output directory");return}const P=[38124,38125,38126,38127,38128,3001];let k="";for(const T of P)try{if((await fetch(`http://localhost:${T}/health`,{signal:AbortSignal.timeout(500)})).ok){k=`http://localhost:${T}/api`;break}}catch{continue}if(!k)throw new Error("PROJAX API server not found");const _=await fetch(`${k}/workspaces/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,description:c,projects:S,output_path:h})});if(!_.ok){const T=await _.json();throw new Error(T.error||"Failed to create workspace")}const A=await _.json();await e(A)}}catch(P){alert(P instanceof Error?P.message:"Failed to add workspace")}finally{C(!1)}};return u.jsx("div",{className:"modal-overlay",onClick:t,children:u.jsxs("div",{className:"modal-content workspace-modal",onClick:w=>w.stopPropagation(),children:[u.jsxs("div",{className:"modal-header",children:[u.jsx("h2",{children:"Add Workspace"}),u.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),u.jsxs("div",{className:"workspace-mode-selector",children:[u.jsx("button",{type:"button",className:`mode-button ${r==="import"?"active":""}`,onClick:()=>s("import"),children:"Import from File"}),u.jsx("button",{type:"button",className:`mode-button ${r==="create"?"active":""}`,onClick:()=>s("create"),children:"Create New"})]}),u.jsxs("form",{onSubmit:y,children:[r==="import"?u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"workspace-file",children:"Workspace File (.code-workspace)"}),u.jsxs("div",{className:"path-input-group",children:[u.jsx("input",{id:"workspace-file",type:"text",value:o,onChange:w=>i(w.target.value),placeholder:"Select workspace file",disabled:v}),u.jsx("button",{type:"button",onClick:p,disabled:v,className:"btn btn-secondary",children:"Browse"})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"workspace-name",children:"Workspace Name *"}),u.jsx("input",{id:"workspace-name",type:"text",value:l,onChange:w=>a(w.target.value),placeholder:"My Workspace",disabled:v,required:!0})]}),u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"workspace-description",children:"Description"}),u.jsx("textarea",{id:"workspace-description",value:c,onChange:w=>m(w.target.value),placeholder:"Optional description",disabled:v,rows:3})]}),u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"output-path",children:"Output Directory *"}),u.jsxs("div",{className:"path-input-group",children:[u.jsx("input",{id:"output-path",type:"text",value:h,onChange:w=>g(w.target.value),placeholder:"Where to save the workspace file",disabled:v,required:!0}),u.jsx("button",{type:"button",onClick:d,disabled:v,className:"btn btn-secondary",children:"Browse"})]})]}),u.jsxs("div",{className:"form-group",children:[u.jsx("label",{children:"Add Projects"}),u.jsx("div",{className:"projects-selector",children:n.length===0?u.jsx("p",{className:"empty-state",children:"No projects available"}):n.map(w=>u.jsxs("label",{className:"project-checkbox",children:[u.jsx("input",{type:"checkbox",checked:S.includes(w.path),onChange:()=>f(w.path),disabled:v}),u.jsx("span",{children:w.name})]},w.id))})]})]}),u.jsxs("div",{className:"modal-actions",children:[u.jsx("button",{type:"button",onClick:t,disabled:v,className:"btn btn-secondary",children:"Cancel"}),u.jsx("button",{type:"submit",disabled:v,className:"btn btn-primary",children:v?"Adding...":r==="import"?"Import":"Create"})]})]})]})})};function $m(){const[e,t]=j.useState([]),[n,r]=j.useState(null),[s,o]=j.useState(!0),[i,l]=j.useState(!1),[a,c]=j.useState(""),[m,h]=j.useState("all"),[g,S]=j.useState("name-asc"),[x,v]=j.useState(!1),[C,p]=j.useState([]),[d,f]=j.useState(-1),y=to.useRef(null),[w,P]=j.useState(280),[k,_]=j.useState(550),[A,T]=j.useState(null),[$,b]=j.useState("projects"),[G,F]=j.useState([]),[H,X]=j.useState(null),[ie,z]=j.useState(!1),[I,R]=j.useState(!1),[J,le]=j.useState(new Map);j.useEffect(()=>{Be(),rt(),_e();const O=setInterval(()=>{_e(),Me()},5e3);return()=>clearInterval(O)},[]),j.useEffect(()=>{e.length>0&&Me()},[e]);const Be=async()=>{try{o(!0);const O=await window.electronAPI.getProjects();t(O),O.length===0&&console.log('No projects found. Use "Add Project" to add one.')}catch(O){console.error("Error loading projects:",O),alert(`Error loading projects: ${O instanceof Error?O.message:String(O)}
|
|
62
|
+
|
|
63
|
+
Check the console for more details.`)}finally{o(!1)}},_e=async()=>{try{const O=await window.electronAPI.getRunningProcesses();p(O)}catch(O){console.error("Error loading running processes:",O)}},rt=async()=>{try{z(!0);const O=[38124,38125,38126,38127,38128,3001];let L="";for(const W of O)try{if((await fetch(`http://localhost:${W}/health`,{signal:AbortSignal.timeout(500)})).ok){L=`http://localhost:${W}/api`;break}}catch{continue}if(!L){z(!1);return}const U=await fetch(`${L}/workspaces`);if(U.ok){const W=await U.json();F(W)}}catch(O){console.error("Error loading workspaces:",O)}finally{z(!1)}},Me=async()=>{try{const O=new Map,L=[38124,38125,38126,38127,38128,3001];let U="";for(const W of L)try{if((await fetch(`http://localhost:${W}/health`,{signal:AbortSignal.timeout(500)})).ok){U=`http://localhost:${W}/api`;break}}catch{continue}if(!U){for(const W of e)O.set(W.id,null);le(O);return}for(const W of e)try{const ne=await fetch(`${U}/projects/${W.id}/git-branch`);if(ne.ok){const xe=await ne.json();O.set(W.id,xe.branch)}else O.set(W.id,null)}catch{O.set(W.id,null)}le(O)}catch(O){console.error("Error updating git branches:",O)}},Mt=async O=>{try{const L=await window.electronAPI.addProject(O);await Be(),l(!1),await window.electronAPI.scanProject(L.id),await Be()}catch(L){console.error("Error adding project:",L),alert(L instanceof Error?L.message:"Failed to add project")}},ko=async O=>{if(confirm("Are you sure you want to remove this project?"))try{await window.electronAPI.removeProject(O),(n==null?void 0:n.id)===O&&r(null),await Be()}catch(L){console.error("Error removing project:",L),alert("Failed to remove project")}},No=(O,L)=>{c(O),h(L)},Lt=j.useMemo(()=>{let O=e;if(a.trim()){const U=a.toLowerCase().trim();O=e.filter(W=>{switch(m){case"name":return W.name.toLowerCase().includes(U);case"path":return W.path.toLowerCase().includes(U);case"ports":return!1;case"running":return U==="running"||U==="not running";case"all":default:return W.name.toLowerCase().includes(U)||W.path.toLowerCase().includes(U)||W.tags&&W.tags.some(ne=>ne.toLowerCase().includes(U))}})}const L=[...O];switch(g){case"name-asc":L.sort((U,W)=>U.name.localeCompare(W.name));break;case"name-desc":L.sort((U,W)=>W.name.localeCompare(U.name));break;case"recent":L.sort((U,W)=>(W.last_scanned||0)-(U.last_scanned||0));break;case"oldest":L.sort((U,W)=>U.created_at-W.created_at);break;case"running":L.sort((U,W)=>{const ne=C.filter(pt=>pt.projectPath===U.path).length;return C.filter(pt=>pt.projectPath===W.path).length-ne});break}return L},[e,a,m,g,C]);j.useEffect(()=>{const O=L=>{var pt;if((L.metaKey||L.ctrlKey)&&L.key===","){L.preventDefault(),v(!0);return}if((L.metaKey||L.ctrlKey)&&L.key==="/"){L.preventDefault(),(pt=y.current)==null||pt.focus();return}const U=L.target;if(U.tagName==="INPUT"||U.tagName==="TEXTAREA")return;const W=document.querySelector(".project-list"),ne=W&&(W===U||W.contains(U)||U.closest(".project-item")!==null);if(!ne&&(L.key==="ArrowDown"||L.key==="ArrowUp"))return;const xe=Lt;if(L.key==="ArrowDown"&&ne){L.preventDefault();const Ge=d<xe.length-1?d+1:xe.length>0?0:-1;Ge>=0&&(f(Ge),r(xe[Ge]))}else if(L.key==="ArrowUp"&&ne){L.preventDefault();const Ge=d>0?d-1:xe.length>0?xe.length-1:-1;Ge>=0&&(f(Ge),r(xe[Ge]))}else L.key==="Enter"&&d>=0&&d<xe.length&&ne?(L.preventDefault(),r(xe[d])):L.key==="Escape"&&ne&&f(-1)};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[d,Lt]),j.useEffect(()=>{f(-1)},[Lt.length,a]);const Zn=(O,L,U)=>{T({pid:O,scriptName:L,projectName:U})},qn=()=>{T(null)};return u.jsxs("div",{className:"app",children:[u.jsx(Mm,{children:u.jsxs("div",{className:"header-actions",children:[u.jsx("button",{type:"button",onClick:()=>v(!0),className:"btn-link",title:"Settings",children:"Settings"}),$==="projects"?u.jsx("button",{type:"button",onClick:()=>l(!0),className:"btn-link btn-link-primary",children:"+ Add Project"}):u.jsx("button",{type:"button",onClick:()=>R(!0),className:"btn-link btn-link-primary",children:"+ Add Workspace"})]})}),u.jsxs("div",{className:"app-content",children:[u.jsx(Em,{size:{width:w,height:"100%"},minWidth:200,maxWidth:600,disableDragging:!0,enableResizing:{right:!0},onResizeStop:(O,L,U,W)=>{const ne=w+W.width;P(Math.max(200,Math.min(600,ne)))},style:{position:"relative",display:"flex",flexDirection:"column"},resizeHandleStyles:{right:{width:"4px",right:"-2px",cursor:"col-resize",backgroundColor:"transparent"}},children:u.jsxs("aside",{className:"sidebar",style:{width:"100%",height:"100%"},children:[u.jsx(Im,{activeTab:$,onTabChange:b}),$==="projects"?u.jsxs(u.Fragment,{children:[u.jsx(Dm,{onSearchChange:No,onSortChange:S,searchInputRef:y}),u.jsx(_m,{projects:Lt,selectedProject:n,onSelectProject:r,loading:s,runningProcesses:C,keyboardFocusedIndex:d,onKeyboardFocusChange:f,gitBranches:J})]}):u.jsx(Wm,{workspaces:G,selectedWorkspace:H,onSelectWorkspace:X,loading:ie,keyboardFocusedIndex:d,onKeyboardFocusChange:f})]})}),u.jsx("main",{className:"main-content",children:$==="projects"?n?u.jsx(Tm,{project:n,onProjectUpdate:O=>{r(O),Be()},onRemoveProject:ko,onOpenTerminal:Zn}):u.jsxs("div",{className:"empty-state",children:[u.jsx("h2",{children:"Select a project to view details"}),u.jsx("p",{children:"Choose a project from the sidebar to see its test files and information."})]}):H?u.jsx(Um,{workspace:H,onWorkspaceUpdate:O=>{X(O),rt()},onRemoveWorkspace:async O=>{try{const L=[38124,38125,38126,38127,38128,3001];let U="";for(const W of L)try{if((await fetch(`http://localhost:${W}/health`,{signal:AbortSignal.timeout(500)})).ok){U=`http://localhost:${W}/api`;break}}catch{continue}U&&await fetch(`${U}/workspaces/${O}`,{method:"DELETE"}),(H==null?void 0:H.id)===O&&X(null),await rt()}catch(L){console.error("Error removing workspace:",L),alert("Failed to remove workspace")}},onOpenWorkspace:async O=>{try{await window.electronAPI.openInEditor(O.workspace_file_path)}catch(L){console.error("Error opening workspace:",L),alert("Failed to open workspace")}}}):u.jsxs("div",{className:"empty-state",children:[u.jsx("h2",{children:"Select a workspace to view details"}),u.jsx("p",{children:"Choose a workspace from the sidebar to see its projects and information."})]})}),A&&u.jsxs("div",{style:{width:`${k}px`,minWidth:"350px",maxWidth:"800px",height:"100%",position:"relative",flexShrink:0,display:"flex",flexDirection:"column"},children:[u.jsx("div",{style:{position:"absolute",left:"-2px",top:0,bottom:0,width:"4px",cursor:"col-resize",zIndex:10},onMouseDown:O=>{O.preventDefault();const L=O.clientX,U=k,W=xe=>{const pt=L-xe.clientX,Ge=Math.max(350,Math.min(800,U+pt));_(Ge)},ne=()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",ne)};document.addEventListener("mousemove",W),document.addEventListener("mouseup",ne)}}),u.jsx(Am,{pid:A.pid,scriptName:A.scriptName,projectName:A.projectName,onClose:qn})]})]}),i&&u.jsx(Rm,{onAdd:Mt,onClose:()=>l(!1)}),I&&u.jsx(Bm,{onAdd:async O=>{await rt(),R(!1),X(O)},onClose:()=>R(!1),existingProjects:e}),x&&u.jsx(Om,{onClose:()=>v(!1)}),u.jsx(Lm,{})]})}const Hd=[{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}],bd=[{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}],Hm=[{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]}],bm={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"}]},Vm=[{id:1,project_id:1,port:3e3,script_name:"dev",config_source:"package.json",last_detected:Date.now()-3e5,created_at:Date.now()-864e5}],ur=[{id:1,project_id:1,file_path:"/Users/dev/my-react-app/src/App.test.tsx",framework:"vitest",status:null,last_run:null},{id:2,project_id:1,file_path:"/Users/dev/my-react-app/src/components/Button.test.tsx",framework:"vitest",status:null,last_run:null}];let gt=[...Hd],cr=[...bd],ot=[...Hm],zs=new Map;zs.set(1,Vm);const Y=(e=300)=>new Promise(t=>setTimeout(t,e)),Xm=()=>({getProjects:async()=>(await Y(),[...gt]),addProject:async e=>{await Y();const t={id:Math.max(...gt.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 gt.push(t),t},removeProject:async e=>{await Y(),gt=gt.filter(t=>t.id!==e)},scanProject:async e=>{await Y(1e3);const t=gt.find(n=>n.id===e);if(!t)throw new Error("Project not found");return{project:t,testsFound:ur.filter(n=>n.project_id===e).length,tests:ur.filter(n=>n.project_id===e)}},scanAllProjects:async()=>(await Y(2e3),gt.map(e=>({project:e,testsFound:ur.filter(t=>t.project_id===e.id).length,tests:ur.filter(t=>t.project_id===e.id)}))),getTests:async e=>(await Y(),ur.filter(t=>t.project_id===e)),selectDirectory:async()=>(await Y(),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 Y();const n=gt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return n.name=t,{...n}},updateProject:async(e,t)=>{await Y();const n=gt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return t.description!==void 0&&(n.description=t.description),{...n}},getProjectScripts:async e=>(await Y(),bm),runScript:async(e,t,n,r)=>{await Y(500);const s=gt.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:[]};ot.push(o)}return{success:!0,background:r||!1}},scanProjectPorts:async e=>(await Y(1e3),zs.get(e)||[]),scanAllPorts:async()=>{await Y(2e3);const e={};return zs.forEach((t,n)=>{e[n]=t}),e},getProjectPorts:async e=>(await Y(),zs.get(e)||[]),getRunningProcesses:async()=>(await Y(),[...ot]),stopScript:async e=>(await Y(),ot=ot.filter(t=>t.pid!==e),!0),stopProject:async e=>{await Y();const t=ot.filter(n=>n.projectPath===e).length;return ot=ot.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 Y(),{editor:{type:"vscode"},browser:{type:"default"}}),saveSettings:async e=>{await Y(),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(()=>{ot.length>0&&e(null,{pid:ot[0].pid,data:`[MOCK] Process output line
|
|
64
|
+
`})},2e3)},onProcessExit:e=>{setTimeout(()=>{ot.length>0&&e(null,{pid:ot[0].pid,code:0})},1e4)},removeProcessOutputListener:e=>{console.log("[MOCK] removeProcessOutputListener")},removeProcessExitListener:e=>{console.log("[MOCK] removeProcessExitListener")},getAppVersion:async()=>(await Y(),"3.3.38"),getLatestTestResult:async e=>(await Y(),{id:1,project_id:e,passed:10,failed:2,skipped:1,duration:1234,timestamp:Date.now()}),getWorkspaces:async()=>(await Y(),[...cr]),addWorkspace:async e=>{await Y();const t={id:Math.max(...cr.map(n=>n.id),0)+1,...e,created_at:Date.now()};return cr.push(t),t},removeWorkspace:async e=>{await Y(),cr=cr.filter(t=>t.id!==e)},createBackup:async e=>(await Y(1e3),{success:!0,backup_path:e}),restoreBackup:async e=>(await Y(1e3),{success:!0}),showSaveDialog:async e=>(await Y(),{canceled:!1,filePath:"/tmp/backup.json"}),showOpenDialog:async e=>(await Y(),{canceled:!1,filePaths:["/tmp/backup.json"]}),selectFile:async e=>(await Y(),"/tmp/selected-file.json")});let kn=[...bd],hu=[...Hd],mu=new Map,Qm=new Map;const Ym=(e=200)=>new Promise(t=>setTimeout(t,e)),Km=()=>{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 Ym();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(kn),{status:200,headers:{"Content-Type":"application/json"}});if(o==="/api/workspaces/create"&&i==="POST"){const l=JSON.parse((n==null?void 0:n.body)||"{}"),a={id:Math.max(...kn.map(c=>c.id),0)+1,...l,created_at:Date.now()};return kn.push(a),new Response(JSON.stringify(a),{status:201,headers:{"Content-Type":"application/json"}})}if(o==="/api/workspaces/import"&&i==="POST")return JSON.parse((n==null?void 0: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 l=parseInt(o.split("/")[3]),a=Qm.get(l)||[],c=hu.filter(m=>a.includes(m.id));return new Response(JSON.stringify(c),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/workspaces/")&&i==="PUT"){const l=parseInt(o.split("/")[3]),a=JSON.parse((n==null?void 0:n.body)||"{}"),c=kn.find(m=>m.id===l);return c?(Object.assign(c,a),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 l=parseInt(o.split("/")[3]);return kn=kn.filter(a=>a.id!==l),new Response(JSON.stringify({success:!0}),{status:200,headers:{"Content-Type":"application/json"}})}if(o==="/api/projects/tags"&&i==="GET"){const l=new Set;return hu.forEach(a=>{(a.tags||[]).forEach(c=>l.add(c))}),new Response(JSON.stringify(Array.from(l)),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/settings")&&i==="GET"){const l=parseInt(o.split("/")[3]),a=mu.get(l)||{script_sort_order:"default"};return new Response(JSON.stringify(a),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/settings")&&i==="PUT"){const l=parseInt(o.split("/")[3]),a=JSON.parse((n==null?void 0:n.body)||"{}");return mu.set(l,a),new Response(JSON.stringify(a),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/git-branch")&&i==="GET"){const l=parseInt(o.split("/")[3]),a=["main","develop","feature/new-feature"];return new Response(JSON.stringify({branch:a[l%a.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"}}))}},Gm=()=>{var t,n,r;if(typeof window>"u")return;const e=((t=window.process)==null?void 0:t.type)==="renderer";console.log("[MOCK SETUP] Environment check:",{isInElectron:e,hasProcess:typeof window.process<"u",processType:(n=window.process)==null?void 0:n.type,hasElectronAPI:typeof window.electronAPI<"u"}),e?console.log("⚡ Running in Electron - using real APIs"):(console.log("🔧 Setting up mocks for browser development..."),window.electronAPI=Xm(),console.log("✅ Mock ElectronAPI initialized"),Km(),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((r=window.electronAPI)==null?void 0:r.getProjects)=="function"?console.log("✅ Verified: electronAPI.getProjects is available"):console.error("❌ ERROR: electronAPI.getProjects is not available!"))};Gm();ti.createRoot(document.getElementById("root")).render(u.jsx(to.StrictMode,{children:u.jsx($m,{})}));
|