projax 3.3.41 → 3.3.52

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