@shinobiapps/shinobi 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +3 -3
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +32 -0
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard-spa/assets/index-BjpafK0A.js +318 -0
- package/dist/dashboard-spa/assets/index-BjpafK0A.js.map +1 -0
- package/dist/dashboard-spa/assets/index-flpjYoXX.css +1 -0
- package/dist/dashboard-spa/index.html +2 -2
- package/dist/models/notes.d.ts +2 -0
- package/dist/models/notes.d.ts.map +1 -1
- package/dist/models/notes.js +5 -0
- package/dist/models/notes.js.map +1 -1
- package/dist/server/tools/notes.d.ts.map +1 -1
- package/dist/server/tools/notes.js +28 -2
- package/dist/server/tools/notes.js.map +1 -1
- package/dist/services/plugins/pages.d.ts +112 -0
- package/dist/services/plugins/pages.d.ts.map +1 -0
- package/dist/services/plugins/pages.js +237 -0
- package/dist/services/plugins/pages.js.map +1 -0
- package/dist/services/plugins/registry.d.ts +8 -0
- package/dist/services/plugins/registry.d.ts.map +1 -1
- package/dist/services/plugins/registry.js +12 -1
- package/dist/services/plugins/registry.js.map +1 -1
- package/dist/services/plugins/state.d.ts +1 -0
- package/dist/services/plugins/state.d.ts.map +1 -1
- package/dist/services/plugins/state.js.map +1 -1
- package/docs/plugin-development.md +65 -0
- package/package.json +1 -1
- package/dist/dashboard-spa/assets/index-CUJDeC3Q.js +0 -288
- package/dist/dashboard-spa/assets/index-CUJDeC3Q.js.map +0 -1
- package/dist/dashboard-spa/assets/index-zCn4MV4E.css +0 -1
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
function Wd(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(r,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function Hd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tu={exports:{}},Ls={},nu={exports:{}},I={};/**
|
|
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 wr=Symbol.for("react.element"),Qd=Symbol.for("react.portal"),Kd=Symbol.for("react.fragment"),Yd=Symbol.for("react.strict_mode"),Gd=Symbol.for("react.profiler"),Xd=Symbol.for("react.provider"),Jd=Symbol.for("react.context"),qd=Symbol.for("react.forward_ref"),Zd=Symbol.for("react.suspense"),ef=Symbol.for("react.memo"),tf=Symbol.for("react.lazy"),_a=Symbol.iterator;function nf(e){return e===null||typeof e!="object"?null:(e=_a&&e[_a]||e["@@iterator"],typeof e=="function"?e:null)}var ru={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},su=Object.assign,lu={};function Cn(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||ru}Cn.prototype.isReactComponent={};Cn.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")};Cn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function iu(){}iu.prototype=Cn.prototype;function bi(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||ru}var _i=bi.prototype=new iu;_i.constructor=bi;su(_i,Cn.prototype);_i.isPureReactComponent=!0;var Ea=Array.isArray,au=Object.prototype.hasOwnProperty,Ei={current:null},ou={key:!0,ref:!0,__self:!0,__source:!0};function uu(e,t,n){var r,l={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)au.call(t,r)&&!ou.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=n;else if(1<o){for(var u=Array(o),f=0;f<o;f++)u[f]=arguments[f+2];l.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)l[r]===void 0&&(l[r]=o[r]);return{$$typeof:wr,type:e,key:i,ref:a,props:l,_owner:Ei.current}}function rf(e,t){return{$$typeof:wr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ci(e){return typeof e=="object"&&e!==null&&e.$$typeof===wr}function sf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ca=/\/+/g;function el(e,t){return typeof e=="object"&&e!==null&&e.key!=null?sf(""+e.key):t.toString(36)}function Kr(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case wr:case Qd:a=!0}}if(a)return a=e,l=l(a),e=r===""?"."+el(a,0):r,Ea(l)?(n="",e!=null&&(n=e.replace(Ca,"$&/")+"/"),Kr(l,t,n,"",function(f){return f})):l!=null&&(Ci(l)&&(l=rf(l,n+(!l.key||a&&a.key===l.key?"":(""+l.key).replace(Ca,"$&/")+"/")+e)),t.push(l)),1;if(a=0,r=r===""?".":r+":",Ea(e))for(var o=0;o<e.length;o++){i=e[o];var u=r+el(i,o);a+=Kr(i,t,n,u,l)}else if(u=nf(e),typeof u=="function")for(e=u.call(e),o=0;!(i=e.next()).done;)i=i.value,u=r+el(i,o++),a+=Kr(i,t,n,u,l);else if(i==="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 a}function Tr(e,t,n){if(e==null)return e;var r=[],l=0;return Kr(e,r,"","",function(i){return t.call(n,i,l++)}),r}function lf(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 ye={current:null},Yr={transition:null},af={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:Yr,ReactCurrentOwner:Ei};function cu(){throw Error("act(...) is not supported in production builds of React.")}I.Children={map:Tr,forEach:function(e,t,n){Tr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Tr(e,function(){t++}),t},toArray:function(e){return Tr(e,function(t){return t})||[]},only:function(e){if(!Ci(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};I.Component=Cn;I.Fragment=Kd;I.Profiler=Gd;I.PureComponent=bi;I.StrictMode=Yd;I.Suspense=Zd;I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=af;I.act=cu;I.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=su({},e.props),l=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Ei.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)au.call(t,u)&&!ou.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var f=0;f<u;f++)o[f]=arguments[f+2];r.children=o}return{$$typeof:wr,type:e.type,key:l,ref:i,props:r,_owner:a}};I.createContext=function(e){return e={$$typeof:Jd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Xd,_context:e},e.Consumer=e};I.createElement=uu;I.createFactory=function(e){var t=uu.bind(null,e);return t.type=e,t};I.createRef=function(){return{current:null}};I.forwardRef=function(e){return{$$typeof:qd,render:e}};I.isValidElement=Ci;I.lazy=function(e){return{$$typeof:tf,_payload:{_status:-1,_result:e},_init:lf}};I.memo=function(e,t){return{$$typeof:ef,type:e,compare:t===void 0?null:t}};I.startTransition=function(e){var t=Yr.transition;Yr.transition={};try{e()}finally{Yr.transition=t}};I.unstable_act=cu;I.useCallback=function(e,t){return ye.current.useCallback(e,t)};I.useContext=function(e){return ye.current.useContext(e)};I.useDebugValue=function(){};I.useDeferredValue=function(e){return ye.current.useDeferredValue(e)};I.useEffect=function(e,t){return ye.current.useEffect(e,t)};I.useId=function(){return ye.current.useId()};I.useImperativeHandle=function(e,t,n){return ye.current.useImperativeHandle(e,t,n)};I.useInsertionEffect=function(e,t){return ye.current.useInsertionEffect(e,t)};I.useLayoutEffect=function(e,t){return ye.current.useLayoutEffect(e,t)};I.useMemo=function(e,t){return ye.current.useMemo(e,t)};I.useReducer=function(e,t,n){return ye.current.useReducer(e,t,n)};I.useRef=function(e){return ye.current.useRef(e)};I.useState=function(e){return ye.current.useState(e)};I.useSyncExternalStore=function(e,t,n){return ye.current.useSyncExternalStore(e,t,n)};I.useTransition=function(){return ye.current.useTransition()};I.version="18.3.1";nu.exports=I;var v=nu.exports;const of=Hd(v),uf=Wd({__proto__:null,default:of},[v]);/**
|
|
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 cf=v,df=Symbol.for("react.element"),ff=Symbol.for("react.fragment"),pf=Object.prototype.hasOwnProperty,mf=cf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hf={key:!0,ref:!0,__self:!0,__source:!0};function du(e,t,n){var r,l={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)pf.call(t,r)&&!hf.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:df,type:e,key:i,ref:a,props:l,_owner:mf.current}}Ls.Fragment=ff;Ls.jsx=du;Ls.jsxs=du;tu.exports=Ls;var s=tu.exports,fu={exports:{}},Le={},pu={exports:{}},mu={};/**
|
|
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,M){var O=T.length;T.push(M);e:for(;0<O;){var Z=O-1>>>1,ae=T[Z];if(0<l(ae,M))T[Z]=M,T[O]=ae,O=Z;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var M=T[0],O=T.pop();if(O!==M){T[0]=O;e:for(var Z=0,ae=T.length,Cr=ae>>>1;Z<Cr;){var zt=2*(Z+1)-1,Zs=T[zt],Ot=zt+1,Pr=T[Ot];if(0>l(Zs,O))Ot<ae&&0>l(Pr,Zs)?(T[Z]=Pr,T[Ot]=O,Z=Ot):(T[Z]=Zs,T[zt]=O,Z=zt);else if(Ot<ae&&0>l(Pr,O))T[Z]=Pr,T[Ot]=O,Z=Ot;else break e}}return M}function l(T,M){var O=T.sortIndex-M.sortIndex;return O!==0?O:T.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var u=[],f=[],p=1,d=null,x=3,w=!1,g=!1,j=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(T){for(var M=n(f);M!==null;){if(M.callback===null)r(f);else if(M.startTime<=T)r(f),M.sortIndex=M.expirationTime,t(u,M);else break;M=n(f)}}function N(T){if(j=!1,h(T),!g)if(n(u)!==null)g=!0,Js(b);else{var M=n(f);M!==null&&qs(N,M.startTime-T)}}function b(T,M){g=!1,j&&(j=!1,m(E),E=-1),w=!0;var O=x;try{for(h(M),d=n(u);d!==null&&(!(d.expirationTime>M)||T&&!C());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,x=d.priorityLevel;var ae=Z(d.expirationTime<=M);M=e.unstable_now(),typeof ae=="function"?d.callback=ae:d===n(u)&&r(u),h(M)}else r(u);d=n(u)}if(d!==null)var Cr=!0;else{var zt=n(f);zt!==null&&qs(N,zt.startTime-M),Cr=!1}return Cr}finally{d=null,x=O,w=!1}}var k=!1,_=null,E=-1,F=5,L=-1;function C(){return!(e.unstable_now()-L<F)}function ie(){if(_!==null){var T=e.unstable_now();L=T;var M=!0;try{M=_(!0,T)}finally{M?Mn():(k=!1,_=null)}}else k=!1}var Mn;if(typeof c=="function")Mn=function(){c(ie)};else if(typeof MessageChannel<"u"){var ba=new MessageChannel,Vd=ba.port2;ba.port1.onmessage=ie,Mn=function(){Vd.postMessage(null)}}else Mn=function(){y(ie,0)};function Js(T){_=T,k||(k=!0,Mn())}function qs(T,M){E=y(function(){T(e.unstable_now())},M)}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(){g||w||(g=!0,Js(b))},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"):F=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(x){case 1:case 2:case 3:var M=3;break;default:M=x}var O=x;x=M;try{return T()}finally{x=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,M){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var O=x;x=T;try{return M()}finally{x=O}},e.unstable_scheduleCallback=function(T,M,O){var Z=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?Z+O:Z):O=Z,T){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=O+ae,T={id:p++,callback:M,priorityLevel:T,startTime:O,expirationTime:ae,sortIndex:-1},O>Z?(T.sortIndex=O,t(f,T),n(u)===null&&T===n(f)&&(j?(m(E),E=-1):j=!0,qs(N,O-Z))):(T.sortIndex=ae,t(u,T),g||w||(g=!0,Js(b))),T},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(T){var M=x;return function(){var O=x;x=M;try{return T.apply(this,arguments)}finally{x=O}}}})(mu);pu.exports=mu;var xf=pu.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var vf=v,Te=xf;function S(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 hu=new Set,tr={};function Gt(e,t){jn(e,t),jn(e+"Capture",t)}function jn(e,t){for(tr[e]=t,e=0;e<t.length;e++)hu.add(t[e])}var rt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),El=Object.prototype.hasOwnProperty,gf=/^[: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]*$/,Pa={},Ta={};function yf(e){return El.call(Ta,e)?!0:El.call(Pa,e)?!1:gf.test(e)?Ta[e]=!0:(Pa[e]=!0,!1)}function jf(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 wf(e,t,n,r){if(t===null||typeof t>"u"||jf(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 je(e,t,n,r,l,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){fe[e]=new je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];fe[t]=new je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){fe[e]=new je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){fe[e]=new je(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){fe[e]=new je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){fe[e]=new je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){fe[e]=new je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){fe[e]=new je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){fe[e]=new je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pi=/[\-:]([a-z])/g;function Ti(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(Pi,Ti);fe[t]=new je(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(Pi,Ti);fe[t]=new je(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(Pi,Ti);fe[t]=new je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){fe[e]=new je(e,1,!1,e.toLowerCase(),null,!1,!1)});fe.xlinkHref=new je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){fe[e]=new je(e,1,!1,e.toLowerCase(),null,!0,!0)});function Li(e,t,n,r){var l=fe.hasOwnProperty(t)?fe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(wf(t,n,l,r)&&(n=null),r||l===null?yf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ot=vf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Lr=Symbol.for("react.element"),tn=Symbol.for("react.portal"),nn=Symbol.for("react.fragment"),Mi=Symbol.for("react.strict_mode"),Cl=Symbol.for("react.profiler"),xu=Symbol.for("react.provider"),vu=Symbol.for("react.context"),Ri=Symbol.for("react.forward_ref"),Pl=Symbol.for("react.suspense"),Tl=Symbol.for("react.suspense_list"),zi=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),gu=Symbol.for("react.offscreen"),La=Symbol.iterator;function Rn(e){return e===null||typeof e!="object"?null:(e=La&&e[La]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,tl;function Bn(e){if(tl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);tl=t&&t[1]||""}return`
|
|
34
|
-
`+tl+e}var nl=!1;function rl(e,t){if(!e||nl)return"";nl=!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(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var l=f.stack.split(`
|
|
35
|
-
`),i=r.stack.split(`
|
|
36
|
-
`),a=l.length-1,o=i.length-1;1<=a&&0<=o&&l[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(l[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||l[a]!==i[o]){var u=`
|
|
37
|
-
`+l[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{nl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bn(e):""}function Nf(e){switch(e.tag){case 5:return Bn(e.type);case 16:return Bn("Lazy");case 13:return Bn("Suspense");case 19:return Bn("SuspenseList");case 0:case 2:case 15:return e=rl(e.type,!1),e;case 11:return e=rl(e.type.render,!1),e;case 1:return e=rl(e.type,!0),e;default:return""}}function Ll(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 nn:return"Fragment";case tn:return"Portal";case Cl:return"Profiler";case Mi:return"StrictMode";case Pl:return"Suspense";case Tl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vu:return(e.displayName||"Context")+".Consumer";case xu:return(e._context.displayName||"Context")+".Provider";case Ri:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zi:return t=e.displayName||null,t!==null?t:Ll(e.type)||"Memo";case dt:t=e._payload,e=e._init;try{return Ll(e(t))}catch{}}return null}function kf(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 Ll(t);case 8:return t===Mi?"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 Et(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sf(e){var t=yu(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mr(e){e._valueTracker||(e._valueTracker=Sf(e))}function ju(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ls(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ml(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ma(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Et(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 wu(e,t){t=t.checked,t!=null&&Li(e,"checked",t,!1)}function Rl(e,t){wu(e,t);var n=Et(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")?zl(e,t.type,n):t.hasOwnProperty("defaultValue")&&zl(e,t.type,Et(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ra(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 zl(e,t,n){(t!=="number"||ls(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vn=Array.isArray;function mn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Ol(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(S(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function za(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(S(92));if(Vn(n)){if(1<n.length)throw Error(S(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Et(n)}}function Nu(e,t){var n=Et(t.value),r=Et(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 Oa(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 Il(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 Rr,Su=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Rr=Rr||document.createElement("div"),Rr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Rr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qn={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},bf=["Webkit","ms","Moz","O"];Object.keys(Qn).forEach(function(e){bf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qn[t]=Qn[e]})});function bu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qn.hasOwnProperty(e)&&Qn[e]?(""+t).trim():t+"px"}function _u(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=bu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var _f=G({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 $l(e,t){if(t){if(_f[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function Dl(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 Fl=null;function Oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Al=null,hn=null,xn=null;function Ia(e){if(e=Sr(e)){if(typeof Al!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Is(t),Al(e.stateNode,e.type,t))}}function Eu(e){hn?xn?xn.push(e):xn=[e]:hn=e}function Cu(){if(hn){var e=hn,t=xn;if(xn=hn=null,Ia(e),t)for(e=0;e<t.length;e++)Ia(t[e])}}function Pu(e,t){return e(t)}function Tu(){}var sl=!1;function Lu(e,t,n){if(sl)return e(t,n);sl=!0;try{return Pu(e,t,n)}finally{sl=!1,(hn!==null||xn!==null)&&(Tu(),Cu())}}function rr(e,t){var n=e.stateNode;if(n===null)return null;var r=Is(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(S(231,t,typeof n));return n}var Ul=!1;if(rt)try{var zn={};Object.defineProperty(zn,"passive",{get:function(){Ul=!0}}),window.addEventListener("test",zn,zn),window.removeEventListener("test",zn,zn)}catch{Ul=!1}function Ef(e,t,n,r,l,i,a,o,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(p){this.onError(p)}}var Kn=!1,is=null,as=!1,Bl=null,Cf={onError:function(e){Kn=!0,is=e}};function Pf(e,t,n,r,l,i,a,o,u){Kn=!1,is=null,Ef.apply(Cf,arguments)}function Tf(e,t,n,r,l,i,a,o,u){if(Pf.apply(this,arguments),Kn){if(Kn){var f=is;Kn=!1,is=null}else throw Error(S(198));as||(as=!0,Bl=f)}}function Xt(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 Mu(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function $a(e){if(Xt(e)!==e)throw Error(S(188))}function Lf(e){var t=e.alternate;if(!t){if(t=Xt(e),t===null)throw Error(S(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return $a(l),e;if(i===r)return $a(l),t;i=i.sibling}throw Error(S(188))}if(n.return!==r.return)n=l,r=i;else{for(var a=!1,o=l.child;o;){if(o===n){a=!0,n=l,r=i;break}if(o===r){a=!0,r=l,n=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===n){a=!0,n=i,r=l;break}if(o===r){a=!0,r=i,n=l;break}o=o.sibling}if(!a)throw Error(S(189))}}if(n.alternate!==r)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function Ru(e){return e=Lf(e),e!==null?zu(e):null}function zu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=zu(e);if(t!==null)return t;e=e.sibling}return null}var Ou=Te.unstable_scheduleCallback,Da=Te.unstable_cancelCallback,Mf=Te.unstable_shouldYield,Rf=Te.unstable_requestPaint,ee=Te.unstable_now,zf=Te.unstable_getCurrentPriorityLevel,Ii=Te.unstable_ImmediatePriority,Iu=Te.unstable_UserBlockingPriority,os=Te.unstable_NormalPriority,Of=Te.unstable_LowPriority,$u=Te.unstable_IdlePriority,Ms=null,Xe=null;function If(e){if(Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Ms,e,void 0,(e.current.flags&128)===128)}catch{}}var We=Math.clz32?Math.clz32:Ff,$f=Math.log,Df=Math.LN2;function Ff(e){return e>>>=0,e===0?32:31-($f(e)/Df|0)|0}var zr=64,Or=4194304;function Wn(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 us(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~l;o!==0?r=Wn(o):(i&=a,i!==0&&(r=Wn(i)))}else a=n&~l,a!==0?r=Wn(a):i!==0&&(r=Wn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&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-We(t),l=1<<n,r|=e[n],t&=~l;return r}function Af(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 Uf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-We(i),o=1<<a,u=l[a];u===-1?(!(o&n)||o&r)&&(l[a]=Af(o,t)):u<=t&&(e.expiredLanes|=o),i&=~o}}function Vl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Du(){var e=zr;return zr<<=1,!(zr&4194240)&&(zr=64),e}function ll(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Nr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-We(t),e[t]=n}function Bf(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 l=31-We(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function $i(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-We(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var A=0;function Fu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Au,Di,Uu,Bu,Vu,Wl=!1,Ir=[],gt=null,yt=null,jt=null,sr=new Map,lr=new Map,pt=[],Vf="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 Fa(e,t){switch(e){case"focusin":case"focusout":gt=null;break;case"dragenter":case"dragleave":yt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":sr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":lr.delete(t.pointerId)}}function On(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Sr(t),t!==null&&Di(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Wf(e,t,n,r,l){switch(t){case"focusin":return gt=On(gt,e,t,n,r,l),!0;case"dragenter":return yt=On(yt,e,t,n,r,l),!0;case"mouseover":return jt=On(jt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return sr.set(i,On(sr.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,lr.set(i,On(lr.get(i)||null,e,t,n,r,l)),!0}return!1}function Wu(e){var t=Dt(e.target);if(t!==null){var n=Xt(t);if(n!==null){if(t=n.tag,t===13){if(t=Mu(n),t!==null){e.blockedOn=t,Vu(e.priority,function(){Uu(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 Gr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Fl=r,n.target.dispatchEvent(r),Fl=null}else return t=Sr(n),t!==null&&Di(t),e.blockedOn=n,!1;t.shift()}return!0}function Aa(e,t,n){Gr(e)&&n.delete(t)}function Hf(){Wl=!1,gt!==null&&Gr(gt)&&(gt=null),yt!==null&&Gr(yt)&&(yt=null),jt!==null&&Gr(jt)&&(jt=null),sr.forEach(Aa),lr.forEach(Aa)}function In(e,t){e.blockedOn===t&&(e.blockedOn=null,Wl||(Wl=!0,Te.unstable_scheduleCallback(Te.unstable_NormalPriority,Hf)))}function ir(e){function t(l){return In(l,e)}if(0<Ir.length){In(Ir[0],e);for(var n=1;n<Ir.length;n++){var r=Ir[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gt!==null&&In(gt,e),yt!==null&&In(yt,e),jt!==null&&In(jt,e),sr.forEach(t),lr.forEach(t),n=0;n<pt.length;n++)r=pt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pt.length&&(n=pt[0],n.blockedOn===null);)Wu(n),n.blockedOn===null&&pt.shift()}var vn=ot.ReactCurrentBatchConfig,cs=!0;function Qf(e,t,n,r){var l=A,i=vn.transition;vn.transition=null;try{A=1,Fi(e,t,n,r)}finally{A=l,vn.transition=i}}function Kf(e,t,n,r){var l=A,i=vn.transition;vn.transition=null;try{A=4,Fi(e,t,n,r)}finally{A=l,vn.transition=i}}function Fi(e,t,n,r){if(cs){var l=Hl(e,t,n,r);if(l===null)hl(e,t,r,ds,n),Fa(e,r);else if(Wf(l,e,t,n,r))r.stopPropagation();else if(Fa(e,r),t&4&&-1<Vf.indexOf(e)){for(;l!==null;){var i=Sr(l);if(i!==null&&Au(i),i=Hl(e,t,n,r),i===null&&hl(e,t,r,ds,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else hl(e,t,r,null,n)}}var ds=null;function Hl(e,t,n,r){if(ds=null,e=Oi(r),e=Dt(e),e!==null)if(t=Xt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Mu(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 ds=e,null}function Hu(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(zf()){case Ii:return 1;case Iu:return 4;case os:case Of:return 16;case $u:return 536870912;default:return 16}default:return 16}}var ht=null,Ai=null,Xr=null;function Qu(){if(Xr)return Xr;var e,t=Ai,n=t.length,r,l="value"in ht?ht.value:ht.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===l[i-r];r++);return Xr=l.slice(e,1<r?1-r:void 0)}function Jr(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 $r(){return!0}function Ua(){return!1}function Me(e){function t(n,r,l,i,a){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?$r:Ua,this.isPropagationStopped=Ua,this}return G(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=$r)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$r)},persist:function(){},isPersistent:$r}),t}var Pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ui=Me(Pn),kr=G({},Pn,{view:0,detail:0}),Yf=Me(kr),il,al,$n,Rs=G({},kr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bi,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!==$n&&($n&&e.type==="mousemove"?(il=e.screenX-$n.screenX,al=e.screenY-$n.screenY):al=il=0,$n=e),il)},movementY:function(e){return"movementY"in e?e.movementY:al}}),Ba=Me(Rs),Gf=G({},Rs,{dataTransfer:0}),Xf=Me(Gf),Jf=G({},kr,{relatedTarget:0}),ol=Me(Jf),qf=G({},Pn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zf=Me(qf),ep=G({},Pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tp=Me(ep),np=G({},Pn,{data:0}),Va=Me(np),rp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sp={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"},lp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ip(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lp[e])?!!t[e]:!1}function Bi(){return ip}var ap=G({},kr,{key:function(e){if(e.key){var t=rp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Jr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bi,charCode:function(e){return e.type==="keypress"?Jr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Jr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),op=Me(ap),up=G({},Rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wa=Me(up),cp=G({},kr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bi}),dp=Me(cp),fp=G({},Pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),pp=Me(fp),mp=G({},Rs,{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}),hp=Me(mp),xp=[9,13,27,32],Vi=rt&&"CompositionEvent"in window,Yn=null;rt&&"documentMode"in document&&(Yn=document.documentMode);var vp=rt&&"TextEvent"in window&&!Yn,Ku=rt&&(!Vi||Yn&&8<Yn&&11>=Yn),Ha=" ",Qa=!1;function Yu(e,t){switch(e){case"keyup":return xp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rn=!1;function gp(e,t){switch(e){case"compositionend":return Gu(t);case"keypress":return t.which!==32?null:(Qa=!0,Ha);case"textInput":return e=t.data,e===Ha&&Qa?null:e;default:return null}}function yp(e,t){if(rn)return e==="compositionend"||!Vi&&Yu(e,t)?(e=Qu(),Xr=Ai=ht=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 Ku&&t.locale!=="ko"?null:t.data;default:return null}}var jp={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 Ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jp[e.type]:t==="textarea"}function Xu(e,t,n,r){Eu(r),t=fs(t,"onChange"),0<t.length&&(n=new Ui("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,ar=null;function wp(e){ac(e,0)}function zs(e){var t=an(e);if(ju(t))return e}function Np(e,t){if(e==="change")return t}var Ju=!1;if(rt){var ul;if(rt){var cl="oninput"in document;if(!cl){var Ya=document.createElement("div");Ya.setAttribute("oninput","return;"),cl=typeof Ya.oninput=="function"}ul=cl}else ul=!1;Ju=ul&&(!document.documentMode||9<document.documentMode)}function Ga(){Gn&&(Gn.detachEvent("onpropertychange",qu),ar=Gn=null)}function qu(e){if(e.propertyName==="value"&&zs(ar)){var t=[];Xu(t,ar,e,Oi(e)),Lu(wp,t)}}function kp(e,t,n){e==="focusin"?(Ga(),Gn=t,ar=n,Gn.attachEvent("onpropertychange",qu)):e==="focusout"&&Ga()}function Sp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zs(ar)}function bp(e,t){if(e==="click")return zs(t)}function _p(e,t){if(e==="input"||e==="change")return zs(t)}function Ep(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qe=typeof Object.is=="function"?Object.is:Ep;function or(e,t){if(Qe(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 l=n[r];if(!El.call(t,l)||!Qe(e[l],t[l]))return!1}return!0}function Xa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ja(e,t){var n=Xa(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=Xa(n)}}function Zu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ec(){for(var e=window,t=ls();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ls(e.document)}return t}function Wi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Cp(e){var t=ec(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zu(n.ownerDocument.documentElement,n)){if(r!==null&&Wi(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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Ja(n,i);var a=Ja(n,r);l&&a&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 Pp=rt&&"documentMode"in document&&11>=document.documentMode,sn=null,Ql=null,Xn=null,Kl=!1;function qa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kl||sn==null||sn!==ls(r)||(r=sn,"selectionStart"in r&&Wi(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}),Xn&&or(Xn,r)||(Xn=r,r=fs(Ql,"onSelect"),0<r.length&&(t=new Ui("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sn)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ln={animationend:Dr("Animation","AnimationEnd"),animationiteration:Dr("Animation","AnimationIteration"),animationstart:Dr("Animation","AnimationStart"),transitionend:Dr("Transition","TransitionEnd")},dl={},tc={};rt&&(tc=document.createElement("div").style,"AnimationEvent"in window||(delete ln.animationend.animation,delete ln.animationiteration.animation,delete ln.animationstart.animation),"TransitionEvent"in window||delete ln.transitionend.transition);function Os(e){if(dl[e])return dl[e];if(!ln[e])return e;var t=ln[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in tc)return dl[e]=t[n];return e}var nc=Os("animationend"),rc=Os("animationiteration"),sc=Os("animationstart"),lc=Os("transitionend"),ic=new Map,Za="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 Pt(e,t){ic.set(e,t),Gt(t,[e])}for(var fl=0;fl<Za.length;fl++){var pl=Za[fl],Tp=pl.toLowerCase(),Lp=pl[0].toUpperCase()+pl.slice(1);Pt(Tp,"on"+Lp)}Pt(nc,"onAnimationEnd");Pt(rc,"onAnimationIteration");Pt(sc,"onAnimationStart");Pt("dblclick","onDoubleClick");Pt("focusin","onFocus");Pt("focusout","onBlur");Pt(lc,"onTransitionEnd");jn("onMouseEnter",["mouseout","mouseover"]);jn("onMouseLeave",["mouseout","mouseover"]);jn("onPointerEnter",["pointerout","pointerover"]);jn("onPointerLeave",["pointerout","pointerover"]);Gt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hn="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(" "),Mp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hn));function eo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Tf(r,t,void 0,e),e.currentTarget=null}function ac(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],u=o.instance,f=o.currentTarget;if(o=o.listener,u!==i&&l.isPropagationStopped())break e;eo(l,o,f),i=u}else for(a=0;a<r.length;a++){if(o=r[a],u=o.instance,f=o.currentTarget,o=o.listener,u!==i&&l.isPropagationStopped())break e;eo(l,o,f),i=u}}}if(as)throw e=Bl,as=!1,Bl=null,e}function V(e,t){var n=t[ql];n===void 0&&(n=t[ql]=new Set);var r=e+"__bubble";n.has(r)||(oc(t,e,2,!1),n.add(r))}function ml(e,t,n){var r=0;t&&(r|=4),oc(n,e,r,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function ur(e){if(!e[Fr]){e[Fr]=!0,hu.forEach(function(n){n!=="selectionchange"&&(Mp.has(n)||ml(n,!1,e),ml(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fr]||(t[Fr]=!0,ml("selectionchange",!1,t))}}function oc(e,t,n,r){switch(Hu(t)){case 1:var l=Qf;break;case 4:l=Kf;break;default:l=Fi}n=l.bind(null,t,n,e),l=void 0,!Ul||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function hl(e,t,n,r,l){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===l||o.nodeType===8&&o.parentNode===l)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;a=a.return}for(;o!==null;){if(a=Dt(o),a===null)return;if(u=a.tag,u===5||u===6){r=i=a;continue e}o=o.parentNode}}r=r.return}Lu(function(){var f=i,p=Oi(n),d=[];e:{var x=ic.get(e);if(x!==void 0){var w=Ui,g=e;switch(e){case"keypress":if(Jr(n)===0)break e;case"keydown":case"keyup":w=op;break;case"focusin":g="focus",w=ol;break;case"focusout":g="blur",w=ol;break;case"beforeblur":case"afterblur":w=ol;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=Ba;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=Xf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=dp;break;case nc:case rc:case sc:w=Zf;break;case lc:w=pp;break;case"scroll":w=Yf;break;case"wheel":w=hp;break;case"copy":case"cut":case"paste":w=tp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=Wa}var j=(t&4)!==0,y=!j&&e==="scroll",m=j?x!==null?x+"Capture":null:x;j=[];for(var c=f,h;c!==null;){h=c;var N=h.stateNode;if(h.tag===5&&N!==null&&(h=N,m!==null&&(N=rr(c,m),N!=null&&j.push(cr(c,N,h)))),y)break;c=c.return}0<j.length&&(x=new w(x,g,null,n,p),d.push({event:x,listeners:j}))}}if(!(t&7)){e:{if(x=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",x&&n!==Fl&&(g=n.relatedTarget||n.fromElement)&&(Dt(g)||g[st]))break e;if((w||x)&&(x=p.window===p?p:(x=p.ownerDocument)?x.defaultView||x.parentWindow:window,w?(g=n.relatedTarget||n.toElement,w=f,g=g?Dt(g):null,g!==null&&(y=Xt(g),g!==y||g.tag!==5&&g.tag!==6)&&(g=null)):(w=null,g=f),w!==g)){if(j=Ba,N="onMouseLeave",m="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(j=Wa,N="onPointerLeave",m="onPointerEnter",c="pointer"),y=w==null?x:an(w),h=g==null?x:an(g),x=new j(N,c+"leave",w,n,p),x.target=y,x.relatedTarget=h,N=null,Dt(p)===f&&(j=new j(m,c+"enter",g,n,p),j.target=h,j.relatedTarget=y,N=j),y=N,w&&g)t:{for(j=w,m=g,c=0,h=j;h;h=qt(h))c++;for(h=0,N=m;N;N=qt(N))h++;for(;0<c-h;)j=qt(j),c--;for(;0<h-c;)m=qt(m),h--;for(;c--;){if(j===m||m!==null&&j===m.alternate)break t;j=qt(j),m=qt(m)}j=null}else j=null;w!==null&&to(d,x,w,j,!1),g!==null&&y!==null&&to(d,y,g,j,!0)}}e:{if(x=f?an(f):window,w=x.nodeName&&x.nodeName.toLowerCase(),w==="select"||w==="input"&&x.type==="file")var b=Np;else if(Ka(x))if(Ju)b=_p;else{b=Sp;var k=kp}else(w=x.nodeName)&&w.toLowerCase()==="input"&&(x.type==="checkbox"||x.type==="radio")&&(b=bp);if(b&&(b=b(e,f))){Xu(d,b,n,p);break e}k&&k(e,x,f),e==="focusout"&&(k=x._wrapperState)&&k.controlled&&x.type==="number"&&zl(x,"number",x.value)}switch(k=f?an(f):window,e){case"focusin":(Ka(k)||k.contentEditable==="true")&&(sn=k,Ql=f,Xn=null);break;case"focusout":Xn=Ql=sn=null;break;case"mousedown":Kl=!0;break;case"contextmenu":case"mouseup":case"dragend":Kl=!1,qa(d,n,p);break;case"selectionchange":if(Pp)break;case"keydown":case"keyup":qa(d,n,p)}var _;if(Vi)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else rn?Yu(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Ku&&n.locale!=="ko"&&(rn||E!=="onCompositionStart"?E==="onCompositionEnd"&&rn&&(_=Qu()):(ht=p,Ai="value"in ht?ht.value:ht.textContent,rn=!0)),k=fs(f,E),0<k.length&&(E=new Va(E,e,null,n,p),d.push({event:E,listeners:k}),_?E.data=_:(_=Gu(n),_!==null&&(E.data=_)))),(_=vp?gp(e,n):yp(e,n))&&(f=fs(f,"onBeforeInput"),0<f.length&&(p=new Va("onBeforeInput","beforeinput",null,n,p),d.push({event:p,listeners:f}),p.data=_))}ac(d,t)})}function cr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fs(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=rr(e,n),i!=null&&r.unshift(cr(e,i,l)),i=rr(e,t),i!=null&&r.push(cr(e,i,l))),e=e.return}return r}function qt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function to(e,t,n,r,l){for(var i=t._reactName,a=[];n!==null&&n!==r;){var o=n,u=o.alternate,f=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&f!==null&&(o=f,l?(u=rr(n,i),u!=null&&a.unshift(cr(n,u,o))):l||(u=rr(n,i),u!=null&&a.push(cr(n,u,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Rp=/\r\n?/g,zp=/\u0000|\uFFFD/g;function no(e){return(typeof e=="string"?e:""+e).replace(Rp,`
|
|
38
|
-
`).replace(zp,"")}function Ar(e,t,n){if(t=no(t),no(e)!==t&&n)throw Error(S(425))}function ps(){}var Yl=null,Gl=null;function Xl(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 Jl=typeof setTimeout=="function"?setTimeout:void 0,Op=typeof clearTimeout=="function"?clearTimeout:void 0,ro=typeof Promise=="function"?Promise:void 0,Ip=typeof queueMicrotask=="function"?queueMicrotask:typeof ro<"u"?function(e){return ro.resolve(null).then(e).catch($p)}:Jl;function $p(e){setTimeout(function(){throw e})}function xl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),ir(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);ir(t)}function wt(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 so(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 Tn=Math.random().toString(36).slice(2),Ge="__reactFiber$"+Tn,dr="__reactProps$"+Tn,st="__reactContainer$"+Tn,ql="__reactEvents$"+Tn,Dp="__reactListeners$"+Tn,Fp="__reactHandles$"+Tn;function Dt(e){var t=e[Ge];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[Ge]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=so(e);e!==null;){if(n=e[Ge])return n;e=so(e)}return t}e=n,n=e.parentNode}return null}function Sr(e){return e=e[Ge]||e[st],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function an(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function Is(e){return e[dr]||null}var Zl=[],on=-1;function Tt(e){return{current:e}}function H(e){0>on||(e.current=Zl[on],Zl[on]=null,on--)}function U(e,t){on++,Zl[on]=e.current,e.current=t}var Ct={},xe=Tt(Ct),ke=Tt(!1),Vt=Ct;function wn(e,t){var n=e.type.contextTypes;if(!n)return Ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Se(e){return e=e.childContextTypes,e!=null}function ms(){H(ke),H(xe)}function lo(e,t,n){if(xe.current!==Ct)throw Error(S(168));U(xe,t),U(ke,n)}function uc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(S(108,kf(e)||"Unknown",l));return G({},n,r)}function hs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ct,Vt=xe.current,U(xe,e),U(ke,ke.current),!0}function io(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=uc(e,t,Vt),r.__reactInternalMemoizedMergedChildContext=e,H(ke),H(xe),U(xe,e)):H(ke),U(ke,n)}var Ze=null,$s=!1,vl=!1;function cc(e){Ze===null?Ze=[e]:Ze.push(e)}function Ap(e){$s=!0,cc(e)}function Lt(){if(!vl&&Ze!==null){vl=!0;var e=0,t=A;try{var n=Ze;for(A=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ze=null,$s=!1}catch(l){throw Ze!==null&&(Ze=Ze.slice(e+1)),Ou(Ii,Lt),l}finally{A=t,vl=!1}}return null}var un=[],cn=0,xs=null,vs=0,Re=[],ze=0,Wt=null,et=1,tt="";function It(e,t){un[cn++]=vs,un[cn++]=xs,xs=e,vs=t}function dc(e,t,n){Re[ze++]=et,Re[ze++]=tt,Re[ze++]=Wt,Wt=e;var r=et;e=tt;var l=32-We(r)-1;r&=~(1<<l),n+=1;var i=32-We(t)+l;if(30<i){var a=l-l%5;i=(r&(1<<a)-1).toString(32),r>>=a,l-=a,et=1<<32-We(t)+l|n<<l|r,tt=i+e}else et=1<<i|n<<l|r,tt=e}function Hi(e){e.return!==null&&(It(e,1),dc(e,1,0))}function Qi(e){for(;e===xs;)xs=un[--cn],un[cn]=null,vs=un[--cn],un[cn]=null;for(;e===Wt;)Wt=Re[--ze],Re[ze]=null,tt=Re[--ze],Re[ze]=null,et=Re[--ze],Re[ze]=null}var Pe=null,Ce=null,Q=!1,Ve=null;function fc(e,t){var n=Oe(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 ao(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,Pe=e,Ce=wt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Pe=e,Ce=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wt!==null?{id:et,overflow:tt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Oe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Pe=e,Ce=null,!0):!1;default:return!1}}function ei(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ti(e){if(Q){var t=Ce;if(t){var n=t;if(!ao(e,t)){if(ei(e))throw Error(S(418));t=wt(n.nextSibling);var r=Pe;t&&ao(e,t)?fc(r,n):(e.flags=e.flags&-4097|2,Q=!1,Pe=e)}}else{if(ei(e))throw Error(S(418));e.flags=e.flags&-4097|2,Q=!1,Pe=e}}}function oo(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pe=e}function Ur(e){if(e!==Pe)return!1;if(!Q)return oo(e),Q=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xl(e.type,e.memoizedProps)),t&&(t=Ce)){if(ei(e))throw pc(),Error(S(418));for(;t;)fc(e,t),t=wt(t.nextSibling)}if(oo(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ce=wt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ce=null}}else Ce=Pe?wt(e.stateNode.nextSibling):null;return!0}function pc(){for(var e=Ce;e;)e=wt(e.nextSibling)}function Nn(){Ce=Pe=null,Q=!1}function Ki(e){Ve===null?Ve=[e]:Ve.push(e)}var Up=ot.ReactCurrentBatchConfig;function Dn(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(S(309));var r=n.stateNode}if(!r)throw Error(S(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var o=l.refs;a===null?delete o[i]:o[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(S(284));if(!n._owner)throw Error(S(290,e))}return e}function Br(e,t){throw e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uo(e){var t=e._init;return t(e._payload)}function mc(e){function t(m,c){if(e){var h=m.deletions;h===null?(m.deletions=[c],m.flags|=16):h.push(c)}}function n(m,c){if(!e)return null;for(;c!==null;)t(m,c),c=c.sibling;return null}function r(m,c){for(m=new Map;c!==null;)c.key!==null?m.set(c.key,c):m.set(c.index,c),c=c.sibling;return m}function l(m,c){return m=bt(m,c),m.index=0,m.sibling=null,m}function i(m,c,h){return m.index=h,e?(h=m.alternate,h!==null?(h=h.index,h<c?(m.flags|=2,c):h):(m.flags|=2,c)):(m.flags|=1048576,c)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function o(m,c,h,N){return c===null||c.tag!==6?(c=Sl(h,m.mode,N),c.return=m,c):(c=l(c,h),c.return=m,c)}function u(m,c,h,N){var b=h.type;return b===nn?p(m,c,h.props.children,N,h.key):c!==null&&(c.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===dt&&uo(b)===c.type)?(N=l(c,h.props),N.ref=Dn(m,c,h),N.return=m,N):(N=ss(h.type,h.key,h.props,null,m.mode,N),N.ref=Dn(m,c,h),N.return=m,N)}function f(m,c,h,N){return c===null||c.tag!==4||c.stateNode.containerInfo!==h.containerInfo||c.stateNode.implementation!==h.implementation?(c=bl(h,m.mode,N),c.return=m,c):(c=l(c,h.children||[]),c.return=m,c)}function p(m,c,h,N,b){return c===null||c.tag!==7?(c=Bt(h,m.mode,N,b),c.return=m,c):(c=l(c,h),c.return=m,c)}function d(m,c,h){if(typeof c=="string"&&c!==""||typeof c=="number")return c=Sl(""+c,m.mode,h),c.return=m,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Lr:return h=ss(c.type,c.key,c.props,null,m.mode,h),h.ref=Dn(m,null,c),h.return=m,h;case tn:return c=bl(c,m.mode,h),c.return=m,c;case dt:var N=c._init;return d(m,N(c._payload),h)}if(Vn(c)||Rn(c))return c=Bt(c,m.mode,h,null),c.return=m,c;Br(m,c)}return null}function x(m,c,h,N){var b=c!==null?c.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return b!==null?null:o(m,c,""+h,N);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Lr:return h.key===b?u(m,c,h,N):null;case tn:return h.key===b?f(m,c,h,N):null;case dt:return b=h._init,x(m,c,b(h._payload),N)}if(Vn(h)||Rn(h))return b!==null?null:p(m,c,h,N,null);Br(m,h)}return null}function w(m,c,h,N,b){if(typeof N=="string"&&N!==""||typeof N=="number")return m=m.get(h)||null,o(c,m,""+N,b);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Lr:return m=m.get(N.key===null?h:N.key)||null,u(c,m,N,b);case tn:return m=m.get(N.key===null?h:N.key)||null,f(c,m,N,b);case dt:var k=N._init;return w(m,c,h,k(N._payload),b)}if(Vn(N)||Rn(N))return m=m.get(h)||null,p(c,m,N,b,null);Br(c,N)}return null}function g(m,c,h,N){for(var b=null,k=null,_=c,E=c=0,F=null;_!==null&&E<h.length;E++){_.index>E?(F=_,_=null):F=_.sibling;var L=x(m,_,h[E],N);if(L===null){_===null&&(_=F);break}e&&_&&L.alternate===null&&t(m,_),c=i(L,c,E),k===null?b=L:k.sibling=L,k=L,_=F}if(E===h.length)return n(m,_),Q&&It(m,E),b;if(_===null){for(;E<h.length;E++)_=d(m,h[E],N),_!==null&&(c=i(_,c,E),k===null?b=_:k.sibling=_,k=_);return Q&&It(m,E),b}for(_=r(m,_);E<h.length;E++)F=w(_,m,E,h[E],N),F!==null&&(e&&F.alternate!==null&&_.delete(F.key===null?E:F.key),c=i(F,c,E),k===null?b=F:k.sibling=F,k=F);return e&&_.forEach(function(C){return t(m,C)}),Q&&It(m,E),b}function j(m,c,h,N){var b=Rn(h);if(typeof b!="function")throw Error(S(150));if(h=b.call(h),h==null)throw Error(S(151));for(var k=b=null,_=c,E=c=0,F=null,L=h.next();_!==null&&!L.done;E++,L=h.next()){_.index>E?(F=_,_=null):F=_.sibling;var C=x(m,_,L.value,N);if(C===null){_===null&&(_=F);break}e&&_&&C.alternate===null&&t(m,_),c=i(C,c,E),k===null?b=C:k.sibling=C,k=C,_=F}if(L.done)return n(m,_),Q&&It(m,E),b;if(_===null){for(;!L.done;E++,L=h.next())L=d(m,L.value,N),L!==null&&(c=i(L,c,E),k===null?b=L:k.sibling=L,k=L);return Q&&It(m,E),b}for(_=r(m,_);!L.done;E++,L=h.next())L=w(_,m,E,L.value,N),L!==null&&(e&&L.alternate!==null&&_.delete(L.key===null?E:L.key),c=i(L,c,E),k===null?b=L:k.sibling=L,k=L);return e&&_.forEach(function(ie){return t(m,ie)}),Q&&It(m,E),b}function y(m,c,h,N){if(typeof h=="object"&&h!==null&&h.type===nn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Lr:e:{for(var b=h.key,k=c;k!==null;){if(k.key===b){if(b=h.type,b===nn){if(k.tag===7){n(m,k.sibling),c=l(k,h.props.children),c.return=m,m=c;break e}}else if(k.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===dt&&uo(b)===k.type){n(m,k.sibling),c=l(k,h.props),c.ref=Dn(m,k,h),c.return=m,m=c;break e}n(m,k);break}else t(m,k);k=k.sibling}h.type===nn?(c=Bt(h.props.children,m.mode,N,h.key),c.return=m,m=c):(N=ss(h.type,h.key,h.props,null,m.mode,N),N.ref=Dn(m,c,h),N.return=m,m=N)}return a(m);case tn:e:{for(k=h.key;c!==null;){if(c.key===k)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(m,c.sibling),c=l(c,h.children||[]),c.return=m,m=c;break e}else{n(m,c);break}else t(m,c);c=c.sibling}c=bl(h,m.mode,N),c.return=m,m=c}return a(m);case dt:return k=h._init,y(m,c,k(h._payload),N)}if(Vn(h))return g(m,c,h,N);if(Rn(h))return j(m,c,h,N);Br(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(m,c.sibling),c=l(c,h),c.return=m,m=c):(n(m,c),c=Sl(h,m.mode,N),c.return=m,m=c),a(m)):n(m,c)}return y}var kn=mc(!0),hc=mc(!1),gs=Tt(null),ys=null,dn=null,Yi=null;function Gi(){Yi=dn=ys=null}function Xi(e){var t=gs.current;H(gs),e._currentValue=t}function ni(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 gn(e,t){ys=e,Yi=dn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ne=!0),e.firstContext=null)}function $e(e){var t=e._currentValue;if(Yi!==e)if(e={context:e,memoizedValue:t,next:null},dn===null){if(ys===null)throw Error(S(308));dn=e,ys.dependencies={lanes:0,firstContext:e}}else dn=dn.next=e;return t}var Ft=null;function Ji(e){Ft===null?Ft=[e]:Ft.push(e)}function xc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ji(t)):(n.next=l.next,l.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 ft=!1;function qi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vc(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 nt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Nt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,D&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,lt(e,n)}return l=r.interleaved,l===null?(t.next=t,Ji(r)):(t.next=l.next,l.next=t),r.interleaved=t,lt(e,n)}function qr(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,$i(e,n)}}function co(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,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 js(e,t,n,r){var l=e.updateQueue;ft=!1;var i=l.firstBaseUpdate,a=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var u=o,f=u.next;u.next=null,a===null?i=f:a.next=f,a=u;var p=e.alternate;p!==null&&(p=p.updateQueue,o=p.lastBaseUpdate,o!==a&&(o===null?p.firstBaseUpdate=f:o.next=f,p.lastBaseUpdate=u))}if(i!==null){var d=l.baseState;a=0,p=f=u=null,o=i;do{var x=o.lane,w=o.eventTime;if((r&x)===x){p!==null&&(p=p.next={eventTime:w,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,j=o;switch(x=t,w=n,j.tag){case 1:if(g=j.payload,typeof g=="function"){d=g.call(w,d,x);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=j.payload,x=typeof g=="function"?g.call(w,d,x):g,x==null)break e;d=G({},d,x);break e;case 2:ft=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=l.effects,x===null?l.effects=[o]:x.push(o))}else w={eventTime:w,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},p===null?(f=p=w,u=d):p=p.next=w,a|=x;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;x=o,o=x.next,x.next=null,l.lastBaseUpdate=x,l.shared.pending=null}}while(!0);if(p===null&&(u=d),l.baseState=u,l.firstBaseUpdate=f,l.lastBaseUpdate=p,t=l.shared.interleaved,t!==null){l=t;do a|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Qt|=a,e.lanes=a,e.memoizedState=d}}function fo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(S(191,l));l.call(r)}}}var br={},Je=Tt(br),fr=Tt(br),pr=Tt(br);function At(e){if(e===br)throw Error(S(174));return e}function Zi(e,t){switch(U(pr,t),U(fr,e),U(Je,br),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Il(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Il(t,e)}H(Je),U(Je,t)}function Sn(){H(Je),H(fr),H(pr)}function gc(e){At(pr.current);var t=At(Je.current),n=Il(t,e.type);t!==n&&(U(fr,e),U(Je,n))}function ea(e){fr.current===e&&(H(Je),H(fr))}var K=Tt(0);function ws(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 gl=[];function ta(){for(var e=0;e<gl.length;e++)gl[e]._workInProgressVersionPrimary=null;gl.length=0}var Zr=ot.ReactCurrentDispatcher,yl=ot.ReactCurrentBatchConfig,Ht=0,Y=null,re=null,oe=null,Ns=!1,Jn=!1,mr=0,Bp=0;function pe(){throw Error(S(321))}function na(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qe(e[n],t[n]))return!1;return!0}function ra(e,t,n,r,l,i){if(Ht=i,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zr.current=e===null||e.memoizedState===null?Qp:Kp,e=n(r,l),Jn){i=0;do{if(Jn=!1,mr=0,25<=i)throw Error(S(301));i+=1,oe=re=null,t.updateQueue=null,Zr.current=Yp,e=n(r,l)}while(Jn)}if(Zr.current=ks,t=re!==null&&re.next!==null,Ht=0,oe=re=Y=null,Ns=!1,t)throw Error(S(300));return e}function sa(){var e=mr!==0;return mr=0,e}function Ye(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?Y.memoizedState=oe=e:oe=oe.next=e,oe}function De(){if(re===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=re.next;var t=oe===null?Y.memoizedState:oe.next;if(t!==null)oe=t,re=e;else{if(e===null)throw Error(S(310));re=e,e={memoizedState:re.memoizedState,baseState:re.baseState,baseQueue:re.baseQueue,queue:re.queue,next:null},oe===null?Y.memoizedState=oe=e:oe=oe.next=e}return oe}function hr(e,t){return typeof t=="function"?t(e):t}function jl(e){var t=De(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=re,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var a=l.next;l.next=i.next,i.next=a}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var o=a=null,u=null,f=i;do{var p=f.lane;if((Ht&p)===p)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var d={lane:p,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(o=u=d,a=r):u=u.next=d,Y.lanes|=p,Qt|=p}f=f.next}while(f!==null&&f!==i);u===null?a=r:u.next=o,Qe(r,t.memoizedState)||(Ne=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,Y.lanes|=i,Qt|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wl(e){var t=De(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var a=l=l.next;do i=e(i,a.action),a=a.next;while(a!==l);Qe(i,t.memoizedState)||(Ne=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function yc(){}function jc(e,t){var n=Y,r=De(),l=t(),i=!Qe(r.memoizedState,l);if(i&&(r.memoizedState=l,Ne=!0),r=r.queue,la(kc.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||oe!==null&&oe.memoizedState.tag&1){if(n.flags|=2048,xr(9,Nc.bind(null,n,r,l,t),void 0,null),ue===null)throw Error(S(349));Ht&30||wc(n,t,l)}return l}function wc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Nc(e,t,n,r){t.value=n,t.getSnapshot=r,Sc(t)&&bc(e)}function kc(e,t,n){return n(function(){Sc(t)&&bc(e)})}function Sc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qe(e,n)}catch{return!0}}function bc(e){var t=lt(e,1);t!==null&&He(t,e,1,-1)}function po(e){var t=Ye();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=Hp.bind(null,Y,e),[t.memoizedState,e]}function xr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function _c(){return De().memoizedState}function es(e,t,n,r){var l=Ye();Y.flags|=e,l.memoizedState=xr(1|t,n,void 0,r===void 0?null:r)}function Ds(e,t,n,r){var l=De();r=r===void 0?null:r;var i=void 0;if(re!==null){var a=re.memoizedState;if(i=a.destroy,r!==null&&na(r,a.deps)){l.memoizedState=xr(t,n,i,r);return}}Y.flags|=e,l.memoizedState=xr(1|t,n,i,r)}function mo(e,t){return es(8390656,8,e,t)}function la(e,t){return Ds(2048,8,e,t)}function Ec(e,t){return Ds(4,2,e,t)}function Cc(e,t){return Ds(4,4,e,t)}function Pc(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 Tc(e,t,n){return n=n!=null?n.concat([e]):null,Ds(4,4,Pc.bind(null,t,e),n)}function ia(){}function Lc(e,t){var n=De();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&na(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mc(e,t){var n=De();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&na(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Rc(e,t,n){return Ht&21?(Qe(n,t)||(n=Du(),Y.lanes|=n,Qt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ne=!0),e.memoizedState=n)}function Vp(e,t){var n=A;A=n!==0&&4>n?n:4,e(!0);var r=yl.transition;yl.transition={};try{e(!1),t()}finally{A=n,yl.transition=r}}function zc(){return De().memoizedState}function Wp(e,t,n){var r=St(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Oc(e))Ic(t,n);else if(n=xc(e,t,n,r),n!==null){var l=ge();He(n,e,r,l),$c(n,t,r)}}function Hp(e,t,n){var r=St(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Oc(e))Ic(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,o=i(a,n);if(l.hasEagerState=!0,l.eagerState=o,Qe(o,a)){var u=t.interleaved;u===null?(l.next=l,Ji(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=xc(e,t,l,r),n!==null&&(l=ge(),He(n,e,r,l),$c(n,t,r))}}function Oc(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Ic(e,t){Jn=Ns=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $c(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$i(e,n)}}var ks={readContext:$e,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Qp={readContext:$e,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:$e,useEffect:mo,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,es(4194308,4,Pc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){return es(4,2,e,t)},useMemo:function(e,t){var n=Ye();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ye();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=Wp.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:po,useDebugValue:ia,useDeferredValue:function(e){return Ye().memoizedState=e},useTransition:function(){var e=po(!1),t=e[0];return e=Vp.bind(null,e[1]),Ye().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,l=Ye();if(Q){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),ue===null)throw Error(S(349));Ht&30||wc(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,mo(kc.bind(null,r,i,e),[e]),r.flags|=2048,xr(9,Nc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ye(),t=ue.identifierPrefix;if(Q){var n=tt,r=et;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=mr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Bp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Kp={readContext:$e,useCallback:Lc,useContext:$e,useEffect:la,useImperativeHandle:Tc,useInsertionEffect:Ec,useLayoutEffect:Cc,useMemo:Mc,useReducer:jl,useRef:_c,useState:function(){return jl(hr)},useDebugValue:ia,useDeferredValue:function(e){var t=De();return Rc(t,re.memoizedState,e)},useTransition:function(){var e=jl(hr)[0],t=De().memoizedState;return[e,t]},useMutableSource:yc,useSyncExternalStore:jc,useId:zc,unstable_isNewReconciler:!1},Yp={readContext:$e,useCallback:Lc,useContext:$e,useEffect:la,useImperativeHandle:Tc,useInsertionEffect:Ec,useLayoutEffect:Cc,useMemo:Mc,useReducer:wl,useRef:_c,useState:function(){return wl(hr)},useDebugValue:ia,useDeferredValue:function(e){var t=De();return re===null?t.memoizedState=e:Rc(t,re.memoizedState,e)},useTransition:function(){var e=wl(hr)[0],t=De().memoizedState;return[e,t]},useMutableSource:yc,useSyncExternalStore:jc,useId:zc,unstable_isNewReconciler:!1};function Ue(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ri(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={isMounted:function(e){return(e=e._reactInternals)?Xt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ge(),l=St(e),i=nt(r,l);i.payload=t,n!=null&&(i.callback=n),t=Nt(e,i,l),t!==null&&(He(t,e,l,r),qr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ge(),l=St(e),i=nt(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Nt(e,i,l),t!==null&&(He(t,e,l,r),qr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ge(),r=St(e),l=nt(n,r);l.tag=2,t!=null&&(l.callback=t),t=Nt(e,l,r),t!==null&&(He(t,e,r,n),qr(t,e,r))}};function ho(e,t,n,r,l,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!or(n,r)||!or(l,i):!0}function Dc(e,t,n){var r=!1,l=Ct,i=t.contextType;return typeof i=="object"&&i!==null?i=$e(i):(l=Se(t)?Vt:xe.current,r=t.contextTypes,i=(r=r!=null)?wn(e,l):Ct),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Fs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function xo(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&&Fs.enqueueReplaceState(t,t.state,null)}function si(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},qi(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=$e(i):(i=Se(t)?Vt:xe.current,l.context=wn(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ri(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Fs.enqueueReplaceState(l,l.state,null),js(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function bn(e,t){try{var n="",r=t;do n+=Nf(r),r=r.return;while(r);var l=n}catch(i){l=`
|
|
39
|
-
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function Nl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function li(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Gp=typeof WeakMap=="function"?WeakMap:Map;function Fc(e,t,n){n=nt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bs||(bs=!0,hi=r),li(e,t)},n}function Ac(e,t,n){n=nt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){li(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){li(e,t),typeof r!="function"&&(kt===null?kt=new Set([this]):kt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function vo(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=um.bind(null,e,t,n),t.then(e,e))}function go(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 yo(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=nt(-1,1),t.tag=2,Nt(n,t,1))),n.lanes|=1),e)}var Xp=ot.ReactCurrentOwner,Ne=!1;function ve(e,t,n,r){t.child=e===null?hc(t,null,n,r):kn(t,e.child,n,r)}function jo(e,t,n,r,l){n=n.render;var i=t.ref;return gn(t,l),r=ra(e,t,n,r,i,l),n=sa(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,it(e,t,l)):(Q&&n&&Hi(t),t.flags|=1,ve(e,t,r,l),t.child)}function wo(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!ma(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Uc(e,t,i,r,l)):(e=ss(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:or,n(a,r)&&e.ref===t.ref)return it(e,t,l)}return t.flags|=1,e=bt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Uc(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(or(i,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,it(e,t,l)}return ii(e,t,n,r,l)}function Bc(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(pn,Ee),Ee|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(pn,Ee),Ee|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,U(pn,Ee),Ee|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,U(pn,Ee),Ee|=r;return ve(e,t,l,n),t.child}function Vc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ii(e,t,n,r,l){var i=Se(n)?Vt:xe.current;return i=wn(t,i),gn(t,l),n=ra(e,t,n,r,i,l),r=sa(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,it(e,t,l)):(Q&&r&&Hi(t),t.flags|=1,ve(e,t,n,l),t.child)}function No(e,t,n,r,l){if(Se(n)){var i=!0;hs(t)}else i=!1;if(gn(t,l),t.stateNode===null)ts(e,t),Dc(t,n,r),si(t,n,r,l),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,f=n.contextType;typeof f=="object"&&f!==null?f=$e(f):(f=Se(n)?Vt:xe.current,f=wn(t,f));var p=n.getDerivedStateFromProps,d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||u!==f)&&xo(t,a,r,f),ft=!1;var x=t.memoizedState;a.state=x,js(t,r,a,l),u=t.memoizedState,o!==r||x!==u||ke.current||ft?(typeof p=="function"&&(ri(t,n,p,r),u=t.memoizedState),(o=ft||ho(t,n,o,r,x,u,f))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=f,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,vc(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:Ue(t.type,o),a.props=f,d=t.pendingProps,x=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=$e(u):(u=Se(n)?Vt:xe.current,u=wn(t,u));var w=n.getDerivedStateFromProps;(p=typeof w=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||x!==u)&&xo(t,a,r,u),ft=!1,x=t.memoizedState,a.state=x,js(t,r,a,l);var g=t.memoizedState;o!==d||x!==g||ke.current||ft?(typeof w=="function"&&(ri(t,n,w,r),g=t.memoizedState),(f=ft||ho(t,n,f,r,x,g,u)||!1)?(p||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=u,r=f):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),r=!1)}return ai(e,t,n,r,i,l)}function ai(e,t,n,r,l,i){Vc(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return l&&io(t,n,!1),it(e,t,i);r=t.stateNode,Xp.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=kn(t,e.child,null,i),t.child=kn(t,null,o,i)):ve(e,t,o,i),t.memoizedState=r.state,l&&io(t,n,!0),t.child}function Wc(e){var t=e.stateNode;t.pendingContext?lo(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lo(e,t.context,!1),Zi(e,t.containerInfo)}function ko(e,t,n,r,l){return Nn(),Ki(l),t.flags|=256,ve(e,t,n,r),t.child}var oi={dehydrated:null,treeContext:null,retryLane:0};function ui(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hc(e,t,n){var r=t.pendingProps,l=K.current,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(l&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),U(K,l&1),e===null)return ti(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Bs(a,r,0,null),e=Bt(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ui(n),t.memoizedState=oi,e):aa(t,a));if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null))return Jp(e,t,a,r,o,l,n);if(i){i=r.fallback,a=t.mode,l=e.child,o=l.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=bt(l,u),r.subtreeFlags=l.subtreeFlags&14680064),o!==null?i=bt(o,i):(i=Bt(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ui(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=oi,r}return i=e.child,e=i.sibling,r=bt(i,{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 aa(e,t){return t=Bs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vr(e,t,n,r){return r!==null&&Ki(r),kn(t,e.child,null,n),e=aa(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jp(e,t,n,r,l,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Nl(Error(S(422))),Vr(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=Bs({mode:"visible",children:r.children},l,0,null),i=Bt(i,l,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&kn(t,e.child,null,a),t.child.memoizedState=ui(a),t.memoizedState=oi,i);if(!(t.mode&1))return Vr(e,t,a,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(S(419)),r=Nl(i,r,void 0),Vr(e,t,a,r)}if(o=(a&e.childLanes)!==0,Ne||o){if(r=ue,r!==null){switch(a&-a){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|a)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,lt(e,l),He(r,e,l,-1))}return pa(),r=Nl(Error(S(421))),Vr(e,t,a,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=cm.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,Ce=wt(l.nextSibling),Pe=t,Q=!0,Ve=null,e!==null&&(Re[ze++]=et,Re[ze++]=tt,Re[ze++]=Wt,et=e.id,tt=e.overflow,Wt=t),t=aa(t,r.children),t.flags|=4096,t)}function So(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ni(e.return,t,n)}function kl(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function Qc(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(ve(e,t,r.children,n),r=K.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&&So(e,n,t);else if(e.tag===19)So(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(U(K,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&ws(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),kl(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&ws(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}kl(t,!0,n,null,i);break;case"together":kl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ts(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function it(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qp(e,t,n){switch(t.tag){case 3:Wc(t),Nn();break;case 5:gc(t);break;case 1:Se(t.type)&&hs(t);break;case 4:Zi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;U(gs,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(U(K,K.current&1),t.flags|=128,null):n&t.child.childLanes?Hc(e,t,n):(U(K,K.current&1),e=it(e,t,n),e!==null?e.sibling:null);U(K,K.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Qc(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),U(K,K.current),r)break;return null;case 22:case 23:return t.lanes=0,Bc(e,t,n)}return it(e,t,n)}var Kc,ci,Yc,Gc;Kc=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}};ci=function(){};Yc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,At(Je.current);var i=null;switch(n){case"input":l=Ml(e,l),r=Ml(e,r),i=[];break;case"select":l=G({},l,{value:void 0}),r=G({},r,{value:void 0}),i=[];break;case"textarea":l=Ol(e,l),r=Ol(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ps)}$l(n,r);var a;n=null;for(f in l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var o=l[f];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(tr.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var u=r[f];if(o=l!=null?l[f]:void 0,r.hasOwnProperty(f)&&u!==o&&(u!=null||o!=null))if(f==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(f,n)),n=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(i=i||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(tr.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&V("scroll",e),i||o===u||(i=[])):(i=i||[]).push(f,u))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}};Gc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fn(e,t){if(!Q)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 me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zp(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return me(t),null;case 1:return Se(t.type)&&ms(),me(t),null;case 3:return r=t.stateNode,Sn(),H(ke),H(xe),ta(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ur(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ve!==null&&(gi(Ve),Ve=null))),ci(e,t),me(t),null;case 5:ea(t);var l=At(pr.current);if(n=t.type,e!==null&&t.stateNode!=null)Yc(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(S(166));return me(t),null}if(e=At(Je.current),Ur(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ge]=t,r[dr]=i,e=(t.mode&1)!==0,n){case"dialog":V("cancel",r),V("close",r);break;case"iframe":case"object":case"embed":V("load",r);break;case"video":case"audio":for(l=0;l<Hn.length;l++)V(Hn[l],r);break;case"source":V("error",r);break;case"img":case"image":case"link":V("error",r),V("load",r);break;case"details":V("toggle",r);break;case"input":Ma(r,i),V("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},V("invalid",r);break;case"textarea":za(r,i),V("invalid",r)}$l(n,i),l=null;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];a==="children"?typeof o=="string"?r.textContent!==o&&(i.suppressHydrationWarning!==!0&&Ar(r.textContent,o,e),l=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Ar(r.textContent,o,e),l=["children",""+o]):tr.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&V("scroll",r)}switch(n){case"input":Mr(r),Ra(r,i,!0);break;case"textarea":Mr(r),Oa(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ps)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ku(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Ge]=t,e[dr]=r,Kc(e,t,!1,!1),t.stateNode=e;e:{switch(a=Dl(n,r),n){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;l<Hn.length;l++)V(Hn[l],e);l=r;break;case"source":V("error",e),l=r;break;case"img":case"image":case"link":V("error",e),V("load",e),l=r;break;case"details":V("toggle",e),l=r;break;case"input":Ma(e,r),l=Ml(e,r),V("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=G({},r,{value:void 0}),V("invalid",e);break;case"textarea":za(e,r),l=Ol(e,r),V("invalid",e);break;default:l=r}$l(n,l),o=l;for(i in o)if(o.hasOwnProperty(i)){var u=o[i];i==="style"?_u(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Su(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&nr(e,u):typeof u=="number"&&nr(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(tr.hasOwnProperty(i)?u!=null&&i==="onScroll"&&V("scroll",e):u!=null&&Li(e,i,u,a))}switch(n){case"input":Mr(e),Ra(e,r,!1);break;case"textarea":Mr(e),Oa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Et(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?mn(e,!!r.multiple,i,!1):r.defaultValue!=null&&mn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=ps)}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 me(t),null;case 6:if(e&&t.stateNode!=null)Gc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(S(166));if(n=At(pr.current),At(Je.current),Ur(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ge]=t,(i=r.nodeValue!==n)&&(e=Pe,e!==null))switch(e.tag){case 3:Ar(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ar(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ge]=t,t.stateNode=r}return me(t),null;case 13:if(H(K),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Q&&Ce!==null&&t.mode&1&&!(t.flags&128))pc(),Nn(),t.flags|=98560,i=!1;else if(i=Ur(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(S(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(S(317));i[Ge]=t}else Nn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;me(t),i=!1}else Ve!==null&&(gi(Ve),Ve=null),i=!0;if(!i)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||K.current&1?se===0&&(se=3):pa())),t.updateQueue!==null&&(t.flags|=4),me(t),null);case 4:return Sn(),ci(e,t),e===null&&ur(t.stateNode.containerInfo),me(t),null;case 10:return Xi(t.type._context),me(t),null;case 17:return Se(t.type)&&ms(),me(t),null;case 19:if(H(K),i=t.memoizedState,i===null)return me(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Fn(i,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ws(e),a!==null){for(t.flags|=128,Fn(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return U(K,K.current&1|2),t.child}e=e.sibling}i.tail!==null&&ee()>_n&&(t.flags|=128,r=!0,Fn(i,!1),t.lanes=4194304)}else{if(!r)if(e=ws(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Q)return me(t),null}else 2*ee()-i.renderingStartTime>_n&&n!==1073741824&&(t.flags|=128,r=!0,Fn(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ee(),t.sibling=null,n=K.current,U(K,r?n&1|2:n&1),t):(me(t),null);case 22:case 23:return fa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(me(t),t.subtreeFlags&6&&(t.flags|=8192)):me(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function em(e,t){switch(Qi(t),t.tag){case 1:return Se(t.type)&&ms(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sn(),H(ke),H(xe),ta(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ea(t),null;case 13:if(H(K),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));Nn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(K),null;case 4:return Sn(),null;case 10:return Xi(t.type._context),null;case 22:case 23:return fa(),null;case 24:return null;default:return null}}var Wr=!1,he=!1,tm=typeof WeakSet=="function"?WeakSet:Set,P=null;function fn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){J(e,t,r)}else n.current=null}function di(e,t,n){try{n()}catch(r){J(e,t,r)}}var bo=!1;function nm(e,t){if(Yl=cs,e=ec(),Wi(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 l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,o=-1,u=-1,f=0,p=0,d=e,x=null;t:for(;;){for(var w;d!==n||l!==0&&d.nodeType!==3||(o=a+l),d!==i||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(w=d.firstChild)!==null;)x=d,d=w;for(;;){if(d===e)break t;if(x===n&&++f===l&&(o=a),x===i&&++p===r&&(u=a),(w=d.nextSibling)!==null)break;d=x,x=d.parentNode}d=w}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gl={focusedElem:e,selectionRange:n},cs=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var j=g.memoizedProps,y=g.memoizedState,m=t.stateNode,c=m.getSnapshotBeforeUpdate(t.elementType===t.type?j:Ue(t.type,j),y);m.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(N){J(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return g=bo,bo=!1,g}function qn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&di(t,n,i)}l=l.next}while(l!==r)}}function As(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 fi(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 Xc(e){var t=e.alternate;t!==null&&(e.alternate=null,Xc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ge],delete t[dr],delete t[ql],delete t[Dp],delete t[Fp])),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 Jc(e){return e.tag===5||e.tag===3||e.tag===4}function _o(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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 pi(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=ps));else if(r!==4&&(e=e.child,e!==null))for(pi(e,t,n),e=e.sibling;e!==null;)pi(e,t,n),e=e.sibling}function mi(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(mi(e,t,n),e=e.sibling;e!==null;)mi(e,t,n),e=e.sibling}var ce=null,Be=!1;function ct(e,t,n){for(n=n.child;n!==null;)qc(e,t,n),n=n.sibling}function qc(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(Ms,n)}catch{}switch(n.tag){case 5:he||fn(n,t);case 6:var r=ce,l=Be;ce=null,ct(e,t,n),ce=r,Be=l,ce!==null&&(Be?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(Be?(e=ce,n=n.stateNode,e.nodeType===8?xl(e.parentNode,n):e.nodeType===1&&xl(e,n),ir(e)):xl(ce,n.stateNode));break;case 4:r=ce,l=Be,ce=n.stateNode.containerInfo,Be=!0,ct(e,t,n),ce=r,Be=l;break;case 0:case 11:case 14:case 15:if(!he&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&di(n,t,a),l=l.next}while(l!==r)}ct(e,t,n);break;case 1:if(!he&&(fn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){J(n,t,o)}ct(e,t,n);break;case 21:ct(e,t,n);break;case 22:n.mode&1?(he=(r=he)||n.memoizedState!==null,ct(e,t,n),he=r):ct(e,t,n);break;default:ct(e,t,n)}}function Eo(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tm),t.forEach(function(r){var l=dm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ae(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:ce=o.stateNode,Be=!1;break e;case 3:ce=o.stateNode.containerInfo,Be=!0;break e;case 4:ce=o.stateNode.containerInfo,Be=!0;break e}o=o.return}if(ce===null)throw Error(S(160));qc(i,a,l),ce=null,Be=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(f){J(l,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zc(t,e),t=t.sibling}function Zc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ae(t,e),Ke(e),r&4){try{qn(3,e,e.return),As(3,e)}catch(j){J(e,e.return,j)}try{qn(5,e,e.return)}catch(j){J(e,e.return,j)}}break;case 1:Ae(t,e),Ke(e),r&512&&n!==null&&fn(n,n.return);break;case 5:if(Ae(t,e),Ke(e),r&512&&n!==null&&fn(n,n.return),e.flags&32){var l=e.stateNode;try{nr(l,"")}catch(j){J(e,e.return,j)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&wu(l,i),Dl(o,a);var f=Dl(o,i);for(a=0;a<u.length;a+=2){var p=u[a],d=u[a+1];p==="style"?_u(l,d):p==="dangerouslySetInnerHTML"?Su(l,d):p==="children"?nr(l,d):Li(l,p,d,f)}switch(o){case"input":Rl(l,i);break;case"textarea":Nu(l,i);break;case"select":var x=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var w=i.value;w!=null?mn(l,!!i.multiple,w,!1):x!==!!i.multiple&&(i.defaultValue!=null?mn(l,!!i.multiple,i.defaultValue,!0):mn(l,!!i.multiple,i.multiple?[]:"",!1))}l[dr]=i}catch(j){J(e,e.return,j)}}break;case 6:if(Ae(t,e),Ke(e),r&4){if(e.stateNode===null)throw Error(S(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(j){J(e,e.return,j)}}break;case 3:if(Ae(t,e),Ke(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ir(t.containerInfo)}catch(j){J(e,e.return,j)}break;case 4:Ae(t,e),Ke(e);break;case 13:Ae(t,e),Ke(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(ca=ee())),r&4&&Eo(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(he=(f=he)||p,Ae(t,e),he=f):Ae(t,e),Ke(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!p&&e.mode&1)for(P=e,p=e.child;p!==null;){for(d=P=p;P!==null;){switch(x=P,w=x.child,x.tag){case 0:case 11:case 14:case 15:qn(4,x,x.return);break;case 1:fn(x,x.return);var g=x.stateNode;if(typeof g.componentWillUnmount=="function"){r=x,n=x.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(j){J(r,n,j)}}break;case 5:fn(x,x.return);break;case 22:if(x.memoizedState!==null){Po(d);continue}}w!==null?(w.return=x,P=w):Po(d)}p=p.sibling}e:for(p=null,d=e;;){if(d.tag===5){if(p===null){p=d;try{l=d.stateNode,f?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=d.stateNode,u=d.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=bu("display",a))}catch(j){J(e,e.return,j)}}}else if(d.tag===6){if(p===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(j){J(e,e.return,j)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;p===d&&(p=null),d=d.return}p===d&&(p=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ae(t,e),Ke(e),r&4&&Eo(e);break;case 21:break;default:Ae(t,e),Ke(e)}}function Ke(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Jc(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(nr(l,""),r.flags&=-33);var i=_o(e);mi(e,i,l);break;case 3:case 4:var a=r.stateNode.containerInfo,o=_o(e);pi(e,o,a);break;default:throw Error(S(161))}}catch(u){J(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rm(e,t,n){P=e,ed(e)}function ed(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var l=P,i=l.child;if(l.tag===22&&r){var a=l.memoizedState!==null||Wr;if(!a){var o=l.alternate,u=o!==null&&o.memoizedState!==null||he;o=Wr;var f=he;if(Wr=a,(he=u)&&!f)for(P=l;P!==null;)a=P,u=a.child,a.tag===22&&a.memoizedState!==null?To(l):u!==null?(u.return=a,P=u):To(l);for(;i!==null;)P=i,ed(i),i=i.sibling;P=l,Wr=o,he=f}Co(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,P=i):Co(e)}}function Co(e){for(;P!==null;){var t=P;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:he||As(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!he)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Ue(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&fo(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fo(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var p=f.memoizedState;if(p!==null){var d=p.dehydrated;d!==null&&ir(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}he||t.flags&512&&fi(t)}catch(x){J(t,t.return,x)}}if(t===e){P=null;break}if(n=t.sibling,n!==null){n.return=t.return,P=n;break}P=t.return}}function Po(e){for(;P!==null;){var t=P;if(t===e){P=null;break}var n=t.sibling;if(n!==null){n.return=t.return,P=n;break}P=t.return}}function To(e){for(;P!==null;){var t=P;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{As(4,t)}catch(u){J(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){J(t,l,u)}}var i=t.return;try{fi(t)}catch(u){J(t,i,u)}break;case 5:var a=t.return;try{fi(t)}catch(u){J(t,a,u)}}}catch(u){J(t,t.return,u)}if(t===e){P=null;break}var o=t.sibling;if(o!==null){o.return=t.return,P=o;break}P=t.return}}var sm=Math.ceil,Ss=ot.ReactCurrentDispatcher,oa=ot.ReactCurrentOwner,Ie=ot.ReactCurrentBatchConfig,D=0,ue=null,te=null,de=0,Ee=0,pn=Tt(0),se=0,vr=null,Qt=0,Us=0,ua=0,Zn=null,we=null,ca=0,_n=1/0,qe=null,bs=!1,hi=null,kt=null,Hr=!1,xt=null,_s=0,er=0,xi=null,ns=-1,rs=0;function ge(){return D&6?ee():ns!==-1?ns:ns=ee()}function St(e){return e.mode&1?D&2&&de!==0?de&-de:Up.transition!==null?(rs===0&&(rs=Du()),rs):(e=A,e!==0||(e=window.event,e=e===void 0?16:Hu(e.type)),e):1}function He(e,t,n,r){if(50<er)throw er=0,xi=null,Error(S(185));Nr(e,n,r),(!(D&2)||e!==ue)&&(e===ue&&(!(D&2)&&(Us|=n),se===4&&mt(e,de)),be(e,r),n===1&&D===0&&!(t.mode&1)&&(_n=ee()+500,$s&&Lt()))}function be(e,t){var n=e.callbackNode;Uf(e,t);var r=us(e,e===ue?de:0);if(r===0)n!==null&&Da(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Da(n),t===1)e.tag===0?Ap(Lo.bind(null,e)):cc(Lo.bind(null,e)),Ip(function(){!(D&6)&&Lt()}),n=null;else{switch(Fu(r)){case 1:n=Ii;break;case 4:n=Iu;break;case 16:n=os;break;case 536870912:n=$u;break;default:n=os}n=od(n,td.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function td(e,t){if(ns=-1,rs=0,D&6)throw Error(S(327));var n=e.callbackNode;if(yn()&&e.callbackNode!==n)return null;var r=us(e,e===ue?de:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Es(e,r);else{t=r;var l=D;D|=2;var i=rd();(ue!==e||de!==t)&&(qe=null,_n=ee()+500,Ut(e,t));do try{am();break}catch(o){nd(e,o)}while(!0);Gi(),Ss.current=i,D=l,te!==null?t=0:(ue=null,de=0,t=se)}if(t!==0){if(t===2&&(l=Vl(e),l!==0&&(r=l,t=vi(e,l))),t===1)throw n=vr,Ut(e,0),mt(e,r),be(e,ee()),n;if(t===6)mt(e,r);else{if(l=e.current.alternate,!(r&30)&&!lm(l)&&(t=Es(e,r),t===2&&(i=Vl(e),i!==0&&(r=i,t=vi(e,i))),t===1))throw n=vr,Ut(e,0),mt(e,r),be(e,ee()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:$t(e,we,qe);break;case 3:if(mt(e,r),(r&130023424)===r&&(t=ca+500-ee(),10<t)){if(us(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){ge(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Jl($t.bind(null,e,we,qe),t);break}$t(e,we,qe);break;case 4:if(mt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var a=31-We(r);i=1<<a,a=t[a],a>l&&(l=a),r&=~i}if(r=l,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sm(r/1960))-r,10<r){e.timeoutHandle=Jl($t.bind(null,e,we,qe),r);break}$t(e,we,qe);break;case 5:$t(e,we,qe);break;default:throw Error(S(329))}}}return be(e,ee()),e.callbackNode===n?td.bind(null,e):null}function vi(e,t){var n=Zn;return e.current.memoizedState.isDehydrated&&(Ut(e,t).flags|=256),e=Es(e,t),e!==2&&(t=we,we=n,t!==null&&gi(t)),e}function gi(e){we===null?we=e:we.push.apply(we,e)}function lm(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 l=n[r],i=l.getSnapshot;l=l.value;try{if(!Qe(i(),l))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 mt(e,t){for(t&=~ua,t&=~Us,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-We(t),r=1<<n;e[n]=-1,t&=~r}}function Lo(e){if(D&6)throw Error(S(327));yn();var t=us(e,0);if(!(t&1))return be(e,ee()),null;var n=Es(e,t);if(e.tag!==0&&n===2){var r=Vl(e);r!==0&&(t=r,n=vi(e,r))}if(n===1)throw n=vr,Ut(e,0),mt(e,t),be(e,ee()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$t(e,we,qe),be(e,ee()),null}function da(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(_n=ee()+500,$s&&Lt())}}function Kt(e){xt!==null&&xt.tag===0&&!(D&6)&&yn();var t=D;D|=1;var n=Ie.transition,r=A;try{if(Ie.transition=null,A=1,e)return e()}finally{A=r,Ie.transition=n,D=t,!(D&6)&&Lt()}}function fa(){Ee=pn.current,H(pn)}function Ut(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Op(n)),te!==null)for(n=te.return;n!==null;){var r=n;switch(Qi(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ms();break;case 3:Sn(),H(ke),H(xe),ta();break;case 5:ea(r);break;case 4:Sn();break;case 13:H(K);break;case 19:H(K);break;case 10:Xi(r.type._context);break;case 22:case 23:fa()}n=n.return}if(ue=e,te=e=bt(e.current,null),de=Ee=t,se=0,vr=null,ua=Us=Qt=0,we=Zn=null,Ft!==null){for(t=0;t<Ft.length;t++)if(n=Ft[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=l,r.next=a}n.pending=r}Ft=null}return e}function nd(e,t){do{var n=te;try{if(Gi(),Zr.current=ks,Ns){for(var r=Y.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Ns=!1}if(Ht=0,oe=re=Y=null,Jn=!1,mr=0,oa.current=null,n===null||n.return===null){se=1,vr=t,te=null;break}e:{var i=e,a=n.return,o=n,u=t;if(t=de,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,p=o,d=p.tag;if(!(p.mode&1)&&(d===0||d===11||d===15)){var x=p.alternate;x?(p.updateQueue=x.updateQueue,p.memoizedState=x.memoizedState,p.lanes=x.lanes):(p.updateQueue=null,p.memoizedState=null)}var w=go(a);if(w!==null){w.flags&=-257,yo(w,a,o,i,t),w.mode&1&&vo(i,f,t),t=w,u=f;var g=t.updateQueue;if(g===null){var j=new Set;j.add(u),t.updateQueue=j}else g.add(u);break e}else{if(!(t&1)){vo(i,f,t),pa();break e}u=Error(S(426))}}else if(Q&&o.mode&1){var y=go(a);if(y!==null){!(y.flags&65536)&&(y.flags|=256),yo(y,a,o,i,t),Ki(bn(u,o));break e}}i=u=bn(u,o),se!==4&&(se=2),Zn===null?Zn=[i]:Zn.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Fc(i,u,t);co(i,m);break e;case 1:o=u;var c=i.type,h=i.stateNode;if(!(i.flags&128)&&(typeof c.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(kt===null||!kt.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var N=Ac(i,o,t);co(i,N);break e}}i=i.return}while(i!==null)}ld(n)}catch(b){t=b,te===n&&n!==null&&(te=n=n.return);continue}break}while(!0)}function rd(){var e=Ss.current;return Ss.current=ks,e===null?ks:e}function pa(){(se===0||se===3||se===2)&&(se=4),ue===null||!(Qt&268435455)&&!(Us&268435455)||mt(ue,de)}function Es(e,t){var n=D;D|=2;var r=rd();(ue!==e||de!==t)&&(qe=null,Ut(e,t));do try{im();break}catch(l){nd(e,l)}while(!0);if(Gi(),D=n,Ss.current=r,te!==null)throw Error(S(261));return ue=null,de=0,se}function im(){for(;te!==null;)sd(te)}function am(){for(;te!==null&&!Mf();)sd(te)}function sd(e){var t=ad(e.alternate,e,Ee);e.memoizedProps=e.pendingProps,t===null?ld(e):te=t,oa.current=null}function ld(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=em(n,t),n!==null){n.flags&=32767,te=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,te=null;return}}else if(n=Zp(n,t,Ee),n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);se===0&&(se=5)}function $t(e,t,n){var r=A,l=Ie.transition;try{Ie.transition=null,A=1,om(e,t,n,r)}finally{Ie.transition=l,A=r}return null}function om(e,t,n,r){do yn();while(xt!==null);if(D&6)throw Error(S(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Bf(e,i),e===ue&&(te=ue=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Hr||(Hr=!0,od(os,function(){return yn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ie.transition,Ie.transition=null;var a=A;A=1;var o=D;D|=4,oa.current=null,nm(e,n),Zc(n,e),Cp(Gl),cs=!!Yl,Gl=Yl=null,e.current=n,rm(n),Rf(),D=o,A=a,Ie.transition=i}else e.current=n;if(Hr&&(Hr=!1,xt=e,_s=l),i=e.pendingLanes,i===0&&(kt=null),If(n.stateNode),be(e,ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(bs)throw bs=!1,e=hi,hi=null,e;return _s&1&&e.tag!==0&&yn(),i=e.pendingLanes,i&1?e===xi?er++:(er=0,xi=e):er=0,Lt(),null}function yn(){if(xt!==null){var e=Fu(_s),t=Ie.transition,n=A;try{if(Ie.transition=null,A=16>e?16:e,xt===null)var r=!1;else{if(e=xt,xt=null,_s=0,D&6)throw Error(S(331));var l=D;for(D|=4,P=e.current;P!==null;){var i=P,a=i.child;if(P.flags&16){var o=i.deletions;if(o!==null){for(var u=0;u<o.length;u++){var f=o[u];for(P=f;P!==null;){var p=P;switch(p.tag){case 0:case 11:case 15:qn(8,p,i)}var d=p.child;if(d!==null)d.return=p,P=d;else for(;P!==null;){p=P;var x=p.sibling,w=p.return;if(Xc(p),p===f){P=null;break}if(x!==null){x.return=w,P=x;break}P=w}}}var g=i.alternate;if(g!==null){var j=g.child;if(j!==null){g.child=null;do{var y=j.sibling;j.sibling=null,j=y}while(j!==null)}}P=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,P=a;else e:for(;P!==null;){if(i=P,i.flags&2048)switch(i.tag){case 0:case 11:case 15:qn(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,P=m;break e}P=i.return}}var c=e.current;for(P=c;P!==null;){a=P;var h=a.child;if(a.subtreeFlags&2064&&h!==null)h.return=a,P=h;else e:for(a=c;P!==null;){if(o=P,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:As(9,o)}}catch(b){J(o,o.return,b)}if(o===a){P=null;break e}var N=o.sibling;if(N!==null){N.return=o.return,P=N;break e}P=o.return}}if(D=l,Lt(),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Ms,e)}catch{}r=!0}return r}finally{A=n,Ie.transition=t}}return!1}function Mo(e,t,n){t=bn(n,t),t=Fc(e,t,1),e=Nt(e,t,1),t=ge(),e!==null&&(Nr(e,1,t),be(e,t))}function J(e,t,n){if(e.tag===3)Mo(e,e,n);else for(;t!==null;){if(t.tag===3){Mo(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(kt===null||!kt.has(r))){e=bn(n,e),e=Ac(t,e,1),t=Nt(t,e,1),e=ge(),t!==null&&(Nr(t,1,e),be(t,e));break}}t=t.return}}function um(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ge(),e.pingedLanes|=e.suspendedLanes&n,ue===e&&(de&n)===n&&(se===4||se===3&&(de&130023424)===de&&500>ee()-ca?Ut(e,0):ua|=n),be(e,t)}function id(e,t){t===0&&(e.mode&1?(t=Or,Or<<=1,!(Or&130023424)&&(Or=4194304)):t=1);var n=ge();e=lt(e,t),e!==null&&(Nr(e,t,n),be(e,n))}function cm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function dm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),id(e,n)}var ad;ad=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ke.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,qp(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,Q&&t.flags&1048576&&dc(t,vs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ts(e,t),e=t.pendingProps;var l=wn(t,xe.current);gn(t,n),l=ra(null,t,r,e,l,n);var i=sa();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Se(r)?(i=!0,hs(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,qi(t),l.updater=Fs,t.stateNode=l,l._reactInternals=t,si(t,r,e,n),t=ai(null,t,r,!0,i,n)):(t.tag=0,Q&&i&&Hi(t),ve(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ts(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=pm(r),e=Ue(r,e),l){case 0:t=ii(null,t,r,e,n);break e;case 1:t=No(null,t,r,e,n);break e;case 11:t=jo(null,t,r,e,n);break e;case 14:t=wo(null,t,r,Ue(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),ii(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),No(e,t,r,l,n);case 3:e:{if(Wc(t),e===null)throw Error(S(387));r=t.pendingProps,i=t.memoizedState,l=i.element,vc(e,t),js(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=bn(Error(S(423)),t),t=ko(e,t,r,n,l);break e}else if(r!==l){l=bn(Error(S(424)),t),t=ko(e,t,r,n,l);break e}else for(Ce=wt(t.stateNode.containerInfo.firstChild),Pe=t,Q=!0,Ve=null,n=hc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nn(),r===l){t=it(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return gc(t),e===null&&ti(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,a=l.children,Xl(r,l)?a=null:i!==null&&Xl(r,i)&&(t.flags|=32),Vc(e,t),ve(e,t,a,n),t.child;case 6:return e===null&&ti(t),null;case 13:return Hc(e,t,n);case 4:return Zi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),jo(e,t,r,l,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,a=l.value,U(gs,r._currentValue),r._currentValue=a,i!==null)if(Qe(i.value,a)){if(i.children===l.children&&!ke.current){t=it(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=nt(-1,n&-n),u.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?u.next=u:(u.next=p.next,p.next=u),f.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),ni(i.return,n,t),o.lanes|=n;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(S(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),ni(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}ve(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,gn(t,n),l=$e(l),r=r(l),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,l=Ue(r,t.pendingProps),l=Ue(r.type,l),wo(e,t,r,l,n);case 15:return Uc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),ts(e,t),t.tag=1,Se(r)?(e=!0,hs(t)):e=!1,gn(t,n),Dc(t,r,l),si(t,r,l,n),ai(null,t,r,!0,e,n);case 19:return Qc(e,t,n);case 22:return Bc(e,t,n)}throw Error(S(156,t.tag))};function od(e,t){return Ou(e,t)}function fm(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 Oe(e,t,n,r){return new fm(e,t,n,r)}function ma(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pm(e){if(typeof e=="function")return ma(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ri)return 11;if(e===zi)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=Oe(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 ss(e,t,n,r,l,i){var a=2;if(r=e,typeof e=="function")ma(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case nn:return Bt(n.children,l,i,t);case Mi:a=8,l|=8;break;case Cl:return e=Oe(12,n,t,l|2),e.elementType=Cl,e.lanes=i,e;case Pl:return e=Oe(13,n,t,l),e.elementType=Pl,e.lanes=i,e;case Tl:return e=Oe(19,n,t,l),e.elementType=Tl,e.lanes=i,e;case gu:return Bs(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xu:a=10;break e;case vu:a=9;break e;case Ri:a=11;break e;case zi:a=14;break e;case dt:a=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=Oe(a,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Bt(e,t,n,r){return e=Oe(7,e,r,t),e.lanes=n,e}function Bs(e,t,n,r){return e=Oe(22,e,r,t),e.elementType=gu,e.lanes=n,e.stateNode={isHidden:!1},e}function Sl(e,t,n){return e=Oe(6,e,null,t),e.lanes=n,e}function bl(e,t,n){return t=Oe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mm(e,t,n,r,l){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=ll(0),this.expirationTimes=ll(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ll(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function ha(e,t,n,r,l,i,a,o,u){return e=new mm(e,t,n,o,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Oe(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qi(i),e}function hm(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 ud(e){if(!e)return Ct;e=e._reactInternals;e:{if(Xt(e)!==e||e.tag!==1)throw Error(S(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Se(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(S(171))}if(e.tag===1){var n=e.type;if(Se(n))return uc(e,n,t)}return t}function cd(e,t,n,r,l,i,a,o,u){return e=ha(n,r,!0,e,l,i,a,o,u),e.context=ud(null),n=e.current,r=ge(),l=St(n),i=nt(r,l),i.callback=t??null,Nt(n,i,l),e.current.lanes=l,Nr(e,l,r),be(e,r),e}function Vs(e,t,n,r){var l=t.current,i=ge(),a=St(l);return n=ud(n),t.context===null?t.context=n:t.pendingContext=n,t=nt(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Nt(l,t,a),e!==null&&(He(e,l,a,i),qr(e,l,a)),a}function Cs(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 Ro(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xa(e,t){Ro(e,t),(e=e.alternate)&&Ro(e,t)}function xm(){return null}var dd=typeof reportError=="function"?reportError:function(e){console.error(e)};function va(e){this._internalRoot=e}Ws.prototype.render=va.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));Vs(e,t,null,null)};Ws.prototype.unmount=va.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kt(function(){Vs(null,e,null,null)}),t[st]=null}};function Ws(e){this._internalRoot=e}Ws.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pt.length&&t!==0&&t<pt[n].priority;n++);pt.splice(n,0,e),n===0&&Wu(e)}};function ga(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Hs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zo(){}function vm(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var f=Cs(a);i.call(f)}}var a=cd(t,r,e,0,null,!1,!1,"",zo);return e._reactRootContainer=a,e[st]=a.current,ur(e.nodeType===8?e.parentNode:e),Kt(),a}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var o=r;r=function(){var f=Cs(u);o.call(f)}}var u=ha(e,0,!1,null,null,!1,!1,"",zo);return e._reactRootContainer=u,e[st]=u.current,ur(e.nodeType===8?e.parentNode:e),Kt(function(){Vs(t,u,n,r)}),u}function Qs(e,t,n,r,l){var i=n._reactRootContainer;if(i){var a=i;if(typeof l=="function"){var o=l;l=function(){var u=Cs(a);o.call(u)}}Vs(t,a,e,l)}else a=vm(n,t,e,l,r);return Cs(a)}Au=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Wn(t.pendingLanes);n!==0&&($i(t,n|1),be(t,ee()),!(D&6)&&(_n=ee()+500,Lt()))}break;case 13:Kt(function(){var r=lt(e,1);if(r!==null){var l=ge();He(r,e,1,l)}}),xa(e,1)}};Di=function(e){if(e.tag===13){var t=lt(e,134217728);if(t!==null){var n=ge();He(t,e,134217728,n)}xa(e,134217728)}};Uu=function(e){if(e.tag===13){var t=St(e),n=lt(e,t);if(n!==null){var r=ge();He(n,e,t,r)}xa(e,t)}};Bu=function(){return A};Vu=function(e,t){var n=A;try{return A=e,t()}finally{A=n}};Al=function(e,t,n){switch(t){case"input":if(Rl(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 l=Is(r);if(!l)throw Error(S(90));ju(r),Rl(r,l)}}}break;case"textarea":Nu(e,n);break;case"select":t=n.value,t!=null&&mn(e,!!n.multiple,t,!1)}};Pu=da;Tu=Kt;var gm={usingClientEntryPoint:!1,Events:[Sr,an,Is,Eu,Cu,da]},An={findFiberByHostInstance:Dt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ym={bundleType:An.bundleType,version:An.version,rendererPackageName:An.rendererPackageName,rendererConfig:An.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ot.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ru(e),e===null?null:e.stateNode},findFiberByHostInstance:An.findFiberByHostInstance||xm,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 Qr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qr.isDisabled&&Qr.supportsFiber)try{Ms=Qr.inject(ym),Xe=Qr}catch{}}Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gm;Le.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ga(t))throw Error(S(200));return hm(e,t,null,n)};Le.createRoot=function(e,t){if(!ga(e))throw Error(S(299));var n=!1,r="",l=dd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=ha(e,1,!1,null,null,n,!1,r,l),e[st]=t.current,ur(e.nodeType===8?e.parentNode:e),new va(t)};Le.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(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=Ru(t),e=e===null?null:e.stateNode,e};Le.flushSync=function(e){return Kt(e)};Le.hydrate=function(e,t,n){if(!Hs(t))throw Error(S(200));return Qs(null,e,t,!0,n)};Le.hydrateRoot=function(e,t,n){if(!ga(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",a=dd;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=cd(t,null,e,1,n??null,l,!1,i,a),e[st]=t.current,ur(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Ws(t)};Le.render=function(e,t,n){if(!Hs(t))throw Error(S(200));return Qs(null,e,t,!1,n)};Le.unmountComponentAtNode=function(e){if(!Hs(e))throw Error(S(40));return e._reactRootContainer?(Kt(function(){Qs(null,null,e,!1,function(){e._reactRootContainer=null,e[st]=null})}),!0):!1};Le.unstable_batchedUpdates=da;Le.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Hs(n))throw Error(S(200));if(e==null||e._reactInternals===void 0)throw Error(S(38));return Qs(e,t,n,!1,r)};Le.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=Le;var pd=fu.exports,md,Oo=pd;md=Oo.createRoot,Oo.hydrateRoot;/**
|
|
41
|
-
* @remix-run/router v1.23.2
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/function gr(){return gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gr.apply(this,arguments)}var vt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(vt||(vt={}));const Io="popstate";function jm(e){e===void 0&&(e={});function t(r,l){let{pathname:i,search:a,hash:o}=r.location;return yi("",{pathname:i,search:a,hash:o},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:Ps(l)}return Nm(t,n,null,e)}function q(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ya(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wm(){return Math.random().toString(36).substr(2,8)}function $o(e,t){return{usr:e.state,key:e.key,idx:t}}function yi(e,t,n,r){return n===void 0&&(n=null),gr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ln(t):t,{state:n,key:t&&t.key||r||wm()})}function Ps(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ln(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Nm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,a=l.history,o=vt.Pop,u=null,f=p();f==null&&(f=0,a.replaceState(gr({},a.state,{idx:f}),""));function p(){return(a.state||{idx:null}).idx}function d(){o=vt.Pop;let y=p(),m=y==null?null:y-f;f=y,u&&u({action:o,location:j.location,delta:m})}function x(y,m){o=vt.Push;let c=yi(j.location,y,m);f=p()+1;let h=$o(c,f),N=j.createHref(c);try{a.pushState(h,"",N)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;l.location.assign(N)}i&&u&&u({action:o,location:j.location,delta:1})}function w(y,m){o=vt.Replace;let c=yi(j.location,y,m);f=p();let h=$o(c,f),N=j.createHref(c);a.replaceState(h,"",N),i&&u&&u({action:o,location:j.location,delta:0})}function g(y){let m=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof y=="string"?y:Ps(y);return c=c.replace(/ $/,"%20"),q(m,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,m)}let j={get action(){return o},get location(){return e(l,a)},listen(y){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Io,d),u=y,()=>{l.removeEventListener(Io,d),u=null}},createHref(y){return t(l,y)},createURL:g,encodeLocation(y){let m=g(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:x,replace:w,go(y){return a.go(y)}};return j}var Do;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Do||(Do={}));function km(e,t,n){return n===void 0&&(n="/"),Sm(e,t,n)}function Sm(e,t,n,r){let l=typeof t=="string"?Ln(t):t,i=En(l.pathname||"/",n);if(i==null)return null;let a=hd(e);bm(a);let o=null;for(let u=0;o==null&&u<a.length;++u){let f=Im(i);o=zm(a[u],f)}return o}function hd(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let l=(i,a,o)=>{let u={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(q(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let f=_t([r,u.relativePath]),p=n.concat(u);i.children&&i.children.length>0&&(q(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),hd(i.children,t,p,f)),!(i.path==null&&!i.index)&&t.push({path:f,score:Mm(f,i.index),routesMeta:p})};return e.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))l(i,a);else for(let u of xd(i.path))l(i,a,u)}),t}function xd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let a=xd(r.join("/")),o=[];return o.push(...a.map(u=>u===""?i:[i,u].join("/"))),l&&o.push(...a),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function bm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Rm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _m=/^:[\w-]+$/,Em=3,Cm=2,Pm=1,Tm=10,Lm=-2,Fo=e=>e==="*";function Mm(e,t){let n=e.split("/"),r=n.length;return n.some(Fo)&&(r+=Lm),t&&(r+=Cm),n.filter(l=>!Fo(l)).reduce((l,i)=>l+(_m.test(i)?Em:i===""?Pm:Tm),r)}function Rm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function zm(e,t,n){let{routesMeta:r}=e,l={},i="/",a=[];for(let o=0;o<r.length;++o){let u=r[o],f=o===r.length-1,p=i==="/"?t:t.slice(i.length)||"/",d=ji({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},p),x=u.route;if(!d)return null;Object.assign(l,d.params),a.push({params:l,pathname:_t([i,d.pathname]),pathnameBase:Um(_t([i,d.pathnameBase])),route:x}),d.pathnameBase!=="/"&&(i=_t([i,d.pathnameBase]))}return a}function ji(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Om(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let i=l[0],a=i.replace(/(.)\/+$/,"$1"),o=l.slice(1);return{params:r.reduce((f,p,d)=>{let{paramName:x,isOptional:w}=p;if(x==="*"){let j=o[d]||"";a=i.slice(0,i.length-j.length).replace(/(.)\/+$/,"$1")}const g=o[d];return w&&!g?f[x]=void 0:f[x]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:a,pattern:e}}function Om(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ya(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Im(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ya(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function En(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const $m=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dm=e=>$m.test(e);function Fm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Ln(e):e,i;if(n)if(Dm(n))i=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),ya(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?i=Ao(n.substring(1),"/"):i=Ao(n,t)}else i=t;return{pathname:i,search:Bm(r),hash:Vm(l)}}function Ao(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function _l(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Am(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vd(e,t){let n=Am(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function gd(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Ln(e):(l=gr({},e),q(!l.pathname||!l.pathname.includes("?"),_l("?","pathname","search",l)),q(!l.pathname||!l.pathname.includes("#"),_l("#","pathname","hash",l)),q(!l.search||!l.search.includes("#"),_l("#","search","hash",l)));let i=e===""||l.pathname==="",a=i?"/":l.pathname,o;if(a==null)o=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let x=a.split("/");for(;x[0]==="..";)x.shift(),d-=1;l.pathname=x.join("/")}o=d>=0?t[d]:"/"}let u=Fm(l,o),f=a&&a!=="/"&&a.endsWith("/"),p=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||p)&&(u.pathname+="/"),u}const _t=e=>e.join("/").replace(/\/\/+/g,"/"),Um=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Wm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yd=["post","put","patch","delete"];new Set(yd);const Hm=["get",...yd];new Set(Hm);/**
|
|
50
|
-
* React Router v6.30.3
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/function yr(){return yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yr.apply(this,arguments)}const Ks=v.createContext(null),jd=v.createContext(null),Mt=v.createContext(null),Ys=v.createContext(null),ut=v.createContext({outlet:null,matches:[],isDataRoute:!1}),wd=v.createContext(null);function Qm(e,t){let{relative:n}=t===void 0?{}:t;_r()||q(!1);let{basename:r,navigator:l}=v.useContext(Mt),{hash:i,pathname:a,search:o}=Gs(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:_t([r,a])),l.createHref({pathname:u,search:o,hash:i})}function _r(){return v.useContext(Ys)!=null}function Jt(){return _r()||q(!1),v.useContext(Ys).location}function Nd(e){v.useContext(Mt).static||v.useLayoutEffect(e)}function kd(){let{isDataRoute:e}=v.useContext(ut);return e?ih():Km()}function Km(){_r()||q(!1);let e=v.useContext(Ks),{basename:t,future:n,navigator:r}=v.useContext(Mt),{matches:l}=v.useContext(ut),{pathname:i}=Jt(),a=JSON.stringify(vd(l,n.v7_relativeSplatPath)),o=v.useRef(!1);return Nd(()=>{o.current=!0}),v.useCallback(function(f,p){if(p===void 0&&(p={}),!o.current)return;if(typeof f=="number"){r.go(f);return}let d=gd(f,JSON.parse(a),i,p.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:_t([t,d.pathname])),(p.replace?r.replace:r.push)(d,p.state,p)},[t,r,a,i,e])}const Sd=v.createContext(null);function Fe(){return v.useContext(Sd)}function Ym(e){let t=v.useContext(ut).outlet;return t&&v.createElement(Sd.Provider,{value:e},t)}function ja(){let{matches:e}=v.useContext(ut),t=e[e.length-1];return t?t.params:{}}function Gs(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Mt),{matches:l}=v.useContext(ut),{pathname:i}=Jt(),a=JSON.stringify(vd(l,r.v7_relativeSplatPath));return v.useMemo(()=>gd(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Gm(e,t){return Xm(e,t)}function Xm(e,t,n,r){_r()||q(!1);let{navigator:l}=v.useContext(Mt),{matches:i}=v.useContext(ut),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let f=Jt(),p;if(t){var d;let y=typeof t=="string"?Ln(t):t;u==="/"||(d=y.pathname)!=null&&d.startsWith(u)||q(!1),p=y}else p=f;let x=p.pathname||"/",w=x;if(u!=="/"){let y=u.replace(/^\//,"").split("/");w="/"+x.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=km(e,{pathname:w}),j=th(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},o,y.params),pathname:_t([u,l.encodeLocation?l.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:_t([u,l.encodeLocation?l.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&j?v.createElement(Ys.Provider,{value:{location:yr({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:vt.Pop}},j):j}function Jm(){let e=lh(),t=Wm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:l},n):null,null)}const qm=v.createElement(Jm,null);class Zm extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(ut.Provider,{value:this.props.routeContext},v.createElement(wd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function eh(e){let{routeContext:t,match:n,children:r}=e,l=v.useContext(Ks);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ut.Provider,{value:t},r)}function th(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(l=n)==null?void 0:l.errors;if(o!=null){let p=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);p>=0||q(!1),a=a.slice(0,Math.min(a.length,p+1))}let u=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<a.length;p++){let d=a[p];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(f=p),d.route.id){let{loaderData:x,errors:w}=n,g=d.route.loader&&x[d.route.id]===void 0&&(!w||w[d.route.id]===void 0);if(d.route.lazy||g){u=!0,f>=0?a=a.slice(0,f+1):a=[a[0]];break}}}return a.reduceRight((p,d,x)=>{let w,g=!1,j=null,y=null;n&&(w=o&&d.route.id?o[d.route.id]:void 0,j=d.route.errorElement||qm,u&&(f<0&&x===0?(ah("route-fallback"),g=!0,y=null):f===x&&(g=!0,y=d.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,x+1)),c=()=>{let h;return w?h=j:g?h=y:d.route.Component?h=v.createElement(d.route.Component,null):d.route.element?h=d.route.element:h=p,v.createElement(eh,{match:d,routeContext:{outlet:p,matches:m,isDataRoute:n!=null},children:h})};return n&&(d.route.ErrorBoundary||d.route.errorElement||x===0)?v.createElement(Zm,{location:n.location,revalidation:n.revalidation,component:j,error:w,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()},null)}var bd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(bd||{}),_d=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(_d||{});function nh(e){let t=v.useContext(Ks);return t||q(!1),t}function rh(e){let t=v.useContext(jd);return t||q(!1),t}function sh(e){let t=v.useContext(ut);return t||q(!1),t}function Ed(e){let t=sh(),n=t.matches[t.matches.length-1];return n.route.id||q(!1),n.route.id}function lh(){var e;let t=v.useContext(wd),n=rh(),r=Ed();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ih(){let{router:e}=nh(bd.UseNavigateStable),t=Ed(_d.UseNavigateStable),n=v.useRef(!1);return Nd(()=>{n.current=!0}),v.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,yr({fromRouteId:t},i)))},[e,t])}const Uo={};function ah(e,t,n){Uo[e]||(Uo[e]=!0)}function oh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Cd(e){return Ym(e.context)}function W(e){q(!1)}function uh(e){let{basename:t="/",children:n=null,location:r,navigationType:l=vt.Pop,navigator:i,static:a=!1,future:o}=e;_r()&&q(!1);let u=t.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:u,navigator:i,static:a,future:yr({v7_relativeSplatPath:!1},o)}),[u,o,i,a]);typeof r=="string"&&(r=Ln(r));let{pathname:p="/",search:d="",hash:x="",state:w=null,key:g="default"}=r,j=v.useMemo(()=>{let y=En(p,u);return y==null?null:{location:{pathname:y,search:d,hash:x,state:w,key:g},navigationType:l}},[u,p,d,x,w,g,l]);return j==null?null:v.createElement(Mt.Provider,{value:f},v.createElement(Ys.Provider,{children:n,value:j}))}function ch(e){let{children:t,location:n}=e;return Gm(wi(t),n)}new Promise(()=>{});function wi(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,l)=>{if(!v.isValidElement(r))return;let i=[...t,l];if(r.type===v.Fragment){n.push.apply(n,wi(r.props.children,i));return}r.type!==W&&q(!1),!r.props.index||!r.props.children||q(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=wi(r.props.children,i)),n.push(a)}),n}/**
|
|
59
|
-
* React Router DOM v6.30.3
|
|
60
|
-
*
|
|
61
|
-
* Copyright (c) Remix Software Inc.
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the MIT license found in the
|
|
64
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
-
*
|
|
66
|
-
* @license MIT
|
|
67
|
-
*/function Ts(){return Ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ts.apply(this,arguments)}function Pd(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i<r.length;i++)l=r[i],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function dh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fh(e,t){return e.button===0&&(!t||t==="_self")&&!dh(e)}const ph=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],mh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],hh="6";try{window.__reactRouterVersion=hh}catch{}const xh=v.createContext({isTransitioning:!1}),vh="startTransition",Bo=uf[vh];function gh(e){let{basename:t,children:n,future:r,window:l}=e,i=v.useRef();i.current==null&&(i.current=jm({window:l,v5Compat:!0}));let a=i.current,[o,u]=v.useState({action:a.action,location:a.location}),{v7_startTransition:f}=r||{},p=v.useCallback(d=>{f&&Bo?Bo(()=>u(d)):u(d)},[u,f]);return v.useLayoutEffect(()=>a.listen(p),[a,p]),v.useEffect(()=>oh(r),[r]),v.createElement(uh,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const yh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X=v.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:a,state:o,target:u,to:f,preventScrollReset:p,viewTransition:d}=t,x=Pd(t,ph),{basename:w}=v.useContext(Mt),g,j=!1;if(typeof f=="string"&&jh.test(f)&&(g=f,yh))try{let h=new URL(window.location.href),N=f.startsWith("//")?new URL(h.protocol+f):new URL(f),b=En(N.pathname,w);N.origin===h.origin&&b!=null?f=b+N.search+N.hash:j=!0}catch{}let y=Qm(f,{relative:l}),m=kh(f,{replace:a,state:o,target:u,preventScrollReset:p,relative:l,viewTransition:d});function c(h){r&&r(h),h.defaultPrevented||m(h)}return v.createElement("a",Ts({},x,{href:g||y,onClick:j||i?r:c,ref:n,target:u}))}),wh=v.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:a=!1,style:o,to:u,viewTransition:f,children:p}=t,d=Pd(t,mh),x=Gs(u,{relative:d.relative}),w=Jt(),g=v.useContext(jd),{navigator:j,basename:y}=v.useContext(Mt),m=g!=null&&Sh(x)&&f===!0,c=j.encodeLocation?j.encodeLocation(x).pathname:x.pathname,h=w.pathname,N=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;l||(h=h.toLowerCase(),N=N?N.toLowerCase():null,c=c.toLowerCase()),N&&y&&(N=En(N,y)||N);const b=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let k=h===c||!a&&h.startsWith(c)&&h.charAt(b)==="/",_=N!=null&&(N===c||!a&&N.startsWith(c)&&N.charAt(c.length)==="/"),E={isActive:k,isPending:_,isTransitioning:m},F=k?r:void 0,L;typeof i=="function"?L=i(E):L=[i,k?"active":null,_?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let C=typeof o=="function"?o(E):o;return v.createElement(X,Ts({},d,{"aria-current":F,className:L,ref:n,style:C,to:u,viewTransition:f}),typeof p=="function"?p(E):p)});var Ni;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ni||(Ni={}));var Vo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vo||(Vo={}));function Nh(e){let t=v.useContext(Ks);return t||q(!1),t}function kh(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:a,viewTransition:o}=t===void 0?{}:t,u=kd(),f=Jt(),p=Gs(e,{relative:a});return v.useCallback(d=>{if(fh(d,n)){d.preventDefault();let x=r!==void 0?r:Ps(f)===Ps(p);u(e,{replace:x,state:l,preventScrollReset:i,relative:a,viewTransition:o})}},[f,u,p,r,l,n,e,i,a,o])}function Sh(e,t){t===void 0&&(t={});let n=v.useContext(xh);n==null&&q(!1);let{basename:r}=Nh(Ni.useViewTransitionState),l=Gs(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=En(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=En(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ji(l.pathname,a)!=null||ji(l.pathname,i)!=null}/**
|
|
68
|
-
* @license lucide-react v0.460.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const bh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Td=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
73
|
-
* @license lucide-react v0.460.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/var _h={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
78
|
-
* @license lucide-react v0.460.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const Eh=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:i,iconNode:a,...o},u)=>v.createElement("svg",{ref:u,..._h,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Td("lucide",l),...o},[...a.map(([f,p])=>v.createElement(f,p)),...Array.isArray(i)?i:[i]]));/**
|
|
83
|
-
* @license lucide-react v0.460.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const z=(e,t)=>{const n=v.forwardRef(({className:r,...l},i)=>v.createElement(Eh,{ref:i,iconNode:t,className:Td(`lucide-${bh(e)}`,r),...l}));return n.displayName=`${e}`,n};/**
|
|
88
|
-
* @license lucide-react v0.460.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const Ld=z("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
93
|
-
* @license lucide-react v0.460.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const Md=z("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
98
|
-
* @license lucide-react v0.460.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const Ch=z("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
|
|
103
|
-
* @license lucide-react v0.460.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const Ph=z("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
|
|
108
|
-
* @license lucide-react v0.460.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Wo=z("BellOff",[["path",{d:"M8.7 3A6 6 0 0 1 18 8a21.3 21.3 0 0 0 .6 5",key:"o7mx20"}],["path",{d:"M17 17H3s3-2 3-9a4.67 4.67 0 0 1 .3-1.7",key:"16f1lm"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
113
|
-
* @license lucide-react v0.460.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const ki=z("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
|
118
|
-
* @license lucide-react v0.460.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const Rd=z("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
123
|
-
* @license lucide-react v0.460.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const Th=z("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
128
|
-
* @license lucide-react v0.460.0 - ISC
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the ISC license.
|
|
131
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const Lh=z("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
133
|
-
* @license lucide-react v0.460.0 - ISC
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the ISC license.
|
|
136
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const at=z("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
138
|
-
* @license lucide-react v0.460.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the ISC license.
|
|
141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const Rt=z("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
143
|
-
* @license lucide-react v0.460.0 - ISC
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the ISC license.
|
|
146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const Mh=z("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
148
|
-
* @license lucide-react v0.460.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const Rh=z("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
153
|
-
* @license lucide-react v0.460.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const zh=z("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
158
|
-
* @license lucide-react v0.460.0 - ISC
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the ISC license.
|
|
161
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const Oh=z("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
163
|
-
* @license lucide-react v0.460.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const Ih=z("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
168
|
-
* @license lucide-react v0.460.0 - ISC
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the ISC license.
|
|
171
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const $h=z("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
173
|
-
* @license lucide-react v0.460.0 - ISC
|
|
174
|
-
*
|
|
175
|
-
* This source code is licensed under the ISC license.
|
|
176
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const Yt=z("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
178
|
-
* @license lucide-react v0.460.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const Dh=z("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
183
|
-
* @license lucide-react v0.460.0 - ISC
|
|
184
|
-
*
|
|
185
|
-
* This source code is licensed under the ISC license.
|
|
186
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const Si=z("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
188
|
-
* @license lucide-react v0.460.0 - ISC
|
|
189
|
-
*
|
|
190
|
-
* This source code is licensed under the ISC license.
|
|
191
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const zd=z("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
193
|
-
* @license lucide-react v0.460.0 - ISC
|
|
194
|
-
*
|
|
195
|
-
* This source code is licensed under the ISC license.
|
|
196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const Od=z("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
198
|
-
* @license lucide-react v0.460.0 - ISC
|
|
199
|
-
*
|
|
200
|
-
* This source code is licensed under the ISC license.
|
|
201
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const Id=z("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
203
|
-
* @license lucide-react v0.460.0 - ISC
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the ISC license.
|
|
206
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const wa=z("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
208
|
-
* @license lucide-react v0.460.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const Fh=z("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
213
|
-
* @license lucide-react v0.460.0 - ISC
|
|
214
|
-
*
|
|
215
|
-
* This source code is licensed under the ISC license.
|
|
216
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const Ah=z("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
218
|
-
* @license lucide-react v0.460.0 - ISC
|
|
219
|
-
*
|
|
220
|
-
* This source code is licensed under the ISC license.
|
|
221
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const Na=z("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
223
|
-
* @license lucide-react v0.460.0 - ISC
|
|
224
|
-
*
|
|
225
|
-
* This source code is licensed under the ISC license.
|
|
226
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const ka=z("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
228
|
-
* @license lucide-react v0.460.0 - ISC
|
|
229
|
-
*
|
|
230
|
-
* This source code is licensed under the ISC license.
|
|
231
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const Uh=z("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
233
|
-
* @license lucide-react v0.460.0 - ISC
|
|
234
|
-
*
|
|
235
|
-
* This source code is licensed under the ISC license.
|
|
236
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const Bh=z("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
238
|
-
* @license lucide-react v0.460.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const Vh=z("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
243
|
-
* @license lucide-react v0.460.0 - ISC
|
|
244
|
-
*
|
|
245
|
-
* This source code is licensed under the ISC license.
|
|
246
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/const Wh=z("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
248
|
-
* @license lucide-react v0.460.0 - ISC
|
|
249
|
-
*
|
|
250
|
-
* This source code is licensed under the ISC license.
|
|
251
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
-
*/const jr=z("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
253
|
-
* @license lucide-react v0.460.0 - ISC
|
|
254
|
-
*
|
|
255
|
-
* This source code is licensed under the ISC license.
|
|
256
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
-
*/const Hh=z("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
258
|
-
* @license lucide-react v0.460.0 - ISC
|
|
259
|
-
*
|
|
260
|
-
* This source code is licensed under the ISC license.
|
|
261
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
-
*/const $d=z("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
263
|
-
* @license lucide-react v0.460.0 - ISC
|
|
264
|
-
*
|
|
265
|
-
* This source code is licensed under the ISC license.
|
|
266
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
-
*/const Qh=z("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
268
|
-
* @license lucide-react v0.460.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/const Kh=z("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
273
|
-
* @license lucide-react v0.460.0 - ISC
|
|
274
|
-
*
|
|
275
|
-
* This source code is licensed under the ISC license.
|
|
276
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
-
*/const Ho=z("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
278
|
-
* @license lucide-react v0.460.0 - ISC
|
|
279
|
-
*
|
|
280
|
-
* This source code is licensed under the ISC license.
|
|
281
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
-
*/const Yh=z("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
283
|
-
* @license lucide-react v0.460.0 - ISC
|
|
284
|
-
*
|
|
285
|
-
* This source code is licensed under the ISC license.
|
|
286
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/const Dd=z("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Fd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=Fd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _e(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=Fd(e))&&(r&&(r+=" "),r+=t);return r}function B(e){if(!e)return"";const t=new Date(e.replace(" ","T")+(e.includes("T")||e.includes("Z")?"":"Z"));if(isNaN(t.getTime()))return e;const n=Math.max(0,(Date.now()-t.getTime())/1e3);if(n<60)return`${Math.floor(n)}s ago`;const r=n/60;if(r<60)return`${Math.floor(r)}m ago`;const l=r/60;if(l<24)return`${Math.floor(l)}h ago`;const i=l/24;if(i<30)return`${Math.floor(i)}d ago`;const a=i/30;return a<12?`${Math.floor(a)}mo ago`:`${Math.floor(a/12)}y ago`}function Gh(e){return e?e.toLowerCase().replace(/[^a-z0-9]+/g,"-"):"none"}function Xh(e){switch(Gh(e)){case"shinobi":return"bg-ws-shinobi text-white";case"shinobiapps":return"bg-ws-shinobiapps text-bg";case"sitesnap":return"bg-ws-sitesnap text-bg";default:return"bg-border-2 text-text-muted italic"}}function Sa({workspace:e}){return s.jsx("span",{className:_e("inline-block rounded text-[10px] font-medium lowercase tracking-wider px-1.5 py-0.5",Xh(e)),children:e??"(no workspace)"})}const Jh={default:"bg-border-2 border-border text-text hover:bg-border",primary:"bg-accent-2 border-accent-2 text-white hover:bg-accent-3",ghost:"bg-transparent border-transparent text-text-muted hover:text-text hover:bg-panel",danger:"bg-danger border-danger text-white hover:opacity-90"},qh={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-1.5"},R=v.forwardRef(({variant:e="default",size:t="md",className:n,...r},l)=>s.jsx("button",{ref:l,className:_e("border rounded transition-colors font-medium cursor-pointer disabled:opacity-50 disabled:cursor-wait",Jh[e],qh[t],n),...r}));R.displayName="Button";async function $(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!n.ok){const r=await n.text();throw new Error(`${(t==null?void 0:t.method)??"GET"} ${e} → ${n.status}: ${r.slice(0,200)}`)}return await n.json()}function Ad(e){const t=new URLSearchParams;e!=null&&e.sort&&t.set("sort",e.sort),e!=null&&e.include_archived&&t.set("include_archived","true");const n=t.toString();return $(`/api/projects${n?`?${n}`:""}`)}function Zh(e){return $(`/api/projects/${e}/snapshot`)}function ex(e,t=8){const n=new URLSearchParams({q:e,limit:String(t)});return $(`/api/recall?${n.toString()}`)}function Ud(e,t){return $(`/api/subtasks/${e}`,{method:"PATCH",body:JSON.stringify(t)})}function tx(e,t){return $(`/api/decisions/${e}/status`,{method:"PATCH",body:JSON.stringify({status:t})})}function nx(e){return $(`/api/projects/${e}/decision-drafts`)}function rx(e){return $(`/api/decision-drafts/${e}/approve`,{method:"POST",body:"{}"})}function sx(e){return $(`/api/decision-drafts/${e}/reject`,{method:"POST",body:"{}"})}function lx(e=200){return $(`/api/sessions?limit=${e}`)}function ix(e){return $(`/api/sessions/${encodeURIComponent(e)}`)}function ax(){return $("/api/settings")}function ox(e){return $("/api/settings",{method:"POST",body:JSON.stringify({patch:e})})}function ux(){return $("/api/push/vapid-key")}function cx(){return $("/api/push/subscriptions")}function dx(e){return $("/api/push/subscribe",{method:"POST",body:JSON.stringify(e)})}function Qo(e){return $(`/api/push/subscriptions/${e}`,{method:"DELETE"})}function fx(){return $("/api/push/test",{method:"POST"})}function px(e){return $("/api/approvals")}function mx(e,t,n){return $(`/api/approvals/${e}/respond`,{method:"POST",body:JSON.stringify({value:t,note:n})})}function hx(e){return $(`/api/approvals/${e}/cancel`,{method:"POST",body:"{}"})}function xx(){return $("/api/sync/status")}function vx(){return $("/api/sync/push",{method:"POST"})}function gx(){return $("/api/sync/pull",{method:"POST"})}function Ko(e){return $(`/api/projects/${e}/time-stats`)}function Yo(e){return $(`/api/projects/${e}/cost-stats`)}function yx(e={}){return $("/api/cost/ingest",{method:"POST",body:JSON.stringify(e)})}function jx(){return $("/api/plugins")}function wx(e){return $("/api/plugins/search",{method:"POST",body:JSON.stringify({query:e})})}function Nx(e){return $("/api/plugins/install",{method:"POST",body:JSON.stringify({pkg:e})})}function kx(e){return $(`/api/plugins/${encodeURIComponent(e)}`,{method:"DELETE"})}function Sx(){return $("/api/telemetry/summary")}function bx(){return $("/api/telemetry/flush",{method:"POST",body:"{}"})}function _x(){return $("/api/relay/status")}function Ex(){return $("/api/relay/broadcast-sync",{method:"POST",body:"{}"})}function Cx(){const[e,t]=v.useState(null),[n,r]=v.useState({kind:"idle"});v.useEffect(()=>{l()},[]);async function l(){try{t(await xx())}catch(o){r({kind:"err",message:o instanceof Error?o.message:String(o)})}}async function i(o){if(!(o==="pull"&&!window.confirm("Pull overwrites the local DB with the latest snapshot from the sync repo. Continue?"))){r({kind:"busy",op:o});try{const u=o==="push"?await vx():await gx();if(!u.ok)throw new Error(u.error??"unknown error");r({kind:"ok",op:o,elapsedMs:u.elapsed_ms??0}),await l(),o==="pull"&&setTimeout(()=>location.reload(),500)}catch(u){r({kind:"err",message:u instanceof Error?u.message:String(u)})}}}const a=e==null?void 0:e.sync;return s.jsxs("div",{className:"bg-panel border border-border rounded-md p-3 mt-4",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Sync"}),s.jsxs("div",{className:"space-y-1 text-xs font-mono",children:[e!=null&&e.configured&&a?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:["push: ",s.jsx("span",{className:a.last_push_at?"text-success":"text-text-muted",children:B(a.last_push_at)||"never"})]}),s.jsxs("div",{children:["pull: ",s.jsx("span",{className:a.last_pull_at?"text-success":"text-text-muted",children:B(a.last_pull_at)||"never"})]}),s.jsxs("div",{className:"text-text-dim text-[10px] break-all",children:[a.repo_path,s.jsx("br",{}),"(branch: ",a.branch,")"]})]}):s.jsx("div",{className:"text-text-muted",children:"not configured"}),n.kind==="ok"&&s.jsxs("div",{className:"text-success",children:[n.op," OK (",n.elapsedMs,"ms)"]}),n.kind==="err"&&s.jsx("div",{className:"text-danger break-all",children:n.message})]}),s.jsxs("div",{className:"flex gap-1.5 mt-3",children:[s.jsxs(R,{size:"sm",variant:"default",className:"flex-1 flex items-center justify-center gap-1",disabled:n.kind==="busy",onClick:()=>void i("pull"),children:[n.kind==="busy"&&n.op==="pull"?s.jsx(Yt,{className:"w-3 h-3 animate-spin"}):s.jsx(Ch,{className:"w-3 h-3"}),"Pull"]}),s.jsxs(R,{size:"sm",variant:"primary",className:"flex-1 flex items-center justify-center gap-1",disabled:n.kind==="busy",onClick:()=>void i("push"),children:[n.kind==="busy"&&n.op==="push"?s.jsx(Yt,{className:"w-3 h-3 animate-spin"}):s.jsx(Ph,{className:"w-3 h-3"}),"Push"]})]})]})}function Go({projects:e}){const t=Jt(),n=ja(),r=n.id?Number(n.id):null,l=e.filter(p=>!p.archived_at),i=e.filter(p=>p.archived_at),a=new Map;for(const p of l){const d=p.workspace??"(no workspace)";a.has(d)||a.set(d,[]),a.get(d).push(p)}const[o,u]=v.useState(!1);v.useEffect(()=>{u(/Mac|iPhone|iPad/.test(navigator.platform??navigator.userAgent))},[]);const f=o?"⌘":"Ctrl";return s.jsxs("aside",{className:"bg-panel-2 border-r border-border w-64 flex-shrink-0 overflow-y-auto scrollbar-thin p-4",children:[s.jsx(X,{to:"/",className:"block text-lg font-bold tracking-wider mb-4 text-text",children:"Shinobi 🥷"}),s.jsxs("button",{onClick:()=>window.dispatchEvent(new CustomEvent("cmd-palette:open")),className:"w-full flex items-center gap-2 px-2 py-1.5 mb-4 rounded text-sm bg-panel border border-border text-text-muted hover:text-text hover:border-accent/60 transition-colors",children:[s.jsx(Na,{className:"w-3.5 h-3.5"}),s.jsx("span",{className:"flex-1 text-left",children:"Search..."}),s.jsxs("kbd",{className:"text-[10px] border border-border rounded px-1 py-0.5",children:[f," K"]})]}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Workspace"}),s.jsxs("ul",{className:"mb-4",children:[s.jsx("li",{children:s.jsx(X,{to:"/sessions",className:_e("block px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/sessions"?"bg-border text-text":"text-text hover:bg-panel"),children:"All sessions"})}),s.jsx("li",{children:s.jsxs(X,{to:"/voice",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/voice"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Si,{className:"w-3.5 h-3.5"})," Voice capture"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/approvals",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/approvals"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Vh,{className:"w-3.5 h-3.5"})," Approvals"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/push",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/push"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(ki,{className:"w-3.5 h-3.5"})," Push"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/relay",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/relay"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Id,{className:"w-3.5 h-3.5"})," Relay"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/plugins",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/plugins"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(zd,{className:"w-3.5 h-3.5"})," Plugins"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/telemetry",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/telemetry"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Ld,{className:"w-3.5 h-3.5"})," Telemetry"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/settings",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/settings"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Uh,{className:"w-3.5 h-3.5"})," Settings"]})})]}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Projects"}),a.size===0?s.jsx("div",{className:"text-text-muted text-sm italic",children:"(none)"}):[...a.entries()].map(([p,d])=>s.jsxs("div",{className:"mb-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 mt-3 mb-1 text-[10px] uppercase tracking-wider text-text-muted",children:[s.jsx(Sa,{workspace:p==="(no workspace)"?null:p}),s.jsx("span",{children:d.length})]}),s.jsx("ul",{children:d.map(x=>s.jsx("li",{children:s.jsx(X,{to:`/projects/${x.id}`,className:_e("block px-2 py-1.5 rounded text-sm transition-colors",r===x.id?"bg-border text-text":"text-text hover:bg-panel"),children:x.title})},x.id))})]},p)),i.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mt-4 mb-2 flex items-center gap-1.5",children:[s.jsx(Md,{className:"w-3 h-3"}),"Archived"]}),s.jsx("ul",{children:i.map(p=>s.jsx("li",{children:s.jsx(X,{to:`/projects/${p.id}`,className:"block px-2 py-1.5 rounded text-sm text-text-dim hover:bg-panel",children:p.title})},p.id))})]}),s.jsx(Cx,{})]})}const Px={project:{label:"Projects",icon:Oh},subtask:{label:"Tasks",icon:$h},decision:{label:"Decisions",icon:Ih},dead_end:{label:"Dead ends",icon:Hh},note:{label:"Notes",icon:zh}};function Tx(e){const t=[];for(const n of e.projects)t.push({kind:"project",id:n.id,title:n.title,subtitle:n.workspace?`workspace: ${n.workspace}`:"no workspace",projectId:n.id,href:`/projects/${n.id}`});for(const n of e.subtasks)t.push({kind:"subtask",id:n.id,title:n.title,subtitle:`task #${n.id} · status: ${n.status}`,projectId:n.project_id,href:`/projects/${n.project_id}`});for(const n of e.decisions)t.push({kind:"decision",id:n.id,title:n.summary,subtitle:`decision #${n.id} · ${n.kind}`,projectId:n.project_id,href:`/projects/${n.project_id}/decisions`});for(const n of e.dead_ends)t.push({kind:"dead_end",id:n.id,title:n.attempted_approach.slice(0,100),subtitle:`dead end #${n.id}${n.never_retry?" · never retry":""}`,projectId:n.project_id,href:`/projects/${n.project_id}/dead-ends`});for(const n of e.notes)t.push({kind:"note",id:n.id,title:n.body.slice(0,100),subtitle:`note #${n.id}`,projectId:n.project_id,href:`/projects/${n.project_id}/notes`});return t}function Lx({open:e,onClose:t}){const n=kd(),[r,l]=v.useState(""),[i,a]=v.useState(null),[o,u]=v.useState(!1),[f,p]=v.useState(0),d=v.useRef(null),x=v.useRef(null);v.useEffect(()=>{e&&(l(""),a(null),p(0),setTimeout(()=>{var j;return(j=d.current)==null?void 0:j.focus()},0))},[e]),v.useEffect(()=>{if(!e)return;const j=r.trim();if(j.length<2){a(null),u(!1);return}u(!0);const y=setTimeout(()=>{ex(j,6).then(m=>{a(m),p(0)}).catch(()=>a(null)).finally(()=>u(!1))},150);return()=>clearTimeout(y)},[r,e]);const w=v.useMemo(()=>i?Tx(i):[],[i]);if(v.useEffect(()=>{if(!e)return;function j(y){if(y.key==="Escape")y.preventDefault(),t();else if(y.key==="ArrowDown")y.preventDefault(),p(m=>Math.min(m+1,w.length-1));else if(y.key==="ArrowUp")y.preventDefault(),p(m=>Math.max(m-1,0));else if(y.key==="Enter"){const m=w[f];m&&(y.preventDefault(),n(m.href),t())}}return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[e,w,f,n,t]),v.useEffect(()=>{var y;const j=(y=x.current)==null?void 0:y.querySelector(`[data-cmd-idx="${f}"]`);j==null||j.scrollIntoView({block:"nearest"})},[f]),!e)return null;const g=["project","subtask","decision","dead_end","note"].map(j=>({kind:j,items:w.filter(y=>y.kind===j)})).filter(j=>j.items.length>0);return pd.createPortal(s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-start justify-center pt-20 px-4",onClick:t,children:[s.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm","aria-hidden":!0}),s.jsxs("div",{className:"relative w-full max-w-2xl bg-panel border border-border rounded-lg shadow-2xl overflow-hidden",onClick:j=>j.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border",children:[s.jsx(Na,{className:"w-4 h-4 text-text-muted"}),s.jsx("input",{ref:d,type:"text",value:r,onChange:j=>l(j.target.value),placeholder:"Search projects, tasks, decisions, dead ends, notes...",className:"flex-1 bg-transparent text-text placeholder:text-text-dim outline-none text-sm"}),s.jsx("kbd",{className:"text-[10px] text-text-dim border border-border rounded px-1.5 py-0.5",children:"esc"})]}),s.jsx("div",{ref:x,className:"max-h-[60vh] overflow-y-auto",children:r.trim().length<2?s.jsx("div",{className:"px-4 py-6 text-center text-text-dim text-sm",children:"Type at least 2 characters to search."}):o&&w.length===0?s.jsx("div",{className:"px-4 py-6 text-center text-text-muted text-sm",children:"Searching..."}):w.length===0?s.jsxs("div",{className:"px-4 py-6 text-center text-text-muted text-sm",children:['No matches for "',r,'".']}):g.map(j=>{const y=Px[j.kind],m=y.icon;return s.jsxs("div",{className:"py-1",children:[s.jsxs("div",{className:"px-4 py-1.5 text-[10px] uppercase tracking-wider text-text-dim flex items-center gap-1.5",children:[s.jsx(m,{className:"w-3 h-3"}),y.label,s.jsxs("span",{className:"text-text-dim",children:["· ",j.items.length]})]}),j.items.map(c=>{const h=w.indexOf(c),N=h===f;return s.jsxs("button",{"data-cmd-idx":h,onMouseEnter:()=>p(h),onClick:()=>{n(c.href),t()},className:`w-full text-left px-4 py-2 flex flex-col gap-0.5 border-l-2 ${N?"bg-panel-2 border-accent":"border-transparent hover:bg-panel-2/60"}`,children:[s.jsx("span",{className:"text-sm text-text truncate",children:c.title}),s.jsx("span",{className:"text-[11px] text-text-muted truncate",children:c.subtitle})]},`${c.kind}-${c.id}`)})]},j.kind)})}),s.jsxs("div",{className:"px-4 py-2 border-t border-border text-[10px] text-text-dim flex items-center justify-between",children:[s.jsxs("span",{className:"flex items-center gap-3",children:[s.jsxs("span",{children:[s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"↑"})," ",s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"↓"})," navigate"]}),s.jsxs("span",{children:[s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"↵"})," open"]}),s.jsxs("span",{children:[s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"esc"})," close"]})]}),i&&s.jsxs("span",{children:[w.length," ",w.length===1?"result":"results"]})]})]})]}),document.body)}function Mx(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[l,i]=v.useState(!1),[a,o]=v.useState(!1),u=Jt();return v.useEffect(()=>{i(!1)},[u.pathname]),v.useEffect(()=>{function f(d){(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),o(w=>!w))}function p(){o(!0)}return window.addEventListener("keydown",f),window.addEventListener("cmd-palette:open",p),()=>{window.removeEventListener("keydown",f),window.removeEventListener("cmd-palette:open",p)}},[]),v.useEffect(()=>{let f=!1;return Ad({sort:"active",include_archived:!0}).then(p=>{f||t(p)}).catch(p=>{f||r(p instanceof Error?p.message:String(p))}),()=>{f=!0}},[]),n?s.jsx("div",{className:"min-h-screen flex items-center justify-center text-danger",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl mb-2",children:"Failed to load projects"}),s.jsx("pre",{className:"text-sm",children:n})]})}):e?s.jsxs("div",{className:"min-h-screen flex",children:[s.jsx("div",{className:"hidden md:block",children:s.jsx(Go,{projects:e})}),l&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>i(!1)}),s.jsx("div",{className:"md:hidden fixed inset-y-0 left-0 z-50 shadow-2xl",children:s.jsx(Go,{projects:e})})]}),s.jsxs("main",{className:"flex-1 overflow-y-auto min-w-0",children:[s.jsxs("div",{className:"md:hidden sticky top-0 z-30 bg-bg/95 backdrop-blur border-b border-border px-4 py-3 flex items-center gap-3",children:[s.jsx("button",{onClick:()=>i(f=>!f),className:"text-text hover:text-accent","aria-label":l?"Close menu":"Open menu",children:l?s.jsx(Dd,{className:"w-5 h-5"}):s.jsx(Dh,{className:"w-5 h-5"})}),s.jsx("span",{className:"text-text font-semibold tracking-wider",children:"Shinobi 🥷"})]}),s.jsx("div",{className:"p-4 md:p-8",children:s.jsx(Cd,{context:{projects:e}})})]}),s.jsx(Lx,{open:a,onClose:()=>o(!1)})]}):s.jsx("div",{className:"min-h-screen flex items-center justify-center text-text-muted",children:"loading..."})}const Rx={default:"bg-border-2 text-text","status-todo":"bg-border text-text","status-in_progress":"bg-accent-2 text-white","status-done":"bg-text-dim text-text","priority-urgent":"bg-danger text-white","priority-high":"bg-orange text-bg","priority-medium":"bg-warning text-bg","priority-low":"bg-text-dim text-text-muted"};function le({children:e,variant:t="default",className:n}){return s.jsx("span",{className:_e("inline-block rounded text-[10px] font-medium uppercase tracking-wider px-1.5 py-0.5",Rx[t],n),children:e})}function Er({priority:e}){return s.jsx(le,{variant:`priority-${e}`,children:e})}function Xs({status:e}){return s.jsx(le,{variant:`status-${e}`,children:e})}const Xo="shinobi.home.workspaceFilter",Zt="__all__",Jo="__none__";function zx({done:e,total:t}){if(t===0)return s.jsx("span",{className:"text-text-muted text-xs",children:"—"});const n=Math.round(e/t*100),l=e===t?"bg-emerald-500":n>=50?"bg-accent":"bg-amber-500";return s.jsxs("div",{className:"flex items-center gap-2 min-w-[140px]",children:[s.jsx("div",{className:"flex-1 h-1.5 bg-border/40 rounded overflow-hidden",children:s.jsx("div",{className:`h-full ${l} transition-all`,style:{width:`${n}%`},role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${e} of ${t} subtasks done`})}),s.jsxs("span",{className:"text-text-muted text-xs tabular-nums whitespace-nowrap",children:[e,"/",t," · ",n,"%"]})]})}function qo({rows:e,dim:t=!1}){return s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Workspace"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Title"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Status"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Priority"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Progress"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Type"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Target path"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Due"}),s.jsx("th",{className:"font-medium pb-2",children:"Created"})]})}),s.jsx("tbody",{className:t?"opacity-60":"",children:e.map(n=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40",children:[s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Sa,{workspace:n.workspace})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(X,{to:`/projects/${n.id}`,className:"text-text hover:text-accent font-medium",children:n.title})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Xs,{status:n.status})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Er,{priority:n.priority})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(zx,{done:n.subtasks_done,total:n.subtasks_total})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.project_type??""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted font-mono text-xs",children:n.target_path??""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.due_date??""}),s.jsx("td",{className:"py-2 text-text-muted text-xs",title:n.created_at,children:B(n.created_at)})]},n.id))})]})})}function Ox(){const{projects:e}=Fe(),[t,n]=v.useState(!1),[r,l]=v.useState(()=>typeof window>"u"?Zt:window.localStorage.getItem(Xo)??Zt),i=v.useMemo(()=>{const d=new Set;let x=!1;for(const g of e)g.workspace?d.add(g.workspace):x=!0;return{named:Array.from(d).sort((g,j)=>g.localeCompare(j)),hasNoWorkspace:x}},[e]);function a(d){return r===Zt?d:r===Jo?d.filter(x=>!x.workspace):d.filter(x=>x.workspace===r)}const o=a(e.filter(d=>!d.archived_at)),u=a(e.filter(d=>d.archived_at));function f(d){l(d),typeof window<"u"&&window.localStorage.setItem(Xo,d)}const p=i.named.length>1||i.named.length>=1&&i.hasNoWorkspace;return s.jsxs("div",{children:[s.jsxs("header",{className:"flex items-baseline justify-between border-b border-border pb-3 mb-6",children:[s.jsx("h1",{className:"text-2xl text-text",children:"Projects"}),s.jsxs("span",{className:"text-text-muted text-xs",children:[o.length," active · ",u.length," archived"]})]}),p&&s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("label",{htmlFor:"workspace-filter",className:"text-[11px] uppercase tracking-wider text-text-muted",children:"Workspace"}),s.jsxs("select",{id:"workspace-filter",value:r,onChange:d=>f(d.target.value),className:"bg-panel border border-border rounded px-2 py-1 text-sm text-text hover:border-accent/60 focus:outline-none focus:border-accent",children:[s.jsx("option",{value:Zt,children:"All workspaces"}),i.named.map(d=>s.jsx("option",{value:d,children:d},d)),i.hasNoWorkspace&&s.jsx("option",{value:Jo,children:"(no workspace)"})]}),r!==Zt&&s.jsx("button",{onClick:()=>f(Zt),className:"text-xs text-text-muted hover:text-text",children:"clear"})]}),e.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No projects yet. Create one via the ",s.jsx("code",{children:"create_project"})," MCP tool, then refresh."]}):o.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No active projects match this workspace filter."}):s.jsx(qo,{rows:o}),u.length>0&&s.jsxs("section",{className:"mt-8",children:[s.jsxs("button",{onClick:()=>n(d=>!d),className:"flex items-center gap-1.5 text-[11px] uppercase tracking-wider text-text-muted hover:text-text mb-3",children:[t?s.jsx(Th,{className:"w-3.5 h-3.5"}):s.jsx(Lh,{className:"w-3.5 h-3.5"}),s.jsx(Md,{className:"w-3.5 h-3.5"}),"Archived (",u.length,")"]}),t&&s.jsx(qo,{rows:u,dim:!0})]})]})}function Ix({projectId:e,draftPendingCount:t}){const n=`/projects/${e}`,r=[{to:n,label:"Board",end:!0},{to:`${n}/subtasks`,label:"List"},{to:`${n}/decisions`,label:"Decisions"},{to:`${n}/decision-drafts`,label:"Drafts",badge:t&&t>0?s.jsx("span",{className:"ml-1 inline-block bg-warning text-bg text-[9px] font-bold px-1.5 py-0.5 rounded-full",children:t}):null},{to:`${n}/dead-ends`,label:"Dead Ends"},{to:`${n}/notes`,label:"Notes"},{to:`${n}/plans`,label:"Plans"},{to:`${n}/context`,label:"Context"},{to:`${n}/sessions`,label:"Sessions"},{to:`${n}/timeline`,label:"Timeline"},{to:`${n}/analytics`,label:"Analytics"}];return s.jsx("nav",{className:"flex gap-1 mb-4 border-b border-border overflow-x-auto scrollbar-thin",children:r.map(l=>s.jsxs(wh,{to:l.to,end:l.end,className:({isActive:i})=>_e("px-3.5 py-2 text-sm -mb-px border-b-2 whitespace-nowrap transition-colors flex items-center",i?"text-text border-accent":"text-text-muted border-transparent hover:text-text hover:border-border-2"),children:[l.label,l.badge]},l.to))})}function $x({subtask:e,onClose:t,onChanged:n}){if(v.useEffect(()=>{if(!e)return;const l=i=>{i.key==="Escape"&&t()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t]),!e)return null;async function r(l){if(e)try{await Ud(e.id,{status:l}),await n()}catch(i){alert("Transition failed: "+(i instanceof Error?i.message:String(i)))}}return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:t,"aria-hidden":"true"}),s.jsxs("aside",{className:"fixed inset-y-0 right-0 z-50 w-full sm:w-[480px] bg-bg border-l border-border shadow-2xl flex flex-col",role:"dialog","aria-label":`Subtask ${e.id}`,children:[s.jsxs("header",{className:"flex items-start justify-between gap-3 px-5 py-4 border-b border-border",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-1",children:["#",e.id]}),s.jsx("h2",{className:"text-lg font-semibold text-text break-words",children:e.title}),s.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap",children:[s.jsx(Xs,{status:e.status}),s.jsx(Er,{priority:e.priority}),e.due_date&&s.jsxs("span",{className:"text-xs text-text-muted",children:["due ",e.due_date]})]})]}),s.jsx("button",{onClick:t,className:"text-text-muted hover:text-text","aria-label":"Close",children:s.jsx(Dd,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[e.description?s.jsxs("section",{children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Description"}),s.jsx("div",{className:"text-sm text-text whitespace-pre-wrap leading-relaxed",children:e.description})]}):s.jsx("section",{className:"text-sm text-text-dim italic",children:"No description."}),s.jsxs("section",{children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Transition status"}),s.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.status!=="todo"&&s.jsxs(R,{size:"sm",variant:"ghost",onClick:()=>void r("todo"),className:"flex items-center gap-1",children:[s.jsx($d,{className:"w-3 h-3"})," todo"]}),e.status!=="in_progress"&&s.jsxs(R,{size:"sm",variant:"ghost",onClick:()=>void r("in_progress"),className:"flex items-center gap-1",children:[s.jsx(Od,{className:"w-3 h-3"})," in progress"]}),e.status!=="done"&&s.jsxs(R,{size:"sm",variant:"ghost",onClick:()=>void r("done"),className:"flex items-center gap-1",children:[s.jsx(Rd,{className:"w-3 h-3"})," done"]})]})]}),e.depends_on&&e.depends_on.length>0&&s.jsxs("section",{children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Depends on"}),s.jsx("div",{className:"text-sm text-text font-mono",children:e.depends_on.join(", ")})]}),e.files_touched&&e.files_touched.length>0&&s.jsxs("section",{children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Files touched"}),s.jsx("ul",{className:"text-xs text-text font-mono space-y-1",children:e.files_touched.map(l=>s.jsx("li",{className:"break-all",children:l},l))})]}),s.jsxs("section",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-xs",children:[s.jsx("div",{className:"text-text-muted",children:"Created"}),s.jsx("div",{className:"text-text",title:e.created_at,children:B(e.created_at)}),s.jsx("div",{className:"text-text-muted",children:"Updated"}),s.jsx("div",{className:"text-text",title:e.updated_at,children:B(e.updated_at)}),e.last_claimed_at&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"text-text-muted",children:"Last claimed"}),s.jsx("div",{className:"text-text",title:e.last_claimed_at,children:B(e.last_claimed_at)})]}),e.claude_session_id&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"text-text-muted",children:"Session"}),s.jsx("div",{className:"text-text font-mono break-all",children:e.claude_session_id})]})]})]})]})]})}function Dx(){const e=ja(),t=Number(e.id),[n,r]=v.useState(null),[l,i]=v.useState(null),[a,o]=v.useState(null),u=v.useCallback(async()=>{try{const d=await Zh(t);r(d)}catch(d){i(d instanceof Error?d.message:String(d))}},[t]);v.useEffect(()=>{Number.isFinite(t)&&(r(null),i(null),o(null),u())},[t,u]);const f=v.useMemo(()=>(n==null?void 0:n.subtasks.find(d=>d.id===a))??null,[n,a]);if(l)return s.jsxs("div",{className:"text-danger",children:["Error: ",l]});if(!n)return s.jsx("div",{className:"text-text-muted",children:"loading..."});const{project:p}=n;return s.jsxs("div",{children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-4",children:[s.jsx("h1",{className:"text-2xl text-text",children:p.title}),s.jsxs("div",{className:"mt-2 text-xs text-text-muted flex items-center gap-2 flex-wrap",children:[s.jsx(Sa,{workspace:p.workspace}),s.jsx("span",{children:"·"}),s.jsx(Xs,{status:p.status}),s.jsx("span",{children:"·"}),s.jsx(Er,{priority:p.priority}),p.due_date&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:["due ",p.due_date]})]}),p.target_path&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{className:"font-mono",children:["target ",p.target_path]})]}),p.recent_summary_at&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:["summary ",B(p.recent_summary_at)]})]})]})]}),s.jsx(Ix,{projectId:t,draftPendingCount:n.draft_counts.pending}),s.jsx(Cd,{context:{snapshot:n,refresh:u,openSubtask:d=>o(d)}}),s.jsx($x,{subtask:f,onClose:()=>o(null),onChanged:u})]})}const Fx=[{key:"todo",label:"Todo"},{key:"in_progress",label:"In Progress"},{key:"done",label:"Done"}];function Ax(){const{snapshot:e,refresh:t,openSubtask:n}=Fe(),{project:r,subtasks:l}=e,i={todo:[],in_progress:[],done:[]};for(const o of l)i[o.status].push(o);async function a(o,u){try{await Ud(o,{status:u}),await t()}catch(f){alert("Transition failed: "+(f instanceof Error?f.message:String(f)))}}return s.jsxs(s.Fragment,{children:[r.description&&s.jsx("pre",{className:"bg-panel border border-border rounded p-3 mb-6 whitespace-pre-wrap text-xs font-mono text-text",children:r.description}),r.recent_summary_md&&s.jsxs("div",{className:"bg-panel border border-border border-l-4 border-l-accent rounded-md p-4 mb-6",children:[s.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:["Recent session summary",r.recent_summary_provider&&s.jsxs("span",{className:"text-text-dim normal-case ml-2 tracking-normal",children:["via ",r.recent_summary_provider]})]}),s.jsx("div",{className:"text-sm text-text whitespace-pre-wrap leading-relaxed",children:r.recent_summary_md})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Fx.map(o=>s.jsxs("div",{className:"bg-panel border border-border rounded-md p-3 min-h-[200px]",children:[s.jsxs("h3",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-3",children:[o.label," (",i[o.key].length,")"]}),s.jsx("div",{className:"space-y-2",children:i[o.key].length===0?s.jsx("div",{className:"text-text-dim text-xs",children:"(empty)"}):i[o.key].map(u=>s.jsxs("button",{type:"button",onClick:()=>n(u.id),className:"w-full text-left bg-panel-2 border border-border rounded p-2.5 text-xs hover:border-accent/60 hover:bg-panel transition-colors cursor-pointer",children:[s.jsx("div",{className:"text-text font-medium mb-1",children:u.title}),s.jsxs("div",{className:"text-text-muted flex flex-wrap gap-2 items-center text-[11px]",children:[s.jsx(Er,{priority:u.priority}),u.due_date&&s.jsxs("span",{children:["due ",u.due_date]}),u.depends_on&&u.depends_on.length>0&&s.jsxs("span",{children:["deps: ",u.depends_on.join(",")]}),u.claude_session_id&&s.jsx("span",{title:u.claude_session_id,children:"session"})]}),s.jsxs("div",{className:"flex gap-1.5 mt-2",onClick:f=>f.stopPropagation(),children:[u.status!=="todo"&&s.jsxs(R,{size:"sm",variant:"ghost",onClick:()=>void a(u.id,"todo"),className:"flex items-center gap-1",children:[s.jsx($d,{className:"w-3 h-3"})," todo"]}),u.status!=="in_progress"&&s.jsxs(R,{size:"sm",variant:"ghost",onClick:()=>void a(u.id,"in_progress"),className:"flex items-center gap-1",children:[s.jsx(Od,{className:"w-3 h-3"})," in progress"]}),u.status!=="done"&&s.jsxs(R,{size:"sm",variant:"ghost",onClick:()=>void a(u.id,"done"),className:"flex items-center gap-1",children:[s.jsx(Rd,{className:"w-3 h-3"})," done"]})]})]},u.id))})]},o.key))})]})}function Ux(){const{snapshot:e,openSubtask:t}=Fe(),{subtasks:n}=e;return n.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No subtasks. Use ",s.jsx("code",{children:"create_task"})," or ",s.jsx("code",{children:"bulk_create_tasks"})," to seed."]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Title"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-28",children:"Status"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Priority"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Deps"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Due"}),s.jsx("th",{className:"font-medium pb-2 w-28",children:"Claimed"})]})}),s.jsx("tbody",{children:n.map(r=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top cursor-pointer",onClick:()=>t(r.id),children:[s.jsx("td",{className:"py-2 pr-3 text-text-muted font-mono",children:r.id}),s.jsxs("td",{className:"py-2 pr-3",children:[s.jsx("div",{className:"text-text font-medium",children:r.title}),r.description&&s.jsx("div",{className:"text-text-muted text-xs mt-1",children:r.description.length>200?r.description.slice(0,200)+"…":r.description})]}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Xs,{status:r.status})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Er,{priority:r.priority})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:r.depends_on&&r.depends_on.length>0?r.depends_on.join(", "):""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:r.due_date??""}),s.jsx("td",{className:"py-2 text-text-muted text-xs",title:r.last_claimed_at??"",children:B(r.last_claimed_at)})]},r.id))})]})})}const Bx=["open","fix_now","fix_later","wontfix","fixed","false_positive"];function Vx(e){switch(e){case"open":return"bg-accent-2 text-white";case"fix_now":return"bg-danger text-white";case"fix_later":return"bg-orange text-bg";case"wontfix":return"bg-text-dim text-text";case"fixed":return"bg-success text-bg";case"false_positive":return"bg-text-dim text-text";default:return"bg-border-2 text-text"}}function Wx(){const{snapshot:e,refresh:t}=Fe(),{decisions:n,draft_counts:r,project:l}=e;async function i(o,u){try{await tx(o,u),await t()}catch(f){alert("Transition failed: "+(f instanceof Error?f.message:String(f)))}}const a=r.pending>0?s.jsxs("div",{className:"bg-panel border-l-4 border-l-warning rounded-md p-3 mb-4 flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm",children:[s.jsxs("strong",{children:[r.pending," pending decision draft",r.pending>1?"s":""]})," ",s.jsx("span",{className:"text-text-muted",children:"extracted via LLM"})]}),s.jsx(X,{to:`/projects/${l.id}/decision-drafts`,className:"text-accent text-sm hover:underline",children:"Review →"})]}):null;return n.length===0?s.jsxs("div",{children:[a,s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No decisions logged. Use ",s.jsx("code",{children:"log_decision"})," via MCP."]})]}):s.jsxs("div",{children:[a,s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Kind"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Summary + Rationale"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-44",children:"Status"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-40",children:"Files"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Tags"}),s.jsx("th",{className:"font-medium pb-2 w-24",children:"Logged"})]})}),s.jsx("tbody",{children:n.map(o=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:o.id}),s.jsx("td",{className:"py-3 pr-3",children:s.jsx(le,{children:o.kind})}),s.jsxs("td",{className:"py-3 pr-3",children:[s.jsx("div",{className:"text-text font-medium",children:o.summary}),s.jsx("div",{className:"text-text-muted text-xs mt-1",children:o.rationale.length>300?o.rationale.slice(0,300)+"…":o.rationale}),o.alternatives_considered&&s.jsxs("div",{className:"text-text-dim text-xs mt-1",children:["alt: ",o.alternatives_considered.slice(0,150)]})]}),s.jsxs("td",{className:"py-3 pr-3",children:[s.jsx("span",{className:`inline-block rounded text-[10px] font-medium uppercase tracking-wider px-1.5 py-0.5 ${Vx(o.status)}`,children:o.status}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:Bx.filter(u=>u!==o.status).map(u=>s.jsx(R,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,u),className:"text-[10px] px-1.5 py-0.5",children:u},u))})]}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(o.files_touched??[]).map(u=>s.jsx("div",{children:u},u))}),s.jsx("td",{className:"py-3 pr-3",children:(o.tags??[]).map(u=>s.jsx(le,{className:"mr-1 mb-1",children:u},u))}),s.jsx("td",{className:"py-3 text-text-muted text-xs",title:o.created_at,children:B(o.created_at)})]},o.id))})]})})]})}function Hx(){const{snapshot:e,refresh:t}=Fe(),n=e.project.id,[r,l]=v.useState(null),[i,a]=v.useState({pending:0,approved:0,rejected:0}),[o,u]=v.useState(null),[f,p]=v.useState(null),d=v.useCallback(async()=>{try{const g=await nx(n);l(g.drafts),a(g.counts)}catch(g){u(g instanceof Error?g.message:String(g))}},[n]);v.useEffect(()=>{d()},[d]);async function x(g,j){if(f===null){p(g);try{j==="approve"?await rx(g):await sx(g),await Promise.all([d(),t()])}catch(y){alert(`${j} failed: ${y instanceof Error?y.message:String(y)}`)}finally{p(null)}}}if(o)return s.jsxs("div",{className:"text-danger",children:["Error: ",o]});if(!r)return s.jsx("div",{className:"text-text-muted",children:"loading drafts..."});const w=(g,j,y)=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:g}),s.jsx("div",{className:`text-2xl mt-1 ${y}`,children:j})]});return s.jsxs("div",{children:[s.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-4",children:[w("Pending",i.pending,"text-warning"),w("Approved",i.approved,"text-success"),w("Rejected",i.rejected,"text-danger")]}),r.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No drafts. Drafts appear when the agent calls ",s.jsx("code",{children:"extract_decisions(text)"})," — LLM scans a transcript and proposes decisions for you to approve."]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Kind"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Summary + Rationale"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Files"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-44",children:"Action"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Created"}),s.jsx("th",{className:"font-medium pb-2",children:"Extractor"})]})}),s.jsx("tbody",{children:r.map(g=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:g.id}),s.jsx("td",{className:"py-3 pr-3",children:s.jsx(le,{children:g.kind})}),s.jsxs("td",{className:"py-3 pr-3",children:[s.jsx("div",{className:"text-text font-medium",children:g.summary}),s.jsx("div",{className:"text-text-muted text-xs mt-1",children:g.rationale}),g.alternatives_considered&&s.jsxs("div",{className:"text-text-dim text-xs mt-1",children:["alt: ",g.alternatives_considered]})]}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(g.files_touched??[]).map(j=>s.jsx("div",{children:j},j))}),s.jsx("td",{className:"py-3 pr-3",children:g.status==="pending"?s.jsxs("div",{className:"flex gap-1.5",children:[s.jsx(R,{size:"sm",variant:"primary",disabled:f===g.id,onClick:()=>void x(g.id,"approve"),children:"Approve"}),s.jsx(R,{size:"sm",variant:"default",disabled:f===g.id,onClick:()=>void x(g.id,"reject"),children:"Reject"})]}):g.status==="approved"?s.jsxs(le,{className:"bg-success text-bg",children:["approved ",g.approved_decision_id?`→ #${g.approved_decision_id}`:""]}):s.jsx(le,{className:"bg-danger text-white",children:"rejected"})}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:B(g.created_at)}),s.jsx("td",{className:"py-3 text-text-dim text-[10px] font-mono",children:g.extractor_model??""})]},g.id))})]})})]})}function Qx(){const{snapshot:e}=Fe(),{dead_ends:t}=e;return t.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No dead ends logged. Use ",s.jsx("code",{children:"log_dead_end"})," when an approach fails."]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Attempted"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Why failed"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Files"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Flag"}),s.jsx("th",{className:"font-medium pb-2 w-24",children:"Logged"})]})}),s.jsx("tbody",{children:t.map(n=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:n.id}),s.jsx("td",{className:"py-3 pr-3 text-text font-medium",children:n.attempted_approach}),s.jsx("td",{className:"py-3 pr-3 text-text-muted",children:n.failure_reason}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(n.files_involved??[]).map(r=>s.jsx("div",{children:r},r))}),s.jsx("td",{className:"py-3 pr-3",children:n.never_retry&&s.jsx(le,{className:"bg-danger text-white",children:"never retry"})}),s.jsx("td",{className:"py-3 text-text-muted text-xs",title:n.created_at,children:B(n.created_at)})]},n.id))})]})})}function Kx(){const{snapshot:e}=Fe(),{notes:t}=e;return t.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No notes yet. Use ",s.jsx("code",{children:"add_note"})," for stray observations."]}):s.jsx("div",{className:"space-y-6",children:t.map(n=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[s.jsxs(le,{children:["note #",n.id]}),(n.tags??[]).map(r=>s.jsx(le,{children:r},r)),s.jsx("span",{className:"text-text-muted text-xs",children:B(n.created_at)}),n.audio_path&&s.jsx(le,{className:"bg-success text-bg",children:"audio"})]}),s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:n.body}),n.audio_path&&s.jsx("audio",{controls:!0,className:"mt-2 w-full",src:n.audio_path}),n.files_touched&&n.files_touched.length>0&&s.jsxs("div",{className:"text-text-muted text-xs mt-1",children:["files: ",n.files_touched.join(", ")]})]},n.id))})}function Yx(){const{snapshot:e}=Fe(),{latest_plan:t,plan_history:n}=e;return t?s.jsxs("div",{children:[s.jsxs("section",{className:"mb-8",children:[s.jsxs("h3",{className:"text-sm text-text mb-2",children:["Latest plan — v",t.version]}),s.jsxs("div",{className:"text-text-muted text-xs mb-3",children:["saved ",B(t.created_at)]}),s.jsx("pre",{className:"bg-panel border border-border rounded p-4 text-xs font-mono text-text whitespace-pre-wrap overflow-x-auto",children:t.plan_md})]}),n.length>0&&s.jsxs("section",{children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Version history"}),s.jsx("ul",{className:"space-y-1 text-sm",children:n.map(r=>s.jsxs("li",{className:"text-text-muted",children:[s.jsxs("span",{className:"text-text font-medium",children:["v",r.version]})," — ",r.created_at," (",r.plan_md_length," chars)"]},r.id))})]})]}):s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No plans saved. Use ",s.jsx("code",{children:"save_plan"})," to persist an approved plan."]})}function en({title:e,children:t}){return s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-2",children:e}),t]})}function Un(){return s.jsx("div",{className:"text-text-muted text-sm",children:"(none)"})}function Gx(){const{snapshot:e}=Fe(),t=e.context;if(!t)return s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No context set. Use ",s.jsx("code",{children:"update_context"})," to record conventions / dont_touch / deploy_notes."]});const n=t.file_annotations??{},r=Object.entries(n);return s.jsxs("div",{children:[s.jsx(en,{title:"Conventions",children:t.conventions?s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.conventions}):s.jsx(Un,{})}),s.jsx(en,{title:"Don't touch",children:t.dont_touch&&t.dont_touch.length>0?s.jsx("ul",{className:"list-disc list-inside text-sm text-text",children:t.dont_touch.map(l=>s.jsx("li",{children:l},l))}):s.jsx(Un,{})}),s.jsx(en,{title:"Test patterns",children:t.test_patterns?s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.test_patterns}):s.jsx(Un,{})}),s.jsx(en,{title:"Deploy notes",children:t.deploy_notes?s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.deploy_notes}):s.jsx(Un,{})}),s.jsx(en,{title:"File annotations",children:r.length>0?s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Path"}),s.jsx("th",{className:"pb-2",children:"Annotation"})]})}),s.jsx("tbody",{children:r.map(([l,i])=>s.jsxs("tr",{className:"border-b border-border/40 align-top",children:[s.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:l}),s.jsx("td",{className:"py-2 text-text-muted",children:i})]},l))})]}):s.jsx(Un,{})}),s.jsx(en,{title:"Meta",children:s.jsxs("div",{className:"text-xs text-text-muted",children:["Last validated commit: ",t.last_validated_commit?s.jsx("code",{className:"text-text",children:t.last_validated_commit}):"(none)",s.jsx("br",{}),"Updated: ",t.updated_at]})})]})}function Xx(){const{snapshot:e}=Fe(),{activity:t}=e;return t.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No activity yet. Write paths (claim_task, log_decision, etc.) populate this timeline."}):s.jsx("div",{className:"space-y-px",children:t.map(n=>s.jsxs("div",{className:"grid grid-cols-[110px_160px_1fr_140px] gap-3 py-2 border-b border-border/40 items-baseline text-xs",children:[s.jsx("div",{className:"text-text-muted font-mono",title:n.created_at,children:B(n.created_at)}),s.jsx("div",{className:"text-accent",children:n.action_type}),s.jsxs("div",{className:"text-text flex flex-wrap items-center gap-2",children:[n.action_details&&s.jsx("span",{children:n.action_details}),n.entity_type&&s.jsxs(le,{children:[n.entity_type,"#",n.entity_id??"?"]}),n.ref_url&&s.jsxs("span",{className:"text-text-dim font-mono",children:[n.ref_url.slice(0,16),"…"]})]}),s.jsx("div",{className:"text-text-muted font-mono text-[11px]",children:n.session_id??""})]},n.id))})}function Zo(e){if(e<60)return`${e}s`;const t=Math.round(e/60);if(t<60)return`${t}m`;const n=Math.floor(t/60),r=t%60;return r===0?`${n}h`:`${n}h ${r}m`}function ne({label:e,value:t}){return s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:e}),s.jsx("div",{className:"text-2xl text-text mt-1",children:t})]})}function Jx(){const{snapshot:e}=Fe(),{subtasks:t,decisions:n,dead_ends:r,notes:l,sessions:i,activity:a,plan_history:o,draft_counts:u,project:f}=e,[p,d]=v.useState(null),[x,w]=v.useState(null),[g,j]=v.useState(!1),[y,m]=v.useState(null),c=()=>{Ko(f.id).then(d),Yo(f.id).then(w)};v.useEffect(()=>{let C=!1;return Ko(f.id).then(ie=>{C||d(ie)}),Yo(f.id).then(ie=>{C||w(ie)}),()=>{C=!0}},[f.id]);const h=async()=>{j(!0),m(null);try{const C=await yx({since_hours:720});m(`parsed ${C.parsed} transcripts, upserted ${C.upserted}, total scanned ≈ $${C.total_cost_usd.toFixed(2)}`),c()}catch(C){m("ingest failed: "+(C instanceof Error?C.message:String(C)))}finally{j(!1)}},N=new Map(t.map(C=>[C.id,C.title])),b={total:t.length,todo:t.filter(C=>C.status==="todo").length,in_progress:t.filter(C=>C.status==="in_progress").length,done:t.filter(C=>C.status==="done").length},k={total:n.length,open:n.filter(C=>C.status==="open").length,fixed:n.filter(C=>C.status==="fixed").length},_=Date.now(),E=a.filter(C=>{const ie=new Date(C.created_at.replace(" ","T")+"Z").getTime();return!isNaN(ie)&&_-ie<864e5}).length,F=new Map;for(const C of a)F.set(C.action_type,(F.get(C.action_type)??0)+1);const L=[...F.entries()].sort((C,ie)=>ie[1]-C[1]).slice(0,20);return s.jsxs("div",{children:[s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Subtasks"}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsx(ne,{label:"total",value:b.total}),s.jsx(ne,{label:"todo",value:b.todo}),s.jsx(ne,{label:"in progress",value:b.in_progress}),s.jsx(ne,{label:"done",value:b.done})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Memory"}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsx(ne,{label:"decisions",value:k.total}),s.jsx(ne,{label:"decisions open",value:k.open}),s.jsx(ne,{label:"decisions fixed",value:k.fixed}),s.jsx(ne,{label:"drafts pending",value:u.pending}),s.jsx(ne,{label:"drafts approved",value:u.approved}),s.jsx(ne,{label:"dead ends",value:r.length}),s.jsx(ne,{label:"notes",value:l.length}),s.jsx(ne,{label:"plan versions",value:o.length})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Time on task"}),p===null?s.jsx("div",{className:"text-text-muted text-sm",children:"loading…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:"total time"}),s.jsx("div",{className:"text-2xl text-text mt-1",children:Zo(p.total_seconds)})]}),s.jsx(ne,{label:"sessions w/ subtask",value:p.session_count}),s.jsx(ne,{label:"tasks tracked",value:p.per_subtask.length})]}),p.per_subtask.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no time-tracked sessions — sessions only count toward a task when claude_session_id is linked at claim)"}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Task"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Duration"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Sessions"}),s.jsx("th",{className:"pb-2 text-right",children:"Last touched"})]})}),s.jsx("tbody",{children:p.per_subtask.slice(0,20).map(C=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsx("td",{className:"py-1.5 pr-3 text-text",children:s.jsxs("a",{href:`#subtask-${C.subtask_id}`,className:"hover:underline",children:["#",C.subtask_id," ",N.get(C.subtask_id)??"(deleted)"]})}),s.jsx("td",{className:"py-1.5 pr-3 text-text text-right font-mono",children:Zo(C.total_seconds)}),s.jsxs("td",{className:"py-1.5 pr-3 text-text text-right",children:[C.session_count,C.open_sessions>0?s.jsxs("span",{className:"text-warning",children:[" (",C.open_sessions," open)"]}):null]}),s.jsx("td",{className:"py-1.5 text-text-muted text-right text-xs",children:C.last_session_at??"—"})]},C.subtask_id))})]})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[s.jsx("h3",{className:"text-sm text-text",children:"AI token cost"}),s.jsx("button",{onClick:()=>void h(),disabled:g,className:"text-[11px] uppercase tracking-wider text-accent hover:underline disabled:text-text-dim",children:g?"ingesting…":"ingest transcripts"})]}),y&&s.jsx("div",{className:"text-text-muted text-xs mb-3",children:y}),x===null?s.jsx("div",{className:"text-text-muted text-sm",children:"loading…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:"total cost"}),s.jsxs("div",{className:"text-2xl text-text mt-1",children:["$",x.total_cost_usd.toFixed(2)]})]}),s.jsx(ne,{label:"costed sessions",value:x.session_count}),s.jsx(ne,{label:"tasks with cost",value:x.per_subtask.length})]}),x.per_subtask.length===0?s.jsxs("div",{className:"text-text-muted text-sm",children:["(no cost data yet — click ",s.jsx("em",{children:"ingest transcripts"})," above to parse ",s.jsx("code",{children:"~/.claude/projects/"})," JSONL files)"]}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Task"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Cost (USD)"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Input tok"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Output tok"}),s.jsx("th",{className:"pb-2 text-right",children:"Models"})]})}),s.jsx("tbody",{children:x.per_subtask.slice(0,20).map(C=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsxs("td",{className:"py-1.5 pr-3 text-text",children:["#",C.subtask_id," ",N.get(C.subtask_id)??"(deleted)"]}),s.jsxs("td",{className:"py-1.5 pr-3 text-text text-right font-mono",children:["$",C.total_cost_usd.toFixed(4)]}),s.jsx("td",{className:"py-1.5 pr-3 text-text-muted text-right font-mono text-xs",children:C.total_input_tokens.toLocaleString()}),s.jsx("td",{className:"py-1.5 pr-3 text-text-muted text-right font-mono text-xs",children:C.total_output_tokens.toLocaleString()}),s.jsx("td",{className:"py-1.5 text-text-muted text-right text-xs",children:C.by_model.map(ie=>ie.model.replace("claude-","")).join(", ")})]},C.subtask_id))})]})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Activity"}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[s.jsx(ne,{label:"sessions",value:i.length}),s.jsx(ne,{label:"events total",value:a.length}),s.jsx(ne,{label:"events 24h",value:E})]}),s.jsx("h3",{className:"text-sm text-text mb-3",children:"Recent action counts"}),L.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no activity)"}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Action"}),s.jsx("th",{className:"pb-2",children:"Count"})]})}),s.jsx("tbody",{children:L.map(([C,ie])=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsx("td",{className:"py-1.5 pr-3 text-text font-mono text-xs",children:C}),s.jsx("td",{className:"py-1.5 text-text",children:ie})]},C))})]})]})]})}function qx(){const{snapshot:e}=Fe(),{sessions:t}=e;return t.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No sessions yet for this project. Sessions appear when agent_bootstrap or claim_task is called with a session_id."}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Session ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Started"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Ended"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Duration"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Tool calls"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Files"}),s.jsx("th",{className:"font-medium pb-2",children:"Notes"})]})}),s.jsx("tbody",{children:t.map(n=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:s.jsx(X,{to:`/sessions/${encodeURIComponent(n.session_id)}`,className:"text-accent hover:underline",children:n.session_id})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:B(n.started_at)}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.ended_at?B(n.ended_at):"active"}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.duration_seconds?`${Math.floor(n.duration_seconds/60)}m`:""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.tool_calls_count}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.files_touched_count}),s.jsx("td",{className:"py-2 text-text-muted text-xs",children:n.notes??""})]},n.session_id))})]})})}function Zx(){const[e,t]=v.useState(null),[n,r]=v.useState(null);return v.useEffect(()=>{lx(500).then(t).catch(l=>r(l instanceof Error?l.message:String(l)))},[]),n?s.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?s.jsxs("div",{children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsx("h1",{className:"text-2xl text-text",children:"All sessions"}),s.jsxs("div",{className:"text-text-muted text-xs mt-1",children:[e.length," session(s)"]})]}),e.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No sessions tracked yet."}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Session ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Project"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Started"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Ended"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Duration"}),s.jsx("th",{className:"font-medium pb-2 w-20",children:"Tool calls"})]})}),s.jsx("tbody",{children:e.map(l=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40",children:[s.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:s.jsx(X,{to:`/sessions/${encodeURIComponent(l.session_id)}`,className:"text-accent hover:underline",children:l.session_id})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:l.project_id?`#${l.project_id}`:""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:B(l.started_at)}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:l.ended_at?B(l.ended_at):"active"}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:l.duration_seconds?`${Math.floor(l.duration_seconds/60)}m`:""}),s.jsx("td",{className:"py-2 text-text-muted text-xs",children:l.tool_calls_count})]},l.session_id))})]})})]}):s.jsx("div",{className:"text-text-muted",children:"loading sessions..."})}function ev(){const{sessionId:e}=ja(),[t,n]=v.useState(null),[r,l]=v.useState(null);if(v.useEffect(()=>{e&&ix(e).then(n).catch(o=>l(o instanceof Error?o.message:String(o)))},[e]),r)return s.jsxs("div",{className:"text-danger",children:["Error: ",r]});if(!t)return s.jsx("div",{className:"text-text-muted",children:"loading session..."});const{session:i,activity:a}=t;return s.jsxs("div",{children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-4",children:[s.jsx(X,{to:"/sessions",className:"text-accent text-xs hover:underline",children:"← all sessions"}),s.jsx("h1",{className:"text-2xl text-text mt-1 font-mono",children:i.session_id}),s.jsxs("div",{className:"text-text-muted text-xs mt-2 flex gap-3 flex-wrap",children:[s.jsxs("span",{children:["started ",i.started_at]}),i.ended_at&&s.jsxs("span",{children:["ended ",i.ended_at]}),i.duration_seconds!==null&&s.jsxs("span",{children:["duration ",Math.floor(i.duration_seconds/60),"m ",i.duration_seconds%60,"s"]}),s.jsxs("span",{children:[i.tool_calls_count," tool calls"]}),s.jsxs("span",{children:[i.files_touched_count," files touched"]})]}),i.notes&&s.jsx("pre",{className:"bg-panel border border-border rounded p-3 mt-3 text-xs font-mono text-text whitespace-pre-wrap",children:i.notes})]}),s.jsx("h2",{className:"text-sm text-text mb-3",children:"Activity"}),a.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no activity in this session)"}):s.jsx("div",{className:"space-y-px",children:a.map(o=>s.jsxs("div",{className:"grid grid-cols-[110px_160px_1fr] gap-3 py-2 border-b border-border/40 items-baseline text-xs",children:[s.jsx("div",{className:"text-text-muted font-mono",title:o.created_at,children:B(o.created_at)}),s.jsx("div",{className:"text-accent",children:o.action_type}),s.jsxs("div",{className:"text-text flex flex-wrap items-center gap-2",children:[o.action_details&&s.jsx("span",{children:o.action_details}),o.entity_type&&s.jsxs(le,{children:[o.entity_type,"#",o.entity_id??"?"]})]})]},o.id))})]})}const tv={storage:"Storage",dashboard:"Dashboard",embedding:"Embedding (semantic recall)",llm:"LLM (extraction + summarization)",recall:"Recall mode",sync:"Sync"};function nv(){const[e,t]=v.useState(null),[n,r]=v.useState([]),[l,i]=v.useState({}),[a,o]=v.useState(null),u=v.useCallback(async()=>{try{const g=await ax();t(g.specs),r(g.values),i({})}catch(g){o({kind:"err",text:g instanceof Error?g.message:String(g)})}},[]);if(v.useEffect(()=>{u()},[u]),!e)return s.jsx("div",{className:"text-text-muted",children:"loading settings..."});const f=new Map(n.map(g=>[g.key,g])),p=new Map;for(const g of e)p.has(g.group)||p.set(g.group,[]),p.get(g.group).push(g);function d(g,j){i(y=>({...y,[g]:j}))}function x(g){i(j=>{const{[g]:y,...m}=j;return m})}async function w(){if(Object.keys(l).length===0){o({kind:"err",text:"no changes to save"});return}o({kind:"busy",text:"writing ~/.shinobi/.env ..."});try{const g=await ox(l);if(!g.ok)throw new Error(g.error??"unknown error");const j=Object.keys(l).filter(m=>{var c;return(c=e==null?void 0:e.find(h=>h.key===m))==null?void 0:c.requiresRestart}),y=`wrote ${g.written??0}, cleared ${g.cleared??0}${j.length>0?` (restart required: ${j.join(", ")})`:""}`;o({kind:"ok",text:y}),await u()}catch(g){o({kind:"err",text:g instanceof Error?g.message:String(g)})}}return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6 flex items-baseline justify-between",children:[s.jsx("h1",{className:"text-2xl text-text",children:"Settings"}),s.jsx("span",{className:"text-text-muted text-xs",children:"writes to ~/.shinobi/.env with backup"})]}),a&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${a.kind==="ok"?"bg-success/20 text-success border border-success/40":a.kind==="err"?"bg-danger/20 text-danger border border-danger/40":"bg-warning/20 text-warning border border-warning/40"}`,children:[a.kind==="ok"&&s.jsx(Rt,{className:"w-4 h-4"}),a.kind==="err"&&s.jsx(at,{className:"w-4 h-4"}),a.kind==="busy"&&s.jsx(Yt,{className:"w-4 h-4 animate-spin"}),a.text]}),[...p.entries()].map(([g,j])=>s.jsxs("section",{className:"mb-8",children:[s.jsx("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:tv[g]}),s.jsx("div",{className:"space-y-3",children:j.map(y=>{const m=f.get(y.key),c=y.key in l,h=l[y.key];return s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-1",children:[s.jsxs("div",{children:[s.jsxs("label",{className:"text-sm text-text font-medium",children:[y.label,y.requiresRestart&&s.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-warning",children:"restart required"})]}),s.jsx("code",{className:"ml-2 text-[11px] text-text-muted font-mono",children:y.key})]}),(m==null?void 0:m.is_set)&&!c&&s.jsx("span",{className:"text-[10px] uppercase tracking-wider text-success",children:"set"}),c&&s.jsx("span",{className:"text-[10px] uppercase tracking-wider text-warning",children:"unsaved"})]}),s.jsx("p",{className:"text-xs text-text-muted mb-2",children:y.description}),s.jsxs("div",{className:"flex gap-2 items-center",children:[y.enumValues?s.jsxs("select",{value:c?h??"":(m==null?void 0:m.value)??"",onChange:N=>d(y.key,N.target.value||null),className:"bg-panel-2 border border-border rounded px-2 py-1 text-sm text-text font-mono flex-1",children:[s.jsx("option",{value:"",children:"(unset)"}),y.enumValues.map(N=>s.jsx("option",{value:N,children:N},N))]}):s.jsx("input",{type:y.secret?"password":"text",value:c?h??"":(m==null?void 0:m.value)??"",placeholder:m!=null&&m.is_set&&y.secret?"(secret set — type to replace)":y.placeholder??"(unset)",onChange:N=>d(y.key,N.target.value||null),className:"bg-panel-2 border border-border rounded px-2 py-1 text-sm text-text font-mono flex-1 placeholder:text-text-dim"}),c&&s.jsx(R,{size:"sm",variant:"ghost",onClick:()=>x(y.key),title:"discard change",children:s.jsx(Fh,{className:"w-3 h-3"})})]})]},y.key)})})]},g)),s.jsxs("div",{className:"sticky bottom-0 bg-bg/95 backdrop-blur border-t border-border py-3 -mx-8 px-8 flex justify-end gap-2",children:[s.jsx(R,{variant:"default",onClick:()=>i({}),disabled:Object.keys(l).length===0,children:"Discard all"}),s.jsxs(R,{variant:"primary",onClick:()=>void w(),disabled:Object.keys(l).length===0,children:["Save (",Object.keys(l).length," change",Object.keys(l).length===1?"":"s",")"]})]})]})}async function Bd(e,t){const n=await fetch(e,t);if(!n.ok){const r=await n.text();throw new Error(`${(t==null?void 0:t.method)??"GET"} ${e} → ${n.status}: ${r.slice(0,200)}`)}return await n.json()}async function rv(e,t="recording.webm"){const n=new FormData;return n.append("audio",e,t),await(await fetch("/api/audio/transcribe",{method:"POST",body:n})).json()}function sv(e){return Bd("/api/voice/save-note",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function lv(e){return Bd("/api/voice/extract-decisions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function iv(e){const t=new FormData;return t.append("audio",e.file),t.append("project_id",String(e.project_id)),e.title&&t.append("title",e.title),e.session_id&&t.append("session_id",e.session_id),await(await fetch("/api/voice/meeting/process",{method:"POST",body:t})).json()}async function av(e){var o;if(!((o=navigator.mediaDevices)!=null&&o.getUserMedia))throw new Error("mic API unavailable in this browser");const t=await navigator.mediaDevices.getUserMedia({audio:!0}),r=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus"].find(u=>MediaRecorder.isTypeSupported(u))??"",l=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t),i=[],a=Date.now();return l.addEventListener("dataavailable",u=>{u.data&&u.data.size>0&&i.push(u.data)}),l.addEventListener("stop",()=>{const u=new Blob(i,{type:l.mimeType||"audio/webm"});e(u,Date.now()-a),t.getTracks().forEach(f=>f.stop())}),l.start(),l}function ov(){const[e,t]=v.useState({kind:"idle"}),[n,r]=v.useState([]),[l,i]=v.useState(null),[a,o]=v.useState("voice"),[u,f]=v.useState(""),p=v.useRef(null),[d,x]=v.useState(0);v.useEffect(()=>{Ad({sort:"active"}).then(k=>{r(k);const _=localStorage.getItem("voice-project-id");_&&k.some(E=>String(E.id)===_)&&i(Number(_))}).catch(()=>{})},[]),v.useEffect(()=>(e.kind==="recording"?p.current=window.setInterval(()=>x(k=>k+1),250):p.current!==null&&(clearInterval(p.current),p.current=null),()=>{p.current!==null&&clearInterval(p.current)}),[e.kind]);function w(k){i(k),k!==null?localStorage.setItem("voice-project-id",String(k)):localStorage.removeItem("voice-project-id")}async function g(){try{const k=await av((_,E)=>{t({kind:"recorded",blob:_,durationMs:E})});t({kind:"recording",startedAt:Date.now(),recorder:k})}catch(k){t({kind:"error",message:k instanceof Error?k.message:String(k)})}}function j(){e.kind==="recording"&&e.recorder.stop()}function y(){t({kind:"idle"}),f("")}async function m(){if(e.kind==="recorded"){t({kind:"transcribing"});try{const k=e.blob.type.includes("mp4")?"mp4":e.blob.type.includes("ogg")?"ogg":"webm",_=await rv(e.blob,`recording.${k}`);if(!_.ok||!_.text){t({kind:"error",message:_.error??"transcription returned empty"});return}f(_.text),t({kind:"transcribed",blob:e.blob,text:_.text,provider:_.provider??"unknown",model:_.model??"unknown",durationMs:e.durationMs})}catch(k){t({kind:"error",message:k instanceof Error?k.message:String(k)})}}}async function c(){var k;if(!(e.kind!=="transcribed"||u.trim()==="")){t({kind:"saving"});try{const _=a.split(",").map(F=>F.trim()).filter(Boolean),E=await sv({project_id:l??void 0,text:u.trim(),tags:_.length>0?_:["voice"]});if(!E.ok){t({kind:"error",message:E.error??"save failed"});return}t({kind:"done",message:`note #${(k=E.note)==null?void 0:k.id} saved${l?` to project #${l}`:" to inbox"}`})}catch(_){t({kind:"error",message:_ instanceof Error?_.message:String(_)})}}}async function h(){if(e.kind!=="transcribed"||u.trim()===""||l===null){l===null&&t({kind:"error",message:"pick a project to extract decisions into"});return}t({kind:"saving"});try{const k=await lv({project_id:l,text:u.trim()});if(!k.ok){t({kind:"error",message:k.error??"extract failed"});return}t({kind:"done",message:`${k.drafts_extracted??0} draft(s) created via ${k.provider}:${k.model} — open project Drafts tab to review`})}catch(k){t({kind:"error",message:k instanceof Error?k.message:String(k)})}}function N(){t({kind:"idle"}),f("")}const b=e.kind==="recording"?Math.floor((Date.now()-e.startedAt)/1e3):0;return s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(Si,{className:"w-6 h-6 text-accent"})," Voice capture"]}),s.jsx("p",{className:"text-text-muted text-xs mt-1",children:"Record audio → Whisper transcribe → save as note or extract decisions into drafts for review."})]}),s.jsxs("div",{className:"bg-panel border border-border rounded-lg p-6 mb-4",children:[s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Project"}),s.jsxs("select",{value:l??"",onChange:k=>w(k.target.value?Number(k.target.value):null),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text",children:[s.jsx("option",{value:"",children:"(inbox — no project)"}),n.map(k=>s.jsxs("option",{value:k.id,children:[k.workspace?`[${k.workspace}] `:"",k.title]},k.id))]}),s.jsxs("div",{className:"flex flex-col items-center my-8",children:[e.kind==="idle"&&s.jsx(R,{variant:"primary",onClick:()=>void g(),className:"w-32 h-32 rounded-full flex items-center justify-center text-base",children:s.jsx(Si,{className:"w-12 h-12"})}),e.kind==="recording"&&s.jsxs(s.Fragment,{children:[s.jsx(R,{variant:"danger",onClick:j,className:"w-32 h-32 rounded-full flex items-center justify-center animate-pulse",children:s.jsx(Wh,{className:"w-12 h-12"})}),s.jsxs("div",{className:"mt-3 text-warning text-sm font-mono",children:["recording ",b,"s"]})]}),e.kind==="recorded"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-text text-sm",children:["recorded ",Math.floor(e.durationMs/1e3),"s"]}),s.jsx("audio",{controls:!0,className:"my-3",src:URL.createObjectURL(e.blob)}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(R,{variant:"default",onClick:y,children:s.jsx(jr,{className:"w-4 h-4"})}),s.jsx(R,{variant:"primary",onClick:()=>void m(),children:"Transcribe"})]})]}),e.kind==="transcribing"&&s.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[s.jsx(Yt,{className:"w-4 h-4 animate-spin"})," transcribing..."]}),e.kind==="transcribed"&&s.jsxs("div",{className:"w-full",children:[s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Transcript (edit before saving)"}),s.jsx("textarea",{value:u,onChange:k=>f(k.target.value),rows:6,className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text font-mono"}),s.jsxs("div",{className:"text-text-dim text-[10px] mt-1",children:["via ",e.provider,":",e.model," · ",Math.floor(e.durationMs/1e3),"s audio"]}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mt-4 mb-2",children:"Tags (comma-separated, applied to note only)"}),s.jsx("input",{type:"text",value:a,onChange:k=>o(k.target.value),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text font-mono"}),s.jsxs("div",{className:"flex gap-2 mt-4 flex-wrap",children:[s.jsxs(R,{variant:"default",onClick:N,children:[s.jsx(jr,{className:"w-4 h-4 mr-1"})," Discard"]}),s.jsxs(R,{variant:"primary",onClick:()=>void c(),className:"flex items-center",children:[s.jsx(Ah,{className:"w-4 h-4 mr-1"})," Save as note"]}),s.jsxs(R,{variant:"primary",onClick:()=>void h(),disabled:l===null,className:"flex items-center",title:l===null?"pick a project first":"extract decisions to drafts",children:[s.jsx(Bh,{className:"w-4 h-4 mr-1"})," Extract decisions"]})]})]}),e.kind==="saving"&&s.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[s.jsx(Yt,{className:"w-4 h-4 animate-spin"})," saving..."]}),e.kind==="done"&&s.jsxs("div",{className:"text-success text-sm flex items-center gap-2 flex-col",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Rt,{className:"w-4 h-4"})," ",e.message]}),s.jsx(R,{variant:"primary",onClick:N,className:"mt-3",children:"Record another"})]}),e.kind==="error"&&s.jsxs("div",{className:"text-danger text-sm flex items-center gap-2 flex-col",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(at,{className:"w-4 h-4"})," ",e.message]}),s.jsx(R,{variant:"default",onClick:N,className:"mt-3",children:"Reset"})]})]})]}),s.jsx(uv,{projects:n,defaultProjectId:l}),s.jsxs("div",{className:"text-text-muted text-xs mt-6",children:[s.jsxs("p",{children:["Requires a transcription provider: ",s.jsx("code",{children:"SHINOBI_TRANSCRIPTION_PROVIDER"})," in ",s.jsx(X,{to:"/settings",className:"text-accent underline",children:"Settings"})," (or canonical ",s.jsx("code",{children:"GROQ_API_KEY"})," / ",s.jsx("code",{children:"OPENAI_API_KEY"}),")."]}),s.jsx("p",{className:"mt-1",children:`Install as PWA on mobile via browser's "Add to home screen" — works offline for read-only.`})]})]})}function uv({projects:e,defaultProjectId:t}){var y,m;const[n,r]=v.useState(null),[l,i]=v.useState(""),[a,o]=v.useState(t),[u,f]=v.useState(!1),[p,d]=v.useState(null),[x,w]=v.useState(null);v.useEffect(()=>{o(t)},[t]);async function g(){if(!n||a===null){w("pick an audio file and a project");return}f(!0),w(null),d(null);try{const c={file:n,project_id:a};l.trim()&&(c.title=l.trim());const h=await iv(c);if(!h.ok){w(h.error??"meeting processing failed");return}d(h)}catch(c){w(c instanceof Error?c.message:String(c))}finally{f(!1)}}function j(){r(null),i(""),d(null),w(null)}return s.jsxs("div",{className:"bg-panel border border-border rounded-lg p-6 mt-6",children:[s.jsxs("h2",{className:"text-sm text-text mb-2 flex items-center gap-2",children:[s.jsx(Kh,{className:"w-4 h-4 text-accent"})," Meeting capture (upload longer audio)"]}),s.jsxs("p",{className:"text-text-muted text-xs mb-4",children:["Upload a meeting recording (.mp3 / .m4a / .wav / .webm, max ~25 MB on Groq free tier). Whisper transcribes → transcript saved as a note tagged ",s.jsx("code",{children:"meeting"})," → decision extractor runs → review drafts on the project's Drafts tab."]}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Project"}),s.jsxs("select",{value:a??"",onChange:c=>o(c.target.value?Number(c.target.value):null),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text mb-3",children:[s.jsx("option",{value:"",children:"(pick a project — required for meetings)"}),e.map(c=>s.jsxs("option",{value:c.id,children:[c.workspace?`[${c.workspace}] `:"",c.title]},c.id))]}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Title (optional)"}),s.jsx("input",{type:"text",value:l,onChange:c=>i(c.target.value),placeholder:"e.g. Standup 2026-05-24",className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text mb-3"}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Audio file"}),s.jsx("input",{type:"file",accept:"audio/*,.mp3,.m4a,.wav,.webm,.ogg",onChange:c=>{var h;return r(((h=c.target.files)==null?void 0:h[0])??null)},className:"block w-full text-sm text-text-muted file:mr-3 file:py-1.5 file:px-3 file:rounded file:border-0 file:bg-accent file:text-bg file:cursor-pointer mb-3"}),n&&s.jsxs("div",{className:"text-text-dim text-[11px] mb-3",children:[n.name," · ",(n.size/1024/1024).toFixed(2)," MB",n.size>25*1024*1024&&s.jsx("span",{className:"text-warning ml-2",children:"⚠️ over 25 MB — Groq/OpenAI will reject. Pre-split with ffmpeg."})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(R,{variant:"primary",onClick:()=>void g(),disabled:u||!n||a===null,children:[u?s.jsx(Yt,{className:"w-4 h-4 mr-1 animate-spin"}):s.jsx(Qh,{className:"w-4 h-4 mr-1"}),u?"processing...":"Process meeting"]}),(p||x)&&s.jsx(R,{variant:"default",onClick:j,children:"Reset"})]}),x&&s.jsxs("div",{className:"mt-4 px-3 py-2 rounded text-sm flex items-center gap-2 bg-danger/20 text-danger border border-danger/40",children:[s.jsx(at,{className:"w-4 h-4"})," ",x]}),p&&s.jsxs("div",{className:"mt-4 px-3 py-2 rounded text-sm bg-success/20 text-success border border-success/40",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Rt,{className:"w-4 h-4"})," Meeting processed"]}),s.jsxs("div",{className:"text-xs text-text grid grid-cols-[8rem_1fr] gap-y-1",children:[s.jsx("div",{className:"text-text-muted",children:"title"}),s.jsx("div",{children:p.title}),s.jsx("div",{className:"text-text-muted",children:"transcript"}),s.jsxs("div",{children:[(y=p.transcript_chars)==null?void 0:y.toLocaleString()," chars · ",((m=p.audio_duration_seconds)==null?void 0:m.toFixed(0))??"?","s audio · via ",p.transcription_provider,":",p.transcription_model]}),s.jsx("div",{className:"text-text-muted",children:"drafts extracted"}),s.jsxs("div",{children:[p.drafts_extracted??0," via ",p.extractor_provider,":",p.extractor_model]}),s.jsx("div",{className:"text-text-muted",children:"note id"}),s.jsxs("div",{children:["#",p.note_id]})]}),a!==null&&s.jsx(X,{to:`/projects/${a}/decision-drafts`,className:"inline-block mt-2 text-accent hover:underline text-xs",children:"→ Review drafts on project Drafts tab"})]})]})}const eu=4e3;function cv(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[l,i]=v.useState(null),a=v.useCallback(async()=>{try{const d=await px();t(d),r(null)}catch(d){r(d instanceof Error?d.message:String(d))}},[]);v.useEffect(()=>{a();const d=setInterval(()=>void a(),eu);return()=>clearInterval(d)},[a]);async function o(d,x){i(d);try{await mx(d,x),await a()}catch(w){alert("respond failed: "+(w instanceof Error?w.message:String(w)))}finally{i(null)}}async function u(d){i(d);try{await hx(d),await a()}catch(x){alert("cancel failed: "+(x instanceof Error?x.message:String(x)))}finally{i(null)}}if(n)return s.jsxs("div",{className:"text-danger",children:["Error: ",n]});if(!e)return s.jsx("div",{className:"text-text-muted",children:"loading approvals..."});const f=e.filter(d=>d.status==="pending"),p=e.filter(d=>d.status!=="pending").slice(0,50);return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6 flex items-baseline justify-between",children:[s.jsx("h1",{className:"text-2xl text-text",children:"Approvals"}),s.jsxs("span",{className:"text-text-muted text-xs flex items-center gap-1",children:[s.jsx(Yt,{className:"w-3 h-3 animate-spin"}),"polling every ",eu/1e3,"s"]})]}),s.jsxs("section",{className:"mb-8",children:[s.jsxs("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:["Pending (",f.length,")"]}),f.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No pending approvals. Approvals appear when the agent calls ",s.jsx("code",{children:"request_approval"})," via MCP. They also fire web push to subscribed devices — see ",s.jsx(X,{to:"/push",className:"text-accent underline",children:"Push settings"}),"."]}):s.jsx("div",{className:"space-y-3",children:f.map(d=>s.jsxs("div",{id:`approval-${d.id}`,className:"bg-panel border border-warning/40 border-l-4 border-l-warning rounded-md p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-2",children:[s.jsxs("div",{className:"text-text-muted text-xs",children:["#",d.id,d.project_id&&s.jsxs(s.Fragment,{children:[" · project #",d.project_id]}),s.jsxs(s.Fragment,{children:[" · ",B(d.created_at)]})]}),s.jsx(le,{className:"bg-warning text-bg",children:"pending"})]}),s.jsx("div",{className:"text-text mb-3 whitespace-pre-wrap",children:d.prompt}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.options.map(x=>s.jsx(R,{variant:"primary",disabled:l===d.id,onClick:()=>void o(d.id,x),children:x},x)),s.jsx(R,{variant:"default",disabled:l===d.id,onClick:()=>void u(d.id),children:"Cancel"})]})]},d.id))})]}),s.jsxs("section",{children:[s.jsxs("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:["Recent (",p.length,")"]}),p.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(none)"}):s.jsx("div",{className:"space-y-1.5",children:p.map(d=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3 text-sm",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-1",children:[s.jsxs("div",{className:"text-text-muted text-xs",children:["#",d.id,d.project_id&&s.jsxs(s.Fragment,{children:[" · project #",d.project_id]}),s.jsxs(s.Fragment,{children:[" · ",B(d.created_at)]})]}),d.status==="responded"?s.jsxs(le,{className:"bg-success text-bg",children:[s.jsx(Rt,{className:"w-3 h-3 inline mr-0.5"}),d.response_value]}):d.status==="expired"?s.jsx(le,{className:"bg-text-dim text-text",children:"expired"}):s.jsxs(le,{className:"bg-text-dim text-text",children:[s.jsx(at,{className:"w-3 h-3 inline mr-0.5"}),d.status]})]}),s.jsxs("div",{className:"text-text text-xs",children:[d.prompt.slice(0,200),d.prompt.length>200?"…":""]}),d.response_note&&s.jsxs("div",{className:"text-text-muted text-xs mt-1",children:["note: ",d.response_note]})]},d.id))})]})]})}function dv(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=atob(n),l=new ArrayBuffer(r.length),i=new Uint8Array(l);for(let a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return i}function fv(){const[e,t]=v.useState({kind:"loading"}),[n,r]=v.useState(null),[l,i]=v.useState(!1),a=v.useCallback(async()=>{try{const y=await cx();let m=null,c="default";const h="serviceWorker"in navigator&&"PushManager"in window;if(h){c=Notification.permission;const b=await(await navigator.serviceWorker.ready).pushManager.getSubscription();m=(b==null?void 0:b.endpoint)??null}t({kind:"ready",subscriptions:y,selfEndpoint:m,permission:c,supported:h})}catch(y){t({kind:"error",message:y instanceof Error?y.message:String(y)})}},[]);v.useEffect(()=>{a()},[a]);async function o(){if(e.kind==="ready"){i(!0);try{const{public_key:y}=await ux(),h=(await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:dv(y)})).toJSON();await dx({endpoint:h.endpoint,keys:{p256dh:h.keys.p256dh,auth:h.keys.auth},device_label:navigator.userAgent.slice(0,60)}),r({kind:"ok",text:"subscribed — try Test push below"}),await a()}catch(y){r({kind:"err",text:y instanceof Error?y.message:String(y)})}finally{i(!1)}}}async function u(){i(!0);try{const m=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(m&&await m.unsubscribe(),e.kind==="ready"&&m){const c=e.subscriptions.find(h=>h.endpoint===m.endpoint);c&&await Qo(c.id)}r({kind:"ok",text:"unsubscribed"}),await a()}catch(y){r({kind:"err",text:y instanceof Error?y.message:String(y)})}finally{i(!1)}}async function f(){i(!0);try{const y=await fx();r({kind:"ok",text:`pushed to ${y.succeeded}/${y.total} (failed ${y.failed}, pruned ${y.pruned_endpoints.length})`}),await a()}catch(y){r({kind:"err",text:y instanceof Error?y.message:String(y)})}finally{i(!1)}}async function p(y){i(!0);try{await Qo(y),await a()}catch(m){r({kind:"err",text:m instanceof Error?m.message:String(m)})}finally{i(!1)}}if(e.kind==="loading")return s.jsx("div",{className:"text-text-muted",children:"loading push state..."});if(e.kind==="error")return s.jsxs("div",{className:"text-danger",children:["Error: ",e.message]});const{subscriptions:d,selfEndpoint:x,permission:w,supported:g}=e,j=x!==null;return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(ki,{className:"w-6 h-6 text-accent"})," Push notifications"]}),s.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Subscribe this device to receive push alerts when the agent fires ",s.jsx("code",{children:"request_approval"})," from MCP. Tap action buttons in the notification to respond from anywhere."]})]}),n&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${n.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[n.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),n.text]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"This device"}),g?w==="denied"?s.jsxs("div",{className:"text-danger text-sm flex items-center gap-2",children:[s.jsx(Wo,{className:"w-4 h-4"})," Notifications blocked at browser level. Enable in browser settings and refresh."]}):s.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[s.jsxs("span",{className:"text-text-muted text-sm mr-2",children:["Status: ",j?s.jsx("span",{className:"text-success",children:"subscribed"}):s.jsx("span",{className:"text-text-dim",children:"not subscribed"})]}),j?s.jsxs(R,{variant:"default",onClick:()=>void u(),disabled:l,children:[s.jsx(Wo,{className:"w-4 h-4 mr-1"})," Unsubscribe"]}):s.jsxs(R,{variant:"primary",onClick:()=>void o(),disabled:l,children:[s.jsx(ki,{className:"w-4 h-4 mr-1"})," Subscribe this device"]}),s.jsxs(R,{variant:"default",onClick:()=>void f(),disabled:l||d.length===0,title:d.length===0?"no subscriptions to push to":"send test push to all subscribed devices",children:[s.jsx(ka,{className:"w-4 h-4 mr-1"})," Test push"]})]}):s.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[s.jsx(at,{className:"w-4 h-4"})," Push API not supported in this browser (try Chrome / Firefox / Edge on desktop, or Safari 16+ as PWA on iOS)."]})]}),s.jsxs("section",{children:[s.jsxs("h2",{className:"text-sm text-text mb-3",children:["All subscribed devices (",d.length,")"]}),d.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No devices subscribed yet."}):s.jsx("div",{className:"space-y-2",children:d.map(y=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"text-xs flex-1 min-w-0",children:[s.jsx("div",{className:"text-text font-medium",children:y.device_label??"(unknown device)"}),s.jsxs("div",{className:"text-text-muted mt-1 font-mono break-all",children:[y.endpoint.slice(0,100),"…"]}),s.jsxs("div",{className:"text-text-dim text-[10px] mt-1",children:["added ",B(y.created_at),y.last_sent_at?` · last push ${B(y.last_sent_at)}`:"",y.last_error?` · last error: ${y.last_error.slice(0,80)}`:""]})]}),s.jsx(R,{variant:"ghost",onClick:()=>void p(y.id),disabled:l,title:"remove subscription",children:s.jsx(jr,{className:"w-3 h-3"})})]},y.id))})]})]})}const pv=3e3;function mv(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[l,i]=v.useState(!1),[a,o]=v.useState(null),u=v.useCallback(async()=>{try{const d=await _x();t(d),r(null)}catch(d){r(d instanceof Error?d.message:String(d))}},[]);v.useEffect(()=>{u();const d=setInterval(()=>void u(),pv);return()=>clearInterval(d)},[u]);async function f(){i(!0);try{const d=await Ex();o({kind:d.ok?"ok":"err",text:d.ok?"sync-available broadcast sent to peers":d.error??"broadcast failed"})}catch(d){o({kind:"err",text:d instanceof Error?d.message:String(d)})}finally{i(!1)}}if(n)return s.jsxs("div",{className:"text-danger",children:["Error: ",n]});if(!e)return s.jsx("div",{className:"text-text-muted",children:"loading relay status..."});const p=e.url!==null&&e.workspace!==null;return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(Id,{className:"w-6 h-6 text-accent"})," Multi-agent relay"]}),s.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Real-time fan-out across multiple machines / agents working on the same workspace. When one agent runs ",s.jsx("code",{children:"shinobi sync push"}),", all other connected agents auto-pull within ~1.5s. Backed by a Cloudflare Worker + Durable Object — see ",s.jsx("code",{children:"relay-worker/"}),"."]})]}),a&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${a.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[a.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),a.text]}),p?s.jsxs(s.Fragment,{children:[s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-sm text-text flex items-center gap-2",children:e.connected?s.jsxs(s.Fragment,{children:[s.jsx(Yh,{className:"w-4 h-4 text-success"}),s.jsx("span",{className:"text-success",children:"Connected"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ho,{className:"w-4 h-4 text-warning"}),s.jsx("span",{className:"text-warning",children:"Disconnected"}),e.reconnect_attempts>0&&s.jsxs("span",{className:"text-text-muted text-xs",children:["— attempt #",e.reconnect_attempts]})]})}),s.jsxs(R,{variant:"default",onClick:()=>void u(),disabled:l,children:[s.jsx(wa,{className:"w-3.5 h-3.5 mr-1"})," Refresh"]})]}),s.jsxs("dl",{className:"text-sm grid grid-cols-[10rem_1fr] gap-y-1.5",children:[s.jsx("dt",{className:"text-text-muted",children:"Agent ID"}),s.jsx("dd",{className:"text-text font-mono text-xs",children:e.agent_id}),s.jsx("dt",{className:"text-text-muted",children:"Workspace"}),s.jsx("dd",{className:"text-text font-mono text-xs",children:e.workspace}),s.jsx("dt",{className:"text-text-muted",children:"Relay URL"}),s.jsx("dd",{className:"text-text font-mono text-xs break-all",children:e.url}),s.jsx("dt",{className:"text-text-muted",children:"Last event"}),s.jsx("dd",{className:"text-text text-xs",children:e.last_event_at?s.jsxs(s.Fragment,{children:[s.jsx(le,{className:"bg-accent/20 text-accent mr-2",children:e.last_event_type}),B(e.last_event_at)]}):s.jsx("span",{className:"text-text-dim",children:"none"})}),e.last_error&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{className:"text-danger",children:"Last error"}),s.jsx("dd",{className:"text-danger text-xs",children:e.last_error})]})]})]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5",children:[s.jsx("h2",{className:"text-sm text-text mb-2",children:"Test broadcast"}),s.jsxs("p",{className:"text-text-muted text-xs mb-3",children:["Sends a ",s.jsx("code",{children:"sync-available"})," event to every other connected agent in this workspace. They will auto-pull the latest snapshot."]}),s.jsxs(R,{variant:"primary",onClick:()=>void f(),disabled:l||!e.connected,children:[s.jsx(ka,{className:"w-4 h-4 mr-1"})," Broadcast sync-available"]})]})]}):s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded-lg p-6",children:[s.jsxs("h2",{className:"text-text mb-2 flex items-center gap-2",children:[s.jsx(Ho,{className:"w-4 h-4 text-text-muted"})," Relay not configured"]}),s.jsxs("p",{className:"text-text-muted text-sm mb-3",children:["Set ",s.jsx("code",{children:"SHINOBI_RELAY_URL"}),", ",s.jsx("code",{children:"SHINOBI_RELAY_TOKEN"}),", and ",s.jsx("code",{children:"SHINOBI_RELAY_WORKSPACE"})," in Settings to enable."]}),s.jsxs("ol",{className:"text-text-muted text-sm list-decimal pl-5 space-y-1",children:[s.jsxs("li",{children:["Deploy the Worker: ",s.jsx("code",{children:"cd relay-worker && npx wrangler deploy"})]}),s.jsxs("li",{children:["Set the secret: ",s.jsx("code",{children:"npx wrangler secret put SHINOBI_RELAY_TOKEN"})]}),s.jsxs("li",{children:["Configure each agent's ",s.jsx("code",{children:"~/.shinobi/.env"})," with matching URL/token/workspace and restart the dashboard."]})]})]})]})}function hv(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[l,i]=v.useState(""),[a,o]=v.useState(!1),[u,f]=v.useState(null),[p,d]=v.useState(null),[x,w]=v.useState(null),g=v.useCallback(async()=>{try{const c=await jx();t(c),r(null)}catch(c){r(c instanceof Error?c.message:String(c))}},[]);v.useEffect(()=>{g()},[g]);async function j(){if(!l.trim()){f(null);return}o(!0);try{const c=await wx(l.trim());f(c.results)}catch(c){w({kind:"err",text:c instanceof Error?c.message:String(c)})}finally{o(!1)}}async function y(c){d(c);try{const h=await Nx(c);w({kind:h.ok?"ok":"err",text:h.ok?`installed ${c} — restart dashboard to load tools`:(h.stderr||"install failed").slice(0,200)}),await g(),u&&await j()}catch(h){w({kind:"err",text:h instanceof Error?h.message:String(h)})}finally{d(null)}}async function m(c){d(c);try{const h=await kx(c);w({kind:h.ok?"ok":"err",text:h.ok?`uninstalled ${c} — restart dashboard to drop tools`:(h.stderr||"uninstall failed").slice(0,200)}),await g(),u&&await j()}catch(h){w({kind:"err",text:h instanceof Error?h.message:String(h)})}finally{d(null)}}return n?s.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?s.jsxs("div",{className:"max-w-4xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(zd,{className:"w-6 h-6 text-accent"})," Plugins"]}),s.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Extend Shinobi with community-maintained packages from npm. Install location: ",s.jsx("code",{children:e.install_prefix})]})]}),x&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${x.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[x.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),x.text]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"Search npm registry"}),s.jsxs("div",{className:"flex gap-2 mb-3",children:[s.jsx("input",{type:"text",className:"flex-1 bg-bg border border-border rounded px-3 py-1.5 text-sm text-text",placeholder:"e.g. github, jira, time-tracking (looks under @shinobi/plugin-* and shinobi-plugin-*)",value:l,onChange:c=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"&&j()}}),s.jsxs(R,{variant:"primary",onClick:()=>void j(),disabled:a,children:[s.jsx(Na,{className:"w-4 h-4 mr-1"})," Search"]})]}),u!==null&&(u.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"no matching plugins published yet"}):s.jsx("div",{className:"space-y-2",children:u.map(c=>s.jsxs("div",{className:"bg-bg border border-border rounded p-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsx("div",{className:"text-text font-medium",children:c.name}),s.jsxs("div",{className:"text-text-muted text-xs",children:["v",c.version,c.author?" · "+c.author:""]}),c.links.npm&&s.jsxs("a",{href:c.links.npm,target:"_blank",rel:"noreferrer",className:"text-accent text-xs hover:underline",children:["npm ",s.jsx(Rh,{className:"w-3 h-3 inline"})]})]}),s.jsx("div",{className:"text-text-muted text-xs mt-1",children:c.description||"(no description)"})]}),c.installed?s.jsxs(R,{variant:"default",onClick:()=>void m(c.name),disabled:p===c.name,children:[s.jsx(jr,{className:"w-3.5 h-3.5 mr-1"})," Uninstall"]}):s.jsxs(R,{variant:"primary",onClick:()=>void y(c.name),disabled:p===c.name,children:[s.jsx(Mh,{className:"w-3.5 h-3.5 mr-1"})," ",p===c.name?"installing…":"Install"]})]},c.name))}))]}),s.jsxs("section",{className:"mb-6",children:[s.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[s.jsxs("h2",{className:"text-sm text-text",children:["Installed (",e.installed.length,")"]}),s.jsxs("button",{onClick:()=>void g(),className:"text-[11px] uppercase tracking-wider text-accent hover:underline",children:[s.jsx(wa,{className:"w-3 h-3 inline mr-0.5"})," refresh"]})]}),e.installed.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no plugins installed yet)"}):s.jsx("div",{className:"space-y-2",children:e.installed.map(c=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3 flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"text-text font-medium",children:[c.name," ",s.jsxs("span",{className:"text-text-muted text-xs",children:["v",c.version]})]}),s.jsx("div",{className:"text-text-muted text-xs",children:c.description})]}),s.jsx(R,{variant:"ghost",onClick:()=>void m(c.name),disabled:p===c.name,title:"uninstall",children:s.jsx(jr,{className:"w-3.5 h-3.5"})})]},c.name))})]}),s.jsxs("section",{children:[s.jsxs("h2",{className:"text-sm text-text mb-3",children:["Loaded at last startup (",e.loaded.length,")"]}),e.loaded.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(none yet — install + restart dashboard)"}):s.jsx("div",{className:"space-y-2",children:e.loaded.map(c=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("div",{className:"text-text font-medium",children:c.name}),s.jsx(le,{className:c.source==="user"?"bg-warning/30 text-warning":"bg-accent/30 text-accent",children:c.source})]}),s.jsx("div",{className:"text-text-muted text-xs font-mono break-all mt-1",children:c.module_path}),c.tools_registered.length>0&&s.jsxs("div",{className:"text-text-dim text-[11px] mt-2",children:["tools: ",c.tools_registered.join(", ")]}),c.error&&s.jsxs("div",{className:"text-danger text-xs mt-2",children:["error: ",c.error]})]},c.name))})]})]}):s.jsx("div",{className:"text-text-muted",children:"loading plugins..."})}function xv(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[l,i]=v.useState(!1),[a,o]=v.useState(null),u=v.useCallback(async()=>{try{t(await Sx()),r(null)}catch(p){r(p instanceof Error?p.message:String(p))}},[]);v.useEffect(()=>{u()},[u]);async function f(){i(!0);try{const p=await bx();p.ok?o({kind:"ok",text:`sent ${p.sent}/${p.attempted} events to ${p.endpoint}`}):o({kind:"err",text:p.error??"flush failed"}),await u()}catch(p){o({kind:"err",text:p instanceof Error?p.message:String(p)})}finally{i(!1)}}return n?s.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(Ld,{className:"w-6 h-6 text-accent"})," Telemetry"]}),s.jsx("p",{className:"text-text-muted text-xs mt-1",children:"Anonymous, opt-in usage stats. Everything below stays in your local SQLite buffer until you flush it to an endpoint. No project content, task titles, decision bodies, prompts, or usernames are ever recorded."})]}),a&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${a.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[a.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),a.text]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"Status"}),s.jsxs("dl",{className:"text-sm grid grid-cols-[12rem_1fr] gap-y-1.5",children:[s.jsx("dt",{className:"text-text-muted",children:"Recording"}),s.jsx("dd",{className:e.enabled?"text-success":"text-text-dim",children:e.enabled?"ON (SHINOBI_TELEMETRY=on)":"OFF (default)"}),s.jsx("dt",{className:"text-text-muted",children:"Endpoint"}),s.jsx("dd",{className:"text-text",children:e.endpoint_configured?"configured":s.jsx("span",{className:"text-text-dim",children:"local-only (no SHINOBI_TELEMETRY_ENDPOINT)"})}),s.jsx("dt",{className:"text-text-muted",children:"Total events"}),s.jsx("dd",{className:"text-text",children:e.total_events.toLocaleString()}),s.jsx("dt",{className:"text-text-muted",children:"Unsent"}),s.jsx("dd",{className:"text-text",children:e.unsent_events.toLocaleString()}),s.jsx("dt",{className:"text-text-muted",children:"Events last 7d"}),s.jsx("dd",{className:"text-text",children:e.last_7d_count.toLocaleString()}),s.jsx("dt",{className:"text-text-muted",children:"Last recorded"}),s.jsx("dd",{className:"text-text-muted text-xs",children:e.last_recorded_at?`${B(e.last_recorded_at)} ago`:"never"}),s.jsx("dt",{className:"text-text-muted",children:"Last sent"}),s.jsx("dd",{className:"text-text-muted text-xs",children:e.last_sent_at?`${B(e.last_sent_at)} ago`:"never"})]}),s.jsxs("div",{className:"mt-4 flex gap-2",children:[s.jsxs(R,{variant:"default",onClick:()=>void u(),children:[s.jsx(wa,{className:"w-3.5 h-3.5 mr-1"})," Refresh"]}),s.jsxs(R,{variant:"primary",onClick:()=>void f(),disabled:l||!e.endpoint_configured||e.unsent_events===0,children:[s.jsx(ka,{className:"w-3.5 h-3.5 mr-1"})," Flush unsent"]})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"Counts by event type (top 30)"}),e.by_event_type.length===0?s.jsxs("div",{className:"text-text-muted text-sm",children:["(no events recorded yet",!e.enabled&&s.jsxs(s.Fragment,{children:[" — enable in ",s.jsx(X,{to:"/settings",className:"text-accent hover:underline",children:"Settings"})," and restart the dashboard)"]})]}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Event type"}),s.jsx("th",{className:"pb-2 text-right",children:"Count"})]})}),s.jsx("tbody",{children:e.by_event_type.map(p=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsx("td",{className:"py-1.5 pr-3 text-text font-mono text-xs",children:p.event_type}),s.jsx("td",{className:"py-1.5 text-text text-right",children:p.count.toLocaleString()})]},p.event_type))})]})]}),s.jsxs("section",{className:"text-text-muted text-xs",children:[s.jsx("h2",{className:"text-text text-sm mb-2",children:"What is recorded"}),s.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[s.jsxs("li",{children:[s.jsx("code",{children:"tool_called"})," — MCP tool name + ok flag"]}),s.jsxs("li",{children:[s.jsx("code",{children:"view_hit"})," — dashboard route bucket (e.g. ",s.jsx("code",{children:"/projects/:tab"}),") + HTTP status. Project IDs are stripped."]})]}),s.jsx("h2",{className:"text-text text-sm mt-4 mb-2",children:"What is NEVER recorded"}),s.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[s.jsx("li",{children:"Project titles, task titles, decision bodies, notes, plans, prompts, model output, code snippets, file paths."}),s.jsx("li",{children:"IP addresses, usernames, machine IDs."}),s.jsxs("li",{children:["The contents of ",s.jsx("code",{children:"~/.shinobi/.env"}),", API keys, or any setting value."]})]})]})]}):s.jsx("div",{className:"text-text-muted",children:"loading telemetry..."})}function vv(){return s.jsxs("div",{className:"text-center py-16",children:[s.jsx("div",{className:"text-6xl mb-4",children:"🥷"}),s.jsx("h1",{className:"text-2xl text-text mb-2",children:"Not found"}),s.jsx("p",{className:"text-text-muted mb-4",children:"The page you're looking for doesn't exist."}),s.jsx(X,{to:"/",className:"text-accent hover:underline",children:"← Back to home"})]})}function gv(){return s.jsx(gh,{children:s.jsx(ch,{children:s.jsxs(W,{element:s.jsx(Mx,{}),children:[s.jsx(W,{path:"/",element:s.jsx(Ox,{})}),s.jsx(W,{path:"/settings",element:s.jsx(nv,{})}),s.jsx(W,{path:"/voice",element:s.jsx(ov,{})}),s.jsx(W,{path:"/approvals",element:s.jsx(cv,{})}),s.jsx(W,{path:"/push",element:s.jsx(fv,{})}),s.jsx(W,{path:"/relay",element:s.jsx(mv,{})}),s.jsx(W,{path:"/plugins",element:s.jsx(hv,{})}),s.jsx(W,{path:"/telemetry",element:s.jsx(xv,{})}),s.jsx(W,{path:"/sessions",element:s.jsx(Zx,{})}),s.jsx(W,{path:"/sessions/:sessionId",element:s.jsx(ev,{})}),s.jsxs(W,{path:"/projects/:id",element:s.jsx(Dx,{}),children:[s.jsx(W,{index:!0,element:s.jsx(Ax,{})}),s.jsx(W,{path:"subtasks",element:s.jsx(Ux,{})}),s.jsx(W,{path:"decisions",element:s.jsx(Wx,{})}),s.jsx(W,{path:"decision-drafts",element:s.jsx(Hx,{})}),s.jsx(W,{path:"dead-ends",element:s.jsx(Qx,{})}),s.jsx(W,{path:"notes",element:s.jsx(Kx,{})}),s.jsx(W,{path:"plans",element:s.jsx(Yx,{})}),s.jsx(W,{path:"context",element:s.jsx(Gx,{})}),s.jsx(W,{path:"sessions",element:s.jsx(qx,{})}),s.jsx(W,{path:"timeline",element:s.jsx(Xx,{})}),s.jsx(W,{path:"analytics",element:s.jsx(Jx,{})})]}),s.jsx(W,{path:"*",element:s.jsx(vv,{})})]})})})}md(document.getElementById("root")).render(s.jsx(v.StrictMode,{children:s.jsx(gv,{})}));
|
|
288
|
-
//# sourceMappingURL=index-CUJDeC3Q.js.map
|