heyiam 0.2.13 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +59 -8
- package/dist/index.js.map +1 -1
- package/dist/public/dist/assets/index-DT-fFQtC.css +1 -0
- package/dist/public/dist/assets/index-dirMWpge.js +21 -0
- package/dist/public/dist/index.html +2 -2
- package/dist/routes/auth.js +11 -1
- package/dist/routes/auth.js.map +1 -1
- package/dist/server.d.ts +9 -0
- package/dist/server.js +61 -2
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=ne(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var j=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},M={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=M,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,j)}catch(e){j(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 s(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 c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var ne=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var ie=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},oe=[],se=-1;function ce(e){return{current:e}}function le(e){0>se||(e.current=oe[se],oe[se]=null,se--)}function N(e,t){se++,oe[se]=e.current,e.current=t}var ue=ce(null),de=ce(null),fe=ce(null),pe=ce(null);function me(e,t){switch(N(fe,t),N(de,e),N(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}le(ue),N(ue,e)}function he(){le(ue),le(de),le(fe)}function ge(e){e.memoizedState!==null&&N(pe,e);var t=ue.current,n=Hd(t,e.type);t!==n&&(N(de,e),N(ue,n))}function _e(e){de.current===e&&(le(ue),le(de)),pe.current===e&&(le(pe),Qf._currentValue=ae)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+ve+e+ye}var xe=!1;function Se(e,t){if(!e||xe)return``;xe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-He(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&rt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function rt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-He(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function it(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function at(e,t){var n=t&-t;return n=n&42?1:ot(n),(n&(e.suspendedLanes|t))===0?n:0}function ot(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function st(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ct(){var e=M.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function lt(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var ut=Math.random().toString(36).slice(2),dt=`__reactFiber$`+ut,ft=`__reactProps$`+ut,pt=`__reactContainer$`+ut,mt=`__reactEvents$`+ut,ht=`__reactListeners$`+ut,gt=`__reactHandles$`+ut,_t=`__reactResources$`+ut,vt=`__reactMarker$`+ut;function yt(e){delete e[dt],delete e[ft],delete e[mt],delete e[ht],delete e[gt]}function bt(e){var t=e[dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[dt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function xt(e){if(e=e[dt]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function St(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ct(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function wt(e){e[vt]=!0}var Tt=new Set,Et={};function Dt(e,t){Ot(e,t),Ot(e+`Capture`,t)}function Ot(e,t){for(Et[e]=t,e=0;e<t.length;e++)Tt.add(t[e])}var kt=RegExp(`^[: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]*$`),At={},jt={};function Mt(e){return Te.call(jt,e)?!0:Te.call(At,e)?!1:kt.test(e)?jt[e]=!0:(At[e]=!0,!1)}function Nt(e,t,n){if(Mt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Pt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ft(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function It(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Rt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zt(e){if(!e._valueTracker){var t=Lt(e)?`checked`:`value`;e._valueTracker=Rt(e,t,``+e[t])}}function Bt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Lt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Vt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ht=/[\n"\\]/g;function Ut(e){return e.replace(Ht,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Wt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+It(t)):e.value!==``+It(t)&&(e.value=``+It(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Kt(e,o,It(n)):Kt(e,o,It(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+It(s):e.removeAttribute(`name`)}function Gt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){zt(e);return}n=n==null?``:``+It(n),t=t==null?n:``+It(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),zt(e)}function Kt(e,t,n){t===`number`&&Vt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+It(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Jt(e,t,n){if(t!=null&&(t=``+It(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+It(n)}function Yt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ie(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=It(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),zt(e)}function Xt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function $t(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Qt(e,o,t[o])}function en(e){if(e.indexOf(`-`)===-1)return!1;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 tn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),nn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rn(e){return nn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function an(){}var on=null;function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cn=null,ln=null;function un(e){var t=xt(e);if(t&&(e=t.stateNode)){var n=e[ft]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Wt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ut(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ft]||null;if(!a)throw Error(i(90));Wt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Bt(r)}break a;case`textarea`:Jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&qt(e,!!n.multiple,t,!1)}}}var dn=!1;function fn(e,t,n){if(dn)return e(t,n);dn=!0;try{return e(t)}finally{if(dn=!1,(cn!==null||ln!==null)&&(bu(),cn&&(t=cn,e=ln,ln=cn=null,un(t),e)))for(t=0;t<e.length;t++)un(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ft]||null;if(r===null)return null;n=r[t];a: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 a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var mn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,`passive`,{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return yn=i.slice(e,1<r?1-r:void 0)}function xn(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 Sn(){return!0}function Cn(){return!1}function wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Sn:Cn,this.isPropagationStopped=Cn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var P={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tn=wn(P),En=h({},P,{view:0,detail:0}),Dn=wn(En),On,kn,An,jn=h({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hn,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!==An&&(An&&e.type===`mousemove`?(On=e.screenX-An.screenX,kn=e.screenY-An.screenY):kn=On=0,An=e),On)},movementY:function(e){return`movementY`in e?e.movementY:kn}}),Mn=wn(jn),Nn=wn(h({},jn,{dataTransfer:0})),Pn=wn(h({},En,{relatedTarget:0})),Fn=wn(h({},P,{animationName:0,elapsedTime:0,pseudoElement:0})),In=wn(h({},P,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Ln=wn(h({},P,{data:0})),Rn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},zn={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`},Bn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bn[e])?!!t[e]:!1}function Hn(){return Vn}var Un=wn(h({},En,{key:function(e){if(e.key){var t=Rn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hn,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Wn=wn(h({},jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gn=wn(h({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hn})),Kn=wn(h({},P,{propertyName:0,elapsedTime:0,pseudoElement:0})),qn=wn(h({},jn,{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})),Jn=wn(h({},P,{newState:0,oldState:0})),Yn=[9,13,27,32],Xn=mn&&`CompositionEvent`in window,Zn=null;mn&&`documentMode`in document&&(Zn=document.documentMode);var Qn=mn&&`TextEvent`in window&&!Zn,$n=mn&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=bn(),yn=vn=_n=null,ir=!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 $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={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 cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){cn?ln?ln.push(r):ln=[r]:cn=r,t=Ed(t,`onChange`),0<t.length&&(n=new Tn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){yd(e,0)}function pr(e){if(Bt(St(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(mn){var gr;if(mn){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,sn(e)),fn(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)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 i=n[r];if(!Te.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function F(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Or(e,t){var n=F(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}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=F(n)}}function I(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?I(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function Ar(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`)}var L=mn&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,R=!1;function z(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;R||jr==null||jr!==Vt(r)||(r=jr,`selectionStart`in r&&Ar(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}),Nr&&Dr(Nr,r)||(Nr=r,r=Ed(Mr,`onSelect`),0<r.length&&(t=new Tn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var B={animationend:Pr(`Animation`,`AnimationEnd`),animationiteration:Pr(`Animation`,`AnimationIteration`),animationstart:Pr(`Animation`,`AnimationStart`),transitionrun:Pr(`Transition`,`TransitionRun`),transitionstart:Pr(`Transition`,`TransitionStart`),transitioncancel:Pr(`Transition`,`TransitionCancel`),transitionend:Pr(`Transition`,`TransitionEnd`)},Fr={},Ir={};mn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete B.animationend.animation,delete B.animationiteration.animation,delete B.animationstart.animation),`TransitionEvent`in window||delete B.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!B[e])return e;var t=B[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`abort auxClick beforeToggle 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(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),Dt(t,[e])}var Jr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-He(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(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.refCleanup=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 oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(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&65011712,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.refCleanup=e.refCleanup,n}function li(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=oi(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-He(r)-1;r&=~(1<<i),n+=1;var a=32-He(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-He(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,V=null,H=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[dt]=e,t[ft]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Gt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Yt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=an),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ji=ji.return}}function Ri(e){if(e!==ji)return!1;if(!H)return Li(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&V&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));V=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));V=uf(e)}else t===27?(t=V,Zd(e.type)?(e=lf,lf=null,V=e):V=t):V=ji?cf(e.stateNode.nextSibling):null;return!0}function zi(){V=ji=null,H=!1}function Bi(){var e=Mi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=ce(null),Ui=null,Wi=null;function Gi(e,t,n){N(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,le(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Er(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function U(e){return $i(Ui,e)}function Qi(e,t){return Ui===null&&Zi(e),$i(e,t)}function $i(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ta=t.unstable_scheduleCallback,na=t.unstable_NormalPriority,ra={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ia(){return{controller:new ea,data:new Map,refCount:0}}function aa(e){e.refCount--,e.refCount===0&&ta(na,function(){e.controller.abort()})}var oa=null,sa=0,ca=0,la=null;function ua(e,t){if(oa===null){var n=oa=[];sa=0,ca=dd(),la={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return sa++,t.then(da,da),t}function da(){if(--sa===0&&oa!==null){la!==null&&(la.status=`fulfilled`);var e=oa;oa=null,ca=0,la=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var pa=j.S;j.S=function(e,t){eu=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&ua(e,t),pa!==null&&pa(e,t)};var ma=ce(null);function ha(){var e=ma.current;return e===null?q.pooledCache:e}function ga(e,t){t===null?N(ma,ma.current):N(ma,t.pool)}function _a(){var e=ha();return e===null?null:{parent:ra._currentValue,pool:e}}var va=Error(i(460)),ya=Error(i(474)),ba=Error(i(542)),xa={then:function(){}};function Sa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ca(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(an,an),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Da(e),e;default:if(typeof t.status==`string`)t.then(an,an);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Da(e),e}throw Ta=t,va}}function wa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ta=e,va):e}}var Ta=null;function Ea(){if(Ta===null)throw Error(i(459));var e=Ta;return Ta=null,e}function Da(e){if(e===va||e===ba)throw Error(i(483))}var Oa=null,ka=0;function Aa(e){var t=ka;return ka+=1,Oa===null&&(Oa=[]),Ca(Oa,e,t)}function ja(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ma(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Na(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&wa(i)===t.type)?(t=a(t,n.props),ja(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),ja(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ui(t.type,t.key,t.props,null,e.mode,n),ja(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=wa(t),f(e,t,n)}if(ie(t)||te(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Aa(t),n);if(t.$$typeof===C)return f(e,Qi(e,t),n);Ma(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=wa(n),p(e,t,n,r)}if(ie(n)||te(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Aa(n),r);if(n.$$typeof===C)return p(e,t,Qi(e,n),r);Ma(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=wa(r),m(e,t,n,r,i)}if(ie(r)||te(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Aa(r),i);if(r.$$typeof===C)return m(e,t,n,Qi(t,r),i);Ma(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return H&&Ei(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),H&&Ei(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),H&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),H&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&wa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ja(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),ja(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=wa(o),b(e,r,o,c)}if(ie(o))return h(e,r,o,c);if(te(o)){if(l=te(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Aa(o),c);if(o.$$typeof===C)return b(e,r,Qi(e,o),c);Ma(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ka=0;var i=b(e,t,n,r);return Oa=null,i}catch(t){if(t===va||t===ba)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=Na(!0),Fa=Na(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=la;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===ca&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ia=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=ce(null),Ya=ce(0);function Xa(e,t){e=Ul,N(Ya,e),N(Ja,t),Ul=e|t.baseLanes}function Za(){N(Ya,Ul),N(Ja,Ja.current)}function Qa(){Ul=Ya.current,le(Ja),le(Ya)}var $a=ce(null),eo=null;function to(e){var t=e.alternate;N(oo,oo.current&1),N($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){N(oo,oo.current),N($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(N(oo,oo.current),N($a,e),eo===null&&(eo=e)):io(e)}function io(){N(oo,oo.current),N($a,$a.current)}function ao(e){le($a),eo===e&&(eo=null),le(oo)}var oo=ce(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){j.H=Is;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||tc||(e=e.dependencies,e!==null&&Xi(e)&&(tc=!0))}function So(e,t,n,r){W=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=G=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=zs,o=t(n,r)}while(fo);return o}function Co(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ca(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return U(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),G,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ca&&(d=!0);else if((co&p)===p){u=u.next,p===ca&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,Gl|=p;f=u.action,po&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Er(o,e.memoizedState)&&(tc=!0,d&&(n=la,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Er(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=W,a=Oo(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Er((G||a).memoizedState,n);if(s&&(a.memoizedState=n,tc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Ho(e){var t=ti(e,2);t!==null&&hu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Ve(!0);try{n()}finally{Ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,G,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(H){var n=q.formState;if(n!==null){a:{var r=W;if(H){if(V){b:{for(var i=V,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){V=cf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,W,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,W,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),G,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===va?ba:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=G;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();W.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&yo(r,G.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(W.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),W.lanes|=e,Gl|=e,n)}function ys(e,t,n,r){return Er(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(tc=!0,e.memoizedState=n):(e=mu(),W.lanes|=e,Gl|=e,t):(e=vs(e,n,r),Er(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};j.T=s,Ms(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,fa(c,r),pu(e)):js(e,t,r,pu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,ae,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},pu())}function Ts(){return U(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=za(n);var r=Ba(t,e,n);r!==null&&(hu(r,t,n),Va(r,t,n)),t={cache:ia()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=ei(e,t,n,r),n!==null&&(hu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,pu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,o))return $r(e,t,i,0),q===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return hu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&hu(t,e,2)}function Ns(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var Is={readContext:U,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:U,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:U,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Do();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=q.identifierPrefix;if(H){var n=Ti,r=wi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,W)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:U,use:jo,useCallback:gs,useContext:U,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),G.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:U,use:jo,useCallback:gs,useContext:U,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return G===null?vs(n,e,t):ys(n,G.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=za(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(hu(t,e,n),Va(t,e,n))}};function Hs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(i,a):!0}function Us(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&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){Jr(e)}function Ks(e){console.error(e)}function qs(e){Jr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=za(e),e.tag=3,e}function Qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(H)return t=$a.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=Xs(e.stateNode,r,a),Ha(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Xs(n.stateNode,r,e),Ha(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Ha(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Fa(t,null,n,r):Pa(t,e.child,n,r)}function rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(H&&s&&Oi(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function oc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ga(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ga(t,null),Za(),io(t)):(ga(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=ha();return a=a===null?null:{parent:ra._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ga(t,null),Za(),ro(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Pa(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(no(t),(e=V)?(e=rf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,V=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(tc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,tc||a){if(r=q,r!==null&&(s=at(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),hu(r,e,s),ec;Du(),t=uc(e,t,n)}else e=o.treeContext,V=cf(s.nextSibling),ji=t,H=!0,Mi=null,Ni=!1,e!==null&&Ai(t,e),t=lc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return Zi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(H&&r&&Oi(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(H&&r&&Oi(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=U(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},La(t),o=n.contextType,a.context=typeof o==`object`&&o?U(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Vs.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=U(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Us(t,a,r,o),Ia=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||Ia?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Ia||Hs(t,n,c,r,f,l,o))?(u||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=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ra(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=U(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Us(t,a,r,c),Ia=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||Ia||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Ia||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,fc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Pa(t,e.child,null,i),t.child=Pa(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return zi(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:_a()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function bc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(H){if(a?to(t):io(t),(e=V)?(e=rf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,V=null)):e=null,e===null)throw Fi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):(to(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Pa(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=q,s!==null&&(r=at(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),hu(s,e,r),ec;af(c)||Du(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,V=cf(c.nextSibling),ji=t,H=!0,Mi=null,Ni=!1,e!==null&&Ai(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=_a():(l=ra._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Pa(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Tc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,N(oo,o),nc(e,t,r,n),r=H?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function kc(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),Gi(t,ra,e.memoizedState.cache),zi();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),N(oo,oo.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Gi(t,ra,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}else tc=!1,H&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=wa(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=rc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=re(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ra(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ra,r),r!==o.cache&&Ji(t,[ra],n,!0),Wa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=gc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Vi(a),t=gc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(V=cf(e.firstChild),ji=t,H=!0,Mi=null,Ni=!0,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(n=t.type,e=t.pendingProps,r=Bd(fe.current).createElement(n),r[dt]=t,r[ft]=e,Pd(r,n,e),wt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&H&&(r=t.stateNode=ff(t.type,t.pendingProps,fe.current),ji=t,Ni=!0,a=V,Zd(t.type)?(lf=a,V=cf(r.firstChild)):V=a),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=V)&&(r=tf(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ji=t,V=cf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=V)&&(n=nf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ji=t,V=null,e=!0)),e||Fi(t)),null;case 13:return bc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pa(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=U(a),r=r(a),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Zi(t),r=U(ra),e===null?(a=ha(),a===null&&(a=q,o=ia(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},La(t),Gi(t,ra,a)):((e.lanes&n)!==0&&(Ra(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ra,r),r!==a.cache&&Ji(t,[ra],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ra,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Ta=xa,ya}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ta=xa,ya}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:$e(),e.lanes|=t,Yl|=t)}function Fc(e,t){if(!H)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 Ic(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ra),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Ic(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,a,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}e=ue.current,Ri(t)?Ii(t,e):(e=ff(a,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}if(o=ue.current,Ri(t))Ii(t,o);else{var s=Bd(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Fi(t,!0)}else e=Bd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[dt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[dt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return he(),e===null&&Sd(t.stateNode.containerInfo),Ic(t),null;case 10:return Ki(t.type),Ic(t),null;case 19:if(le(oo),r=t.memoizedState,r===null)return Ic(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return N(oo,oo.current&1|2),H&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>tu&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return Ic(t),null}else 2*Ae()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=oo.current,N(oo,a?n&1|2:n&1),H&&Ei(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&le(ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ra),Ic(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ra),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(oo),null;case 4:return he(),null;case 10:return Ki(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&le(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ra),null;case 25:return null;default:return null}}function zc(e,t){switch(ki(t),t.tag){case 3:Ki(ra),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:le(oo);break;case 10:Ki(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&le(ma);break;case 24:Ki(ra)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ft]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a: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.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=an));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(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&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[dt]=e,t[ft]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{qa(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Be&&typeof Be.onCommitFiberUnmount==`function`)try{Be.onCommitFiberUnmount(ze,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(i(160));ul(o,s,a),sl=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[vt]||o[dt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[dt]=e,wt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[dt]=e,wt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){a=e.stateNode;try{Xt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ae()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||a,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||$c||el||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Zc(e,Yc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Xt(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ka(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&aa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=U(ra),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return U(ra).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:j.T===null?ct():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||H){var e=qe;qe<<=1,!(qe&3932160)&&(qe=262144),Jl=e}else Jl=536870912;return e=$a.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),tt(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ze(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ae(),10<a)){if(yu(r,t,Jl,!Bl),Xe(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:an},jl(t,a,d);var m=(a&62914560)===a?$l-Ae():(a&4194048)===a?eu-Ae():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Er(a(),i))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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-He(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&rt(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Wi=Ui=null,Eo(e),Oa=null,ka=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=ci(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ze(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-He(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Qr(),n}function Cu(e,t){W=null,j.H=Is,t===va||t===ba?(t=Ea(),X=3):t===ya?(t=Ea(),X=4):X=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Js(e,gi(t,e.current)))}function wu(){var e=$a.current;return e===null?!0:(Y&4194048)===Y?eo===null:(Y&62914560)===Y||Y&536870912?e===eo:!1}function Tu(){var e=j.H;return j.H=Is,e===null?Is:e}function Eu(){var e=j.A;return j.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&$a.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,K=r,j.H=i,j.A=a,J===null&&(q=null,Y=0,Qr()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Ae()+500,Su(e,t)):Vl=Ze(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(Sa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Sa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Wi=Ui=null,j.H=r,j.A=a,K=n,J===null?(q=null,Y=0,Qr(),Wl):0}function ju(){for(;J!==null&&!Oe();)Mu(J)}function Mu(e){var t=Ac(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:zc(n,t),t=J=li(t,Ul),t=Ac(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Wi=Ui=null,Eo(t),Oa=null,ka=0;var i=t.return;try{if($s(e,i,t,n,Y)){Wl=1,Js(e,gi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Js(e,gi(n,e.current)),J=null;return}t.flags&32768?(H||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Lc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,nt(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Pe,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=j.T,j.T=null,a=M.p,M.p=2,s=K,K|=4;try{il(e,t,n)}finally{K=s,M.p=a,j.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&I(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{K=i,M.p=r,j.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=K;K|=4;try{al(e,t.alternate,t)}finally{K=i,M.p=r,j.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,ke();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),st(n),t=t.stateNode,Be&&typeof Be.onCommitFiberRoot==`function`)try{Be.onCommitFiberRoot(ze,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=j.T,i=M.p,M.p=2,j.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{j.T=t,M.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,aa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=st(su),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{M.p=a,j.T=r,Vu(e,t)}}function Wu(e,t,n){t=gi(n,t),t=Xs(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(tt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=gi(n,e),n=Zs(2),r=Ba(t,n,2),r!==null&&(Qs(n,r,t,e),tt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ae()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=$e()),e=ti(e,t),e!==null&&(tt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ee(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Xe(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ae(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-He(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=Xe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),st(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=Ie;break;default:n=Pe}return r=cd.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Xe(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?Ee(Me,ad):od()})}function dd(){if(nd===0){var e=ca;e===0&&(e=Ke,Ke<<=1,!(Ke&261888)&&(Ke=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:rn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ft]||null).action),o=r.submitter;o&&(t=(t=o[ft]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Tn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Kr.length;hd++){var gd=Kr[hd];qr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),Ot(`onMouseEnter`,[`mouseout`,`mouseover`]),Ot(`onMouseLeave`,[`mouseout`,`mouseover`]),Ot(`onPointerEnter`,[`pointerout`,`pointerover`]),Ot(`onPointerLeave`,[`pointerout`,`pointerover`]),Dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[mt];n===void 0&&(n=t[mt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Tt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=bt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}fn(function(){var r=a,i=sn(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=Tn,u=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:l=Un;break;case`focusin`:u=`focus`,l=Pn;break;case`focusout`:u=`blur`,l=Pn;break;case`beforeblur`:case`afterblur`:l=Pn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Nn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Gn;break;case Rr:case zr:case Br:l=Fn;break;case Wr:l=Kn;break;case`scroll`:case`scrollend`:l=Dn;break;case`wheel`:l=qn;break;case`copy`:case`cut`:case`paste`:l=In;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Wn;break;case`toggle`:case`beforetoggle`:l=Jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==on&&(u=n.relatedTarget||n.fromElement)&&(bt(u)||u[pt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?bt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Wn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:St(l),h=u==null?c:St(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,bt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?St(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=mr;else if(cr(c))if(hr)v=wr;else{v=Sr;var y=xr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&en(r.elementType)&&(v=mr):v=Cr;if(v&&=v(e,r)){lr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Kt(c,`number`,c.value)}switch(y=r?St(r):window,e){case`focusin`:(cr(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:R=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:R=!1,z(s,n,i);break;case`selectionchange`:if(L)break;case`keydown`:case`keyup`:z(s,n,i)}var b;if(Xn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ir?nr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&($n&&n.locale!==`ko`&&(ir||x!==`onCompositionStart`?x===`onCompositionEnd`&&ir&&(b=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,ir=!0)),y=Ed(r,x),0<y.length&&(x=new Ln(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=rr(n),b!==null&&(x.data=b)))),(b=Qn?ar(e,n):or(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Ln(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=pn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
9
|
+
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Xt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Pt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=an);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=rn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=tn.get(n)||n,Nt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:$t(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Xt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=an);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Et.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ft]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Gt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&qt(e,!!r,n,!0):qt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Yt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(en(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Wt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?qt(e,!!n,n?[]:``,!1):qt(e,!!n,t,!0)):qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(en(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),yt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[vt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=M.d;M.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=xt(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Ct(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);wt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),wt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),wt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=fe.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Ut(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),wt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ut(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,wt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[vt]||a[dt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},La(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(hu(n,e,t),Va(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=ot(t);var n=ti(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,up(e,t,n,r)}finally{M.p=a,j.T=i}}function lp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,up(e,t,n,r)}finally{M.p=a,j.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=xt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ae()+500,id(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=sn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=bt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 fp=e,null}function mp(e){switch(e){case`beforetoggle`: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`toggle`: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 2;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`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=xt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=bt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);on=r,n.target.dispatchEvent(r),on=null}else return t=xt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=xt(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[pt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(i(527,Lp,`19.2.4`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ze=zp.inject(Rp),Be=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[pt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=g(),y=`modulepreload`,b=function(e){return`/`+e},x={},S=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=b(t,n),t in x)return;x[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:y,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},C=`popstate`;function w(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function T(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return k(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:A(t)}return ne(t,n,null,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function D(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function O(){return Math.random().toString(36).substring(2,10)}function ee(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function k(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?te(t):t,state:n,key:t&&t.key||r||O(),unstable_mask:i}}function A({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function te(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ne(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=w(e)?e:k(h.location,e,t);n&&n(r,e),l=u()+1;let d=ee(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=w(e)?e:k(h.location,e,t);n&&n(r,e),l=u();let i=ee(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return re(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function re(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),E(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:A(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function ie(e,t,n=`/`){return j(e,t,n,!1)}function j(e,t,n,r){let i=be((typeof t==`string`?te(t):t).pathname||`/`,n);if(i==null)return null;let a=ae(e);se(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ye(i);o=ge(a[e],t,r)}return o}function M(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ae(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;E(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Oe([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ae(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:me(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of oe(e.path))a(e,t,!0,n)}),t}function oe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=oe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function se(e){e.sort((e,t)=>e.score===t.score?he(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ce=/^:[\w-]+$/,le=3,N=2,ue=1,de=10,fe=-2,pe=e=>e===`*`;function me(e,t){let n=e.split(`/`),r=n.length;return n.some(pe)&&(r+=fe),t&&(r+=N),n.filter(e=>!pe(e)).reduce((e,t)=>e+(ce.test(t)?le:t===``?ue:de),r)}function he(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ge(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=_e({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=_e({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Oe([a,u.pathname]),pathnameBase:ke(Oe([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Oe([a,u.pathnameBase]))}return o}function _e(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ve(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ve(e,t=!1,n=!0){D(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=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ye(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function be(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)||`/`}var xe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Se(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?te(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?Ce(n.substring(1),`/`):Ce(n,t)):a=t,{pathname:a,search:Ae(r),hash:je(i)}}function Ce(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function we(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 Te(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ee(e){let t=Te(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function De(e,t,n,r=!1){let i;typeof e==`string`?i=te(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),we(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),we(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),we(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Se(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Oe=e=>e.join(`/`).replace(/\/\/+/g,`/`),ke=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Ae=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,je=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Me=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ne(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Pe(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Fe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ie(e,t){let n=e;if(typeof n!=`string`||!xe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Fe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=be(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{D(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Le=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Le);var Re=[`GET`,...Le];new Set(Re);var ze=_.createContext(null);ze.displayName=`DataRouter`;var Be=_.createContext(null);Be.displayName=`DataRouterState`;var Ve=_.createContext(!1),He=_.createContext({isTransitioning:!1});He.displayName=`ViewTransition`;var Ue=_.createContext(new Map);Ue.displayName=`Fetchers`;var We=_.createContext(null);We.displayName=`Await`;var Ge=_.createContext(null);Ge.displayName=`Navigation`;var Ke=_.createContext(null);Ke.displayName=`Location`;var qe=_.createContext({outlet:null,matches:[],isDataRoute:!1});qe.displayName=`Route`;var Je=_.createContext(null);Je.displayName=`RouteError`;var Ye=`REACT_ROUTER_ERROR`,Xe=`REDIRECT`,Ze=`ROUTE_ERROR_RESPONSE`;function Qe(e){if(e.startsWith(`${Ye}:${Xe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $e(e){if(e.startsWith(`${Ye}:${Ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Me(t.status,t.statusText,t.data)}catch{}}function et(e,{relative:t}={}){E(tt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(Ge),{hash:i,pathname:a,search:o}=ct(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Oe([n,a])),r.createHref({pathname:s,search:o,hash:i})}function tt(){return _.useContext(Ke)!=null}function nt(){return E(tt(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(Ke).location}var rt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function it(e){_.useContext(Ge).static||_.useLayoutEffect(e)}function at(){let{isDataRoute:e}=_.useContext(qe);return e?Dt():ot()}function ot(){E(tt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(ze),{basename:t,navigator:n}=_.useContext(Ge),{matches:r}=_.useContext(qe),{pathname:i}=nt(),a=JSON.stringify(Ee(r)),o=_.useRef(!1);return it(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(D(o.current,rt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=De(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Oe([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}_.createContext(null);function st(){let{matches:e}=_.useContext(qe),t=e[e.length-1];return t?t.params:{}}function ct(e,{relative:t}={}){let{matches:n}=_.useContext(qe),{pathname:r}=nt(),i=JSON.stringify(Ee(n));return _.useMemo(()=>De(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lt(e,t){return ut(e,t)}function ut(e,t,n){E(tt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(Ge),{matches:i}=_.useContext(qe),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;kt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=nt(),d;if(t){let e=typeof t==`string`?te(t):t;E(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=ie(e,{pathname:p});D(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),D(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=_t(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Oe([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Oe([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(Ke.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function dt(){let e=Et(),t=Ne(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var ft=_.createElement(dt,null),pt=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$e(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(qe.Provider,{value:this.props.routeContext},_.createElement(Je.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(ht,{error:e},t):t}};pt.contextType=Ve;var mt=new WeakMap;function ht({children:e,error:t}){let{basename:n}=_.useContext(Ge);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qe(t.digest);if(e){let r=mt.get(t);if(r)throw r;let i=Ie(e.location,n);if(Fe&&!mt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mt.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gt({routeContext:e,match:t,children:n}){let r=_.useContext(ze);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(qe.Provider,{value:e},n)}function _t(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);E(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Pe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ft,o&&(s<0&&c===0?(kt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(gt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(pt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yt(e){let t=_.useContext(ze);return E(t,vt(e)),t}function bt(e){let t=_.useContext(Be);return E(t,vt(e)),t}function xt(e){let t=_.useContext(qe);return E(t,vt(e)),t}function St(e){let t=xt(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ct(){return St(`useRouteId`)}function wt(){return bt(`useNavigation`).navigation}function Tt(){let{matches:e,loaderData:t}=bt(`useMatches`);return _.useMemo(()=>e.map(e=>M(e,t)),[e,t])}function Et(){let e=_.useContext(Je),t=bt(`useRouteError`),n=St(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dt(){let{router:e}=yt(`useNavigate`),t=St(`useNavigate`),n=_.useRef(!1);return it(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{D(n.current,rt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ot={};function kt(e,t,n){!t&&!Ot[e]&&(Ot[e]=!0,D(!1,n))}_.useOptimistic,_.memo(At);function At({routes:e,future:t,state:n,isStatic:r,onError:i}){return ut(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function jt(e){E(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){E(!tt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=te(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=_.useMemo(()=>{let e=be(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return D(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement(Ge.Provider,{value:c},_.createElement(Ke.Provider,{children:t,value:h}))}function Nt({children:e,location:t}){return lt(Pt(e),t)}_.Component;function Pt(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,Pt(e.props.children,i));return}E(e.type===jt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Pt(e.props.children,i)),n.push(a)}),n}var Ft=`get`,It=`application/x-www-form-urlencoded`;function Lt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Rt(e){return Lt(e)&&e.tagName.toLowerCase()===`button`}function zt(e){return Lt(e)&&e.tagName.toLowerCase()===`form`}function Bt(e){return Lt(e)&&e.tagName.toLowerCase()===`input`}function Vt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ht(e,t){return e.button===0&&(!t||t===`_self`)&&!Vt(e)}function Ut(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Wt(e,t){let n=Ut(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Gt=null;function Kt(){if(Gt===null)try{new FormData(document.createElement(`form`),0),Gt=!1}catch{Gt=!0}return Gt}var qt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Jt(e){return e!=null&&!qt.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${It}"`),null):e}function Yt(e,t){let n,r,i,a,o;if(zt(e)){let o=e.getAttribute(`action`);r=o?be(o,t):null,n=e.getAttribute(`method`)||Ft,i=Jt(e.getAttribute(`enctype`))||It,a=new FormData(e)}else if(Rt(e)||Bt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?be(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ft,i=Jt(e.getAttribute(`formenctype`))||Jt(o.getAttribute(`enctype`))||It,a=new FormData(o,e),!Kt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Lt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Ft,r=null,i=It,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Xt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Zt=/[&><\u2028\u2029]/g;function Qt(e){return e.replace(Zt,e=>Xt[e])}function $t(e,t){if(e===!1||e==null)throw Error(t)}function en(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&be(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function tn(e,t){if(e.id in t)return t[e.id];try{let n=await S(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nn(e){return e!=null&&typeof e.page==`string`}function rn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function an(e,t,n){return un((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await tn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(rn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function on(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function sn(e,t,{includeHydrateFallback:n}={}){return cn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function cn(e){return[...new Set(e)]}function ln(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function un(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!nn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ln(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function dn(){let e=_.useContext(ze);return $t(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function fn(){let e=_.useContext(Be);return $t(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var pn=_.createContext(void 0);pn.displayName=`FrameworkContext`;function mn(){let e=_.useContext(pn);return $t(e,`You must render this element inside a <HydratedRouter> element`),e}function hn(e,t){let n=_.useContext(pn),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:gn(s,p),onBlur:gn(c,m),onMouseEnter:gn(l,p),onMouseLeave:gn(u,m),onTouchStart:gn(d,p)}]:[a,f,{}]:[!1,f,{}]}function gn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function _n({page:e,...t}){let{router:n}=dn(),r=_.useMemo(()=>ie(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(yn,{page:e,matches:r,...t}):null}function vn(e){let{manifest:t,routeModules:n}=mn(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return an(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function yn({page:e,matches:t,...n}){let r=nt(),{future:i,manifest:a,routeModules:o}=mn(),{basename:s}=dn(),{loaderData:c,matches:l}=fn(),u=_.useMemo(()=>on(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>on(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=en(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>sn(d,a),[d,a]),m=vn(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function bn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var xn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{xn&&(window.__reactRouterVersion=`7.13.2`)}catch{}function Sn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=_.useRef();i.current??=T({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(Mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Cn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(Mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Cn.displayName=`unstable_HistoryRouter`;var wn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,P=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:v}=_.useContext(Ge),y=typeof l==`string`&&wn.test(l),b=Ie(l,h);l=b.to;let x=et(l,{relative:r}),S=nt(),C=null;if(o){let e=De(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Oe([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=hn(n,p),D=jn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let ee=!(b.isExternal||i),k=_.createElement(`a`,{...p,...E,href:(ee?C:void 0)||b.absoluteURL||x,onClick:ee?O:e,ref:bn(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,k,_.createElement(_n,{page:x})):k});P.displayName=`Link`;var Tn=_.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ct(a,{relative:c.relative}),d=nt(),f=_.useContext(Be),{navigator:p,basename:m}=_.useContext(Ge),h=f!=null&&Hn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=be(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(P,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Tn.displayName=`NavLink`;var En=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Ft,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=_.useContext(Ge),g=Fn(),v=In(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&wn.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});En.displayName=`Form`;function Dn({getKey:e,storageKey:t,...n}){let r=_.useContext(pn),{basename:i}=_.useContext(Ge),a=nt(),o=Tt();Bn({getKey:e,storageKey:t});let s=_.useMemo(()=>{if(!r||!e)return null;let t=zn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return _.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Qt(JSON.stringify(t||Ln))}, ${Qt(JSON.stringify(s))})`}})}Dn.displayName=`ScrollRestoration`;function On(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kn(e){let t=_.useContext(ze);return E(t,On(e)),t}function An(e){let t=_.useContext(Be);return E(t,On(e)),t}function jn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=at(),d=nt(),f=ct(e,{relative:o});return _.useCallback(p=>{if(Ht(p,t)){p.preventDefault();let t=n===void 0?A(d)===A(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Mn(e){D(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=_.useRef(Ut(e)),n=_.useRef(!1),r=nt(),i=_.useMemo(()=>Wt(r.search,n.current?null:t.current),[r.search]),a=at();return[i,_.useCallback((e,t)=>{let r=Ut(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Nn=0,Pn=()=>`__${String(++Nn)}__`;function Fn(){let{router:e}=kn(`useSubmit`),{basename:t}=_.useContext(Ge),n=Ct(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Yt(e,t);a.navigate===!1?await r(a.fetcherKey||Pn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function In(e,{relative:t}={}){let{basename:n}=_.useContext(Ge),r=_.useContext(qe);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ct(e||`.`,{relative:t})},o=nt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Oe([n,a.pathname])),A(a)}var Ln=`react-router-scroll-positions`,Rn={};function zn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:be(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Bn({getKey:e,storageKey:t}={}){let{router:n}=kn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=An(`useScrollRestoration`),{basename:a}=_.useContext(Ge),o=nt(),s=Tt(),c=wt();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Vn(_.useCallback(()=>{if(c.state===`idle`){let t=zn(o,s,a,e);Rn[t]=window.scrollY}try{sessionStorage.setItem(t||Ln,JSON.stringify(Rn))}catch(e){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Ln);e&&(Rn=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Rn,()=>window.scrollY,e?(t,n)=>zn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{D(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Vn(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Hn(e,{relative:t}={}){let n=_.useContext(He);E(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=kn(`useViewTransitionState`),i=ct(e,{relative:t});if(!n.isTransitioning)return!1;let a=be(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=be(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _e(i.pathname,o)!=null||_e(i.pathname,a)!=null}var Un=`/api`;function Wn(e){return encodeURIComponent(e)}async function Gn(e){let t=await fetch(`${Un}${e}`);if(!t.ok)throw Error(`GET ${e} failed: ${t.status}`);return t.json()}async function Kn(e,t){let n=await fetch(`${Un}${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)});if(!n.ok){let t=await n.json().catch(()=>({error:{message:`POST ${e} failed`}}));throw Error(t.error?.message??`POST ${e} failed: ${n.status}`)}return n.json()}function qn(e,t,n){let r=new AbortController;return fetch(`${Un}${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r.signal}).then(async e=>{if(e.status===401){n({type:`error`,message:`AUTH_REQUIRED`});return}if(!e.ok){n({type:`error`,message:(await e.json().catch(()=>({error:{message:`Request failed`}}))).error?.message??`Request failed`});return}let t=e.body?.getReader();if(!t){n({type:`error`,message:`No response stream`});return}let r=new TextDecoder,i=``;for(;;){let{done:e,value:a}=await t.read();if(e)break;i+=r.decode(a,{stream:!0});let o=i.split(`
|
|
12
|
+
`);i=o.pop()??``;for(let e of o){if(!e.startsWith(`data: `))continue;let t=e.slice(6).trim();if(t)try{n(JSON.parse(t))}catch{}}}}).catch(e=>{e.name!==`AbortError`&&n({type:`error`,message:e.message})}),r}async function Jn(){return(await Gn(`/projects`)).projects}async function Yn(e){return(await Gn(`/projects/${Wn(e)}/sessions`)).sessions}async function Xn(e,t){return(await Gn(`/projects/${Wn(e)}/sessions/${Wn(t)}`)).session}async function Zn(){return Gn(`/source-audit`)}async function Qn(){return Gn(`/archive/stats`)}async function $n(){return Kn(`/archive/sync`)}async function er(){let e=await fetch(`${Un}/archive/export`);if(!e.ok){let t=await e.json().catch(()=>({error:`Export failed`}));throw Error(t.error??`Export failed: ${e.status}`)}let t=await e.blob(),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=e.headers.get(`Content-Disposition`)?.match(/filename="(.+)"/)?.[1]??`heyiam-archive.tar.gz`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}async function tr(){return Gn(`/archive/verify`)}async function nr(e){return Gn(`/projects/${Wn(e)}/detail`)}async function rr(e){return Gn(`/projects/${Wn(e)}/boundaries`)}async function ir(e,t){await Kn(`/projects/${Wn(e)}/boundaries`,t)}function ar(e,t){return qn(`/projects/${Wn(e)}/triage`,{},t)}function or(e,t,n,r,i){return qn(`/projects/${Wn(e)}/enhance-project`,{selectedSessionIds:t,skippedSessions:n,force:i},r)}async function sr(e,t,n,r){return Kn(`/projects/${Wn(e)}/refine-narrative`,{draftNarrative:t,draftTimeline:n,answers:r})}function cr(e,t,n){return qn(`/projects/${Wn(e)}/upload`,t,n)}async function lr(){try{return await Gn(`/settings/api-key`)}catch{return{hasKey:!1}}}async function ur(e){await Kn(`/settings/api-key`,{apiKey:e})}async function dr(){try{return await Gn(`/auth/status`)}catch{return{authenticated:!1}}}async function fr(e,t){let n=new URLSearchParams;return e&&n.set(`q`,e),t?.source&&n.set(`source`,t.source),t?.project&&n.set(`project`,t.project),t?.skill&&n.set(`skill`,t.skill),Gn(`/search?${n.toString()}`)}async function pr(e){return(await Gn(`/sessions/${Wn(e)}`)).session}async function mr(e,t=`summary`){return Gn(`/sessions/${Wn(e)}/context?format=${t}`)}async function hr(e){return Gn(`/sessions/${Wn(e)}/transcript`)}async function gr(e,t,n,r){try{return await Kn(`/projects/${Wn(e)}/enhance-save`,{selectedSessionIds:t,result:n,...r}),!0}catch{return!1}}async function _r(e){try{return await Gn(`/projects/${Wn(e)}/git-remote`)}catch{return{url:null}}}async function vr(e,t,n){return Kn(`/projects/${Wn(e)}/screenshot-capture`,{url:n,slug:t})}async function yr(e){return Kn(`/auth/poll`,{device_code:e})}async function br(e){return Gn(`/auth/check-username?username=${encodeURIComponent(e)}`)}async function xr(e){return Kn(`/auth/signup`,{username:e})}async function Sr(){return Kn(`/auth/login`)}async function Cr(){await Kn(`/auth/logout`)}async function wr(){return Gn(`/dashboard`)}async function Tr(){await Kn(`/onboarding/complete`)}function Er(e){let t=new EventSource(`${Un}/sync/progress`);return t.onmessage=t=>{try{e(JSON.parse(t.data))}catch{}},t.onerror=()=>{t.close()},()=>t.close()}var Dr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),F=o(((e,t)=>{t.exports=Dr()}))(),Or={default:`bg-surface-low text-on-surface-variant`,green:`bg-green-bg text-green`,amber:`bg-amber-bg text-amber`,violet:`bg-violet-bg text-violet`,primary:`bg-primary/10 text-primary`};function I({variant:e=`default`,children:t}){return(0,F.jsx)(`span`,{className:`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm ${Or[e]}`,children:t})}function kr({value:e,onChange:t,onSubmit:n,compact:r=!1,placeholder:i=`Search sessions...`,autoFocus:a=!1}){let o=(0,_.useRef)(null);return(0,_.useEffect)(()=>{function e(e){e.key===`/`&&!e.ctrlKey&&!e.metaKey&&document.activeElement?.tagName!==`INPUT`&&document.activeElement?.tagName!==`TEXTAREA`&&(e.preventDefault(),o.current?.focus())}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsxs)(`svg`,{className:`absolute top-1/2 -translate-y-1/2 text-on-surface-variant ${r?`left-2 w-3.5 h-3.5`:`left-3 w-4 h-4`}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,F.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,F.jsx)(`input`,{ref:o,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n&&n(),e.key===`Escape`&&o.current?.blur()},placeholder:i,autoFocus:a,className:[`w-full bg-surface-low border border-ghost rounded-md font-mono text-on-surface placeholder:text-outline transition-colors`,`focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20`,r?`text-xs pl-7 pr-2 py-1`:`text-sm pl-9 pr-3 py-2`].join(` `)}),!r&&(0,F.jsx)(`kbd`,{className:`absolute right-3 top-1/2 -translate-y-1/2 font-mono text-[10px] text-outline bg-surface-mid px-1.5 py-0.5 rounded-sm border border-ghost`,children:`/`})]})}function Ar({back:e,chips:t,actions:n,children:r}){let i=at(),a=nt().pathname===`/search`,[o,s]=(0,_.useState)(``);return(0,F.jsxs)(`div`,{className:`min-h-screen flex flex-col bg-surface-mid`,children:[(0,F.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsxs)(P,{to:`/`,className:`flex items-center gap-2 shrink-0`,children:[(0,F.jsx)(`span`,{className:`w-6 h-6 bg-primary rounded-md flex items-center justify-center text-on-primary font-display text-xs font-bold`,children:`h`}),(0,F.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface`,children:`heyi.am`})]}),e&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`text-outline text-xs`,children:`/`}),(0,F.jsx)(P,{to:e.to,className:`text-sm text-on-surface-variant hover:text-on-surface transition-colors`,children:e.label})]}),t&&t.length>0&&(0,F.jsx)(`div`,{className:`flex items-center gap-1.5 ml-1`,children:t.map(e=>(0,F.jsx)(I,{variant:e.variant,children:e.label},e.label))})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!a&&(0,F.jsx)(`div`,{className:`w-48`,children:(0,F.jsx)(kr,{value:o,onChange:s,onSubmit:()=>{i(`/search?q=${encodeURIComponent(o)}`),s(``)},compact:!0})}),n]})]})}),(0,F.jsx)(`main`,{className:`flex-1 overflow-y-auto`,children:r})]})}function L({hover:e,className:t=``,children:n}){return(0,F.jsx)(`div`,{className:[`bg-surface-lowest border border-ghost rounded-md p-4`,e?`transition-shadow hover:shadow-md`:``,t].filter(Boolean).join(` `),children:n})}var jr={refined:`bg-green-bg text-green`,local:`bg-surface-low text-on-surface-variant`,exported:`bg-amber-bg text-amber`,violet:`bg-violet-bg text-violet`};function Mr({variant:e,children:t}){return(0,F.jsx)(`span`,{className:`font-mono text-[9px] leading-tight uppercase tracking-wider py-0.5 px-1.5 rounded-sm ${jr[e]}`,children:t})}function Nr({label:e,value:t,valueSize:n=`text-2xl`}){return(0,F.jsxs)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md p-4`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mb-1`,children:e}),(0,F.jsx)(`div`,{className:`font-display font-bold text-on-surface ${n}`,children:t})]})}function R({title:e,children:t}){return(0,F.jsxs)(`div`,{className:`bg-surface-low border border-ghost rounded-sm p-2.5`,children:[e&&(0,F.jsx)(`div`,{className:`font-body text-sm font-semibold text-on-surface mb-1`,children:e}),(0,F.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:t})]})}function z({title:e,meta:t,children:n}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,F.jsx)(`h3`,{className:`font-display text-base font-semibold text-on-surface`,children:e}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&(0,F.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant`,children:t}),n]})]})}var Pr={main:`#084471`,orchestrator:`#084471`,"frontend-dev":`#7c3aed`,frontend:`#7c3aed`,"backend-dev":`#0891b2`,backend:`#0891b2`,"qa-engineer":`#059669`,qa:`#059669`,"ux-designer":`#d97706`,ux:`#d97706`,"product-manager":`#dc2626`,pm:`#dc2626`,"security-engineer":`#475569`,"team-lead":`#475569`,explore:`#94a3b8`,"code-reviewer":`#e11d48`,reviewer:`#e11d48`,"code-explorer":`#2563eb`,explorer:`#2563eb`,"code-architect":`#7e22ce`,architect:`#7e22ce`,"test-runner":`#16a34a`,tester:`#16a34a`,"build-fix":`#ea580c`,fixer:`#ea580c`,planner:`#0d9488`,plan:`#0d9488`,research:`#6366f1`,researcher:`#6366f1`,agent:`#2563eb`,wiring:`#c026d3`,enhance:`#0891b2`},B=`#084471`,Fr=`#d1d5db`,Ir=`'IBM Plex Mono', monospace`,Lr=`#6b7280`,Rr=`#9ca3af`,zr=[`#e11d48`,`#2563eb`,`#7e22ce`,`#ea580c`,`#0d9488`,`#6366f1`,`#c026d3`,`#0891b2`,`#ca8a04`,`#16a34a`,`#be185d`,`#4f46e5`,`#0e7490`,`#b45309`,`#059669`];function Br(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)}function Vr(e){if(!e)return Lr;let t=e.toLowerCase();if(Pr[t])return Pr[t];for(let[e,n]of Object.entries(Pr))if(t.includes(e)||e.includes(t))return n;return zr[Br(t)%zr.length]}function Hr(e){return new Date(e.date).getTime()}function Ur(e){if(e.endTime)return new Date(e.endTime).getTime();let t=e.wallClockMinutes??e.durationMinutes;return Hr(e)+t*6e4}function Wr(e){let t=e/36e5;if(t<20)return`${Math.round(t)}h gap`;let n=Math.round(t/24);return n===1?`1 day gap`:`${n} days gap`}function Gr(e){let t=new Date(e),n=t.toLocaleString(`en-US`,{month:`short`}),r=t.getDate(),i=t.getHours(),a=t.getMinutes().toString().padStart(2,`0`),o=i>=12?`PM`:`AM`;return`${n} ${r}, ${i%12||12}:${a} ${o}`}function Kr(e){if(e<60)return`${Math.round(e)}m`;let t=Math.floor(e/60),n=e%60;return n>0?`${t}h ${n}m`:`${t}h`}var qr=36e5,Jr=160,Yr=480;function Xr(e){return Math.min(Math.max(e*3,Jr),Yr)}function Zr(e){if(!e.length)return[];let t=[...e].sort((e,t)=>Hr(e)-Hr(t)),n=[],r=null;for(let e of t){let t=Hr(e),i=Ur(e);!r||t>=r.e?(r&&n.push(r),r={sessions:[e],s:t,e:i}):(r.sessions.push(e),i>r.e&&(r.e=i))}r&&n.push(r);let i=[];for(let e=0;e<n.length;e++){let t=n[e];if(e>0){let r=t.s-n[e-1].e;r>qr&&i.push({type:`gap`,durationMs:r})}t.sessions.length===1?i.push({type:`session`,session:t.sessions[0],startMs:t.s,endMs:t.e}):i.push({type:`concurrent`,sessions:t.sessions,startMs:t.s,endMs:t.e})}return i}function Qr(e){let t=[...e].sort((e,t)=>Hr(e)-Hr(t)),n=[],r=new Map;for(let e of t){let t=Hr(e),i=-1;for(let e=0;e<n.length;e++)if(n[e]<=t){i=e;break}i===-1&&(i=n.length,n.push(0));let a=((e.children?.length??0)>5?30:15)*6e4;n[i]=Ur(e)+a,r.set(e.id,i)}return r}function $r(e,t,n,r,i){return n===t?r:r+(e-t)/(n-t)*(i-r)}function ei(e){return e.children?.length?e.children.map(e=>({id:e.sessionId,role:e.role,durationMinutes:e.durationMinutes??0,linesOfCode:e.linesOfCode??0,date:e.date})):[]}var ti=2*6e4;function ni(e,t){let n=e.map(e=>({...e,startMs:e.date?new Date(e.date).getTime():t,endMs:(e.date?new Date(e.date).getTime():t)+e.durationMinutes*6e4})).sort((e,t)=>e.startMs-t.startMs),r=[],i=null;for(let e of n)!i||e.startMs>i.startMs+ti?(i&&r.push({children:i.children,startMs:i.startMs,endMs:i.endMs}),i={children:[e],startMs:e.startMs,endMs:e.endMs}):(i.children.push(e),e.endMs>i.endMs&&(i.endMs=e.endMs));return i&&r.push({children:i.children,startMs:i.startMs,endMs:i.endMs}),r}function ri(e,t){let n=e.map(e=>{let n=e.date?new Date(e.date).getTime():t,r=n+e.durationMinutes*6e4;return{...e,startMs:n,endMs:r}}).sort((e,t)=>e.startMs-t.startMs),r=new Map;return n.forEach((e,t)=>r.set(e.id,t)),{laneMap:r,laneCount:n.length}}function ii(e){let t=ei(e);return{title:e.title,timestamp:Gr(e.date),duration:Kr(e.wallClockMinutes??e.durationMinutes),linesOfCode:e.linesOfCode,agentCount:t.length,session:e}}var ai=6,oi=30;function si(e){let t=new Map;for(let n of e){let e=n.role??`agent`,r=t.get(e);r?(r.totalMin+=n.durationMinutes,r.count+=1):t.set(e,{totalMin:n.durationMinutes,count:1})}return[...t.entries()].sort((e,t)=>t[1].totalMin-e[1].totalMin).map(([e,{totalMin:t,count:n}])=>({role:e,color:Vr(e),duration:Kr(t),count:n}))}function ci(e,t){return t.map(e=>{let t=ei(e.session);return{title:e.session.title,timestamp:Gr(e.session.date),agents:si(t),totalAgents:t.length,xStart:e.xStart,xEnd:e.xEnd}})}var li=30,ui=56,di=50,fi=140,pi=4,mi=300,hi=1200,gi=140,_i=32;function vi(e){return e<=5?44:e<=10?32:e<=20?22:16}function yi(e,t){return e.length<=t?e:e.slice(0,t-1)+`…`}function bi(e,t,n,r){if(r===n)return`M ${e} ${n} L ${t} ${n}`;let i=Math.min(di,(t-e)/4);return[`M ${e} ${n}`,`C ${e+i} ${n}, ${e+i} ${r}, ${e+i*2} ${r}`,`L ${t-i*2} ${r}`,`C ${t-i} ${r}, ${t-i} ${n}, ${t} ${n}`].join(` `)}var xi=8;function Si(e,t=xi){let n=[],r=[],i=[],a=!1,o=48,s=0,c=0,l=o,u=(e,t)=>{e<s&&(s=e),e+t>c&&(c=e+t)};for(let s of e){if(s.type===`gap`){r.push({path:`M ${o} 0 L ${o+72} 0`,color:Rr,width:1.5,dashed:!0}),n.push({kind:`gap`,pos:{x:o,y:16},label:Wr(s.durationMs),durationMs:s.durationMs}),u(-8,40),o+=72+ui;continue}if(s.type===`session`){let e=s.session,t=ei(e),a=e.durationMinutes,c=t.length>0?Math.max(Jr,t.length*30+100):Jr,l=t.length>0?Math.min(Math.max(a*pi,c),hi):Math.min(Math.max(Xr(a),Jr),Yr),d=Kr(e.durationMinutes),f=ii(e),p=Gr(e.date);if(t.length>0){let a=t.slice(0,li),s=Hr(e),c=s+e.durationMinutes*6e4,m=Math.max(c,...a.map(e=>(e.date?new Date(e.date).getTime():s)+e.durationMinutes*6e4)),h=ni(a,s),g=Math.max(...h.map(e=>e.children.length),1),_=vi(g),v=Math.min((g-1)*_,300),y=o,b=o+l,x=0-v/2-32,S=y+di*2;n.push({kind:`label`,pos:{x:S+8,y:x},title:yi(e.title,_i),sub:d,timestamp:p,color:B,above:!0,session:e,tooltip:f}),u(x-4,28),n.push({kind:`dot`,pos:{x:y,y:0},color:B,size:`lg`,tooltip:f}),r.push({path:`M ${y} 0 L ${b} 0`,color:B,width:1.5});for(let e of h){let t=e.children.length,n=Math.min((t-1)*_,v),i=t>1?n/(t-1):0,a=0-n/2,o=$r(e.startMs,s,m,y,b);e.children.forEach((e,t)=>{let n=a+t*i,c=Vr(e.role),l=(e.date?new Date(e.date).getTime():s)+e.durationMinutes*6e4,d=$r(Math.min(l,m),s,m,y,b),f=Math.max(d,o+100);r.push({path:bi(o,Math.min(f,b),0,n),color:c,width:1.5}),u(n-2,4)})}n.push({kind:`dot`,pos:{x:b,y:0},color:B,size:`lg`,tooltip:f}),i.push({session:e,xStart:y,xEnd:b}),o=b+ui}else n.push({kind:`label`,pos:{x:o+14,y:-28},title:yi(e.title,_i),sub:d,timestamp:p,color:B,above:!0,session:e,tooltip:f}),u(-32,28),n.push({kind:`dot`,pos:{x:o,y:0},color:B,size:`sm`,tooltip:f}),n.push({kind:`dot`,pos:{x:o+l,y:0},color:B,size:`sm`,tooltip:f}),r.push({path:`M ${o} 0 L ${o+l} 0`,color:B,width:3}),i.push({session:e,xStart:o,xEnd:o+l}),o+=l+ui;continue}if(s.type===`concurrent`){let e=[...s.sessions].sort((e,t)=>Hr(e)-Hr(t)),c=e.slice(0,t),l=Qr(c),d=Math.max(...l.values())+1,f=e.length-c.length;f>0&&(a=!0);let p=Math.max(...c.map(e=>ei(e).length),0),m=p>15?Math.max(fi,p*5+60):p>5?Math.max(fi,p*8+40):fi,h=s.startMs,g=s.endMs,_=(g-h)/6e4,v=Math.min(Math.max(_*pi,mi),hi),y=o,b=o+v,x=Array(d).fill(0);for(let a of e.slice(0,t)){let e=l.get(a.id)??0,t=0+e*m,o=ei(a),s=ii(a),c=Gr(a.date),d=Kr(a.durationMinutes),f=$r(Hr(a),h,g,y,b),p=f+Math.min(Math.max(a.durationMinutes*pi,20),b-f);if(o.length>0){let l=o.slice(0,li),h=Hr(a),g=Ur(a),{laneMap:_,laneCount:v}=ri(l,h),y=vi(v),b=Math.min((v-1)*y,m-40),S=v>1?b/(v-1):0,C=t-b/2,w=C-32;(x[e]===0||f>=x[e])&&(n.push({kind:`label`,pos:{x:f+8,y:w},title:yi(a.title,_i),sub:d,timestamp:c,color:B,above:!0,session:a,tooltip:s}),x[e]=f+gi),u(w-4,28),n.push({kind:`dot`,pos:{x:f,y:t},color:B,size:`lg`,tooltip:s}),r.push({path:`M ${f} ${t} L ${p} ${t}`,color:B,width:1.5});let T=v>15?.4:v>8?.6:.8,E=v>15?1:1.5;l.forEach(e=>{let n=C+(_.get(e.id)??0)*S,i=Vr(e.role),a=e.date?new Date(e.date).getTime():h,o=a+e.durationMinutes*6e4,s=$r(a,h,g,f,p),c=Math.min($r(Math.min(o,g),h,g,f,p),p),l=Math.max(c,s+60);r.push({path:bi(s,Math.min(l,p),t,n),color:i,width:E,opacity:T}),u(n-2,4)}),n.push({kind:`dot`,pos:{x:p,y:t},color:B,size:`lg`,tooltip:s}),i.push({session:a,xStart:f,xEnd:p})}else (x[e]===0||f>=x[e])&&(n.push({kind:`label`,pos:{x:f+8,y:t-28},title:yi(a.title,_i),sub:d,timestamp:c,color:B,above:!0,session:a,tooltip:s}),x[e]=f+gi),u(t-32,28),n.push({kind:`dot`,pos:{x:f,y:t},color:B,size:`sm`,tooltip:s}),n.push({kind:`dot`,pos:{x:p,y:t},color:B,size:`sm`,tooltip:s}),r.push({path:`M ${f} ${t} L ${p} ${t}`,color:B,width:3}),i.push({session:a,xStart:f,xEnd:p});u(t-4,8)}if(f>0){let e=0+d*m;n.push({kind:`label`,pos:{x:y+8,y:e},title:`+${f} more sessions`,color:Rr,above:!1}),u(e,16)}o=b+ui}}let d=o-ui,f=-s+36,p=c-s+72;return{nodes:n.map(e=>({...e,pos:{x:e.pos.x,y:e.pos.y+f}})),tracks:r,sessionRanges:i,hasConcurrentOverflow:a,threadStart:l,threadEnd:d,totalW:o+48,totalH:Math.max(p,100),centerY:0+f}}function Ci(e,t,n){if(!n.length)return null;let r=e+t/2,i=null,a=1/0;for(let e of n){let t=(e.xStart+e.xEnd)/2,n=Math.abs(r-t);n<a&&(a=n,i=e)}return i}function wi({entry:e}){if(!e||e.agents.length===0)return null;let t=e.agents.slice(0,ai),n=e.agents.length-t.length,r=e.totalAgents>=oi;return(0,F.jsxs)(`div`,{style:{fontFamily:Ir,fontSize:10,display:`flex`,alignItems:`baseline`,gap:14,padding:`6px 0`,minHeight:28},children:[r?(0,F.jsxs)(`span`,{style:{fontSize:10,fontWeight:700,letterSpacing:`0.06em`,color:`#d97706`,flexShrink:0},children:[`LEGENDARY AGENTIC USE — `,e.totalAgents,` agents:`]}):(0,F.jsxs)(`span`,{style:{fontSize:10,color:Lr,fontWeight:600,flexShrink:0},children:[e.totalAgents,` agents:`]}),(0,F.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:10,alignItems:`center`},children:[t.map(e=>(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5},children:[(0,F.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:e.color,boxShadow:`0 0 4px ${e.color}40`,flexShrink:0}}),(0,F.jsx)(`span`,{style:{fontWeight:600,color:e.color,letterSpacing:`0.03em`},children:e.role.toUpperCase()}),e.count>1&&(0,F.jsxs)(`span`,{style:{color:Rr},children:[`×`,e.count]}),(0,F.jsx)(`span`,{style:{color:Rr},children:e.duration})]},e.role)),n>0&&(0,F.jsxs)(`span`,{style:{color:Rr,fontStyle:`italic`},children:[`+`,n,` more`]})]})]})}function Ti({data:e,pos:t}){return(0,F.jsxs)(`div`,{style:{position:`absolute`,left:t.x,top:t.y-8,transform:`translateY(-100%)`,background:`#1f2937`,color:`#f9fafb`,borderRadius:6,padding:`10px 14px`,fontFamily:Ir,fontSize:11,lineHeight:1.5,whiteSpace:`nowrap`,zIndex:100,pointerEvents:`none`,boxShadow:`0 4px 16px rgba(0,0,0,0.18)`},children:[(0,F.jsx)(`div`,{style:{fontWeight:700,fontSize:12,marginBottom:4,color:`#fff`},children:e.title}),(0,F.jsx)(`div`,{style:{color:`#d1d5db`},children:e.timestamp}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:16,marginTop:4},children:[(0,F.jsx)(`span`,{children:e.duration}),(0,F.jsxs)(`span`,{children:[e.linesOfCode.toLocaleString(),` lines`]}),e.agentCount>0&&(0,F.jsxs)(`span`,{children:[e.agentCount,` agents`]})]})]})}function Ei({sessions:e,onSessionClick:t,maxHeight:n}){let r=(0,_.useMemo)(()=>Zr(e),[e]),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),u=(0,_.useRef)(null),d=i?999:xi,f=(0,_.useMemo)(()=>Si(r,d),[r,d]),p=(0,_.useMemo)(()=>ci(r,f.sessionRanges),[r,f.sessionRanges]),m=(0,_.useRef)(null),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=p.filter(e=>e.agents.length>0);e.length>0&&y(e[0])},[p]);let b=(0,_.useCallback)(()=>{let e=m.current;if(!e)return;let t=p.filter(e=>e.agents.length>0),n=Ci(e.scrollLeft,e.clientWidth,t);n&&y(n)},[p]),x=(0,_.useCallback)(()=>{if(c){u.current&&cancelAnimationFrame(u.current),u.current=null,l(!1);return}l(!0);let e=()=>{let t=m.current;if(t){if(t.scrollLeft>=t.scrollWidth-t.clientWidth-1){l(!1),u.current=null;return}t.scrollLeft+=1.2,u.current=requestAnimationFrame(e)}};u.current=requestAnimationFrame(e)},[c]);(0,_.useEffect)(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),(0,_.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&s(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]);let S=(0,_.useCallback)((e,t)=>{e&&g({tooltip:e,pos:t})},[]),C=(0,_.useCallback)(()=>g(null),[]);if(!e.length)return(0,F.jsx)(`div`,{"data-testid":`work-timeline-empty`,children:(0,F.jsx)(`p`,{style:{fontFamily:Ir,fontSize:`0.8125rem`,color:Lr},children:`No sessions to display.`})});let w=p.some(e=>e.agents.length>0),T=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12},children:[(0,F.jsx)(`div`,{style:{flex:1,minWidth:0},children:w&&(0,F.jsx)(wi,{entry:v})}),(0,F.jsx)(`div`,{style:{display:`flex`,gap:6,flexShrink:0},children:f.totalW>600&&(0,F.jsx)(`button`,{onClick:x,style:(e=>({padding:`3px 10px`,fontSize:10,fontWeight:600,border:`1px solid ${Fr}`,borderRadius:4,background:e?B:`#fff`,color:e?`#fff`:B,cursor:`pointer`,fontFamily:Ir,letterSpacing:`0.03em`,flexShrink:0}))(c),children:c?`PAUSE`:`PLAY`})})]}),(0,F.jsx)(`div`,{ref:m,onScroll:b,style:{overflowX:`auto`,overflowY:o?`auto`:`hidden`,WebkitOverflowScrolling:`touch`,paddingBottom:12,maxHeight:o?`calc(100vh - 80px)`:void 0},children:(0,F.jsxs)(`div`,{style:{position:`relative`,width:f.totalW,height:f.totalH,fontFamily:Ir},children:[(0,F.jsxs)(`svg`,{style:{position:`absolute`,inset:0,width:f.totalW,height:f.totalH,pointerEvents:`none`},children:[(0,F.jsx)(`line`,{x1:f.threadStart,y1:f.centerY,x2:f.threadEnd,y2:f.centerY,stroke:Fr,strokeWidth:1.5}),f.tracks.map((e,t)=>(0,F.jsx)(`path`,{d:e.path,fill:`none`,stroke:e.color,strokeWidth:e.width,opacity:e.opacity??.8,strokeDasharray:e.dashed?`6 4`:void 0,transform:`translate(0, ${f.centerY})`},`t-${t}`))]}),f.nodes.map((e,n)=>{if(e.kind===`label`)return(0,F.jsxs)(`div`,{style:{position:`absolute`,left:e.pos.x,top:e.pos.y,cursor:t&&e.session?`pointer`:`default`,whiteSpace:`nowrap`},onClick:t&&e.session?()=>t(e.session):void 0,onMouseEnter:e.tooltip?()=>S(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?C:void 0,children:[(0,F.jsx)(`span`,{style:{fontSize:12,fontWeight:700,color:e.color,letterSpacing:`0.01em`,display:`block`},children:e.title}),(0,F.jsxs)(`span`,{style:{fontSize:10,color:Rr,display:`flex`,gap:8,marginTop:1},children:[e.sub&&(0,F.jsx)(`span`,{children:e.sub}),e.timestamp&&(0,F.jsx)(`span`,{style:{color:Lr},children:e.timestamp})]})]},`l-${n}`);if(e.kind===`dot`){let t=e.size===`lg`?6:4;return(0,F.jsx)(`div`,{onMouseEnter:e.tooltip?()=>S(e.tooltip,e.pos):void 0,onMouseLeave:e.tooltip?C:void 0,style:{position:`absolute`,left:e.pos.x-t,top:e.pos.y-t,width:t*2,height:t*2,borderRadius:`50%`,background:e.color,boxShadow:`0 0 ${e.size===`lg`?10:5}px ${e.color}50`,zIndex:2,cursor:e.tooltip?`pointer`:`default`}},`d-${n}`)}return e.kind===`gap`?(0,F.jsx)(`div`,{style:{position:`absolute`,left:e.pos.x,top:e.pos.y,width:72,height:22,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:10,color:Rr,letterSpacing:`0.04em`},children:e.label},`g-${n}`):null}),h&&(0,F.jsx)(Ti,{data:h.tooltip,pos:h.pos})]})})]});if(o)return(0,F.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:9998,background:`#f8f9fb`,display:`flex`,flexDirection:`column`,padding:`16px 24px`},children:[(0,F.jsx)(`button`,{onClick:()=>s(!1),style:{position:`absolute`,top:16,right:24,zIndex:1,padding:`6px 14px`,fontSize:12,fontWeight:700,border:`1px solid ${Fr}`,borderRadius:4,background:`#fff`,color:B,cursor:`pointer`,fontFamily:Ir},children:`Close`}),(0,F.jsx)(`div`,{"data-testid":`work-timeline`,style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:T})]});let E=n&&f.totalH>n;return(0,F.jsxs)(`div`,{"data-testid":`work-timeline`,style:{position:`relative`},children:[(0,F.jsx)(`div`,{style:E?{maxHeight:n,overflow:`hidden`}:void 0,children:T}),E&&(0,F.jsx)(`div`,{style:{position:`absolute`,bottom:0,left:0,right:0,height:64,background:`linear-gradient(transparent, #f8f9fb)`,display:`flex`,alignItems:`flex-end`,justifyContent:`center`,paddingBottom:10},children:(0,F.jsx)(`button`,{onClick:()=>{a(!0),s(!0)},style:{padding:`5px 16px`,fontSize:11,fontWeight:700,border:`1px solid ${Fr}`,borderRadius:4,background:`#fff`,color:B,cursor:`pointer`,fontFamily:Ir,letterSpacing:`0.03em`,boxShadow:`0 2px 8px rgba(0,0,0,0.08)`},children:`EXPAND TIMELINE`})})]})}var Di=`'IBM Plex Mono', monospace`,Oi=`#16a34a`,ki=`#dc2626`,Ai=`#9ca3af`,ji=`#6b7280`,V=`#e4e4e7`;function H(e){return e<1e3?String(e):`${(e/1e3).toFixed(1)}k`}function Mi(e){return e===0?`0`:e>=1e3?`${(e/1e3).toFixed(e%1e3==0?0:1)}k`:String(e)}function Ni(e){if(e<=0)return[0];let t=e/4,n=10**Math.floor(Math.log10(t)),r=[1,2,2.5,5,10],i=n;for(let e of r)if(e*n>=t){i=e*n;break}let a=[];for(let t=0;t<=e+i*.1;t+=i)a.push(Math.round(t));return a[a.length-1]<e&&a.push(a[a.length-1]+Math.round(i)),a}function Pi(e){let t=[...e].filter(e=>e.date).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());if(t.length===0)return[];let n=0,r=0;return t.map((e,t)=>{let i=0,a=0;if(e.filesChanged&&e.filesChanged.length>0)for(let t of e.filesChanged)i+=t.additions,a+=t.deletions;else i=Math.max(0,e.linesOfCode);return n+=i,r+=a,{dateMs:new Date(e.date).getTime(),cumulativeAdded:n,cumulativeDeleted:r,sessionIndex:t,sessionId:e.id,title:e.title,added:i,deleted:a}})}var Fi=3600*1e3,Ii=600*1e3;function Li(e){if(e.length===0)return{visualTimes:[],totalVisualTime:0};let t=[0],n=0;for(let r=1;r<e.length;r++){let i=e[r].dateMs-e[r-1].dateMs;n+=i>Fi?Ii:Math.max(i,0),t.push(n)}return{visualTimes:t,totalVisualTime:n}}function Ri(e,t,n){if(e.length<2)return[];let r=e[0].dateMs,i=e[e.length-1].dateMs;if(i-r<14*864e5)return[];let a=[],o=new Date(r),s=new Date(i),c=new Date(o.getFullYear(),o.getMonth()+1,1);for(;c<=s;){let r=c.getTime(),i=0,o=1/0;for(let t=0;t<e.length;t++){let n=Math.abs(e[t].dateMs-r);n<o&&(o=n,i=t)}a.push({x:n(t[i]),label:c.toLocaleString(`en-US`,{month:`short`}).toUpperCase()}),c.setMonth(c.getMonth()+1)}return a}function zi({sessions:e,totalLoc:t,totalFiles:n,keyMoments:r,onSessionClick:i}){let a=Pi(e);if(a.length===0)return(0,F.jsx)(`div`,{style:{fontFamily:Di,fontSize:`0.75rem`,color:ji,padding:16},children:`No session data available for growth chart.`});let{visualTimes:o,totalVisualTime:s}=Li(a),c=new Map;if(r)for(let e of r)c.set(e.sessionId,e.label);let l=a[a.length-1].cumulativeAdded,u=a[a.length-1].cumulativeDeleted,d=u>0,f=Ni(Math.max(l,1)),p=f[f.length-1]||1,m=d?Ni(u):[],h=d?m[m.length-1]||1:0,g=Math.max(700,Math.round(s/6e4*.8)+120),_=d?50:0,v=d?2:0,y=164+v+_+36,b=s||1,x=e=>48+e/b*(g-48-16),S=e=>164-e/p*140,C=e=>164+v+e/h*_,w=a.map((e,t)=>({x:x(o[t]),y:S(e.cumulativeAdded)})),T=d?a.map((e,t)=>({x:x(o[t]),y:C(e.cumulativeDeleted)})):[];function E(e){if(e.length===0)return``;let t=`M${e[0].x.toFixed(1)},${e[0].y.toFixed(1)}`;for(let n=1;n<e.length;n++)t+=` L${e[n].x.toFixed(1)},${e[n-1].y.toFixed(1)}`,t+=` L${e[n].x.toFixed(1)},${e[n].y.toFixed(1)}`;return t}let D=E(w),O=D+` L${w[w.length-1].x.toFixed(1)},164 L${w[0].x.toFixed(1)},164 Z`,ee=d?E(T):``,k=d?ee+` L${T[T.length-1].x.toFixed(1)},${164+v} L${T[0].x.toFixed(1)},${164+v} Z`:``,A=new Set,te=-1/0;for(let e=0;e<a.length;e++){let t=x(o[e]);t-te>=90&&(A.add(e),te=t)}a.length>1&&A.add(a.length-1);let ne=Ri(a,o,x),re=g>700,ie=[...e].filter(e=>e.date).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,padding:`8px 12px`,borderBottom:`1px solid ${V}`,fontFamily:Di},children:[(0,F.jsx)(`span`,{style:{fontSize:10,fontWeight:700,color:Ai,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`Code Changes Over Time`}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:16,fontSize:11,fontWeight:600},children:[(0,F.jsxs)(`span`,{style:{color:Oi},children:[`+`,H(l)]}),d&&(0,F.jsxs)(`span`,{style:{color:ki},children:[`-`,H(u)]}),(0,F.jsxs)(`span`,{style:{color:`#191c1e`},children:[H(t),` total`]})]})]}),(0,F.jsx)(`div`,{style:re?{overflowX:`auto`}:{padding:`4px 0`},children:(0,F.jsxs)(`svg`,{viewBox:`0 0 ${g} ${y}`,width:re?g:`100%`,height:re?y:void 0,preserveAspectRatio:`xMidYMid meet`,style:{display:`block`},children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsxs)(`linearGradient`,{id:`addGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:Oi,stopOpacity:.12}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:Oi,stopOpacity:.02})]}),(0,F.jsxs)(`linearGradient`,{id:`delGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:ki,stopOpacity:.02}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:ki,stopOpacity:.1})]})]}),f.map(e=>(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`line`,{x1:48,y1:S(e),x2:g-16,y2:S(e),stroke:V,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,F.jsx)(`text`,{x:40,y:S(e)+3,textAnchor:`end`,fontFamily:Di,fontSize:`8`,fill:Ai,children:e===0?``:`+${Mi(e)}`})]},`ya-${e}`)),(0,F.jsx)(`line`,{x1:48,y1:164,x2:g-16,y2:164,stroke:V,strokeWidth:`1`}),(0,F.jsx)(`text`,{x:40,y:167,textAnchor:`end`,fontFamily:Di,fontSize:`8`,fill:ji,fontWeight:`600`,children:`0`}),d&&m.filter(e=>e>0).map(e=>(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`line`,{x1:48,y1:C(e),x2:g-16,y2:C(e),stroke:V,strokeWidth:`0.5`,strokeDasharray:`4,4`}),(0,F.jsx)(`text`,{x:40,y:C(e)+3,textAnchor:`end`,fontFamily:Di,fontSize:`8`,fill:Ai,children:`-${Mi(e)}`})]},`yd-${e}`)),ne.map((e,t)=>(0,F.jsx)(`line`,{x1:e.x,y1:24,x2:e.x,y2:164+v+_,stroke:V,strokeWidth:`0.5`,strokeDasharray:`2,4`},`m-${t}`)),(0,F.jsx)(`path`,{d:O,fill:`url(#addGrad)`}),(0,F.jsx)(`path`,{d:D,fill:`none`,stroke:Oi,strokeWidth:`1.5`}),d&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{d:k,fill:`url(#delGrad)`}),(0,F.jsx)(`path`,{d:ee,fill:`none`,stroke:ki,strokeWidth:`1.5`})]}),a.map((e,t)=>{let n=x(o[t]),r=c.has(e.sessionId),a=A.has(t);return(0,F.jsxs)(`g`,{style:i?{cursor:`pointer`}:void 0,onClick:i?()=>i(ie[t]):void 0,children:[r?(0,F.jsx)(`circle`,{cx:n,cy:S(e.cumulativeAdded),r:`5`,fill:Oi,stroke:`#fff`,strokeWidth:`2`}):a?(0,F.jsx)(`circle`,{cx:n,cy:S(e.cumulativeAdded),r:`3`,fill:Oi}):null,d&&e.cumulativeDeleted>0&&a&&(0,F.jsx)(`circle`,{cx:n,cy:C(e.cumulativeDeleted),r:`2.5`,fill:ki}),r&&(0,F.jsx)(`text`,{x:n,y:S(e.cumulativeAdded)-12,textAnchor:`middle`,fontFamily:Di,fontSize:`8`,fill:ji,children:c.get(e.sessionId)}),a&&(0,F.jsx)(`text`,{x:n,y:y-8,textAnchor:`middle`,fontFamily:Di,fontSize:`8`,fill:Ai,children:new Date(e.dateMs).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})})]},`pt-${t}`)})]})}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:24,padding:`8px 12px`,borderTop:`1px solid ${V}`,fontFamily:Di,fontSize:10},children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:Oi},children:[`+`,H(l)]}),(0,F.jsx)(`div`,{style:{color:Ai,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Added`})]}),d&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{style:{fontSize:14,fontWeight:700,color:ki},children:[`-`,H(u)]}),(0,F.jsx)(`div`,{style:{color:Ai,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Deleted`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:`#191c1e`},children:H(t)}),(0,F.jsx)(`div`,{style:{color:Ai,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Lines changed`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:`#191c1e`},children:n}),(0,F.jsx)(`div`,{style:{color:Ai,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Files`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:{fontSize:14,fontWeight:700,color:`#191c1e`},children:a.length}),(0,F.jsx)(`div`,{style:{color:Ai,textTransform:`uppercase`,letterSpacing:`0.06em`,fontWeight:600},children:`Sessions`})]})]})]})}var Bi=[`preview_project`,`preview_enhanced`,`prompt_enhance`];function Vi(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function Hi(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Ui(){let[e,t]=(0,_.useState)(`loading`),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(new Set),[c,l]=(0,_.useState)(0),[u,d]=(0,_.useState)(0),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(``),[x,S]=(0,_.useState)(`idle`),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(``),[D,O]=(0,_.useState)(!1),[ee,k]=(0,_.useState)(``),A=(0,_.useRef)(null),te=(0,_.useRef)(``),ne=(0,_.useCallback)(()=>{Tr().catch(()=>{}),t(`dashboard`)},[]);(0,_.useEffect)(()=>{let e=!1,n=null;return wr().then(i=>{if(!e){if(r(i),i.onboardingComplete){t(`dashboard`);return}i.sync.status===`syncing`?(t(`syncing`),a(i.sync),n=Er(n=>{e||(a(n),n.currentProject&&s(e=>new Set(e).add(n.currentProject)),n.status===`done`&&wr().then(n=>{e||(r(n),n.isEmpty?ne():setTimeout(()=>{e||t(`reveal`)},800))}))})):i.isEmpty?t(`dashboard`):t(`reveal`)}}).catch(()=>{e||t(`dashboard`)}),()=>{e=!0,n?.()}},[ne]),(0,_.useEffect)(()=>{if(e!==`reveal`)return;let n=[];for(let e=1;e<=4;e++)n.push(setTimeout(()=>l(e),e*400));return n.push(setTimeout(()=>t(`prompt_project`),3100)),()=>n.forEach(clearTimeout)},[e]);let re=n?.stats,ie=n?.projects??[],j=ie.length>0?ie.reduce((e,t)=>t.sessionCount>e.sessionCount?t:e,ie[0]):null,M=e!==`dashboard`&&e!==`loading`,ae=Bi.includes(e),oe=[`This is what a project looks like.
|
|
13
|
+
Scroll down to explore.`,`The work timeline shows every
|
|
14
|
+
session as a bar — longer bars
|
|
15
|
+
mean longer sessions.`,`The growth chart tracks your
|
|
16
|
+
codebase over time. Green is
|
|
17
|
+
additions, red is deletions.`,`Each session is a card you can
|
|
18
|
+
click to see the full AI
|
|
19
|
+
conversation transcript.`];return(0,F.jsxs)(Ar,{chips:[{label:`local-first`,variant:`primary`},{label:`private by default`,variant:`green`}],actions:(0,F.jsx)(`div`,{className:`flex items-center gap-3`,children:M?(0,F.jsx)(`button`,{onClick:ne,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Skip tour`}):(0,F.jsx)(P,{to:`/settings`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Settings`})}),children:[e!==`dashboard`&&(0,F.jsxs)(`div`,{className:`flex min-h-[calc(100vh-3rem)]`,style:{justifyContent:ae?`flex-start`:`center`,alignItems:ae?`flex-start`:`center`},children:[(0,F.jsxs)(`div`,{className:`shrink-0 transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)]`,style:{width:ae?340:`100%`,maxWidth:ae?340:680,padding:ae?`1.5rem 1rem 1.5rem 1.5rem`:`0 1.5rem`,position:ae?`sticky`:`relative`,top:ae?48:`auto`,alignSelf:ae?`flex-start`:`center`},children:[e===`loading`&&(0,F.jsxs)(Zi,{compact:!1,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam`}),(0,F.jsx)(U,{variant:`active`,children:` Connecting...`})]}),e===`syncing`&&i&&(0,F.jsxs)(Zi,{compact:!1,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam`}),(0,F.jsx)(U,{variant:`info`,children:` Indexing your AI coding sessions.`}),(0,F.jsx)(U,{variant:`info`,children:` Everything stays on your machine.`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),i.phase===`discovering`&&(0,F.jsx)(U,{variant:`active`,children:` Discovering sessions...`}),(i.phase===`indexing`||i.phase===`done`)&&(0,F.jsxs)(U,{variant:`passed`,children:[` Found `,i.parentCount,` sessions`]}),i.phase===`indexing`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(U,{variant:`active`,children:[` `,`Indexing... (`,i.current,`/`,i.total,`)`,i.currentProject?` — ${i.currentProject}`:``]}),o.size>0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`section`,children:` Projects found:`}),[...o].slice(0,8).map(e=>(0,F.jsxs)(U,{variant:`default`,children:[` `,e]},e)),o.size>8&&(0,F.jsxs)(U,{variant:`default`,children:[` ...and `,o.size-8,` more`]})]})]}),i.phase===`done`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(U,{variant:`passed`,children:[` Indexed `,i.total,` sessions`]}),(0,F.jsx)(U,{variant:`passed`,children:` Ready.`})]})]}),e===`reveal`&&re&&(0,F.jsxs)(Zi,{compact:!1,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam`}),(0,F.jsxs)(U,{variant:`passed`,children:[` Indexed `,re.sessionCount,` sessions. Ready.`]}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`section`,children:` Your coding in numbers:`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),c>=1&&(0,F.jsxs)(U,{variant:`reveal`,children:[` `,(0,F.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:re.sessionCount}),` sessions indexed`]}),c>=2&&(0,F.jsxs)(U,{variant:`reveal`,children:[` `,(0,F.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:re.projectCount}),` projects discovered`]}),c>=3&&(0,F.jsxs)(U,{variant:`reveal`,children:[` `,(0,F.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:re.sourceCount}),` `,re.sourceCount===1?`tool`:`tools`,` detected`]}),c>=4&&j&&(0,F.jsxs)(U,{variant:`reveal`,children:[` `,`Biggest: `,(0,F.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:j.projectName}),` (`,j.sessionCount,` sessions)`]})]}),e===`prompt_project`&&(0,F.jsxs)(Zi,{compact:!1,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam`}),(0,F.jsxs)(U,{variant:`passed`,children:[` `,re?.sessionCount,` sessions across `,re?.projectCount,` projects.`]}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`info`,children:` Here's what a project page looks`}),(0,F.jsx)(U,{variant:`info`,children:` like — with timeline, growth chart,`}),(0,F.jsx)(U,{variant:`info`,children:` and clickable sessions.`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(Qi,{question:`See a demo project?`,onYes:()=>t(`preview_project`),onNo:()=>t(`prompt_enhance`)})]}),e===`preview_project`&&(0,F.jsxs)(Zi,{compact:!0,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam project view`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),g?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(U,{variant:`info`,children:` Viewing session detail.`}),(0,F.jsx)(U,{variant:`info`,children:` Click X to go back.`})]}):(0,F.jsxs)(F.Fragment,{children:[oe[u]?.split(`
|
|
20
|
+
`).map((e,t)=>(0,F.jsxs)(U,{variant:`info`,children:[` `,e]},`${u}-${t}`)),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsxs)(U,{variant:`default`,children:[` `,(0,F.jsxs)(`span`,{className:`text-white/30`,children:[`section `,u+1,`/4`]})]})]}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(Qi,{question:`Enhance this project?`,onYes:()=>{v(null),t(`preview_enhanced`)},onNo:()=>{v(null),t(`preview_enhanced`)},yesLabel:`Enhance`,noLabel:`Skip`})]}),e===`preview_enhanced`&&(0,F.jsxs)(Zi,{compact:!0,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam enhance heyi-am`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`passed`,children:` Reading 16 sessions...`}),(0,F.jsx)(U,{variant:`passed`,children:` Extracting skills...`}),(0,F.jsx)(U,{variant:`passed`,children:` Writing narrative...`}),(0,F.jsx)(U,{variant:`passed`,children:` Building project arc...`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`passed`,children:` Enhanced. Scroll to see the`}),(0,F.jsx)(U,{variant:`passed`,children:` difference.`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(Qi,{question:`Continue tour?`,onYes:()=>t(`prompt_enhance`),onNo:()=>ne()})]}),e===`prompt_enhance`&&(0,F.jsxs)(Zi,{compact:!0,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam enhance`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`info`,children:` To enhance your own projects,`}),(0,F.jsx)(U,{variant:`info`,children:` you need an Anthropic API key.`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),m?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(U,{variant:`passed`,children:` API key saved. You're all set.`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(Qi,{question:`Continue?`,onYes:()=>t(`claim_username`),onNo:()=>t(`claim_username`)})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Qi,{question:`Add your API key now?`,onYes:()=>{},onNo:()=>t(`claim_username`),noLabel:`I'll do this later`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(`div`,{className:`triage-terminal__line opacity-80`,children:` Paste your key:`}),(0,F.jsx)(`div`,{className:`flex items-center gap-2 mt-1 ml-4`,children:(0,F.jsx)(`input`,{type:`password`,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&f.startsWith(`sk-`)&&ur(f).then(()=>h(!0)).catch(()=>{})},placeholder:`sk-ant-...`,className:`bg-white/10 border border-white/20 rounded px-2 py-1 text-[11px] font-mono text-[#34d399] w-48 outline-none focus:border-[#9dcaff] placeholder:text-white/20`})}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`You can always add this later in Settings.`]})]})]}),e===`claim_username`&&(0,F.jsxs)(Zi,{compact:!1,children:[(0,F.jsx)(U,{variant:`prompt`,children:`$ heyiam publish`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`section`,children:` Claim your portfolio page`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(U,{variant:`info`,children:` Want to show off your AI dev work?`}),(0,F.jsx)(U,{variant:`info`,children:` Claim a name and create a public`}),(0,F.jsx)(U,{variant:`info`,children:` portfolio on heyi.am — show how`}),(0,F.jsx)(U,{variant:`info`,children:` you build, not just what you ship.`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsxs)(U,{variant:`info`,children:[` Your page: `,(0,F.jsxs)(`span`,{className:`text-[#9dcaff] font-semibold`,children:[`heyi.am/`,y||`your-name`]})]}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`Optional — the CLI works fully without an account.`]}),(0,F.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px]`,children:[` `,`You choose what to publish. Nothing is public by default.`]}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),x===`claimed`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(U,{variant:`passed`,children:[` Welcome, `,T,`!`]}),(0,F.jsxs)(U,{variant:`passed`,children:[` heyi.am/`,T,` is yours.`]}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsx)(Qi,{question:`Ready to explore?`,onYes:ne,onNo:ne,yesLabel:`Let's go`})]}):D?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(U,{variant:`active`,children:` Waiting for signup to complete...`}),(0,F.jsx)(U,{variant:`info`,children:` A browser window should have opened.`}),(0,F.jsx)(U,{variant:`info`,children:` Sign up there, then come back here.`}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 ml-4`,children:[(0,F.jsx)(`button`,{onClick:()=>{O(!1),S(`idle`),k(``)},className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`Cancel`}),(0,F.jsx)(`button`,{onClick:()=>{O(!1),ne()},className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`Skip this`})]})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`triage-terminal__line opacity-80`,children:` Choose a username:`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 ml-4`,children:[(0,F.jsx)(`span`,{className:`text-white/40 text-[11px] font-mono`,children:`heyi.am/`}),(0,F.jsx)(`input`,{type:`text`,value:y,onChange:e=>{let t=e.target.value.toLowerCase().replace(/[^a-z0-9-]/g,``);b(t),S(`idle`),w(``),A.current&&clearTimeout(A.current),t.length>=3&&t!==te.current&&(A.current=setTimeout(async()=>{te.current=t,S(`checking`);try{let e=await br(t);S(e.available?`available`:`taken`),e.available||w(e.reason||`Taken`)}catch{S(`idle`)}},500))},onKeyDown:async e=>{if(e.key===`Enter`&&y.length>=3){if(e.preventDefault(),x===`submitting`||x===`checking`||D)return;A.current&&clearTimeout(A.current),S(`submitting`),w(``);try{let e=await br(y);if(!e.available){S(`taken`),w(e.reason||`Username is taken`);return}let t=await xr(y);k(t.device_code),O(!0),S(`available`),window.open(t.verification_uri,`_blank`);let n=Date.now(),r=async()=>{try{let e=await yr(t.device_code);if(e.authenticated){O(!1),S(`claimed`),E(e.username||y);return}}catch{}Date.now()-n<3e5?setTimeout(r,5e3):(O(!1),S(`error`),w(`Timed out. Try again.`))};setTimeout(r,5e3)}catch{S(`error`),w(`Could not connect. Try again later.`)}}},placeholder:`your-name`,className:`bg-white/10 border border-white/20 rounded px-2 py-1 text-[11px] font-mono text-[#34d399] w-36 outline-none focus:border-[#9dcaff] placeholder:text-white/20`,autoFocus:!0}),x===`checking`&&(0,F.jsx)(`span`,{className:`text-[10px] text-[#fbbf24] font-mono`,children:`checking...`}),x===`available`&&(0,F.jsx)(`span`,{className:`text-[10px] text-[#34d399] font-mono`,children:`available!`}),x===`submitting`&&(0,F.jsx)(`span`,{className:`text-[10px] text-[#fbbf24] font-mono`,children:`claiming...`}),x===`taken`&&(0,F.jsx)(`span`,{className:`text-[10px] text-[#f87171] font-mono`,children:C}),x===`error`&&(0,F.jsx)(`span`,{className:`text-[10px] text-[#f87171] font-mono`,children:C})]}),y.length>=3&&x===`idle`&&(0,F.jsxs)(`div`,{className:`triage-terminal__line opacity-40 text-[10px] mt-1`,children:[` `,`Press Enter to check & claim`]}),(0,F.jsx)(U,{variant:`default`,children:`\xA0`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 mt-1 ml-4`,children:[(0,F.jsx)(`button`,{disabled:D||x===`submitting`,onClick:async()=>{if(!(D||x===`submitting`)){S(`submitting`),w(``);try{let e=await xr(``);k(e.device_code),O(!0),S(`idle`),window.open(e.verification_uri,`_blank`);let t=Date.now(),n=async()=>{try{let t=await yr(e.device_code);if(t.authenticated){O(!1),S(`claimed`),E(t.username||``);return}}catch{}Date.now()-t<3e5?setTimeout(n,5e3):(O(!1),S(`error`),w(`Timed out.`))};setTimeout(n,5e3)}catch{S(`error`),w(`Could not connect. Try again later.`)}}},className:`text-[10px] font-mono px-2.5 py-1 rounded bg-white/10 text-white/70 hover:text-white/90 hover:bg-white/15 transition-colors disabled:opacity-40`,children:`Already have an account? Log in`}),(0,F.jsx)(`button`,{onClick:()=>ne(),className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:`I'll do this later`})]})]})]})]}),ae&&(0,F.jsx)(`div`,{className:`flex-1 min-w-0 pr-4 pt-6 pb-8 animate-[slideIn_0.6s_cubic-bezier(0.16,1,0.3,1)_forwards]`,children:(e===`preview_project`||e===`preview_enhanced`||e===`prompt_enhance`)&&(0,F.jsx)(qi,{enhanced:e===`preview_enhanced`||e===`prompt_enhance`,onScrollSection:d,selectedSession:g,onSelectSession:v},e===`preview_project`?`draft`:`enhanced`)})]}),e===`dashboard`&&(0,F.jsx)($i,{dashboard:n,stats:re,projects:ie})]})}var Wi=[`bg-primary`,`bg-green`,`bg-violet`];function Gi(){let e=[`Set up project scaffolding with Vite + React + TypeScript`,`Build SQLite sync pipeline for session indexing`,`Implement real-time file watcher with debounce`,`Design project detail page with work timeline`,`Add full-text search across all sessions`,`Fix subagent indexing — children were silently dropped`,`Add multi-agent orchestration visualization`,`Build guided onboarding flow with CLI aesthetics`,`Implement session archiving with hard links`,`Add Cursor workspace discovery and polling`,`Design growth chart with cumulative LOC tracking`,`Build publish flow with streaming SSE upload`,`Add Ed25519 session sealing for interviews`,`Implement project-level AI enhancement pipeline`,`Fix work timeline SVG rendering for long sessions`,`Add context export in compact/summary/full formats`],t=[`TypeScript`,`React`,`SQLite`,`Node.js`,`CSS`,`Vite`,`Shell`,`Vitest`],n=[`claude`,`claude`,`claude`,`cursor`,`claude`,`codex`],r=new Date(`2026-02-15T10:00:00Z`),i=[];for(let a=0;a<e.length;a++){let o=new Date(r.getTime()+a*2.5*864e5+Math.random()*432e5),s=15+Math.floor(Math.random()*120),c=new Date(o.getTime()+s*6e4),l=Math.floor(200+Math.random()*5e3),u=Math.floor(50+Math.random()*l*.3),d=a%4==0?[{sessionId:`child-${a}-1`,role:`frontend-dev`,durationMinutes:Math.floor(s*.6),linesOfCode:Math.floor(l*.3),date:o.toISOString()},{sessionId:`child-${a}-2`,role:`qa-engineer`,durationMinutes:Math.floor(s*.4),linesOfCode:Math.floor(l*.15),date:o.toISOString()}]:a%3==0?[{sessionId:`child-${a}-1`,role:`backend-dev`,durationMinutes:Math.floor(s*.7),linesOfCode:Math.floor(l*.4),date:o.toISOString()}]:void 0;i.push({id:`mock-session-${a}`,title:e[a],date:o.toISOString(),endTime:c.toISOString(),durationMinutes:s,wallClockMinutes:s+Math.floor(Math.random()*30),turns:10+Math.floor(Math.random()*60),linesOfCode:l+u,status:`draft`,projectName:`heyi-am`,rawLog:[],skills:[t[a%t.length],t[(a+3)%t.length]],source:n[a%n.length],filesChanged:[[`src/sync.ts`,`src/db.ts`,`src/parsers/index.ts`,`src/server.ts`,`src/bridge.ts`],[`src/analyzer.ts`,`src/search.ts`,`src/settings.ts`,`src/export.ts`],[`app/src/components/ProjectDetail.tsx`,`app/src/components/WorkTimeline.tsx`,`app/src/api.ts`],[`src/routes/projects.ts`,`src/routes/sessions.ts`,`src/routes/dashboard.ts`,`app/src/types.ts`],[`src/parsers/claude.ts`,`src/parsers/cursor.ts`,`src/parsers/codex.ts`,`src/parsers/gemini.ts`],[`app/src/components/FirstRun.tsx`,`app/src/index.css`,`src/routes/export.ts`],[`src/archive.ts`,`src/context-export.ts`,`app/src/components/Search.tsx`],[`app/src/components/GrowthChart.tsx`,`app/src/components/SessionView.tsx`,`src/transcript.ts`]][a%8].map((e,t)=>({path:e,additions:Math.floor(l/(t+1.5)),deletions:Math.floor(u/(t+2))})),toolBreakdown:[{tool:`Read`,count:15+Math.floor(Math.random()*30)},{tool:`Edit`,count:8+Math.floor(Math.random()*25)},{tool:`Bash`,count:5+Math.floor(Math.random()*20)},{tool:`Write`,count:2+Math.floor(Math.random()*10)},{tool:`Grep`,count:3+Math.floor(Math.random()*8)},{tool:`Glob`,count:1+Math.floor(Math.random()*5)}],children:d,childCount:d?.length??0,isOrchestrated:!!d})}return i}var Ki=Gi();function qi({enhanced:e,onScrollSection:t,selectedSession:n,onSelectSession:r}){let i=(0,_.useRef)([]);(0,_.useEffect)(()=>{let e=[];return i.current.forEach((n,r)=>{if(!n)return;let i=new IntersectionObserver(([e])=>{e.isIntersecting&&t(r)},{threshold:.3});i.observe(n),e.push(i)}),()=>e.forEach(e=>e.disconnect())},[t]);let a=Ki.reduce((e,t)=>e+t.linesOfCode,0);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Xi,{url:`localhost:17845/project/heyi-am`,children:(0,F.jsxs)(`div`,{className:`bg-surface-mid`,children:[(0,F.jsxs)(`div`,{ref:e=>{i.current[0]=e},className:`p-5 pb-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`font-display text-xl font-bold text-on-surface`,children:`heyi-am`}),(0,F.jsx)(`span`,{className:`text-on-surface-variant text-[0.8125rem]`,children:`Feb 15 – Mar 25, 2026`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(I,{variant:e?`green`:`primary`,children:e?`Enhanced`:`Draft`}),(0,F.jsx)(I,{variant:`primary`,children:`16 sessions`})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-4 mt-1 mb-2`,children:[(0,F.jsxs)(`a`,{href:`https://heyi.am`,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,F.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`currentColor`,children:(0,F.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z`})}),`github.com/interactivecats/heyi.am`]}),(0,F.jsxs)(`a`,{href:`https://heyi.am`,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,F.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:(0,F.jsx)(`path`,{d:`M6.5 10.5l3-3m-1.5-2a2.5 2.5 0 013.54 3.54l-1.5 1.5m-4.08-1.08a2.5 2.5 0 01-3.54-3.54l1.5-1.5`})}),`heyi.am`]})]}),(0,F.jsxs)(`div`,{className:`rounded-md border border-ghost overflow-hidden shadow-sm mb-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-2 bg-surface-low border-b border-ghost`,children:[(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#ff5f57]`}),(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#febc2e]`}),(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#28c840]`})]}),(0,F.jsx)(`div`,{className:`max-h-96 overflow-y-auto`,children:(0,F.jsx)(`img`,{src:`/heyi-am-screenshot.png`,alt:`heyi.am — proof-of-work for AI-native developers`,className:`w-full h-auto`})})]}),e&&(0,F.jsxs)(L,{className:`my-3`,children:[(0,F.jsx)(z,{title:`Narrative summary`,meta:`AI-generated`}),(0,F.jsx)(`p`,{className:`leading-relaxed text-on-surface border-l-[3px] border-primary pl-3`,style:{fontSize:`clamp(0.8125rem, 1.2vw, 1rem)`},children:`Built a local-first developer portfolio tool that indexes AI coding sessions across Claude Code, Cursor, Codex, and Gemini CLI. Designed a real-time sync pipeline with SQLite indexing, implemented multi-agent session visualization, and shipped a guided onboarding flow.`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-4`,children:[(0,F.jsx)(Nr,{label:`Sessions`,value:16}),(0,F.jsx)(Nr,{label:`Human / Agents`,value:`52h / 78h`}),(0,F.jsx)(Nr,{label:`Lines changed`,value:Hi(a)}),(0,F.jsx)(Nr,{label:`Files`,value:847})]})]}),e&&(0,F.jsx)(`div`,{className:`px-5 pb-4`,children:(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Project arc`,meta:`AI-generated`}),(0,F.jsxs)(`div`,{className:`relative pl-5`,children:[(0,F.jsx)(`div`,{className:`absolute left-1 top-1.5 bottom-1.5 w-0.5 bg-ghost rounded-full`}),[{title:`Foundation`,desc:`Set up project scaffolding, parser pipeline, and SQLite schema`},{title:`Core features`,desc:`Built sync engine, search, work timeline, and growth chart`},{title:`Polish`,desc:`Onboarding flow, subagent visualization, export pipeline`}].map(e=>(0,F.jsxs)(`div`,{className:`relative pb-3 last:pb-0`,children:[(0,F.jsx)(`div`,{className:`absolute -left-5 top-1.5 w-2 h-2 rounded-full bg-primary shadow-[0_0_0_3px_rgba(8,68,113,0.1)]`}),(0,F.jsx)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant`,children:e.title}),(0,F.jsx)(R,{children:(0,F.jsx)(`span`,{className:`text-on-surface-variant`,children:e.desc})})]},e.title))]})]})}),e&&(0,F.jsx)(`div`,{className:`px-5 pb-4`,children:(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Skills extracted`,meta:`14 skills`}),(0,F.jsx)(`div`,{className:`flex gap-1.5 flex-wrap`,children:[`TypeScript`,`React`,`SQLite`,`Node.js`,`CSS`,`Vite`,`Vitest`,`Shell`,`HTML`,`Express`,`SSE`,`FTS5`,`Ed25519`,`Docker`].map(e=>(0,F.jsx)(I,{variant:`violet`,children:e},e))})]})}),(0,F.jsx)(`div`,{ref:e=>{i.current[1]=e},className:`px-5 pb-4`,children:(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Work timeline`,meta:`sessions over time`}),(0,F.jsx)(Ei,{sessions:Ki,maxHeight:280})]})}),(0,F.jsx)(`div`,{ref:e=>{i.current[2]=e},className:`px-5 pb-4`,children:(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Project growth`,meta:`lines changed`}),(0,F.jsx)(zi,{sessions:Ki,totalLoc:a,totalFiles:847})]})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 px-5 pb-4`,children:[(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Key decisions`,meta:`signal`}),(0,F.jsx)(`div`,{className:`flex flex-col gap-3`,children:e?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(R,{title:`SQLite over filesystem`,children:`Chose SQLite for session indexing over raw filesystem scans — 10x faster project listing.`}),(0,F.jsx)(R,{title:`Local-first architecture`,children:`All data stays on the user's machine. No cloud dependency for core features.`}),(0,F.jsx)(R,{title:`Multi-parser pipeline`,children:`One bridge layer normalizes data from Claude, Cursor, Codex, and Gemini into a shared schema.`})]}):(0,F.jsx)(R,{children:`Enhance this project to extract key decisions.`})})]}),(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Source breakdown`,meta:`provenance`}),(0,F.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,F.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Count`})]})}),(0,F.jsx)(`tbody`,{children:[{source:`claude`,count:10},{source:`cursor`,count:3},{source:`codex`,count:2},{source:`gemini`,count:1}].map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.source}),(0,F.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.count})]},e.source))})]})]})]}),(0,F.jsx)(`div`,{ref:e=>{i.current[3]=e},className:`px-5 pb-5`,children:(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:e?`Featured sessions`:`Sessions`,meta:`${Ki.length} total`}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:Ki.slice(0,6).map((e,t)=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(e),className:`text-left bg-surface-lowest border border-ghost rounded-sm p-4 cursor-pointer transition-shadow hover:shadow-md`,children:[(0,F.jsx)(`div`,{className:`h-1 rounded-full mb-3 ${Wi[t%Wi.length]}`}),(0,F.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-1 line-clamp-2`,children:e.title}),(0,F.jsxs)(`span`,{className:`text-on-surface-variant text-xs`,children:[Vi(e.durationMinutes),` · `,e.turns,` turns · `,Hi(e.linesOfCode),` lines`]}),e.skills?.[0]&&(0,F.jsx)(`div`,{className:`mt-2`,children:(0,F.jsx)(I,{variant:`violet`,children:e.skills[0]})})]},e.id))})]})})]})}),n&&(0,F.jsx)(`div`,{className:`fixed inset-0 z-50 flex justify-end bg-black/40`,onClick:e=>{e.target===e.currentTarget&&r(null)},children:(0,F.jsx)(`div`,{className:`w-[600px] max-w-full h-full bg-surface overflow-y-auto shadow-[-8px_0_32px_rgba(25,28,30,0.1)] animate-[slideIn_0.3s_ease_forwards]`,children:(0,F.jsxs)(`div`,{className:`p-8`,children:[(0,F.jsx)(`div`,{className:`flex items-center gap-3 mb-6`,children:(0,F.jsx)(`button`,{type:`button`,onClick:()=>r(null),className:`font-mono text-[0.8125rem] text-on-surface-variant bg-surface-low border border-surface-high rounded-md px-3 py-1 cursor-pointer hover:text-on-surface`,children:`ESC · Close`})}),(0,F.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface mb-2`,children:n.title}),(0,F.jsxs)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant mb-4`,children:[new Date(n.date).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),n.source&&` · ${n.source}`]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-5`,children:[(0,F.jsx)(Ji,{label:`Active Time`,value:Vi(n.durationMinutes),primary:!0}),(0,F.jsx)(Ji,{label:`Turns`,value:n.turns}),(0,F.jsx)(Ji,{label:`Files`,value:n.filesChanged?.length??`—`}),(0,F.jsx)(Ji,{label:`Lines changed`,value:Hi(n.linesOfCode)})]}),e&&(0,F.jsx)(`p`,{className:`text-[0.9375rem] leading-relaxed text-on-surface border-l-[3px] border-primary pl-3 mb-5`,children:`Implemented the core sync pipeline that discovers sessions from the filesystem, checks staleness against SQLite, and indexes new or changed sessions with full text search support.`}),n.skills&&n.skills.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-5`,children:n.skills.map(e=>(0,F.jsx)(I,{variant:`violet`,children:e},e))}),n.turns>=50&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsxs)(Yi,{children:[`Session Activity · `,n.turns,` turns over `,Vi(n.durationMinutes)]}),(0,F.jsx)(Ei,{sessions:[n],maxHeight:200})]}),(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(Yi,{children:`Execution Path`}),(e?[{n:1,title:`Read existing parsers and DB schema`,desc:`Analyzed the current session discovery pipeline and SQLite schema to understand the data flow`},{n:2,title:`Build staleness checker`,desc:`Compared file mtime/size against DB records to skip unchanged sessions`},{n:3,title:`Implement indexing loop`,desc:`Parse → bridge → analyze → upsert for each stale session, with progress reporting`}]:(()=>{let e=n.filesChanged??[],t=[],r=Math.max(1,Math.ceil(e.length/3));for(let n=0;n<e.length;n+=r){let i=e.slice(n,n+r);t.push({n:t.length+1,title:`Modified ${i.map(e=>e.path.split(`/`).pop()).join(`, `)}`,desc:``})}return t.length>0?t:[{n:1,title:`Modified multiple files`,desc:``}]})()).map(e=>(0,F.jsxs)(`div`,{className:`flex gap-3 items-start py-2.5 border-b border-ghost last:border-b-0`,children:[(0,F.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-primary text-white font-mono text-[0.625rem] font-bold flex items-center justify-center flex-shrink-0`,children:e.n}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-0.5`,children:e.title}),e.desc&&(0,F.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.desc})]})]},e.n))]}),n.toolBreakdown&&n.toolBreakdown.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(Yi,{children:`Tool Usage`}),n.toolBreakdown.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,F.jsx)(`span`,{className:`text-on-surface`,children:e.tool}),(0,F.jsx)(`span`,{className:`text-on-surface-variant`,children:e.count})]},e.tool))]}),n.filesChanged&&n.filesChanged.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(Yi,{children:`Top Files`}),n.filesChanged.slice(0,10).map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,F.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.path}),(0,F.jsxs)(`span`,{className:`flex-shrink-0 ml-2 whitespace-nowrap`,children:[(0,F.jsxs)(`span`,{className:`text-green-600 font-semibold`,children:[`+`,e.additions]}),(0,F.jsxs)(`span`,{className:`text-red-600 font-semibold ml-1`,children:[`-`,e.deletions]})]})]},e.path))]})]})})})]})}function Ji({label:e,value:t,primary:n}){return(0,F.jsxs)(`div`,{className:`text-center p-3 border border-ghost rounded-sm bg-surface-lowest`,children:[(0,F.jsx)(`div`,{className:`font-mono text-xl font-bold ${n?`text-primary`:`text-on-surface`}`,children:t}),(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mt-1`,children:e})]})}function Yi({children:e}){return(0,F.jsx)(`div`,{className:`font-mono text-[0.625rem] font-semibold uppercase tracking-wider text-on-surface-variant mb-2.5`,children:e})}function Xi({url:e,children:t}){return(0,F.jsxs)(`div`,{className:`rounded-lg border border-[#d1d5db] bg-white shadow-xl overflow-hidden`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-[#f1f3f5] border-b border-[#d1d5db]`,children:[(0,F.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,F.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#ff5f57]`}),(0,F.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#febc2e]`}),(0,F.jsx)(`div`,{className:`w-[10px] h-[10px] rounded-full bg-[#28c840]`})]}),(0,F.jsx)(`div`,{className:`flex-1 mx-2`,children:(0,F.jsx)(`div`,{className:`bg-white rounded-md border border-[#d1d5db] px-3 py-1 text-[10px] text-[#6b7280] font-mono`,children:e})})]}),(0,F.jsx)(`div`,{className:`bg-[#f1f5f9] max-h-[70vh] overflow-y-auto`,children:t})]})}function Zi({children:e,compact:t}){let n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{n.current?.scrollTo({top:n.current.scrollHeight})}),(0,F.jsxs)(`div`,{className:`triage-terminal`,style:{maxWidth:t?340:680,margin:`0 auto`,padding:t?`0.875rem 1rem 0.625rem`:`1.5rem 1.5rem 1rem`,fontSize:t?`0.6875rem`:`0.8125rem`},children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-3`,children:[(0,F.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#ff5f57]`}),(0,F.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#febc2e]`}),(0,F.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-[#28c840]`})]}),(0,F.jsx)(`div`,{ref:n,className:`triage-terminal__feed`,children:e})]})}function U({variant:e,children:t}){return(0,F.jsx)(`div`,{className:`triage-terminal__line ${e===`prompt`?`triage-terminal__prompt`:e===`passed`?`triage-terminal__line--passed`:e===`active`?`triage-terminal__line--active`:e===`section`?`triage-terminal__section`:e===`reveal`?`triage-terminal__line--passed opacity-0 animate-[fadeIn_0.3s_ease_forwards]`:e===`info`?`opacity-80`:``}`,children:t})}function Qi({question:e,onYes:t,onNo:n,defaultNo:r,yesLabel:i,noLabel:a}){let o=(0,_.useRef)(null),[s,c]=(0,_.useState)(r?``:`Y`);return(0,_.useEffect)(()=>{let e=setTimeout(()=>o.current?.focus(),100);return()=>clearTimeout(e)},[]),(0,F.jsxs)(`div`,{className:`mt-1`,children:[(0,F.jsxs)(`div`,{className:`triage-terminal__line flex items-center gap-0 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`text-[#9dcaff] font-semibold`,children:` > `}),(0,F.jsxs)(`span`,{children:[e,` `]}),(0,F.jsxs)(`span`,{className:`text-white/40`,children:[r?`[y/N]`:`[Y/n]`,` `]}),(0,F.jsx)(`input`,{ref:o,type:`text`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let r=s.trim().toLowerCase();r===``||r===`y`||r===`yes`?t():n()}},className:`bg-transparent border-none outline-none text-[#34d399] font-mono w-12 caret-[#34d399]`,style:{fontSize:`inherit`,lineHeight:`inherit`,padding:0}})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 mt-2 ml-4`,children:[(0,F.jsxs)(`button`,{onClick:t,className:`text-[10px] font-mono px-2.5 py-1 rounded bg-white/10 text-white/90 hover:bg-white/20 transition-colors`,children:[i??`Yes`,` `,(0,F.jsx)(`span`,{className:`text-white/30 ml-0.5`,children:`↵`})]}),(0,F.jsx)(`button`,{onClick:n,className:`text-[10px] font-mono px-2.5 py-1 rounded text-white/40 hover:text-white/70 transition-colors`,children:a??`No`})]})]})}function $i({dashboard:e,stats:t,projects:n}){let r=n.slice(0,4),i=t?.enhancedCount??0;return(0,F.jsxs)(`div`,{className:`p-6`,children:[(0,F.jsx)(`h1`,{className:`font-display text-[1.75rem] leading-[1.1] font-bold text-on-surface`,children:`Turn your AI sessions into a dev portfolio.`}),t&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`h-6`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-4 gap-4`,children:[(0,F.jsx)(ta,{label:`Sessions indexed`,value:t.sessionCount,to:`/archive`,color:`var(--primary)`}),(0,F.jsx)(ta,{label:`Projects`,value:t.projectCount,to:`/projects`}),(0,F.jsx)(ta,{label:`Enhanced`,value:i,to:`/projects`,color:i>0?`#34d399`:void 0}),(0,F.jsx)(ta,{label:`Sources`,value:t.sourceCount,to:`/sources`})]})]}),(0,F.jsx)(`div`,{className:`h-6`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,F.jsx)(P,{to:`/sources`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-4 py-2 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Sync new sessions`}),(0,F.jsx)(P,{to:`/projects`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-4 py-2 rounded-sm text-primary border border-ghost hover:border-outline transition-colors`,children:`View projects`}),(0,F.jsx)(P,{to:`/search`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-4 py-2 rounded-sm text-primary border border-ghost hover:border-outline transition-colors`,children:`Search sessions`}),e?.sync.status===`syncing`&&(0,F.jsxs)(`span`,{className:`text-xs text-on-surface-variant`,children:[`syncing `,e.sync.current,`/`,e.sync.total,e.sync.currentProject?` — ${e.sync.currentProject}`:``,`...`]})]}),(0,F.jsx)(`div`,{className:`h-10`}),r.length>0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`flex items-baseline justify-between mb-3`,children:[(0,F.jsx)(`h2`,{className:`font-semibold text-sm text-on-surface`,children:`Recent projects`}),(0,F.jsx)(P,{to:`/projects`,className:`text-xs text-primary hover:underline`,children:`View all →`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:r.map(e=>(0,F.jsx)(ea,{project:e},e.projectDir))}),(0,F.jsx)(`div`,{className:`h-10`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,F.jsx)(na,{to:`/archive`,label:`Archive`,title:`Back up sessions`,desc:`Import from local AI tools before they expire. Everything stays on your machine.`}),(0,F.jsx)(na,{to:`/projects`,label:`Build`,title:`AI case studies`,desc:`AI reads your sessions, extracts skills, and drafts a narrative for each project.`}),(0,F.jsx)(na,{to:`/search`,label:`Search`,title:`Find past work`,desc:`Full-text search across all sessions. Filter by tool, project, or skill.`}),(0,F.jsx)(na,{to:`/projects`,label:`Export`,title:`HTML, markdown, or publish`,desc:`Save locally, export markdown, or publish a public portfolio on heyi.am.`})]}),(0,F.jsx)(`div`,{className:`h-8`}),(0,F.jsxs)(`div`,{className:`border-t border-ghost pt-4 flex items-start gap-6 text-xs text-on-surface-variant`,children:[(0,F.jsx)(`span`,{children:`Everything is local by default.`}),(0,F.jsx)(`span`,{children:`Nothing is published unless you choose to.`}),(0,F.jsx)(`span`,{children:`No account required to archive or export.`})]})]})}function ea({project:e}){return(0,F.jsxs)(P,{to:`/project/${encodeURIComponent(e.projectDir)}`,className:`group block bg-white border border-ghost rounded-sm p-3.5 hover:border-outline transition-colors`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-sm text-on-surface truncate`,children:e.projectName}),(0,F.jsxs)(`div`,{className:`text-xs text-on-surface-variant mt-0.5`,children:[e.sessionCount,` session`,e.sessionCount===1?``:`s`,e.enhancedAt&&(0,F.jsx)(`span`,{className:`ml-2`,style:{color:`#34d399`},children:`enhanced`})]}),e.skills.length>0&&(0,F.jsx)(`div`,{className:`flex gap-1 mt-2 flex-wrap`,children:e.skills.slice(0,3).map(e=>(0,F.jsx)(I,{children:e},e))})]})}function ta({label:e,value:t,to:n,color:r}){return(0,F.jsxs)(P,{to:n,className:`block bg-white border border-ghost rounded-sm px-4 py-3 hover:border-outline transition-colors`,children:[(0,F.jsx)(`div`,{className:`text-2xl font-bold`,style:r?{color:r}:{color:`var(--on-surface)`},children:t}),(0,F.jsx)(`div`,{className:`text-xs text-on-surface-variant mt-0.5`,children:e})]})}function na({to:e,label:t,title:n,desc:r}){return(0,F.jsxs)(P,{to:e,className:`group block bg-white border border-ghost rounded-sm p-4 hover:border-outline transition-colors`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-primary mb-1.5`,children:t}),(0,F.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-1`,children:n}),(0,F.jsx)(`div`,{className:`text-xs text-on-surface-variant leading-relaxed`,children:r})]})}function ra(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{Zn().then(e=>{t(e.sources.map(e=>({tool:e.name,path:e.path+(e.dateRange?` · ${e.dateRange}`:``),live:e.liveCount,archived:e.archivedCount,chips:[{label:`${e.liveCount} live`,variant:`primary`},{label:`${e.archivedCount} archived`,variant:`green`},...e.retentionRisk?[{label:e.retentionRisk,variant:`amber`}]:[]],kpis:[{label:`Health`,value:e.health}]})))}).catch(()=>{a(!0)}).finally(()=>r(!1))},[]),n)return(0,F.jsx)(Ar,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],children:(0,F.jsx)(`div`,{className:`p-6`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Scanning sources...`})})});if(i)return(0,F.jsx)(Ar,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],children:(0,F.jsx)(`div`,{className:`p-6`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Scan failed. Could not load source data.`})})});let o=e.reduce((e,t)=>e+t.live,0),s=e.reduce((e,t)=>e+t.archived,0),c=e.some(e=>e.chips.some(e=>e.variant===`amber`));return(0,F.jsx)(Ar,{back:{label:`Back`,to:`/`},chips:[{label:`Source audit`}],actions:(0,F.jsx)(`button`,{className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent`,children:`Rescan all`}),children:(0,F.jsxs)(`div`,{className:`p-6`,children:[(0,F.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`font-display text-xl font-semibold text-on-surface`,children:`What we found, what we archived, and what we skipped`}),(0,F.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`The ingestion layer should feel inspectable, not magical.`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,F.jsxs)(I,{variant:`green`,children:[s,` archived`]}),c&&(0,F.jsx)(I,{variant:`amber`,children:`Claude retention risk detected`})]})]}),(0,F.jsx)(`div`,{className:`h-4`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,F.jsx)(Nr,{label:`Sources scanned`,value:e.length}),(0,F.jsx)(Nr,{label:`Live sessions`,value:o}),(0,F.jsx)(Nr,{label:`Archived`,value:s})]}),(0,F.jsx)(`div`,{className:`h-5`}),(0,F.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map(e=>(0,F.jsxs)(L,{children:[(0,F.jsxs)(`div`,{className:`flex items-start justify-between mb-2`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{className:`font-display text-[0.9375rem] font-semibold text-on-surface`,children:e.tool}),(0,F.jsx)(`span`,{className:`font-mono text-xs text-outline`,children:e.path})]}),(0,F.jsx)(`div`,{className:`flex items-center gap-1`,children:e.chips.map(e=>(0,F.jsx)(I,{variant:e.variant,children:e.label},e.label))})]}),(0,F.jsx)(`div`,{className:`flex flex-wrap gap-4 text-[0.8125rem] text-on-surface-variant mt-2`,children:e.kpis.map(e=>(0,F.jsxs)(`span`,{children:[(0,F.jsxs)(`strong`,{className:`text-on-surface`,children:[e.label,`:`]}),` `,e.value]},e.label))})]},e.tool))}),(0,F.jsx)(`div`,{className:`h-5`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(P,{to:`/archive`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Review archive`}),(0,F.jsx)(P,{to:`/projects`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors`,children:`Continue to projects`}),(0,F.jsx)(`button`,{className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors bg-transparent border-none`,children:`Add custom path`})]})]})})}function ia(e){switch(e){case`healthy`:return{status:`healthy`,statusVariant:`green`};case`warning`:return{status:`partial`,statusVariant:`default`};case`error`:return{status:`filtered`,statusVariant:`violet`}}}function aa(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(!0),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(null);function x(){return Promise.all([Qn(),Zn()]).then(([e,n])=>{t({archived:e.total,oldest:e.oldest,sources:e.sourcesCount,lastSync:e.lastSync}),r(n.sources.map(e=>({source:e.name,archived:e.archivedCount,...ia(e.health)})))})}(0,_.useEffect)(()=>{x().catch(()=>s(!0)).finally(()=>a(!1))},[]);async function S(){l(!0),d(null);try{let e=await $n();e.archived===0?d(`Archive is up to date — no new sessions to sync.`):d(`Archived ${e.archived} new session${e.archived===1?``:`s`}.`),await x()}catch{d(`Sync failed. Check the console for details.`)}finally{l(!1)}}async function C(){p(!0),h(null);try{h(await tr())}catch{h({total:0,verified:0,missing:0,errors:[`Verification failed. Check the console for details.`]})}finally{p(!1)}}async function w(){v(!0),b(null);try{await er()}catch(e){b(e.message)}finally{v(!1)}}return i?(0,F.jsx)(Ar,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],children:(0,F.jsx)(`div`,{className:`p-6`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading archive...`})})}):o||!e?(0,F.jsx)(Ar,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],children:(0,F.jsx)(`div`,{className:`p-6`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Failed to load archive data.`})})}):(0,F.jsx)(Ar,{back:{label:`Sources`,to:`/sources`},chips:[{label:`Archive`}],actions:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{onClick:S,disabled:c,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent disabled:opacity-50 disabled:cursor-not-allowed`,children:c?`Syncing…`:`Archive now`}),(0,F.jsx)(`button`,{onClick:w,disabled:g,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent disabled:opacity-50 disabled:cursor-not-allowed`,children:g?`Exporting…`:`Export archive`})]}),children:(0,F.jsxs)(`div`,{className:`p-6`,children:[(0,F.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`font-display text-xl font-semibold text-on-surface`,children:`Your preserved AI work history`}),(0,F.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`A durable library across tools, with clear ownership and visible coverage.`})]}),(0,F.jsx)(I,{variant:`green`,children:`under your control`})]}),(0,F.jsx)(`div`,{className:`h-4`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[(0,F.jsx)(Nr,{label:`Archived sessions`,value:e.archived}),(0,F.jsx)(Nr,{label:`Oldest saved`,value:e.oldest}),(0,F.jsx)(Nr,{label:`Sources covered`,value:e.sources}),(0,F.jsx)(Nr,{label:`Last sync`,value:e.lastSync})]}),u&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`h-3`}),(0,F.jsx)(R,{children:u})]}),y&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`h-3`}),(0,F.jsxs)(R,{children:[`Export failed: `,y]})]}),(0,F.jsx)(`div`,{className:`h-5`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,F.jsxs)(L,{className:`bg-white`,children:[(0,F.jsx)(z,{title:`By source`,meta:`coverage`}),(0,F.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,F.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Archived`}),(0,F.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Status`})]})}),(0,F.jsx)(`tbody`,{children:n.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.source}),(0,F.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e.archived}),(0,F.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:(0,F.jsx)(I,{variant:e.statusVariant,children:e.status})})]},e.source))})]})]}),(0,F.jsxs)(L,{className:`bg-white`,children:[(0,F.jsx)(z,{title:`Archive posture`,meta:`ops`}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[n.some(e=>e.status===`partial`)&&(0,F.jsxs)(R,{children:[n.filter(e=>e.status===`partial`).length,` source`,n.filter(e=>e.status===`partial`).length===1?``:`s`,` with partial coverage — consider a manual sync.`]}),n.every(e=>e.status===`healthy`)&&n.length>0&&(0,F.jsx)(R,{children:`All sources healthy. Archive coverage is complete.`}),(0,F.jsx)(R,{children:(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:`Archive path: ~/.config/heyiam/sessions/`})})]}),(0,F.jsx)(`div`,{className:`h-4`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(P,{to:`/projects`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Go to projects`}),(0,F.jsx)(`button`,{onClick:C,disabled:f,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm text-primary border border-ghost hover:border-outline transition-colors bg-transparent disabled:opacity-50 disabled:cursor-not-allowed`,children:f?`Verifying…`:`Verify integrity`})]}),m&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`h-3`}),m.missing===0&&m.errors.length===0?(0,F.jsxs)(R,{children:[`All `,m.verified,` archived file`,m.verified===1?``:`s`,` verified.`]}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(R,{children:[`Verified `,m.verified,`/`,m.total,` — `,m.missing,` missing.`]}),m.errors.map((e,t)=>(0,F.jsx)(`span`,{className:`text-xs text-on-surface-variant font-mono break-all`,children:e},t))]})]})]})]})]})})}function oa(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function sa(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function ca(e){if(!e)return``;let[t,n]=e.split(`|`),r=e=>{try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,year:`numeric`})}catch{return``}},i=r(t),a=r(n);return i?i===a?i:`${i} — ${a}`:``}function la(e){let t=[];return e.enhancedAt&&t.push({variant:`refined`,label:`Refined`}),e.isUploaded?t.push({variant:`exported`,label:`Exported`}):t.push({variant:`local`,label:`Local only`}),t}function ua(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(``);(0,_.useEffect)(()=>{Jn().then(t).catch(()=>{}).finally(()=>r(!1))},[]);let o=i?e.filter(e=>{let t=i.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.skills.some(e=>e.toLowerCase().includes(t))}):e;return(0,F.jsx)(Ar,{chips:[{label:`Projects`}],actions:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(P,{to:`/search`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Search`}),(0,F.jsx)(P,{to:`/archive`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Archive`}),(0,F.jsx)(P,{to:`/settings`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Settings`})]}),children:(0,F.jsxs)(`div`,{className:`p-6`,children:[(0,F.jsx)(z,{title:`Your projects`,meta:`Local project memory built from both live and archived history.`,children:(0,F.jsx)(I,{variant:`green`,children:`Local-only is a complete state`})}),e.length>3&&(0,F.jsx)(`div`,{className:`mt-3`,children:(0,F.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:`Filter projects...`,className:`w-full max-w-sm bg-surface-low border border-ghost rounded-md font-mono text-xs text-on-surface placeholder:text-outline px-3 py-1.5 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20`})}),(0,F.jsx)(`div`,{className:`h-4`}),n?(0,F.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:`Loading projects...`}):o.length===0?(0,F.jsx)(L,{children:(0,F.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:i?`No projects match your filter.`:`No projects found. Run a source scan to get started.`})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-3`,children:o.map(e=>(0,F.jsx)(P,{to:`/project/${encodeURIComponent(e.dirName)}`,className:`no-underline`,children:(0,F.jsxs)(L,{hover:!0,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between mb-1`,children:(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`h3`,{className:`font-display text-[0.9375rem] font-semibold text-on-surface`,children:e.name}),la(e).map(e=>(0,F.jsx)(Mr,{variant:e.variant,children:e.label},e.label))]}),(0,F.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:e.description})]})}),(e.dateRange||e.skills.length>0)&&(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 mt-2`,children:[e.dateRange&&(0,F.jsx)(`span`,{className:`font-mono text-[0.6875rem] text-outline`,children:ca(e.dateRange)}),e.skills.length>0&&(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.skills.slice(0,8).map(e=>(0,F.jsx)(I,{variant:`violet`,children:e},e)),e.skills.length>8&&(0,F.jsxs)(`span`,{className:`font-mono text-[10px] text-outline`,children:[`+`,e.skills.length-8]})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mt-3`,children:[(0,F.jsx)(Nr,{label:`Sessions`,value:e.sessionCount,valueSize:`text-lg`}),(0,F.jsx)(Nr,{label:`Time`,value:oa(e.totalDuration),valueSize:`text-lg`}),(0,F.jsx)(Nr,{label:`Lines changed`,value:sa(e.totalLoc),valueSize:`text-lg`}),(0,F.jsx)(Nr,{label:`Files`,value:e.totalFiles,valueSize:`text-lg`})]})]})},e.dirName))})]})})}function da(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function fa(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function pa(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function ma({session:e,projectDirName:t,onClose:n}){let[r,i]=(0,_.useState)(e),[a,o]=(0,_.useState)(!0),s=at();(0,_.useEffect)(()=>{Xn(t,e.id).then(e=>i(e)).catch(()=>{}).finally(()=>o(!1))},[t,e.id]);let c=(0,_.useCallback)(e=>{e.key===`Escape`&&n()},[n]);(0,_.useEffect)(()=>(document.addEventListener(`keydown`,c),()=>document.removeEventListener(`keydown`,c)),[c]);let l=r.children&&r.children.length>0;return(0,F.jsx)(`div`,{className:`fixed inset-0 z-50 flex justify-end bg-black/40`,onClick:e=>{e.target===e.currentTarget&&n()},children:(0,F.jsx)(`div`,{className:`w-[600px] max-w-full h-full bg-surface overflow-y-auto shadow-[-8px_0_32px_rgba(25,28,30,0.1)]`,children:(0,F.jsxs)(`div`,{className:`p-8`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:n,className:`font-mono text-[0.8125rem] text-on-surface-variant bg-surface-low border border-surface-high rounded-md px-3 py-1 cursor-pointer hover:text-on-surface`,children:`ESC · Close`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{n(),s(`/session/${encodeURIComponent(r.id)}`)},className:`font-mono text-[0.8125rem] text-primary bg-primary/5 border border-primary/20 rounded-md px-3 py-1 cursor-pointer hover:bg-primary/10 transition-colors`,children:`View full session →`})]}),(0,F.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface mb-2`,children:r.title}),(0,F.jsxs)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant mb-4`,children:[pa(r.date),r.source&&` · ${r.source}`,r.context&&` · ${r.context}`]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 mb-5`,children:[(0,F.jsx)(ga,{label:`Active Time`,value:da(r.durationMinutes),primary:!0,children:l&&(0,F.jsx)(_a,{you:da(Math.max(0,r.durationMinutes-r.children.reduce((e,t)=>e+t.durationMinutes,0))),agent:da(r.children.reduce((e,t)=>e+t.durationMinutes,0))})}),(0,F.jsx)(ga,{label:`Turns`,value:r.turns,children:l&&(0,F.jsx)(_a,{you:`Human`,agent:`${r.childCount??r.children.length} agents`})}),(0,F.jsx)(ga,{label:`Files`,value:r.filesChanged?.length===1&&r.filesChanged[0]?.path===`(aggregate)`?`—`:r.filesChanged?.length??`—`}),(0,F.jsx)(ga,{label:`Lines changed`,value:fa(r.linesOfCode),children:l&&(0,F.jsx)(_a,{you:fa(Math.max(0,r.linesOfCode-r.children.reduce((e,t)=>e+t.linesOfCode,0))),agent:fa(r.children.reduce((e,t)=>e+t.linesOfCode,0))})})]}),r.developerTake&&(0,F.jsx)(`p`,{className:`text-[0.9375rem] leading-relaxed text-on-surface border-l-[3px] border-primary pl-3 mb-5`,children:r.developerTake}),r.skills&&r.skills.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mb-5`,children:r.skills.map(e=>(0,F.jsx)(I,{variant:`violet`,children:e},e))}),r.turns>=50&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsxs)(ha,{children:[`Session Activity · `,r.turns,` turns over `,da(r.durationMinutes)]}),(0,F.jsx)(Ei,{sessions:[r],maxHeight:200})]}),a&&(0,F.jsx)(`p`,{className:`text-sm text-on-surface-variant mb-4`,children:`Loading full session data...`}),r.executionPath&&r.executionPath.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(ha,{children:`Execution Path`}),r.executionPath.map(e=>(0,F.jsxs)(`div`,{className:`flex gap-3 items-start py-2.5 border-b border-ghost last:border-b-0`,children:[(0,F.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-primary text-white font-mono text-[0.625rem] font-bold flex items-center justify-center flex-shrink-0`,children:e.stepNumber}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-0.5`,children:e.title}),(0,F.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.description})]})]},e.stepNumber))]}),r.toolBreakdown&&r.toolBreakdown.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(ha,{children:`Tool Usage`}),r.toolBreakdown.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,F.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.tool}),(0,F.jsx)(`span`,{className:`text-on-surface-variant flex-shrink-0 ml-3`,children:e.count})]},e.tool))]}),r.filesChanged&&r.filesChanged.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(ha,{children:`Top Files`}),r.filesChanged.slice(0,10).map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between items-center py-1.5 border-b border-ghost last:border-b-0 font-mono text-xs`,children:[(0,F.jsx)(`span`,{className:`text-on-surface truncate min-w-0`,children:e.path}),(0,F.jsxs)(`span`,{className:`flex-shrink-0 ml-2 whitespace-nowrap`,children:[(0,F.jsxs)(`span`,{className:`text-green-600 font-semibold`,children:[`+`,e.additions]}),(0,F.jsxs)(`span`,{className:`text-red-600 font-semibold ml-1`,children:[`-`,e.deletions]})]})]},e.path))]}),r.qaPairs&&r.qaPairs.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(ha,{children:`Questions & Answers`}),r.qaPairs.map((e,t)=>(0,F.jsxs)(`div`,{className:`py-3 border-b border-ghost last:border-b-0`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-[0.9375rem] text-on-surface mb-2`,children:e.question}),(0,F.jsx)(`div`,{className:`text-sm text-on-surface-variant leading-relaxed`,children:e.answer})]},t))]})]})})})}function ha({children:e}){return(0,F.jsx)(`div`,{className:`font-mono text-[0.625rem] font-semibold uppercase tracking-wider text-on-surface-variant mb-2.5`,children:e})}function ga({label:e,value:t,primary:n,children:r}){return(0,F.jsxs)(`div`,{className:`text-center p-3 border border-ghost rounded-sm bg-surface-lowest`,children:[(0,F.jsx)(`div`,{className:`font-mono text-xl font-bold ${n?`text-primary`:`text-on-surface`}`,children:t}),(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mt-1`,children:e}),r]})}function _a({you:e,agent:t}){return(0,F.jsxs)(`div`,{className:`flex justify-center gap-2 mt-1 font-mono text-[9px] text-on-surface-variant`,children:[(0,F.jsx)(`span`,{className:`text-primary font-semibold`,children:e}),(0,F.jsx)(`span`,{className:`text-green font-semibold`,children:t})]})}function va(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function ya(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function ba(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}k`:String(e)}function xa(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Sa(e){let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/36e5);return n<1?`just now`:n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}var Ca=[`bg-primary`,`bg-green`,`bg-violet`];function wa({narrative:e,screenshotSrc:t,projectName:n,humanTime:r,agentTime:i,stats:a}){let o=i?parseFloat(i)/parseFloat(r):void 0,s=o&&o>1?`${o.toFixed(1)}x`:void 0;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 mb-4`,children:[t&&(0,F.jsxs)(`div`,{className:`rounded-md border border-ghost overflow-hidden shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-2 bg-surface-low border-b border-ghost`,children:[(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#ff5f57]`}),(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#febc2e]`}),(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-[#28c840]`})]}),(0,F.jsx)(`div`,{className:`max-h-96 overflow-y-auto`,children:(0,F.jsx)(`img`,{src:t,alt:`${n} screenshot`,className:`w-full h-auto`})})]}),e&&(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Narrative summary`,meta:`editable`}),(0,F.jsx)(`p`,{className:`leading-relaxed text-on-surface border-l-[3px] border-primary pl-3`,style:{fontSize:`clamp(0.8125rem, 1.2vw, 1rem)`},children:e})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-3`,children:[(0,F.jsxs)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md p-4 flex flex-col justify-between`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mb-1`,children:i?`Human / Agents`:`Time`}),(0,F.jsx)(`div`,{className:`font-display font-bold text-on-surface text-2xl`,children:i?`${r} / ${i}`:r})]}),s&&(0,F.jsxs)(`div`,{className:`mt-2 pt-2 border-t border-ghost`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-on-surface-variant mb-0.5`,children:`Efficiency multiplier`}),(0,F.jsx)(`div`,{className:`font-display font-bold text-on-surface text-lg`,children:s})]})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-2 gap-3`,children:a.map(e=>(0,F.jsx)(Nr,{label:e.label,value:e.value},e.label))})]})]})}function Ta(){let{dirName:e}=st(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(!0),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(!1),v=(0,_.useRef)(null),y=(0,_.useRef)(null);(0,_.useEffect)(()=>{e&&(nr(e).then(e=>{n(e),e.enhanceCache?.repoUrl&&c(e.enhanceCache.repoUrl),e.enhanceCache?.projectUrl&&u(e.enhanceCache.projectUrl),e.enhanceCache?.screenshotBase64&&f(e.enhanceCache.screenshotBase64)}).catch(()=>{}).finally(()=>i(!1)),_r(e).then(({url:e})=>{e&&c(t=>t||(e.startsWith(`http`)?e:`https://${e}`))}).catch(()=>{}))},[e]);let b=(0,_.useCallback)(()=>{if(!e||!t)return;let n=t.enhanceCache;gr(e,n?.selectedSessionIds??[],n?.result??{narrative:``,arc:[],skills:[],timeline:[],questions:[]},{repoUrl:s||void 0,projectUrl:l||void 0,screenshotBase64:d??void 0}).then(()=>g(!1)).catch(()=>{})},[e,t,s,l,d]);if((0,_.useEffect)(()=>{if(h)return v.current&&clearTimeout(v.current),v.current=setTimeout(b,800),()=>{v.current&&clearTimeout(v.current)}},[h,b]),r)return(0,F.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading project...`})});if(!t)return(0,F.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-8`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Project not found.`})});let{project:x,sessions:S,enhanceCache:C}=t,w=C??null,T=w?.result?.narrative??x.description,E=w?.result?.arc??[],D=[...new Set(S.map(e=>e.source??`unknown`))],O=w?.screenshotBase64?`data:image/png;base64,${w.screenshotBase64}`:void 0,ee=[],k=new Set;if(w?.result?.timeline)for(let e of w.result.timeline)for(let t of e.sessions)t.featured&&(k.add(t.sessionId),t.tag?ee.push({sessionId:t.sessionId,label:t.tag}):ee.push({sessionId:t.sessionId,label:t.title.slice(0,18)}));let A=(()=>{let e=S.filter(e=>k.has(e.id));if(e.length>=6)return e.slice(0,6);let t=S.filter(e=>e.status===`enhanced`||e.status===`uploaded`),n=S.filter(e=>e.status===`draft`&&!k.has(e.id)),r=[...e,...t.filter(e=>!k.has(e.id)).sort((e,t)=>t.linesOfCode-e.linesOfCode),...n],i=new Set;return r.filter(e=>i.has(e.id)?!1:(i.add(e.id),!0)).slice(0,6)})();return(0,F.jsxs)(`div`,{className:`grid grid-cols-[240px_1fr] min-h-[calc(100vh-48px)]`,children:[(0,F.jsxs)(`aside`,{className:`border-r border-ghost bg-surface-low p-4`,children:[(0,F.jsxs)(`div`,{className:`mb-4`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:`Source mix`}),(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:D.map(e=>(0,F.jsx)(I,{children:e},e))})]}),(0,F.jsxs)(`div`,{className:`mb-4`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:`Status`}),(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:[(0,F.jsx)(I,{variant:`primary`,children:x.enhancedAt?`Refined`:`Unrefined`}),(0,F.jsx)(I,{variant:`green`,children:x.isUploaded?`Uploaded`:`Local only`})]})]}),(0,F.jsx)(R,{children:`The local project page is the main object. Public pages are just one projection of it.`}),(0,F.jsxs)(`div`,{className:`mt-6 pt-4 border-t border-ghost`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-3`,children:`Project links`}),(0,F.jsxs)(`label`,{className:`block mb-3`,children:[(0,F.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Repo URL`}),(0,F.jsx)(`input`,{type:`url`,value:s,onChange:e=>{c(e.target.value),g(!0)},placeholder:`https://github.com/...`,className:`w-full text-xs font-mono px-2 py-1.5 rounded-sm border border-ghost bg-surface-lowest text-on-surface placeholder:text-outline`})]}),(0,F.jsxs)(`label`,{className:`block mb-3`,children:[(0,F.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Project URL`}),(0,F.jsx)(`input`,{type:`url`,value:l,onChange:e=>{u(e.target.value),g(!0)},placeholder:`https://example.com`,className:`w-full text-xs font-mono px-2 py-1.5 rounded-sm border border-ghost bg-surface-lowest text-on-surface placeholder:text-outline`})]}),(0,F.jsxs)(`div`,{className:`mb-2`,children:[(0,F.jsx)(`span`,{className:`text-[0.75rem] font-medium text-on-surface-variant block mb-1`,children:`Screenshot`}),d?(0,F.jsxs)(`div`,{className:`relative rounded-sm overflow-hidden border border-ghost`,children:[(0,F.jsx)(`img`,{src:d.startsWith(`data:`)?d:`data:image/png;base64,${d}`,alt:`Project screenshot`,className:`w-full h-auto max-h-32 object-cover object-top`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{f(null),g(!0)},className:`absolute top-1 right-1 w-5 h-5 rounded-full bg-black/60 text-white text-[10px] flex items-center justify-center hover:bg-black/80`,children:`×`})]}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>y.current?.click(),className:`text-xs font-mono text-primary hover:underline text-left`,children:`Upload image...`}),l&&(0,F.jsx)(`button`,{type:`button`,onClick:async()=>{if(!e)return;m(!0);let t=x.name.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``);try{let n=await vr(e,t,l);n.ok&&n.preview&&(f(n.preview),g(!0))}catch{}finally{m(!1)}},disabled:p,className:`text-xs font-mono text-primary hover:underline text-left`,children:p?`Capturing...`:`Auto-capture from URL`})]}),(0,F.jsx)(`input`,{ref:y,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{f(n.result),g(!0)},n.readAsDataURL(t)}})]}),h&&(0,F.jsx)(`div`,{className:`text-[9px] font-mono text-outline mt-2`,children:`Saving...`})]})]}),(0,F.jsxs)(`main`,{className:`p-6 overflow-y-auto`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`font-display text-xl font-bold text-on-surface`,children:x.name}),(0,F.jsxs)(`span`,{className:`text-on-surface-variant text-[0.8125rem]`,children:[x.dateRange?typeof x.dateRange==`string`?x.dateRange:`${xa(x.dateRange.start)} – ${xa(x.dateRange.end)}`:``,x.enhancedAt&&` · last refined ${Sa(x.enhancedAt)}`]})]}),(0,F.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,F.jsxs)(I,{variant:`primary`,children:[x.sessionCount,` sessions`]})})]}),(s||l)&&(0,F.jsxs)(`div`,{className:`flex items-center gap-4 mt-1 mb-1`,children:[s&&(0,F.jsxs)(`a`,{href:s,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,F.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`currentColor`,children:(0,F.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z`})}),s.replace(/^https?:\/\/(www\.)?/,``).replace(/\.git$/,``)]}),l&&(0,F.jsxs)(`a`,{href:l,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-xs text-primary hover:underline flex items-center gap-1`,children:[(0,F.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:(0,F.jsx)(`path`,{d:`M6.5 10.5l3-3m-1.5-2a2.5 2.5 0 013.54 3.54l-1.5 1.5m-4.08-1.08a2.5 2.5 0 01-3.54-3.54l1.5-1.5`})}),l.replace(/^https?:\/\/(www\.)?/,``)]})]}),(0,F.jsx)(`div`,{className:`h-4`}),(0,F.jsx)(wa,{narrative:T,screenshotSrc:d?d.startsWith(`data:`)?d:`data:image/png;base64,${d}`:O,projectName:x.name,humanTime:va(x.totalDuration),agentTime:x.totalAgentDuration?va(x.totalAgentDuration):void 0,stats:[{label:`Sessions`,value:x.sessionCount},{label:`Lines changed`,value:ya(x.totalLoc)},{label:`Files`,value:x.totalFiles},...x.totalInputTokens||x.totalOutputTokens?[{label:`Tokens`,value:ba((x.totalInputTokens??0)+(x.totalOutputTokens??0))}]:[]]}),(0,F.jsxs)(L,{className:`mb-4`,children:[(0,F.jsx)(z,{title:`Work timeline`,meta:`sessions over time`}),(0,F.jsx)(Ei,{sessions:S,maxHeight:300})]}),(0,F.jsxs)(L,{className:`mb-4`,children:[(0,F.jsx)(z,{title:`Project growth`,meta:`lines changed`}),(0,F.jsx)(zi,{sessions:S,totalLoc:x.totalLoc,totalFiles:x.totalFiles,keyMoments:ee})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 mb-4`,children:[(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Key decisions`,meta:`signal`}),(0,F.jsx)(`div`,{className:`flex flex-col gap-3`,children:E.length>0?E.slice(0,3).map(e=>(0,F.jsx)(R,{title:e.title,children:e.description},e.phase)):(0,F.jsx)(R,{children:`Enhance this project to extract key decisions.`})})]}),(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Source breakdown`,meta:`provenance`}),(0,F.jsx)(Ea,{sessions:S})]})]}),E.length>0&&(0,F.jsxs)(L,{className:`mb-4`,children:[(0,F.jsx)(z,{title:`Project phases`,meta:`timeline`}),(0,F.jsxs)(`div`,{className:`relative pl-5`,children:[(0,F.jsx)(`div`,{className:`absolute left-1 top-1.5 bottom-1.5 w-0.5 bg-ghost rounded-full`}),E.map(e=>(0,F.jsxs)(`div`,{className:`relative pb-4 last:pb-0`,children:[(0,F.jsx)(`div`,{className:`absolute -left-5 top-1.5 w-2 h-2 rounded-full bg-primary shadow-[0_0_0_3px_rgba(8,68,113,0.1)]`}),(0,F.jsx)(`div`,{className:`font-mono text-[0.6875rem] uppercase tracking-wider text-on-surface-variant`,children:e.title}),(0,F.jsx)(R,{children:(0,F.jsx)(`span`,{className:`text-on-surface-variant`,children:e.description})})]},e.phase))]})]}),(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Featured sessions`,children:(0,F.jsxs)(P,{to:`/project/${encodeURIComponent(e??``)}/sessions`,className:`font-mono text-[11px] text-primary hover:underline`,children:[`All `,S.length,` sessions →`]})}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:A.map((e,t)=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>o(e),className:`text-left bg-surface-lowest border border-ghost rounded-sm p-4 cursor-pointer transition-shadow hover:shadow-md`,children:[(0,F.jsx)(`div`,{className:`h-1 rounded-full mb-3 ${Ca[t%Ca.length]}`}),(0,F.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-1 line-clamp-2`,children:e.title}),(0,F.jsxs)(`span`,{className:`text-on-surface-variant text-xs`,children:[va(e.durationMinutes),` · `,e.turns,` turns · `,ya(e.linesOfCode),` lines`]}),e.skills?.[0]&&(0,F.jsx)(`div`,{className:`mt-2`,children:(0,F.jsx)(I,{variant:`violet`,children:e.skills[0]})})]},e.id))})]})]}),a&&e&&(0,F.jsx)(ma,{session:a,projectDirName:e,onClose:()=>o(null)})]})}function Ea({sessions:e}){let t=e.reduce((e,t)=>(e[t.source??`unknown`]=(e[t.source??`unknown`]??0)+1,e),{});return(0,F.jsxs)(`table`,{className:`w-full border-collapse text-[0.8125rem]`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Source`}),(0,F.jsx)(`th`,{className:`text-left py-2 font-mono text-[9px] uppercase tracking-wider text-outline border-b border-ghost`,children:`Count`})]})}),(0,F.jsx)(`tbody`,{children:Object.entries(t).map(([e,t])=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:e}),(0,F.jsx)(`td`,{className:`py-2 border-b border-ghost`,children:t})]},e))})]})}function Da(){let{dirName:e}=st(),[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(!1);(0,_.useEffect)(()=>{e&&Promise.all([rr(e).catch(()=>null),Yn(e).catch(()=>[])]).then(([e,t])=>{e&&n(e),i(t)}).finally(()=>o(!1))},[e]);let l=r.filter(e=>t?.selectedSessionIds?.includes(e.id)),u=t?.skippedSessions??[];async function d(){if(!(!e||!t)){c(!0);try{await ir(e,t)}catch{}finally{c(!1)}}}return a?(0,F.jsx)(Ar,{back:{label:e??`Project`,to:`/project/${encodeURIComponent(e??``)}`},chips:[{label:`Project boundaries`}],children:(0,F.jsx)(`div`,{className:`p-6`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading boundaries...`})})}):(0,F.jsx)(Ar,{back:{label:e??`Project`,to:`/project/${encodeURIComponent(e??``)}`},chips:[{label:`Project boundaries`}],actions:(0,F.jsx)(`button`,{onClick:d,disabled:s,className:`bg-primary text-on-primary font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm hover:bg-primary-hover transition-colors disabled:opacity-50`,children:s?`Saving...`:`Save boundaries`}),children:(0,F.jsxs)(`div`,{className:`p-6`,children:[(0,F.jsx)(`h2`,{className:`font-display text-xl font-bold text-on-surface`,children:`Shape what this project actually contains`}),(0,F.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`Clustering gets you close. This screen makes it trustworthy.`}),(0,F.jsx)(`div`,{className:`h-4`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Included sessions`,meta:`${l.length} total`}),(0,F.jsx)(`div`,{className:`flex flex-col gap-3`,children:l.length===0?(0,F.jsx)(R,{children:`No sessions included yet.`}):l.map(e=>(0,F.jsx)(R,{title:e.title,children:(0,F.jsxs)(`span`,{className:`font-mono text-xs text-on-surface-variant`,children:[e.source??`unknown`,` · `,e.filesChanged?.length??0,` files · `,e.linesOfCode,` lines`]})},e.id))})]}),(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Nearby / excluded`,meta:`needs review`}),(0,F.jsx)(`div`,{className:`flex flex-col gap-3`,children:u.length===0?(0,F.jsx)(R,{children:`No excluded sessions.`}):u.map(e=>(0,F.jsx)(R,{title:r.find(t=>t.id===e.sessionId)?.title??e.sessionId,children:(0,F.jsxs)(`span`,{className:`font-mono text-xs text-on-surface-variant`,children:[`excluded · `,e.reason]})},e.sessionId))})]})]})]})})}function Oa(e){if(e<60)return`${Math.round(e)}m`;let t=e/60;return t>=10?`${Math.round(t)}h`:`${t.toFixed(1)}h`}function ka(e){return e<1e3?String(e):`${(e/1e3).toFixed(1)}k`}function Aa(e){return e?new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}):``}function ja(e){if(!e)return``;let[t,n]=e.split(`|`);if(!t||!n)return``;let r=new Date(t),i=new Date(n),a=e=>e.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}),o=i.getFullYear();return`${a(r)}\u2013${a(i)}, ${o}`}var Ma=[`overview`,`triage`,`enhance`,`questions`,`timeline`];function Na({current:e}){let t=Ma.indexOf(e);return(0,F.jsx)(`div`,{className:`phase-bar`,children:Ma.slice(0,-1).map((e,n)=>(0,F.jsx)(`div`,{className:`phase-bar__segment ${n<=t?`phase-bar__segment--active`:``}`},n))})}function Pa({project:e,sessions:t,onTriage:n,onCancel:r}){let i=[...t].sort((e,t)=>{let n=e.date?new Date(e.date).getTime():0;return(t.date?new Date(t.date).getTime():0)-n});return(0,F.jsxs)(`div`,{className:`upload-flow`,children:[(0,F.jsx)(`div`,{className:`upload-flow__label`,children:`Upload Project`}),(0,F.jsx)(`h2`,{className:`upload-flow__title`,children:e.name}),(0,F.jsx)(`div`,{className:`upload-flow__date`,children:ja(e.dateRange)}),(0,F.jsxs)(`p`,{className:`upload-flow__desc`,children:[`The AI will scan all `,e.sessionCount,` sessions, pick the ones worth showcasing, and build a project narrative. Small or trivial sessions are skipped automatically.`]}),(0,F.jsxs)(`div`,{className:`upload-flow__stat-grid`,children:[(0,F.jsx)(Fa,{label:`Sessions`,value:String(e.sessionCount)}),(0,F.jsx)(Fa,{label:e.totalAgentDuration?`Human / Agents`:`Total Time`,value:e.totalAgentDuration?`${Oa(e.totalDuration)} / ${Oa(e.totalAgentDuration)}`:Oa(e.totalDuration)}),(0,F.jsx)(Fa,{label:`Lines changed`,value:ka(e.totalLoc)}),(0,F.jsx)(Fa,{label:`Files`,value:String(e.totalFiles)})]}),(0,F.jsxs)(`div`,{className:`upload-flow__section-label`,children:[`All Sessions (`,t.length,`)`]}),(0,F.jsxs)(`div`,{className:`session-table`,children:[(0,F.jsxs)(`div`,{className:`session-table__header`,children:[(0,F.jsx)(`span`,{children:`Session`}),(0,F.jsx)(`span`,{style:{textAlign:`right`},children:`Date`}),(0,F.jsx)(`span`,{style:{textAlign:`right`},children:`Time`}),(0,F.jsx)(`span`,{style:{textAlign:`right`},children:`LOC`}),(0,F.jsx)(`span`,{style:{textAlign:`right`},children:`Turns`})]}),(0,F.jsx)(`div`,{className:`session-table__body`,children:i.map(e=>(0,F.jsxs)(`div`,{className:`session-table__row`,children:[(0,F.jsx)(`span`,{className:`session-table__name`,children:e.title}),(0,F.jsx)(`span`,{className:`session-table__cell`,children:Aa(e.date)}),(0,F.jsx)(`span`,{className:`session-table__cell`,children:Oa(e.durationMinutes)}),(0,F.jsx)(`span`,{className:`session-table__cell`,children:ka(e.linesOfCode)}),(0,F.jsx)(`span`,{className:`session-table__cell`,children:e.turns})]},e.id))})]}),(0,F.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:r,children:`Cancel`}),(0,F.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:n,children:[e.sessionCount<5?`Enhance all ${e.sessionCount} sessions`:`Let AI pick sessions`,` →`]})]})]})}function Fa({label:e,value:t}){return(0,F.jsxs)(`div`,{className:`stat-card`,children:[(0,F.jsx)(`div`,{className:`stat-card__label`,children:e}),(0,F.jsx)(`div`,{className:`stat-card__value`,children:t})]})}var Ia=[`◐`,`◑`,`◒`,`◓`];function La(){let[e,t]=(0,_.useState)(0);return(0,_.useEffect)(()=>{let e=setInterval(()=>t(e=>(e+1)%Ia.length),120);return()=>clearInterval(e)},[]),Ia[e]}function Ra(e,t){let n=[{id:`prompt`,text:`$ heyiam triage`,variant:`prompt`}],r=0,i=0,a=0,o=!1,s=!1,c=!1;for(let l of e)switch(l.type){case`scanning`:r=l.total,n.push({id:`scanning`,text:` Loading session stats... (${l.total} sessions)`,variant:`active`});break;case`loading_stats`:l.index;break;case`hard_floor`:{if(!o){let e=n.findIndex(e=>e.id===`scanning`);e!==-1&&(n[e]={id:`scanning-done`,text:` \u2713 Loaded ${r} sessions`,variant:`passed`}),n.push({id:`hf-header`,text:``,variant:`default`}),n.push({id:`hf-section`,text:` ── Hard floor filter ──`,variant:`section`}),o=!0}let e=l.sessionId.slice(0,8);l.passed?(i++,n.push({id:`hf-${l.sessionId}`,text:` \u2713 ${l.title||e} \u2192 passed`,variant:`passed`})):(a++,n.push({id:`hf-${l.sessionId}`,text:` \u2717 ${l.title||e} \u2192 skipped${l.reason?` (${l.reason})`:``}`,variant:`skipped`}));break}case`extracting_signals`:{s||=(o&&n.push({id:`hf-summary`,text:` \u2713 ${i} passed, ${a} filtered`,variant:`passed`}),n.push({id:`sig-header`,text:``,variant:`default`}),n.push({id:`sig-section`,text:` ── Signal extraction ──`,variant:`section`}),!0);let e=l.sessionId.slice(0,8);n.push({id:`sig-${l.sessionId}`,text:` ${t} Scanning ${l.title||e}...`,variant:`active`});break}case`signals_done`:{let e=n.findIndex(e=>e.id===`sig-${l.sessionId}`);if(e!==-1){let t=l.sessionId.slice(0,8);n[e]={id:`sig-done-${l.sessionId}`,text:` \u2713 ${t}: signals extracted`,variant:`passed`}}break}case`llm_ranking`:c||=(n.push({id:`rank-header`,text:``,variant:`default`}),n.push({id:`rank-section`,text:` ── AI ranking ──`,variant:`section`}),!0),n.push({id:`llm-ranking`,text:` ${t} Sending ${l.sessionCount} sessions to AI...`,variant:`active`});break;case`scoring_fallback`:c||=(n.push({id:`rank-header`,text:``,variant:`default`}),n.push({id:`rank-section`,text:` ── Scoring ──`,variant:`section`}),!0),n.push({id:`scoring-fallback`,text:` ${t} Scoring ${l.sessionCount} sessions...`,variant:`active`});break;case`done`:let e=n.findIndex(e=>e.id===`llm-ranking`||e.id===`scoring-fallback`);e!==-1&&(n[e]={id:`rank-done`,text:` \u2713 AI selected ${l.selected} sessions`,variant:`passed`});break;case`result`:break}return n}function za({events:e,dirName:t}){let n=La(),r=(0,_.useRef)(null),i=Ra(e,n);return(0,_.useEffect)(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},[i.length]),(0,F.jsx)(`div`,{className:`triage-terminal`,role:`log`,"aria-live":`polite`,"aria-label":`Triage progress`,children:(0,F.jsx)(`div`,{className:`triage-terminal__feed`,ref:r,children:i.map(e=>(0,F.jsx)(`div`,{className:`triage-terminal__line${e.variant===`prompt`?` triage-terminal__prompt`:e.variant===`section`?` triage-terminal__section`:e.variant===`passed`?` triage-terminal__line--passed`:e.variant===`skipped`?` triage-terminal__line--skipped`:e.variant===`active`?` triage-terminal__line--active`:``}`,children:e.text},e.id))})})}function Ba({sessionId:e,title:t,stats:n,reason:r,variant:i,checked:a,onToggle:o,dimTitle:s,previouslyUploaded:c}){let[l,u]=(0,_.useState)(!1),d=r.length>(i===`selected`?60:40),f=i===`selected`?r.length>60?r.slice(0,57)+`...`:r:r.length>40?r.slice(0,37)+`...`:r;return(0,F.jsxs)(`div`,{className:`triage-item ${a?`triage-item--selected`:`triage-item--skipped`}`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:a,onChange:o,className:`triage-item__checkbox`}),(0,F.jsxs)(`div`,{className:`triage-item__info`,children:[(0,F.jsxs)(`div`,{className:`triage-item__name`,style:s?{color:`var(--on-surface-variant)`}:void 0,children:[t,c&&(0,F.jsx)(`span`,{className:`triage-item__uploaded-badge`,children:`previously uploaded`})]}),(0,F.jsx)(`div`,{className:`triage-item__stats`,children:n})]}),(0,F.jsx)(`div`,{className:`triage-item__reason triage-item__reason--${i} ${d?`triage-item__reason--expandable`:``}`,onClick:d?()=>u(!l):void 0,role:d?`button`:void 0,tabIndex:d?0:void 0,onKeyDown:d?e=>{e.key===`Enter`&&u(!l)}:void 0,children:l?r:f})]})}function Va({project:e,sessions:t,triageResult:n,selectedIds:r,onToggle:i,onEnhance:a,onBack:o,uploadedSessionIds:s}){let c=new Map(t.map(e=>[e.id,e])),l=r.size,u=t.length-l;return(0,F.jsxs)(`div`,{className:`upload-flow`,children:[(0,F.jsx)(Na,{current:`triage`}),(0,F.jsxs)(`div`,{className:`upload-flow__scan-status`,children:[`✓ Scanned `,t.length,` sessions · `,Oa(e.totalDuration),` · `,ka(e.totalLoc),` lines`]}),(0,F.jsxs)(`h2`,{className:`upload-flow__title`,children:[`AI selected `,l,` sessions to showcase`]}),(0,F.jsxs)(`p`,{className:`upload-flow__desc`,children:[`Skipped `,u,` sessions that were too small, purely mechanical, or redundant. You can override any selection.`]}),n.triageMethod===`scoring`&&(0,F.jsxs)(`div`,{className:`triage-method-banner`,children:[(0,F.jsx)(`span`,{className:`triage-method-banner__icon`,"aria-hidden":`true`,children:`ⓘ`}),(0,F.jsx)(`span`,{children:`Sessions selected by signal analysis (no API key configured). `}),(0,F.jsx)(`a`,{href:`/settings`,className:`triage-method-banner__link`,children:`Go to Settings`})]}),(0,F.jsxs)(`div`,{className:`upload-flow__section-label upload-flow__section-label--selected`,children:[`✓ Selected for showcase (`,l,`)`]}),(0,F.jsx)(`div`,{className:`triage-list`,children:n.selected.map(e=>{let t=c.get(e.sessionId),n=r.has(e.sessionId);return(0,F.jsx)(Ba,{sessionId:e.sessionId,title:t?.title??e.sessionId,stats:t?`${Oa(t.durationMinutes)} \u00b7 ${ka(t.linesOfCode)} lines \u00b7 ${t.turns} turns`:``,reason:e.reason,variant:`selected`,checked:n,onToggle:()=>i(e.sessionId),previouslyUploaded:s?.has(e.sessionId)},e.sessionId)})}),(0,F.jsxs)(`details`,{className:`triage-skipped`,children:[(0,F.jsxs)(`summary`,{className:`triage-skipped__summary`,children:[(0,F.jsx)(`span`,{children:`▶`}),` Skipped (`,n.skipped.length,`) — click to override`]}),(0,F.jsx)(`div`,{className:`triage-list`,style:{marginTop:`var(--spacing-3)`},children:n.skipped.map(e=>{let t=c.get(e.sessionId),n=r.has(e.sessionId);return(0,F.jsx)(Ba,{sessionId:e.sessionId,title:t?.title??e.sessionId,stats:t?`${Oa(t.durationMinutes)} \u00b7 ${ka(t.linesOfCode)} lines \u00b7 ${t.turns} turns`:``,reason:e.reason,variant:`skipped`,checked:n,onToggle:()=>i(e.sessionId),dimTitle:!n,previouslyUploaded:s?.has(e.sessionId)},e.sessionId)})})]}),(0,F.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:o,children:`Back`}),(0,F.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:a,disabled:l===0,children:`Enhance project →`})]})]})}function Ha({project:e,sessions:t,selectedIds:n,triageResult:r,onComplete:i,onBack:a}){let o=new Map(t.map(e=>[e.id,e])),[s,c]=(0,_.useState)(()=>{let e=r.selected.filter(e=>n.has(e.sessionId)),t=r.skipped.filter(e=>n.has(e.sessionId));return[...e,...t].map(e=>({sessionId:e.sessionId,title:o.get(e.sessionId)?.title??e.sessionId,status:`pending`}))}),[l,u]=(0,_.useState)(`waiting`),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)([]),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(!1),w=(0,_.useRef)(null),T=(0,_.useRef)(null),E=(0,_.useCallback)(t=>{if(!e.dirName)return;t&&(x(null),f(null),u(`waiting`),g(``),m([]),y(null),c(e=>e.map(e=>({...e,status:`pending`}))));let i=r.skipped.filter(e=>!n.has(e.sessionId)).map(e=>{let t=o.get(e.sessionId);return{title:t?.title??e.sessionId,duration:t?.durationMinutes??0,loc:t?.linesOfCode??0}}),a=or(e.dirName,Array.from(n),i,e=>{switch(e.type){case`session_progress`:c(t=>t.map(t=>t.sessionId===e.sessionId?{...t,status:e.status,title:e.title||t.title,detail:e.detail}:t)),(e.status===`done`||e.status===`skipped`)&&e.skills&&m(t=>{let n=new Set(t);for(let t of e.skills)n.add(t);return[...n]});break;case`project_enhance`:u(`generating`);break;case`narrative_chunk`:g(t=>t+e.text);break;case`cached`:x(e.enhancedAt),c(e=>e.map(e=>({...e,status:`done`}))),u(`done`);break;case`done`:u(`done`),f(e.result);break;case`error`:y(e.message);break}},t);return w.current=a,a},[e.dirName,n,r,o]);(0,_.useEffect)(()=>{let e=E(S);return()=>e?.abort()},[S]);let D=s.filter(e=>e.status!==`pending`).length;(0,_.useEffect)(()=>{if(!T.current||D===0)return;let e=T.current.querySelectorAll(`.enhance-feed-item:not(.enhance-feed-item--pending)`),t=e[e.length-1];t&&t.scrollIntoView({block:`nearest`,behavior:`smooth`})},[D]);let O=d!==null,ee=d?.skills??p,k=s.filter(e=>e.status===`failed`),A=s.filter(e=>e.status===`done`||e.status===`skipped`),te=s.every(e=>e.status!==`pending`&&e.status!==`enhancing`),ne=k.length>0,re=A.length>0,ie=(0,_.useCallback)(()=>{c(e=>e.map(e=>e.status===`failed`?{...e,status:`pending`,detail:void 0}:e)),y(null),w.current?.abort(),C(e=>!e)},[]),j=(0,_.useCallback)(()=>{i({narrative:``,arc:[],skills:p,timeline:[],questions:[]})},[p,i]);return(0,F.jsxs)(`div`,{className:`enhance-split`,children:[(0,F.jsxs)(`div`,{className:`enhance-split__left`,children:[(0,F.jsx)(`div`,{className:`enhance-split__left-header`,children:`Session Processing`}),(0,F.jsx)(`div`,{className:`enhance-split__feed`,ref:T,children:s.map(e=>(0,F.jsxs)(`div`,{className:`enhance-feed-item ${e.status===`pending`?`enhance-feed-item--pending`:``} ${e.status===`failed`?`enhance-feed-item--failed`:``}`,children:[(0,F.jsxs)(`div`,{className:`enhance-feed-item__row`,children:[e.status===`done`||e.status===`skipped`?(0,F.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}):e.status===`failed`?(0,F.jsx)(`span`,{className:`enhance-feed-item__fail`,children:`✗`}):e.status===`enhancing`?(0,F.jsx)(`span`,{className:`enhance-feed-item__spinner`}):(0,F.jsx)(`span`,{className:`enhance-feed-item__circle`,children:`◯`}),(0,F.jsx)(`span`,{className:`enhance-feed-item__title ${e.status===`enhancing`?`enhance-feed-item__title--active`:``} ${e.status===`failed`?`enhance-feed-item__title--failed`:``}`,children:e.title})]}),e.detail&&e.status!==`pending`&&(0,F.jsx)(`div`,{className:`enhance-feed-item__detail ${e.status===`failed`?`enhance-feed-item__detail--failed`:``}`,children:e.detail})]},e.sessionId))}),(0,F.jsxs)(`div`,{className:`enhance-split__narrative-box`,children:[(0,F.jsx)(`div`,{className:`enhance-split__narrative-label`,children:`PROJECT NARRATIVE`}),(0,F.jsx)(`div`,{className:`enhance-split__narrative-status`,children:b&&l===`done`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}),(0,F.jsxs)(`span`,{children:[`Loaded from cache (`,new Date(b).toLocaleDateString(),`)`]})]}):l===`done`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`enhance-feed-item__check`,children:`✓`}),(0,F.jsx)(`span`,{children:`Project story complete`})]}):l===`generating`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`enhance-split__blink-dot`}),(0,F.jsxs)(`span`,{children:[`Building project story from `,n.size,` sessions...`]})]}):(0,F.jsx)(`span`,{children:`Waiting for session processing...`})})]})]}),(0,F.jsxs)(`div`,{className:`enhance-split__right`,children:[(0,F.jsx)(Na,{current:`enhance`}),v?(0,F.jsxs)(`div`,{className:`enhance-error`,style:{marginTop:`var(--spacing-4)`},children:[(0,F.jsx)(`div`,{className:`enhance-error__message`,children:v}),(0,F.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:a,children:`Back`}),(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:ie,children:`Retry`}),re&&(0,F.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:j,children:`Continue without narrative`})]})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`upload-flow__label`,children:`Project Story`}),(0,F.jsx)(`h2`,{className:`upload-flow__title`,children:e.name}),!h&&!d?.narrative&&(0,F.jsxs)(`div`,{className:`enhance-split__narrative-placeholder`,children:[(0,F.jsx)(`span`,{className:`enhance-split__blink-dot`}),(0,F.jsx)(`span`,{children:l===`generating`?`Writing project narrative...`:`Analyzing sessions — narrative will appear here...`})]}),(h||d?.narrative)&&(0,F.jsxs)(`div`,{className:`enhance-split__narrative-text`,children:[d?.narrative??h,l===`generating`&&(0,F.jsx)(`span`,{className:`typewriter-cursor`,"aria-hidden":`true`})]}),ee.length>0&&(0,F.jsx)(`div`,{className:`enhance-split__skills`,children:ee.map(e=>(0,F.jsx)(`span`,{className:`chip`,children:e},e))}),d?.arc&&d.arc.length>0&&(()=>{let e=d.arc;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`upload-flow__section-label`,style:{marginTop:`var(--spacing-6)`},children:`Project Arc`}),(0,F.jsx)(`div`,{className:`enhance-split__arc`,children:e.map((t,n)=>(0,F.jsxs)(`div`,{className:`enhance-split__arc-item ${!O&&n===e.length-1?`enhance-split__arc-item--generating`:``}`,children:[(0,F.jsx)(`div`,{className:`enhance-split__arc-num`,children:String(t.phase).padStart(2,`0`)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`enhance-split__arc-title`,children:t.title}),(0,F.jsx)(`div`,{className:`enhance-split__arc-desc`,children:t.description})]})]},n))})]})})(),te&&ne&&!O&&(0,F.jsxs)(`div`,{className:`enhance-split__failure-recovery`,children:[(0,F.jsxs)(`p`,{className:`enhance-split__failure-text`,children:[k.length,` session`,k.length===1?``:`s`,` failed to enhance.`]}),(0,F.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:ie,children:`Retry failed`}),re&&(0,F.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:j,children:[`Continue with `,A.length,` successful →`]})]})]}),O&&(0,F.jsxs)(`div`,{className:`upload-flow__actions`,children:[b&&(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:()=>{w.current?.abort(),C(!0)},children:`Re-enhance`}),(0,F.jsxs)(`button`,{className:`btn btn--primary btn--large`,onClick:()=>i(d),children:[d.questions.length>0?`Answer a few questions`:`Continue`,` →`]})]})]})]})]})}var Ua={pattern:`Pattern detected`,architecture:`Architecture`,evolution:`Evolution`};function Wa({enhanceResult:e,onSkip:t,onWeave:n}){let[r,i]=(0,_.useState)(new Map),[a,o]=(0,_.useState)(!1),s=(0,_.useCallback)((e,t)=>{i(n=>{let r=new Map(n);return r.set(e,t),r})},[]),c=Array.from(r.values()).some(e=>e.trim().length>0),l=(0,_.useCallback)(()=>{let t=e.questions.filter(e=>(r.get(e.id)??``).trim().length>0).map(e=>({questionId:e.id,question:e.question,answer:r.get(e.id).trim()}));o(!0),n(t)},[r,e.questions,n]);return(0,F.jsxs)(`div`,{className:`upload-flow`,children:[(0,F.jsx)(Na,{current:`questions`}),(0,F.jsxs)(`div`,{className:`upload-flow__scan-status`,children:[`✓ `,e.timeline.reduce((e,t)=>e+t.sessions.length,0),` sessions enhanced · Project narrative generated`]}),(0,F.jsx)(`h2`,{className:`upload-flow__title`,children:`A few things we noticed`}),(0,F.jsx)(`p`,{className:`upload-flow__desc`,children:`Your answers get woven into the narrative. Skip any you don't want to answer.`}),(0,F.jsx)(`div`,{className:`questions-list`,children:e.questions.map(e=>(0,F.jsxs)(`div`,{className:`question-card`,children:[(0,F.jsx)(`div`,{className:`question-card__tag-row`,children:(0,F.jsx)(`span`,{className:`question-card__tag question-card__tag--${e.category}`,children:Ua[e.category]??e.category})}),(0,F.jsx)(`div`,{className:`question-card__text`,children:e.question}),(0,F.jsx)(`textarea`,{className:`question-card__textarea`,value:r.get(e.id)??``,onChange:t=>s(e.id,t.target.value),placeholder:e.context||``,rows:3})]},e.id))}),(0,F.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:t,disabled:a,children:`Skip questions`}),(0,F.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:l,disabled:!c||a,children:a?`Weaving...`:`Weave into narrative →`})]})]})}function Ga({project:e,timeline:t,onBack:n,onViewProject:r}){let i=t.reduce((e,t)=>e+t.sessions.length,0);return(0,F.jsxs)(`div`,{className:`upload-flow`,children:[(0,F.jsx)(Na,{current:`timeline`}),(0,F.jsx)(`div`,{className:`upload-flow__label`,children:`Project Timeline`}),(0,F.jsxs)(`h2`,{className:`upload-flow__title`,children:[e.name,` `,(0,F.jsxs)(`span`,{style:{fontWeight:400,fontSize:`1rem`,color:`var(--on-surface-variant)`},children:[i,` sessions`]})]}),(0,F.jsx)(`p`,{className:`upload-flow__desc`,children:e.description}),(0,F.jsxs)(`div`,{className:`timeline`,children:[(0,F.jsx)(`div`,{className:`timeline__line`}),t.map((e,t)=>{let n=e.sessions.filter(e=>e.featured),r=e.sessions.filter(e=>!e.featured);return(0,F.jsxs)(`div`,{className:`timeline__period`,children:[(0,F.jsxs)(`div`,{className:`timeline__period-header`,children:[(0,F.jsx)(`span`,{className:`timeline__period-date`,children:e.period}),(0,F.jsx)(`span`,{className:`timeline__period-sep`,children:`—`}),(0,F.jsx)(`span`,{className:`timeline__period-label`,children:e.label})]}),n.map(e=>(0,F.jsxs)(`div`,{className:`timeline__featured`,children:[(0,F.jsx)(`div`,{className:`timeline__dot--large`}),(0,F.jsxs)(`div`,{className:`timeline__card`,children:[(0,F.jsxs)(`div`,{className:`timeline__card-header`,children:[(0,F.jsx)(`span`,{className:`timeline__card-title`,children:e.title}),e.tag&&(0,F.jsx)(`span`,{className:`timeline__card-tag`,children:e.tag})]}),(0,F.jsxs)(`div`,{className:`timeline__card-meta`,children:[(0,F.jsx)(`span`,{children:Oa(e.duration)}),e.date&&(0,F.jsx)(`span`,{children:Aa(e.date)})]}),e.description&&(0,F.jsx)(`p`,{className:`timeline__card-desc`,children:e.description}),e.skills&&e.skills.length>0&&(0,F.jsx)(`div`,{className:`timeline__card-skills`,children:e.skills.map(e=>(0,F.jsx)(`span`,{className:`chip`,children:e},e))})]})]},e.sessionId)),r.length>0&&(0,F.jsxs)(`div`,{className:`timeline__collapsed`,children:[(0,F.jsx)(`div`,{className:`timeline__dot--small`}),(0,F.jsx)(Ka,{sessions:r})]})]},t)})]}),(0,F.jsxs)(`div`,{className:`upload-flow__actions`,children:[(0,F.jsx)(`button`,{className:`btn btn--secondary btn--large`,onClick:n,children:`Back`}),(0,F.jsx)(`button`,{className:`btn btn--primary btn--large`,onClick:r,children:`View updated project →`})]})]})}function Ka({sessions:e}){let t=e.map(e=>e.title.toLowerCase()).join(`, `),n=e.filter(e=>e.date).map(e=>e.date).sort(),r=n.length>=2?`${Aa(n[0])} \u2013 ${Aa(n[n.length-1])}`:n.length===1?Aa(n[0]):``;return(0,F.jsxs)(`span`,{className:`timeline__collapsed-text`,children:[e.length,` smaller session`,e.length===1?``:`s`,` — `,t,r&&(0,F.jsxs)(F.Fragment,{children:[` · `,r]})]})}var qa=[{period:`Mar 3–7`,label:`Foundation`,sessions:[{sessionId:`placeholder-1`,title:`Project scaffolding & architecture`,description:`Set up the monorepo structure, CI pipeline, and core abstractions.`,duration:145,featured:!0,tag:`KEY DECISION`,skills:[`Architecture`,`CI/CD`],date:`2026-03-03`},{sessionId:`placeholder-2`,title:`Dependency setup`,duration:30,featured:!1,date:`2026-03-04`},{sessionId:`placeholder-3`,title:`Initial config`,duration:15,featured:!1,date:`2026-03-05`}]},{period:`Mar 10–14`,label:`Core Implementation`,sessions:[{sessionId:`placeholder-4`,title:`Data model & API design`,description:`Designed the schema and REST endpoints for the core domain.`,duration:210,featured:!0,skills:[`API Design`,`PostgreSQL`],date:`2026-03-10`},{sessionId:`placeholder-5`,title:`Frontend component library`,description:`Built reusable components following the design system.`,duration:180,featured:!0,skills:[`React`,`CSS`],date:`2026-03-12`}]}];function Ja(){let{dirName:e}=st(),[t,n]=Mn(),r=at(),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(!0);(0,_.useEffect)(()=>{Jn().then(a).catch(()=>{}).finally(()=>s(!1))},[]);let c=i.find(t=>t.dirName===e),[l,u]=(0,_.useState)(`overview`),d=(0,_.useCallback)(e=>{u(e),window.scrollTo(0,0)},[]),[f,p]=(0,_.useState)([]),[m,h]=(0,_.useState)(!0),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(new Set),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)([]),[T,E]=(0,_.useState)(null),D=(0,_.useRef)(null),[O,ee]=(0,_.useState)(null),[k,A]=(0,_.useState)(null);k?.narrative,k?.skills;let te=k?.timeline??[],ne=(0,_.useCallback)(()=>{f.length>0||!e||Yn(e).then(e=>{p(e),h(!1)}).catch(e=>{ee(e.message),h(!1)})},[e,f.length]);(0,_.useEffect)(()=>{[`overview`,`triage`,`enhance`].includes(l)&&ne()},[l,ne]),(0,_.useEffect)(()=>{let i=t.get(`view`)||t.get(`preview`);!e||i!==`1`||(n({},{replace:!0}),r(`/project/${e}`))},[e]);let re=(0,_.useCallback)(()=>{e&&(S(!0),ee(null),w([]),D.current=ar(e,e=>{if(w(t=>[...t,e]),e.type===`error`){ee(e.message),S(!1);return}if(e.type===`result`){let t={selected:e.selected,skipped:e.skipped,autoSelected:e.autoSelected,triageMethod:e.triageMethod};v(t);let n=new Set(t.selected.map(e=>e.sessionId));if(c?.uploadedSessions)for(let e of c.uploadedSessions)n.add(e);b(n),setTimeout(()=>{S(!1),t.autoSelected?(E(`All ${n.size} sessions selected (small project)`),d(`enhance`)):d(`triage`)},1200)}}))},[e]);(0,_.useEffect)(()=>()=>{D.current?.abort()},[]);let ie=(0,_.useCallback)(e=>{A(e),e.questions.length>0?d(`questions`):d(`timeline`)},[]),j=(0,_.useCallback)(()=>{d(`timeline`)},[]),M=(0,_.useCallback)(async t=>{if(!(!e||!k))try{let n=await sr(e,k.narrative,k.timeline,t);A(e=>e&&{...e,narrative:n.narrative,timeline:n.timeline}),d(`timeline`)}catch(e){ee(e.message)}},[e,k]),ae=(0,_.useCallback)(e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return o?(0,F.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},children:(0,F.jsx)(`div`,{className:`dashboard-loading`,children:`Loading project...`})}):c?(0,F.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},children:m&&l===`overview`?(0,F.jsx)(`div`,{className:`dashboard-loading`,children:`Loading sessions...`}):O&&l===`overview`?(0,F.jsx)(`div`,{className:`dashboard-error`,children:O}):l===`overview`?x?(0,F.jsx)(za,{events:C,dirName:e??``}):(0,F.jsx)(Pa,{project:c,sessions:f,onTriage:re,onCancel:()=>r(`/`)}):l===`triage`&&g?(0,F.jsx)(Va,{project:c,sessions:f,triageResult:g,selectedIds:y,onToggle:ae,onEnhance:()=>d(`enhance`),onBack:()=>d(`overview`),uploadedSessionIds:c.uploadedSessions?new Set(c.uploadedSessions):void 0}):l===`enhance`&&g?(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsxs)(`div`,{className:`upload-flow__auto-select-banner`,children:[`✓ `,T]}),(0,F.jsx)(Ha,{project:c,sessions:f,selectedIds:y,triageResult:g,onComplete:ie,onBack:()=>d(`triage`)})]}):l===`questions`&&k?(0,F.jsx)(Wa,{enhanceResult:k,onSkip:j,onWeave:M}):l===`timeline`?(0,F.jsx)(Ga,{project:c,timeline:te.length>0?te.map(e=>({...e,sessions:e.sessions.map(e=>({sessionId:e.sessionId,title:e.title,featured:e.featured,tag:e.tag,duration:f.find(t=>t.id===e.sessionId)?.durationMinutes??0,date:f.find(t=>t.id===e.sessionId)?.date}))})):qa,onBack:()=>k?.questions.length?d(`questions`):d(`enhance`),onViewProject:()=>{e&&k&&gr(e,Array.from(y),k).catch(()=>{}),r(`/project/${e}`)}}):null}):(0,F.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},children:(0,F.jsx)(`div`,{className:`dashboard-error`,children:`Project not found`})})}function Ya(e){let t=e.indexOf(`-Dev-`);if(t!==-1)return e.slice(t+5);let n=e.split(`-`).filter(Boolean);return n.length>0?n[n.length-1]:e}function Xa(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``)}function Za(){let{dirName:e=``}=st(),[t,n]=(0,_.useState)({step:`review`}),[r,i]=(0,_.useState)(null);(0,_.useEffect)(()=>{e&&nr(e).then(i).catch(()=>{})},[e]);let a=(0,_.useCallback)(()=>{n({step:`uploading`,messages:[]});let t=r?.enhanceCache,i=r?.project,a=i?.name??Ya(e);cr(e,{title:a,slug:Xa(a),narrative:t?.result?.narrative??``,repoUrl:t?.repoUrl??``,projectUrl:t?.projectUrl??``,timeline:t?.result?.timeline??[],skills:t?.result?.skills??[],totalSessions:i?.sessionCount??0,totalLoc:i?.totalLoc??0,totalDurationMinutes:i?.totalDuration??0,totalAgentDurationMinutes:i?.totalAgentDuration,totalFilesChanged:i?.totalFiles??0,totalInputTokens:i?.totalInputTokens??0,totalOutputTokens:i?.totalOutputTokens??0,skippedSessions:[],selectedSessionIds:t?.selectedSessionIds??[],screenshotBase64:t?.screenshotBase64??void 0},e=>{switch(e.type){case`project`:n(t=>t.step===`uploading`?{...t,messages:[...t.messages,`Project ${e.status}`]}:t);break;case`session`:n(t=>t.step===`uploading`?{...t,messages:[...t.messages,`Session ${e.sessionId}: ${e.status}`]}:t);break;case`done`:n({step:`done`,projectUrl:e.projectUrl,uploaded:e.uploaded,failed:e.failed});break;case`error`:e.message===`AUTH_REQUIRED`?o():n({step:`error`,message:e.message});break}})},[e,r]),o=(0,_.useCallback)(async()=>{n({step:`auth`,status:`opening`});try{let e=await Sr();window.open(e.verification_uri,`_blank`),n({step:`auth`,status:`waiting`});let t=Date.now(),r=async()=>{try{if((await yr(e.device_code)).authenticated){n({step:`auth`,status:`done`}),setTimeout(()=>a(),500);return}}catch{}Date.now()-t<3e5?setTimeout(r,5e3):n({step:`auth`,status:`error`,error:`Timed out. Try again.`})};setTimeout(r,5e3)}catch{n({step:`auth`,status:`error`,error:`Could not connect. Try again later.`})}},[a]),s=(0,F.jsx)(`button`,{className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:a,disabled:t.step===`uploading`,children:`Send to heyiam.com`});return(0,F.jsx)(Ar,{back:{label:`Project`,to:`/project/${e}`},chips:[{label:`Send to heyiam.com`}],actions:t.step===`review`?s:void 0,children:(0,F.jsxs)(`div`,{className:`p-6`,children:[t.step===`uploading`&&(0,F.jsxs)(L,{className:`max-w-2xl mx-auto`,children:[(0,F.jsx)(z,{title:`Uploading...`,meta:`in progress`}),(0,F.jsxs)(`div`,{className:`space-y-1.5 mt-3`,children:[t.messages.map((e,t)=>(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,F.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),e]},t)),t.messages.length===0&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,F.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Connecting...`]})]})]}),t.step===`done`&&(0,F.jsxs)(L,{className:`max-w-2xl mx-auto`,children:[(0,F.jsx)(z,{title:`Uploaded`,meta:`on heyi.am`}),(0,F.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-green shrink-0`}),(0,F.jsxs)(`span`,{className:`text-sm text-on-surface font-medium`,children:[t.uploaded,` session`,t.uploaded===1?``:`s`,` uploaded`]})]}),(0,F.jsx)(`p`,{className:`text-xs text-on-surface-variant`,children:`Sessions are unlisted by default. Go to the dashboard to publish them.`}),(0,F.jsx)(`a`,{href:t.projectUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors mt-1`,children:`Open dashboard`})]})]}),t.step===`auth`&&(0,F.jsxs)(L,{className:`max-w-2xl mx-auto`,children:[t.status===`opening`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(z,{title:`Opening browser...`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 mt-3 text-sm text-on-surface-variant`,children:[(0,F.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Starting login...`]})]}),t.status===`waiting`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(z,{title:`Log in to heyiam.com`}),(0,F.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-on-surface-variant`,children:[(0,F.jsx)(`span`,{className:`w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin shrink-0`}),`Waiting for you to finish in the browser...`]}),(0,F.jsx)(`p`,{className:`text-xs text-on-surface-variant`,children:`Log in or create an account in the browser window that opened, then come back here.`})]})]}),t.status===`done`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(z,{title:`Logged in`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 mt-3 text-sm text-on-surface`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-green shrink-0`}),`Uploading...`]})]}),t.status===`error`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(z,{title:`Login failed`}),(0,F.jsx)(`p`,{className:`text-error text-sm mt-2`,children:t.error}),(0,F.jsx)(`button`,{className:`mt-3 inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:o,children:`Try again`})]})]}),t.step===`error`&&(0,F.jsxs)(L,{className:`max-w-2xl mx-auto`,children:[(0,F.jsx)(z,{title:`Upload failed`}),(0,F.jsx)(`p`,{className:`text-error text-sm mt-2`,children:t.message}),(0,F.jsx)(`button`,{className:`mt-3 inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:a,children:`Retry`})]}),t.step===`review`&&(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-6`,children:[(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`What gets uploaded`,meta:`review`}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(R,{children:`Project title and narrative summary`}),(0,F.jsx)(R,{children:`Selected sessions and stats`}),(0,F.jsx)(R,{children:`Curated decisions, phases, and rendered templates`})]})]}),(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`What stays local`,meta:`safety`}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(R,{children:`Excluded sessions and private notes`}),(0,F.jsx)(R,{children:`Source audit details and archive metadata`}),(0,F.jsx)(R,{children:`Sensitive flagged terms and personal data`})]}),(0,F.jsx)(`div`,{className:`flex items-center gap-3 mt-4`,children:(0,F.jsx)(`button`,{className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:a,children:`Send to heyiam.com`})})]})]})]})})}function Qa(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!0),[m,h]=(0,_.useState)({localOnly:!0,requireReview:!0,excludeOpenClaw:!1});(0,_.useEffect)(()=>{Promise.all([lr().catch(()=>({hasKey:!1})),dr().catch(()=>({authenticated:!1}))]).then(([e,n])=>{t(e),r(n)}).finally(()=>p(!1))},[]);async function g(){if(i.trim()){l(!0);try{await ur(i.trim()),t({hasKey:!0,keyPrefix:i.trim().slice(0,16)}),a(``)}finally{l(!1)}}}async function v(){l(!0);try{await ur(``),t({hasKey:!1}),a(``),s(!1)}finally{l(!1)}}async function y(){d(!0);try{await Cr(),r({authenticated:!1})}finally{d(!1)}}function b(e){h(t=>({...t,[e]:!t[e]}))}return f||!e||!n?(0,F.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},chips:[{label:`Settings`}],children:(0,F.jsx)(`div`,{className:`max-w-3xl mx-auto p-6`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading settings...`})})}):(0,F.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},chips:[{label:`Settings`}],children:(0,F.jsxs)(`div`,{className:`max-w-3xl mx-auto p-6`,children:[(0,F.jsx)(`h2`,{className:`font-display text-2xl font-bold text-on-surface`,children:`Settings`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 mt-6`,children:[(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`API configuration`,meta:`local only`}),(0,F.jsx)(`label`,{className:`font-mono text-[11px] uppercase tracking-wider text-on-surface-variant block mb-1.5`,children:`Anthropic API Key`}),e.hasKey&&!i?(0,F.jsx)(`input`,{type:o?`text`:`password`,value:e.keyPrefix?`${e.keyPrefix}...`:`••••••••••••`,readOnly:!0,className:`w-full bg-surface-low border border-ghost rounded-md px-3 py-1.5 text-sm font-mono text-on-surface mb-2`}):(0,F.jsx)(`input`,{type:`password`,value:i,onChange:e=>a(e.target.value),placeholder:`sk-ant-api03-...`,className:`w-full bg-surface-low border border-ghost rounded-md px-3 py-1.5 text-sm font-mono text-on-surface mb-2`,onKeyDown:e=>{e.key===`Enter`&&g()}}),(0,F.jsx)(`p`,{className:`text-on-surface-variant text-xs mb-3`,children:`Used for project refinement. Keys stay on your machine.`}),(0,F.jsx)(`div`,{className:`flex items-center gap-2`,children:e.hasKey&&!i?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{className:`text-xs font-medium px-2.5 py-1 rounded-md border border-outline text-on-surface hover:bg-surface-low transition-colors`,onClick:()=>s(!o),children:o?`Hide`:`Show`}),(0,F.jsx)(`button`,{className:`text-xs font-medium px-2.5 py-1 rounded-md text-on-surface-variant hover:text-on-surface transition-colors`,onClick:v,disabled:c,children:`Remove`})]}):i?(0,F.jsx)(`button`,{className:`text-xs font-medium px-2.5 py-1 rounded-md bg-primary text-on-primary hover:bg-primary-hover transition-colors`,onClick:g,disabled:c,children:c?`Saving...`:`Save key`}):null})]}),(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Privacy defaults`,meta:`recommended`}),(0,F.jsxs)(`div`,{className:`space-y-3`,children:[(0,F.jsx)($a,{label:`Mark new projects local only by default`,checked:m.localOnly,onChange:()=>b(`localOnly`)}),(0,F.jsx)($a,{label:`Require review before publish`,checked:m.requireReview,onChange:()=>b(`requireReview`)}),(0,F.jsx)($a,{label:`Exclude personal OpenClaw sessions by default`,checked:m.excludeOpenClaw,onChange:()=>b(`excludeOpenClaw`)})]})]})]}),(0,F.jsx)(`div`,{className:`mt-4`,children:(0,F.jsxs)(L,{children:[(0,F.jsx)(z,{title:`Authentication`,meta:`optional`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full shrink-0 ${n.authenticated?`bg-green`:`bg-outline`}`}),n.authenticated?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:`text-[13px] text-on-surface`,children:[`Connected as `,(0,F.jsxs)(`strong`,{children:[`@`,n.username]})]}),(0,F.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:`Authenticated via device auth. Required for publishing.`}),(0,F.jsx)(`button`,{className:`ml-auto text-xs font-medium px-2.5 py-1 rounded-md text-on-surface-variant hover:text-on-surface transition-colors`,onClick:y,disabled:u,children:u?`Disconnecting...`:`Disconnect`})]}):(0,F.jsx)(`span`,{className:`text-[13px] text-on-surface-variant`,children:`Not connected. Authentication is required for publishing.`})]})]})})]})})}function $a({label:e,checked:t,onChange:n}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsx)(`span`,{className:`text-sm text-on-surface`,children:e}),(0,F.jsx)(`button`,{role:`switch`,"aria-checked":t,onClick:n,className:`relative w-[40px] h-[22px] rounded-full transition-colors ${t?`bg-green`:`bg-surface-high`}`,children:(0,F.jsx)(`span`,{className:`absolute top-[3px] w-4 h-4 rounded-full bg-surface-lowest shadow-sm transition-transform ${t?`left-[21px]`:`left-[3px]`}`})})]})}var eo=[`Claude`,`Cursor`,`Codex`,`Gemini`];function to(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function no(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function ro(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}catch{return e}}function io(){let[e,t]=Mn(),n=at(),r=e.get(`q`)??``,i=e.get(`source`)??``,a=e.get(`project`)??``,o=e.get(`skill`)??``,[s,c]=(0,_.useState)(r),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(0),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(!1),v=i,y=a,b=o,[x,S]=(0,_.useState)([]),[C,w]=(0,_.useState)([]),T=(0,_.useCallback)(async(e,t,n,r)=>{if(!e&&!t&&!n&&!r){u([]),f(0),g(!1);return}m(!0),g(!0);try{let i=await fr(e,{source:t||void 0,project:n||void 0,skill:r||void 0});u(i.results),f(i.total);let a=[...new Set(i.results.map(e=>e.projectName))].sort(),o=[...new Set(i.results.flatMap(e=>e.skills))].sort();S(a),w(o)}catch{u([]),f(0)}finally{m(!1)}},[]);(0,_.useEffect)(()=>{let e=setTimeout(()=>{let e=new URLSearchParams;s&&e.set(`q`,s),v&&e.set(`source`,v),y&&e.set(`project`,y),b&&e.set(`skill`,b),t(e,{replace:!0}),T(s,v,y,b)},300);return()=>clearTimeout(e)},[s,v,y,b,t,T]),(0,_.useEffect)(()=>{(r||i||a||o)&&(c(r),T(r,i,a,o))},[]);function E(n,r){let i=new URLSearchParams(e);i.get(n)===r?i.delete(n):i.set(n,r),t(i,{replace:!0})}return(0,F.jsx)(Ar,{chips:[{label:`Search`}],children:(0,F.jsxs)(`div`,{className:`p-6 max-w-3xl mx-auto`,children:[(0,F.jsx)(kr,{value:s,onChange:c,autoFocus:!0,placeholder:`Search sessions...`}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mt-3`,children:[(0,F.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mr-1`,children:`Source`}),eo.map(e=>(0,F.jsx)(`button`,{onClick:()=>E(`source`,e.toLowerCase()),className:[`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm border transition-colors cursor-pointer`,v===e.toLowerCase()?`bg-primary/10 text-primary border-primary/30`:`bg-surface-low text-on-surface-variant border-ghost hover:border-outline`].join(` `),children:e},e)),x.length>0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline ml-3 mr-1`,children:`Project`}),x.slice(0,5).map(e=>(0,F.jsx)(`button`,{onClick:()=>E(`project`,e),className:[`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm border transition-colors cursor-pointer`,y===e?`bg-primary/10 text-primary border-primary/30`:`bg-surface-low text-on-surface-variant border-ghost hover:border-outline`].join(` `),children:e},e))]}),C.length>0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline ml-3 mr-1`,children:`Skill`}),C.slice(0,5).map(e=>(0,F.jsx)(`button`,{onClick:()=>E(`skill`,e),className:[`font-mono text-[11px] leading-tight py-0.5 px-2 rounded-sm border transition-colors cursor-pointer`,b===e?`bg-violet-bg text-violet border-violet/30`:`bg-surface-low text-on-surface-variant border-ghost hover:border-outline`].join(` `),children:e},e))]})]}),(0,F.jsx)(`div`,{className:`h-4`}),p?(0,F.jsx)(`div`,{className:`text-sm text-on-surface-variant`,children:`Searching...`}):h?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`font-mono text-[11px] text-on-surface-variant mb-3`,children:[d,` result`,d===1?``:`s`,s?` for '${s}'`:``]}),l.length===0?(0,F.jsx)(L,{children:(0,F.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:`No sessions found. Try a different query or adjust filters.`})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:l.map(e=>(0,F.jsx)(`button`,{onClick:()=>n(`/session/${encodeURIComponent(e.sessionId)}${s?`?q=${encodeURIComponent(s)}`:``}`),className:`text-left w-full cursor-pointer`,children:(0,F.jsxs)(L,{hover:!0,children:[(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`h4`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface truncate`,children:e.title}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,F.jsx)(`span`,{className:`text-xs text-on-surface-variant`,children:e.projectName}),(0,F.jsx)(I,{children:e.source}),(0,F.jsx)(`span`,{className:`text-xs text-outline`,children:ro(e.date)})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[0.6875rem] text-outline shrink-0`,children:[(0,F.jsx)(`span`,{children:to(e.durationMinutes)}),(0,F.jsxs)(`span`,{children:[e.turns,` turns`]}),(0,F.jsxs)(`span`,{children:[no(e.linesOfCode),` lines`]})]})]}),e.snippet&&(0,F.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-2 line-clamp-2 font-mono`,children:e.snippet}),e.skills.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:e.skills.map(e=>(0,F.jsx)(I,{variant:`violet`,children:e},e))})]})},e.sessionId))})]}):(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,F.jsxs)(`svg`,{className:`w-12 h-12 text-outline mb-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,F.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,F.jsx)(`p`,{className:`font-display text-sm font-semibold text-on-surface`,children:`Search across all your AI sessions`}),(0,F.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-1`,children:`Full-text search with source, project, and skill filters`})]})]})})}var ao={Read:`📄`,Write:`✏️`,Edit:`✏️`,Bash:`▶`,Grep:`🔍`,Glob:`📂`,Agent:`🤖`,WebSearch:`🌐`,WebFetch:`🌐`};function oo(e){return ao[e]??`⚙`}function so(e){let{toolName:t,input:n}=e;if(!n)return t;switch(t){case`Read`:return n;case`Write`:return n;case`Edit`:return n;case`Bash`:return n.length>80?n.slice(0,77)+`...`:n;case`Grep`:case`Glob`:return n;case`Agent`:return n;default:return n.length>60?n.slice(0,57)+`...`:n}}function co({block:e}){let[t,n]=(0,_.useState)(!1),r=!!e.output,i=e.toolName===`Edit`,a=e.toolName===`Bash`;return(0,F.jsxs)(`div`,{className:`my-1.5 border border-ghost rounded-md bg-surface-lowest overflow-hidden`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-surface-low transition-colors cursor-pointer`,children:[(0,F.jsx)(`span`,{className:`text-xs shrink-0 w-4 text-center`,children:oo(e.toolName)}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] font-semibold text-primary shrink-0`,children:e.toolName}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] text-on-surface-variant truncate flex-1`,children:so(e)}),e.isError&&(0,F.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-error shrink-0`,children:`error`}),(0,F.jsx)(`span`,{className:`text-[10px] text-outline shrink-0 transition-transform`,style:{transform:t?`rotate(90deg)`:`rotate(0deg)`},children:`▸`})]}),t&&(0,F.jsxs)(`div`,{className:`border-t border-ghost`,children:[i&&e.inputData&&(0,F.jsxs)(`div`,{className:`px-3 py-2 border-b border-ghost`,children:[typeof e.inputData.old_string==`string`&&(0,F.jsxs)(`div`,{className:`mb-2`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1`,children:`old`}),(0,F.jsx)(`pre`,{className:`font-mono text-[11px] text-error/80 bg-error/5 rounded px-2 py-1.5 overflow-x-auto whitespace-pre-wrap break-all max-h-40 overflow-y-auto`,children:e.inputData.old_string})]}),typeof e.inputData.new_string==`string`&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1`,children:`new`}),(0,F.jsx)(`pre`,{className:`font-mono text-[11px] text-green/80 bg-green/5 rounded px-2 py-1.5 overflow-x-auto whitespace-pre-wrap break-all max-h-40 overflow-y-auto`,children:e.inputData.new_string})]})]}),a&&e.input&&(0,F.jsx)(`div`,{className:`px-3 py-2 border-b border-ghost bg-[var(--inverse-surface)]`,children:(0,F.jsxs)(`pre`,{className:`font-mono text-[11px] text-[var(--inverse-on-surface)] whitespace-pre-wrap break-all`,children:[`$ `,e.input]})}),r&&(0,F.jsxs)(`div`,{className:`px-3 py-2 max-h-64 overflow-y-auto`,children:[(0,F.jsx)(`pre`,{className:`font-mono text-[11px] whitespace-pre-wrap break-all ${e.isError?`text-error`:`text-on-surface-variant`}`,children:e.output}),e.outputTruncated&&(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mt-2`,children:`output truncated`})]}),!r&&!i&&!a&&(0,F.jsx)(`div`,{className:`px-3 py-2 text-[11px] text-outline italic`,children:`no output`})]})]})}function W({text:e}){let[t,n]=(0,_.useState)(!1),r=e.slice(0,80).replace(/\n/g,` `);return(0,F.jsxs)(`div`,{className:`my-1`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-2 text-left cursor-pointer group`,children:[(0,F.jsx)(`span`,{className:`text-[10px] text-outline transition-transform shrink-0`,style:{transform:t?`rotate(90deg)`:`rotate(0deg)`},children:`▸`}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] text-outline italic group-hover:text-on-surface-variant transition-colors`,children:t?`thinking`:`thinking: ${r}${e.length>80?`...`:``}`})]}),t&&(0,F.jsx)(`div`,{className:`ml-5 mt-1.5 pl-3 border-l-2 border-ghost`,children:(0,F.jsx)(`pre`,{className:`font-mono text-[11px] text-on-surface-variant/70 whitespace-pre-wrap break-words max-h-96 overflow-y-auto`,children:e})})]})}var G=300;function lo({text:e,highlights:t}){let[n,r]=(0,_.useState)(e.length<=G),i=e.length>G,a=(()=>{if(!i)return e.length;let t=e.slice(0,G+50),n=t.lastIndexOf(`. `,G);if(n>G*.6)return n+1;let r=t.lastIndexOf(` `,G);return r>G*.6?r:G})(),o=n?e:e.slice(0,a);if(t){let e=RegExp(`(${go(t)})`,`gi`);return(0,F.jsxs)(`div`,{className:`text-[0.8125rem] leading-relaxed whitespace-pre-wrap break-words`,children:[o.split(e).map((t,n)=>e.test(t)?(0,F.jsx)(`mark`,{className:`bg-amber/30 text-on-surface rounded-sm px-0.5`,children:t},n):(0,F.jsx)(`span`,{children:t},n)),i&&(0,F.jsx)(uo,{expanded:n,onToggle:()=>r(!n)})]})}return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(fo,{text:o}),i&&(0,F.jsx)(uo,{expanded:n,onToggle:()=>r(!n)})]})}function uo({expanded:e,onToggle:t}){return(0,F.jsx)(`button`,{type:`button`,onClick:t,className:`inline-block mt-1 font-mono text-[11px] text-primary hover:underline cursor-pointer`,children:e?`▴ Show less`:`▾ Show more`})}function fo({text:e}){return(0,F.jsx)(`div`,{className:`text-[0.8125rem] leading-relaxed whitespace-pre-wrap break-words`,children:e.split(/(```[\s\S]*?```)/g).map((e,t)=>{if(e.startsWith("```")&&e.endsWith("```")){let n=e.slice(3,-3),r=n.indexOf(`
|
|
21
|
+
`),i=r>0?n.slice(0,r).trim():``,a=r>0?n.slice(r+1):n;return(0,F.jsxs)(`pre`,{className:`my-2 bg-surface-lowest border border-ghost rounded-md px-3 py-2 font-mono text-[11px] overflow-x-auto`,children:[i&&(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-1.5`,children:i}),a]},t)}return(0,F.jsx)(`span`,{children:e.split(/(`[^`]+`)/g).map((e,t)=>e.startsWith("`")&&e.endsWith("`")?(0,F.jsx)(`code`,{className:`bg-surface-low rounded px-1 py-0.5 font-mono text-[11px]`,children:e.slice(1,-1)},t):(0,F.jsx)(`span`,{children:e},t))},t)})})}function po({message:e,searchQuery:t,messageIndex:n,showRoleBadge:r=!0}){let i=e.role===`user`,a=e.blocks.filter(e=>e.type===`tool_call`),o=e.blocks.filter(e=>e.type===`text`),s=e.blocks.filter(e=>e.type===`thinking`),[c,l]=(0,_.useState)(a.length<=3);return(0,F.jsxs)(`div`,{className:`relative`,"data-message-index":n,children:[r&&(0,F.jsx)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:(0,F.jsx)(`span`,{className:`inline-flex items-center font-mono text-[11px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-sm ${i?`bg-primary/10 text-primary`:`bg-green/10 text-green`}`,children:i?`you`:`assistant`})}),(0,F.jsxs)(`div`,{className:`${i?`bg-primary/5 border-l-[3px] border-primary pl-3 py-2 rounded-r-md`:`pl-0.5`}`,children:[s.map((e,n)=>(0,F.jsx)(mo,{block:e,searchQuery:t},`t-${n}`)),o.map((e,n)=>(0,F.jsx)(mo,{block:e,searchQuery:t},`x-${n}`)),a.length>3&&!c?(0,F.jsxs)(`button`,{type:`button`,onClick:()=>l(!0),className:`mt-1.5 flex items-center gap-2 font-mono text-[11px] text-on-surface-variant hover:text-on-surface cursor-pointer transition-colors`,children:[(0,F.jsx)(`span`,{className:`text-[10px] text-outline`,children:`▸`}),(0,F.jsxs)(`span`,{children:[a.length,` tool calls`]}),(0,F.jsxs)(`span`,{className:`text-outline`,children:[`(`,[...new Set(a.map(e=>e.type===`tool_call`?e.toolName:``))].join(`, `),`)`]})]}):a.map((e,n)=>(0,F.jsx)(mo,{block:e,searchQuery:t},`tc-${n}`)),a.length>3&&c&&(0,F.jsxs)(`button`,{type:`button`,onClick:()=>l(!1),className:`mt-1 font-mono text-[10px] text-outline hover:text-on-surface-variant cursor-pointer`,children:[`▾ Collapse `,a.length,` tool calls`]})]})]})}function mo({block:e,searchQuery:t}){switch(e.type){case`text`:return(0,F.jsx)(lo,{text:e.text,highlights:t});case`thinking`:return(0,F.jsx)(W,{text:e.text});case`tool_call`:return(0,F.jsx)(co,{block:e})}}function ho({query:e,onQueryChange:t,matchCount:n,currentMatch:r,onNext:i,onPrev:a,onClose:o}){let s=(0,_.useRef)(null);return(0,_.useEffect)(()=>{s.current?.focus()},[]),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 bg-surface-lowest border border-ghost rounded-md px-3 py-1.5 shadow-sm`,children:[(0,F.jsxs)(`svg`,{className:`w-3.5 h-3.5 text-outline shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,F.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,F.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,F.jsx)(`input`,{ref:s,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.shiftKey?a():i()),e.key===`Escape`&&o()},placeholder:`Search in session...`,className:`bg-transparent text-sm text-on-surface outline-none flex-1 min-w-0`}),e&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`font-mono text-[10px] text-outline shrink-0`,children:n>0?`${r+1}/${n}`:`no matches`}),(0,F.jsx)(`button`,{type:`button`,onClick:a,disabled:n===0,className:`text-xs text-on-surface-variant hover:text-on-surface disabled:opacity-30 cursor-pointer`,children:`↑`}),(0,F.jsx)(`button`,{type:`button`,onClick:i,disabled:n===0,className:`text-xs text-on-surface-variant hover:text-on-surface disabled:opacity-30 cursor-pointer`,children:`↓`})]}),(0,F.jsx)(`button`,{type:`button`,onClick:o,className:`text-xs text-outline hover:text-on-surface cursor-pointer ml-1`,children:`✕`})]})}function go(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function _o({messages:e,initialSearchQuery:t,compact:n}){let[r,i]=(0,_.useState)(!!t),[a,o]=(0,_.useState)(t??``),[s,c]=(0,_.useState)(0),l=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(n)return;function e(e){(e.metaKey||e.ctrlKey)&&e.key===`f`&&(e.preventDefault(),i(!0))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n]);let u=(0,_.useMemo)(()=>{if(!a)return 0;let t=new RegExp(go(a),`gi`),n=0;for(let r of e)for(let e of r.blocks)if(e.type===`text`){let r=e.text.match(t);r&&(n+=r.length)}return n},[e,a]),d=(0,_.useCallback)(()=>{c(e=>(e+1)%Math.max(1,u))},[u]),f=(0,_.useCallback)(()=>{c(e=>(e-1+Math.max(1,u))%Math.max(1,u))},[u]),p=(0,_.useCallback)(()=>{i(!1),o(``),c(0)},[]);return e.length===0?(0,F.jsx)(`div`,{className:`text-center ${n?`py-4`:`py-12`}`,children:(0,F.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:`No conversation data available.`})}):(0,F.jsxs)(`div`,{ref:l,className:`relative`,children:[!n&&r&&(0,F.jsx)(`div`,{className:`sticky top-12 z-40 mb-4`,children:(0,F.jsx)(ho,{query:a,onQueryChange:e=>{o(e),c(0)},matchCount:u,currentMatch:s,onNext:d,onPrev:f,onClose:p})}),(0,F.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.map((t,n)=>{let r=n>0?e[n-1].role:null,i=r!==t.role;return(0,F.jsxs)(`div`,{children:[r!==null&&r!==t.role&&t.role===`user`&&(0,F.jsx)(`div`,{className:`border-t border-ghost/60 mb-4 mt-1`}),(0,F.jsx)(po,{message:t,messageIndex:n,searchQuery:a||void 0,showRoleBadge:i})]},t.id)})}),!n&&!r&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>i(!0),className:`fixed bottom-6 right-6 z-40 bg-surface-lowest border border-ghost rounded-full w-10 h-10 flex items-center justify-center shadow-lg hover:shadow-xl transition-shadow cursor-pointer group`,title:`Search in session (Cmd+F)`,children:(0,F.jsxs)(`svg`,{className:`w-4 h-4 text-on-surface-variant group-hover:text-on-surface transition-colors`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,F.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,F.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})})]})}function vo(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function yo(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function bo(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}catch{return e}}function xo(e){let t=e.replace(/^#+\s*/gm,``).replace(/\*\*/g,``).replace(/\n.*/s,``);return t.length>120&&(t=t.slice(0,117)+`...`),t}function So(){let{sessionId:e}=st(),[t]=Mn(),n=at(),r=t.get(`q`)??``,[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!0),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)([]),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(null),[C,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>{e&&(s(!0),pr(e).then(a).catch(e=>l(e.message)).finally(()=>s(!1)))},[e]),(0,_.useEffect)(()=>{!e||m||(p(!0),hr(e).then(e=>{d(e.messages),h(!0)}).catch(()=>{}).finally(()=>p(!1)))},[e,m]),(0,_.useEffect)(()=>{if(!x)return;let e=setTimeout(()=>S(null),3e3);return()=>clearTimeout(e)},[x]);async function T(t){if(!(!e||y)){b(!0),v(!1);try{let n=await mr(e,t);await navigator.clipboard.writeText(n.content),S(`Context copied (${n.tokens.toLocaleString()} tokens)`)}catch{S(`Failed to copy context`)}finally{b(!1)}}}async function E(){if(!(!e||C)){w(!0);try{let t=await mr(e,`summary`),n=new Blob([t.content],{type:`text/markdown`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`session-${e.slice(0,8)}.md`,i.click(),URL.revokeObjectURL(r),S(`Downloaded summary (${t.tokens.toLocaleString()} tokens)`)}catch{S(`Failed to download summary`)}finally{w(!1)}}}if(o)return(0,F.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-surface-mid`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading session...`})});if(c||!i)return(0,F.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center bg-surface-mid gap-3`,children:[(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:c??`Session not found.`}),(0,F.jsx)(`button`,{onClick:()=>n(-1),className:`text-xs text-primary hover:underline cursor-pointer`,children:`Go back`})]});let D=i.filesChanged??[],O=i.toolBreakdown??[],ee=Math.max(...O.map(e=>e.count),1),k=(()=>{if(u.length>0&&u[0].role===`user`)return u;let e=i.title.replace(/\.\.\.$/,``).replace(/\s*##\s*$/,``).trim();return[{id:`first-prompt`,timestamp:i.date,role:`user`,blocks:[{type:`text`,text:e}]},...u]})();return(0,F.jsxs)(`div`,{className:`min-h-screen bg-surface-mid`,children:[(0,F.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,F.jsx)(`button`,{onClick:()=>n(-1),className:`text-sm text-on-surface-variant hover:text-on-surface transition-colors cursor-pointer shrink-0`,children:`← Back`}),(0,F.jsx)(`span`,{className:`text-outline text-xs shrink-0`,children:`/`}),(0,F.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface truncate`,children:xo(i.title)})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,F.jsx)(`button`,{onClick:E,disabled:C,className:`inline-flex items-center gap-1.5 text-[0.8125rem] px-3 py-1.5 rounded-sm border border-ghost text-on-surface-variant hover:text-on-surface hover:border-outline transition-colors cursor-pointer disabled:opacity-50`,children:C?`Downloading...`:`↓ Summary`}),(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(`button`,{onClick:()=>v(!g),disabled:y,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors cursor-pointer disabled:opacity-50`,children:y?`Copying...`:`Copy for AI`}),g&&(0,F.jsx)(`div`,{className:`absolute right-0 top-full mt-1 bg-surface-lowest border border-ghost rounded-md shadow-lg z-50 py-1 min-w-[160px]`,children:[`compact`,`summary`,`full`].map(e=>(0,F.jsxs)(`button`,{onClick:()=>T(e),className:`w-full text-left px-3 py-1.5 text-sm text-on-surface hover:bg-surface-low transition-colors cursor-pointer`,children:[(0,F.jsx)(`span`,{className:`font-semibold capitalize`,children:e}),(0,F.jsx)(`span`,{className:`text-on-surface-variant text-xs ml-1.5`,children:e===`compact`?`~500 tokens`:e===`summary`?`~2k tokens`:`~5k+ tokens`})]},e))})]})]})]})}),x&&(0,F.jsx)(`div`,{className:`fixed bottom-4 right-4 z-50 bg-surface-dark text-on-primary font-mono text-xs px-4 py-2.5 rounded-md shadow-lg`,children:x}),(0,F.jsxs)(`div`,{className:`p-6 max-w-3xl mx-auto`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mb-2`,children:[i.source&&(0,F.jsx)(I,{children:i.source}),(0,F.jsx)(I,{children:bo(i.date)}),i.projectName&&(0,F.jsx)(I,{variant:`primary`,children:i.projectName})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-4 font-mono text-[11px] text-on-surface-variant mb-4`,children:[(0,F.jsxs)(`span`,{children:[vo(i.durationMinutes),` active`]}),(0,F.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,F.jsxs)(`span`,{children:[i.turns,` turns`]}),(0,F.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,F.jsxs)(`span`,{children:[D.length,` files`]}),(0,F.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,F.jsxs)(`span`,{children:[yo(i.linesOfCode),` lines`]})]}),i.developerTake&&(0,F.jsx)(`div`,{className:`mb-5`,children:(0,F.jsx)(`p`,{className:`text-[0.9375rem] leading-relaxed text-on-surface border-l-[3px] border-primary pl-3`,children:i.developerTake})}),i.skills&&i.skills.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-5`,children:i.skills.map(e=>(0,F.jsx)(I,{variant:`violet`,children:e},e))}),f?(0,F.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`span`,{className:`w-4 h-4 border-2 border-primary border-t-transparent rounded-full animate-spin`}),(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading transcript...`})]})}):(0,F.jsx)(_o,{messages:k,initialSearchQuery:r}),(O.length>0||D.length>0||i.qaPairs&&i.qaPairs.length>0)&&(0,F.jsxs)(`div`,{className:`mt-8 pt-6 border-t border-ghost`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline mb-4`,children:`Supporting detail`}),D.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsxs)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:[`Files changed · `,D.length]}),(0,F.jsx)(`div`,{className:`flex flex-col divide-y divide-ghost bg-surface-lowest border border-ghost rounded-md`,children:D.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`font-mono text-xs text-on-surface truncate flex-1 mr-3`,children:e.path}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-[11px] shrink-0`,children:[e.additions>0&&(0,F.jsxs)(`span`,{className:`text-green`,children:[`+`,e.additions]}),e.deletions>0&&(0,F.jsxs)(`span`,{className:`text-error`,children:[`-`,e.deletions]})]})]},e.path))})]}),O.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsxs)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:[`Tool breakdown · `,O.reduce((e,t)=>e+t.count,0),` calls`]}),(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:O.sort((e,t)=>t.count-e.count).map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`span`,{className:`font-mono text-[11px] text-on-surface-variant w-28 truncate shrink-0`,children:e.tool}),(0,F.jsx)(`div`,{className:`flex-1 h-4 bg-surface-low rounded-sm overflow-hidden`,children:(0,F.jsx)(`div`,{className:`h-full bg-primary/20 rounded-sm`,style:{width:`${e.count/ee*100}%`}})}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] text-outline w-8 text-right shrink-0`,children:e.count})]},e.tool))})]}),i.qaPairs&&i.qaPairs.length>0&&(0,F.jsxs)(`div`,{className:`mb-5`,children:[(0,F.jsx)(`div`,{className:`font-mono text-[10px] uppercase tracking-wider text-on-surface-variant mb-2`,children:`Questions & Answers`}),(0,F.jsx)(`div`,{className:`bg-surface-lowest border border-ghost rounded-md divide-y divide-ghost`,children:i.qaPairs.map((e,t)=>(0,F.jsxs)(`div`,{className:`px-3 py-3`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-sm text-on-surface mb-1`,children:e.question}),(0,F.jsx)(`div`,{className:`text-[0.8125rem] text-on-surface-variant leading-relaxed`,children:e.answer})]},t))})]})]})]})]})}function Co(e){let t=e/60;return t>=1?`${t.toFixed(1)}h`:`${Math.round(e)}m`}function wo(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function To(e){try{return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Eo(){let{dirName:e}=st(),t=at(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!0),[o,s]=(0,_.useState)(`date`),[c,l]=(0,_.useState)(!0),[u,d]=(0,_.useState)(``);if((0,_.useEffect)(()=>{e&&nr(e).then(r).catch(()=>{}).finally(()=>a(!1))},[e]),i)return(0,F.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-surface-mid`,children:(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Loading sessions...`})});if(!n)return(0,F.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center bg-surface-mid gap-3`,children:[(0,F.jsx)(`span`,{className:`text-sm text-on-surface-variant`,children:`Project not found.`}),(0,F.jsx)(`button`,{onClick:()=>t(-1),className:`text-xs text-primary hover:underline cursor-pointer`,children:`Go back`})]});let{sessions:f}=n,p=[...u?f.filter(e=>e.title.toLowerCase().includes(u.toLowerCase())||(e.skills??[]).some(e=>e.toLowerCase().includes(u.toLowerCase()))||(e.source??``).toLowerCase().includes(u.toLowerCase())):f].sort((e,t)=>{let n=0;switch(o){case`date`:n=new Date(e.date).getTime()-new Date(t.date).getTime();break;case`duration`:n=e.durationMinutes-t.durationMinutes;break;case`loc`:n=e.linesOfCode-t.linesOfCode;break;case`turns`:n=e.turns-t.turns;break}return c?-n:n});function m(e){o===e?l(!c):(s(e),l(!0))}function h({label:e,sortKey:t}){let n=o===t;return(0,F.jsxs)(`button`,{type:`button`,onClick:()=>m(t),className:`font-mono text-[9px] uppercase tracking-wider cursor-pointer transition-colors ${n?`text-primary font-bold`:`text-outline hover:text-on-surface-variant`}`,children:[e,` `,n?c?`↓`:`↑`:``]})}return(0,F.jsxs)(`div`,{className:`min-h-screen bg-surface-mid`,children:[(0,F.jsx)(`header`,{className:`sticky top-0 z-50 bg-surface-lowest border-b border-ghost`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-between h-12 px-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,F.jsxs)(`button`,{onClick:()=>t(`/project/${encodeURIComponent(e??``)}`),className:`text-sm text-on-surface-variant hover:text-on-surface transition-colors cursor-pointer shrink-0`,children:[`← `,n.project.name]}),(0,F.jsx)(`span`,{className:`text-outline text-xs shrink-0`,children:`/`}),(0,F.jsx)(`span`,{className:`font-display text-sm font-semibold text-on-surface`,children:`All sessions`})]}),(0,F.jsxs)(I,{variant:`primary`,children:[f.length,` sessions`]})]})}),(0,F.jsxs)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-4 mb-4`,children:[(0,F.jsx)(`input`,{type:`text`,value:u,onChange:e=>d(e.target.value),placeholder:`Filter by title, skill, or source...`,className:`flex-1 bg-surface-lowest border border-ghost rounded-md px-3 py-2 text-sm text-on-surface placeholder:text-outline outline-none focus:border-primary transition-colors`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,F.jsx)(`span`,{className:`font-mono text-[9px] uppercase tracking-wider text-outline`,children:`Sort:`}),(0,F.jsx)(h,{label:`Date`,sortKey:`date`}),(0,F.jsx)(h,{label:`Duration`,sortKey:`duration`}),(0,F.jsx)(h,{label:`Lines`,sortKey:`loc`}),(0,F.jsx)(h,{label:`Turns`,sortKey:`turns`})]})]}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[p.map(e=>(0,F.jsxs)(P,{to:`/session/${encodeURIComponent(e.id)}`,className:`flex items-start gap-4 bg-surface-lowest border border-ghost rounded-md px-4 py-3 hover:shadow-md transition-shadow`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`div`,{className:`font-display text-[0.8125rem] font-semibold text-on-surface mb-0.5 truncate`,children:e.title}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 font-mono text-[10px] text-on-surface-variant`,children:[(0,F.jsx)(`span`,{children:To(e.date)}),(0,F.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,F.jsx)(`span`,{children:Co(e.durationMinutes)}),(0,F.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,F.jsxs)(`span`,{children:[e.turns,` turns`]}),(0,F.jsx)(`span`,{className:`text-ghost`,children:`|`}),(0,F.jsxs)(`span`,{children:[wo(e.linesOfCode),` lines`]})]}),e.developerTake&&(0,F.jsx)(`p`,{className:`text-xs text-on-surface-variant mt-1 line-clamp-1`,children:e.developerTake})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0 pt-0.5`,children:[e.source&&(0,F.jsx)(I,{children:e.source}),e.skills?.[0]&&(0,F.jsx)(I,{variant:`violet`,children:e.skills[0]}),(e.skills?.length??0)>1&&(0,F.jsxs)(`span`,{className:`font-mono text-[9px] text-outline`,children:[`+`,e.skills.length-1]})]})]},e.id)),p.length===0&&(0,F.jsx)(`div`,{className:`text-center py-12`,children:(0,F.jsx)(`p`,{className:`text-sm text-on-surface-variant`,children:u?`No sessions match your filter.`:`No sessions in this project.`})})]})]})]})}function Do({dirName:e}){let[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(null);(0,_.useEffect)(()=>{function e(e){r.current&&!r.current.contains(e.target)&&n(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let i=encodeURIComponent(e),a=[{label:`HTML (.zip)`,href:`/api/projects/${i}/download-html`},{label:`Markdown (.zip)`,href:`/api/projects/${i}/download-markdown`},{label:`JSON`,href:`/api/projects/${i}/download-json`}];return(0,F.jsxs)(`div`,{className:`relative`,ref:r,children:[(0,F.jsxs)(`button`,{onClick:()=>n(e=>!e),className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm border border-ghost text-primary hover:border-outline transition-colors`,children:[`Export`,(0,F.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,className:`transition-transform ${t?`rotate-180`:``}`,children:(0,F.jsx)(`path`,{d:`M3 4.5L6 7.5L9 4.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),t&&(0,F.jsx)(`div`,{className:`absolute right-0 top-full mt-1 z-50 min-w-[160px] rounded-md border border-outline bg-surface py-1 shadow-lg`,children:a.map(e=>(0,F.jsx)(`a`,{href:e.href,className:`block px-3 py-1.5 text-[0.8125rem] text-on-surface hover:bg-surface-low transition-colors`,onClick:()=>n(!1),children:e.label},e.label))})]})}function Oo(){let{dirName:e}=st(),[t,n]=(0,_.useState)(null);return(0,_.useEffect)(()=>{e&&nr(e).then(e=>{n(e.project.name)}).catch(()=>{})},[e]),(0,F.jsx)(Ar,{back:{label:`Projects`,to:`/projects`},chips:[{label:t??`...`}],actions:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(P,{to:`/project/${encodeURIComponent(e??``)}/enhance`,className:`inline-flex items-center gap-1.5 font-semibold text-[0.8125rem] px-3.5 py-1.5 rounded-sm bg-primary text-on-primary hover:bg-primary-hover transition-colors`,children:`Enhance project`}),(0,F.jsx)(Do,{dirName:e??``}),(0,F.jsx)(P,{to:`/project/${encodeURIComponent(e??``)}/publish`,className:`text-xs text-on-surface-variant hover:text-on-surface transition-colors`,children:`Send to heyiam.com`})]}),children:(0,F.jsx)(Ta,{})})}function ko(){return(0,F.jsx)(Sn,{children:(0,F.jsxs)(Nt,{children:[(0,F.jsx)(jt,{path:`/`,element:(0,F.jsx)(Ui,{})}),(0,F.jsx)(jt,{path:`/sources`,element:(0,F.jsx)(ra,{})}),(0,F.jsx)(jt,{path:`/archive`,element:(0,F.jsx)(aa,{})}),(0,F.jsx)(jt,{path:`/projects`,element:(0,F.jsx)(ua,{})}),(0,F.jsx)(jt,{path:`/project/:dirName`,element:(0,F.jsx)(Oo,{})}),(0,F.jsx)(jt,{path:`/project/:dirName/sessions`,element:(0,F.jsx)(Eo,{})}),(0,F.jsx)(jt,{path:`/project/:dirName/boundaries`,element:(0,F.jsx)(Da,{})}),(0,F.jsx)(jt,{path:`/project/:dirName/enhance`,element:(0,F.jsx)(Ja,{})}),(0,F.jsx)(jt,{path:`/search`,element:(0,F.jsx)(io,{})}),(0,F.jsx)(jt,{path:`/session/:sessionId`,element:(0,F.jsx)(So,{})}),(0,F.jsx)(jt,{path:`/project/:dirName/publish`,element:(0,F.jsx)(Za,{})}),(0,F.jsx)(jt,{path:`/settings`,element:(0,F.jsx)(Qa,{})})]})})}(0,v.createRoot)(document.getElementById(`root`)).render((0,F.jsx)(_.StrictMode,{children:(0,F.jsx)(ko,{})}));
|