@a5c-ai/agent-mux-webui 5.0.1-staging.660d2b90f27f → 5.0.1-staging.69cb593ea536

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.
@@ -1,4 +1,4 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(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},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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 f=s((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 k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(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 N(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,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(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(A,`$&/`)+`/`)+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+j(a,u),c+=N(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+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(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 F=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)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(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=I,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:ee}},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,F)}catch(e){F(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.6`})),p=s(((e,t)=>{t.exports=f()})),m=s((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&&j(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&&j(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 k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(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,j(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}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();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.6`})),_=s(((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=g()})),v=s((e=>{var t=h(),n=p(),r=_();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 u(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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=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`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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 k: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?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function L(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var ae=ie(null),oe=ie(null),se=ie(null),ce=ie(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function ue(){L(ae),L(oe),L(se)}function z(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Ud(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function de(e){oe.current===e&&(L(ae),L(oe)),ce.current===e&&(L(ce),Qf._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(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},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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 f=s((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 k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(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 N(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,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(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(A,`$&/`)+`/`)+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+j(a,u),c+=N(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+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(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 F=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)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(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=I,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:ee}},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,F)}catch(e){F(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.6`})),p=s(((e,t)=>{t.exports=f()})),m=s((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&&j(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&&j(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 k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(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,j(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}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();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.6`})),_=s(((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=g()})),v=s((e=>{var t=h(),n=p(),r=_();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 u(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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=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`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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 k: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?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function L(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var ae=ie(null),oe=ie(null),se=ie(null),ce=ie(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function ue(){L(ae),L(oe),L(se)}function z(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Ud(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function de(e){oe.current===e&&(L(ae),L(oe)),ce.current===e&&(L(ce),Qf._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
2
2
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
3
  `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!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
4
  `),l=s.split(`
@@ -6,7 +6,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
6
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{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
7
  Error generating stack: `+e.message+`
8
8
  `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,B=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,V=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Le,Fe=Math.log,Ie=Math.LN2;function Le(e){return e>>>=0,e===0?32:31-(Fe(e)/Ie|0)|0}var Re=256,ze=262144,Be=4194304;function Ve(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 He(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=Ve(n))):i=Ve(o):i=Ve(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ve(n))):i=Ve(o)):i=Ve(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 Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function We(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 Ge(){var e=Be;return Be<<=1,!(Be&62914560)&&(Be=4194304),e}function Ke(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Je(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-Pe(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&&Ye(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ye(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Xe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function H(e,t){var n=t&-t;return n=n&42?1:Ze(n),(n&(e.suspendedLanes|t))===0?n:0}function Ze(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 Qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function $e(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function et(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var tt=Math.random().toString(36).slice(2),nt=`__reactFiber$`+tt,rt=`__reactProps$`+tt,it=`__reactContainer$`+tt,U=`__reactEvents$`+tt,at=`__reactListeners$`+tt,ot=`__reactHandles$`+tt,st=`__reactResources$`+tt,ct=`__reactMarker$`+tt;function lt(e){delete e[nt],delete e[rt],delete e[U],delete e[at],delete e[ot]}function ut(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[nt])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function W(e){if(e=e[nt]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ft(e){var t=e[st];return t||=e[st]={hoistableStyles:new Map,hoistableScripts:new Map},t}function pt(e){e[ct]=!0}var mt=new Set,ht={};function gt(e,t){_t(e,t),_t(e+`Capture`,t)}function _t(e,t){for(ht[e]=t,e=0;e<t.length;e++)mt.add(t[e])}var vt=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]*$`),yt={},bt={};function xt(e){return ye.call(bt,e)?!0:ye.call(yt,e)?!1:vt.test(e)?bt[e]=!0:(yt[e]=!0,!1)}function St(e,t,n){if(xt(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 Ct(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 wt(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 Tt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Et(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Dt(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 Ot(e){if(!e._valueTracker){var t=Et(e)?`checked`:`value`;e._valueTracker=Dt(e,t,``+e[t])}}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Et(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(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 At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(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=``+Tt(t)):e.value!==``+Tt(t)&&(e.value=``+Tt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,Tt(n)):Pt(e,o,Tt(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=``+Tt(s):e.removeAttribute(`name`)}function Nt(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)){Ot(e);return}n=n==null?``:``+Tt(n),t=t==null?n:``+Tt(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),Ot(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(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=``+Tt(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 It(e,t,n){if(t!=null&&(t=``+Tt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Tt(n)}function K(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Tt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ot(e)}function q(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lt=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 Rt(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||Lt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function zt(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&&Rt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Rt(e,o,t[o])}function Bt(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 Vt=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`]]),Ht=/^[\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 Ut(e){return Ht.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function J(){}var Wt=null;function Gt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kt=null,qt=null;function Jt(e){var t=W(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(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="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[rt]||null;if(!a)throw Error(i(90));Mt(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&&G(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Yt=!1;function Xt(e,t,n){if(Yt)return e(t,n);Yt=!0;try{return e(t)}finally{if(Yt=!1,(Kt!==null||qt!==null)&&(vu(),Kt&&(t=Kt,e=qt,qt=Kt=null,Jt(t),e)))for(t=0;t<e.length;t++)Jt(e[t])}}function Zt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rt]||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 Qt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),$t=!1;if(Qt)try{var en={};Object.defineProperty(en,`passive`,{get:function(){$t=!0}}),window.addEventListener(`test`,en,en),window.removeEventListener(`test`,en,en)}catch{$t=!1}var tn=null,nn=null,rn=null;function an(){if(rn)return rn;var e,t=nn,n=t.length,r,i=`value`in tn?tn.value:tn.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 rn=i.slice(e,1<r?1-r:void 0)}function on(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 ln(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 f(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 un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=ln(un),fn=f({},un,{view:0,detail:0}),pn=ln(fn),mn,hn,gn,_n=f({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,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!==gn&&(gn&&e.type===`mousemove`?(mn=e.screenX-gn.screenX,hn=e.screenY-gn.screenY):hn=mn=0,gn=e),mn)},movementY:function(e){return`movementY`in e?e.movementY:hn}}),vn=ln(_n),yn=ln(f({},_n,{dataTransfer:0})),bn=ln(f({},fn,{relatedTarget:0})),xn=ln(f({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),Sn=ln(f({},un,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Cn=ln(f({},un,{data:0})),wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Tn={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`},En={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=En[e])?!!t[e]:!1}function On(){return Dn}var kn=ln(f({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=on(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Tn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return e.type===`keypress`?on(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?on(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),An=ln(f({},_n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),jn=ln(f({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),Y=ln(f({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=ln(f({},_n,{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})),Nn=ln(f({},un,{newState:0,oldState:0})),Pn=[9,13,27,32],Fn=Qt&&`CompositionEvent`in window,In=null;Qt&&`documentMode`in document&&(In=document.documentMode);var Ln=Qt&&`TextEvent`in window&&!In,Rn=Qt&&(!Fn||In&&8<In&&11>=In),zn=` `,Bn=!1;function Vn(e,t){switch(e){case`keyup`:return Pn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Hn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Un=!1;function Wn(e,t){switch(e){case`compositionend`:return Hn(t);case`keypress`:return t.which===32?(Bn=!0,zn):null;case`textInput`:return e=t.data,e===zn&&Bn?null:e;default:return null}}function Gn(e,t){if(Un)return e===`compositionend`||!Fn&&Vn(e,t)?(e=an(),rn=nn=tn=null,Un=!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 Rn&&t.locale!==`ko`?null:t.data;default:return null}}var Kn={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 qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Kn[e.type]:t===`textarea`}function Jn(e,t,n,r){Kt?qt?qt.push(r):qt=[r]:Kt=r,t=Ed(t,`onChange`),0<t.length&&(n=new dn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Yn=null,Xn=null;function Zn(e){vd(e,0)}function Qn(e){if(G(dt(e)))return e}function $n(e,t){if(e===`change`)return t}var er=!1;if(Qt){var tr;if(Qt){var nr=`oninput`in document;if(!nr){var rr=document.createElement(`div`);rr.setAttribute(`oninput`,`return;`),nr=typeof rr.oninput==`function`}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function ir(){Yn&&(Yn.detachEvent(`onpropertychange`,ar),Xn=Yn=null)}function ar(e){if(e.propertyName===`value`&&Qn(Xn)){var t=[];Jn(t,Xn,e,Gt(e)),Xt(Zn,t)}}function or(e,t,n){e===`focusin`?(ir(),Yn=t,Xn=n,Yn.attachEvent(`onpropertychange`,ar)):e===`focusout`&&ir()}function sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Qn(Xn)}function cr(e,t){if(e===`click`)return Qn(t)}function lr(e,t){if(e===`input`||e===`change`)return Qn(t)}function ur(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var dr=typeof Object.is==`function`?Object.is:ur;function fr(e,t){if(dr(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(!ye.call(t,i)||!dr(e[i],t[i]))return!1}return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mr(e,t){var n=pr(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=pr(n)}}function hr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(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=kt(e.document)}return t}function _r(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 vr=Qt&&`documentMode`in document&&11>=document.documentMode,yr=null,br=null,xr=null,Sr=!1;function Cr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sr||yr==null||yr!==kt(r)||(r=yr,`selectionStart`in r&&_r(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}),xr&&fr(xr,r)||(xr=r,r=Ed(br,`onSelect`),0<r.length&&(t=new dn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Tr={animationend:wr(`Animation`,`AnimationEnd`),animationiteration:wr(`Animation`,`AnimationIteration`),animationstart:wr(`Animation`,`AnimationStart`),transitionrun:wr(`Transition`,`TransitionRun`),transitionstart:wr(`Transition`,`TransitionStart`),transitioncancel:wr(`Transition`,`TransitionCancel`),transitionend:wr(`Transition`,`TransitionEnd`)},Er={},Dr={};Qt&&(Dr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),`TransitionEvent`in window||delete Tr.transitionend.transition);function Or(e){if(Er[e])return Er[e];if(!Tr[e])return e;var t=Tr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Dr)return Er[e]=t[n];return e}var kr=Or(`animationend`),Ar=Or(`animationiteration`),jr=Or(`animationstart`),Mr=Or(`transitionrun`),Nr=Or(`transitionstart`),Pr=Or(`transitioncancel`),Fr=Or(`transitionend`),Ir=new Map,Lr=`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(` `);Lr.push(`scrollEnd`);function Rr(e,t){Ir.set(e,t),gt(t,[e])}var zr=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)},Br=[],Vr=0,Hr=0;function Ur(){for(var e=Vr,t=Hr=Vr=0;t<e;){var n=Br[t];Br[t++]=null;var r=Br[t];Br[t++]=null;var i=Br[t];Br[t++]=null;var a=Br[t];if(Br[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&&qr(n,i,a)}}function Wr(e,t,n,r){Br[Vr++]=e,Br[Vr++]=t,Br[Vr++]=n,Br[Vr++]=r,Hr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Gr(e,t,n,r){return Wr(e,t,n,r),Jr(e)}function Kr(e,t){return Wr(e,null,null,t),Jr(e)}function qr(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-Pe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Jr(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Yr={};function Xr(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 Zr(e,t,n,r){return new Xr(e,t,n,r)}function Qr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return n===null?(n=Zr(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 ei(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 ti(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Qr(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=Zr(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ni(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=Zr(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=Zr(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=Zr(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=Zr(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ni(e,t,n,r){return e=Zr(7,e,r,t),e.lanes=n,e}function ri(e,t,n){return e=Zr(6,e,null,t),e.lanes=n,e}function ii(e){var t=Zr(18,null,null,0);return t.stateNode=e,t}function ai(e,t,n){return t=Zr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oi=new WeakMap;function si(e,t){if(typeof e==`object`&&e){var n=oi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},oi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var ci=[],li=0,ui=null,di=0,fi=[],pi=0,mi=null,hi=1,gi=``;function _i(e,t){ci[li++]=di,ci[li++]=ui,ui=e,di=t}function vi(e,t,n){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,mi=e;var r=hi;e=gi;var i=32-Pe(r)-1;r&=~(1<<i),n+=1;var a=32-Pe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,hi=1<<32-Pe(t)+i|n<<i|r,gi=a+e}else hi=1<<a|n<<i|r,gi=e}function yi(e){e.return!==null&&(_i(e,1),vi(e,1,0))}function bi(e){for(;e===ui;)ui=ci[--li],ci[li]=null,di=ci[--li],ci[li]=null;for(;e===mi;)mi=fi[--pi],fi[pi]=null,gi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null}function xi(e,t){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,hi=t.id,gi=t.overflow,mi=e}var Si=null,Ci=null,wi=!1,Ti=null,Ei=!1,Di=Error(i(519));function Oi(e){throw Pi(si(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Di}function ki(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nt]=e,t[rt]=r,n){case`dialog`:yd(`cancel`,t),yd(`close`,t);break;case`iframe`:case`object`:case`embed`:yd(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)yd(gd[n],t);break;case`source`:yd(`error`,t);break;case`img`:case`image`:case`link`:yd(`error`,t),yd(`load`,t);break;case`details`:yd(`toggle`,t);break;case`input`:yd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:yd(`invalid`,t);break;case`textarea`:yd(`invalid`,t),K(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&&(yd(`beforetoggle`,t),yd(`toggle`,t)),r.onScroll!=null&&yd(`scroll`,t),r.onScrollEnd!=null&&yd(`scrollend`,t),r.onClick!=null&&(t.onclick=J),t=!0):t=!1,t||Oi(e,!0)}function Ai(e){for(Si=e.return;Si;)switch(Si.tag){case 5:case 31:case 13:Ei=!1;return;case 27:case 3:Ei=!0;return;default:Si=Si.return}}function ji(e){if(e!==Si)return!1;if(!wi)return Ai(e),wi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&Ci&&Oi(e),Ai(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ci=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ci=df(e)}else t===27?(t=Ci,Qd(e.type)?(e=uf,uf=null,Ci=e):Ci=t):Ci=Si?lf(e.stateNode.nextSibling):null;return!0}function Mi(){Ci=Si=null,wi=!1}function Ni(){var e=Ti;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Ti=null),e}function Pi(e){Ti===null?Ti=[e]:Ti.push(e)}var Fi=ie(null),Ii=null,Li=null;function Ri(e,t,n){R(Fi,t._currentValue),t._currentValue=n}function zi(e){e._currentValue=Fi.current,L(Fi)}function Bi(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 Vi(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),Bi(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),Bi(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 Hi(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;dr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.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&&Vi(t,e,n,r),t.flags|=262144}function Ui(e){for(e=e.firstContext;e!==null;){if(!dr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wi(e){Ii=e,Li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gi(e){return qi(Ii,e)}function Ki(e,t){return Ii===null&&Wi(e),qi(e,t)}function qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Li===null){if(e===null)throw Error(i(308));Li=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Li=Li.next=t;return n}var Ji=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()})}},Yi=t.unstable_scheduleCallback,Xi=t.unstable_NormalPriority,Zi={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qi(){return{controller:new Ji,data:new Map,refCount:0}}function $i(e){e.refCount--,e.refCount===0&&Yi(Xi,function(){e.controller.abort()})}var ea=null,ta=0,na=0,ra=null;function ia(e,t){if(ea===null){var n=ea=[];ta=0,na=ud(),ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ta++,t.then(aa,aa),t}function aa(){if(--ta===0&&ea!==null){ra!==null&&(ra.status=`fulfilled`);var e=ea;ea=null,na=0,ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function oa(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 sa=F.S;F.S=function(e,t){Ql=B(),typeof t==`object`&&t&&typeof t.then==`function`&&ia(e,t),sa!==null&&sa(e,t)};var ca=ie(null);function la(){var e=ca.current;return e===null?Fl.pooledCache:e}function ua(e,t){t===null?R(ca,ca.current):R(ca,t.pool)}function da(){var e=la();return e===null?null:{parent:Zi._currentValue,pool:e}}var fa=Error(i(460)),pa=Error(i(474)),ma=Error(i(542)),ha={then:function(){}};function ga(e){return e=e.status,e===`fulfilled`||e===`rejected`}function _a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(J,J),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,xa(e),e;default:if(typeof t.status==`string`)t.then(J,J);else{if(e=Fl,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,xa(e),e}throw ya=t,fa}}function va(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ya=e,fa):e}}var ya=null;function ba(){if(ya===null)throw Error(i(459));var e=ya;return ya=null,e}function xa(e){if(e===fa||e===ma)throw Error(i(483))}var Sa=null,Ca=0;function wa(e){var t=Ca;return Ca+=1,Sa===null&&(Sa=[]),_a(Sa,e,t)}function Ta(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ea(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Da(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=$r(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=ri(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&&va(i)===t.type)?(t=a(t,n.props),Ta(t,n),t.return=e,t):(t=ti(n.type,n.key,n.props,null,e.mode,r),Ta(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=ai(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=ni(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=ri(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ti(t.type,t.key,t.props,null,e.mode,n),Ta(n,t),n.return=e,n;case v:return t=ai(t,e.mode,n),t.return=e,t;case O:return t=va(t),f(e,t,n)}if(ee(t)||M(t))return t=ni(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,wa(t),n);if(t.$$typeof===C)return f(e,Ki(e,t),n);Ea(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 g: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=va(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,wa(n),r);if(n.$$typeof===C)return p(e,t,Ki(e,n),r);Ea(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 g: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=va(r),m(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,wa(r),i);if(r.$$typeof===C)return m(e,t,n,Ki(t,r),i);Ea(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),wi&&_i(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 wi&&_i(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)}),wi&&_i(i,h),l}function _(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),wi&&_i(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 wi&&_i(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)}),wi&&_i(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 g: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&&va(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ta(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ni(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ti(o.type,o.key,o.props,null,e.mode,c),Ta(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=ai(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=va(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,wa(o),c);if(o.$$typeof===C)return b(e,r,Ki(e,o),c);Ea(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=ri(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ca=0;var i=b(e,t,n,r);return Sa=null,i}catch(t){if(t===fa||t===ma)throw t;var a=Zr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Oa=Da(!0),ka=Da(!1),Aa=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ma(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 Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Jr(e),qr(e,null,n),t}return Wr(e,r,t,n),Jr(e)}function Fa(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,Xe(e,n)}}function Ia(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 La=!1;function Ra(){if(La){var e=ra;if(e!==null)throw e}}function za(e,t,n,r){La=!1;var i=e.updateQueue;Aa=!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 p=s.lane&-536870913,m=p!==s.lane;if(m?(Q&p)===p:(r&p)===p){p!==0&&p===na&&(La=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Aa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),Ul|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Va(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ba(n[e],t)}var Ha=ie(null),Ua=ie(0);function Wa(e,t){e=Vl,R(Ua,e),R(Ha,t),Vl=e|t.baseLanes}function Ga(){R(Ua,Vl),R(Ha,Ha.current)}function Ka(){Vl=Ua.current,L(Ha),L(Ua)}var qa=ie(null),Ja=null;function Ya(e){var t=e.alternate;R(eo,eo.current&1),R(qa,e),Ja===null&&(t===null||Ha.current!==null||t.memoizedState!==null)&&(Ja=e)}function Xa(e){R(eo,eo.current),R(qa,e),Ja===null&&(Ja=e)}function Za(e){e.tag===22?(R(eo,eo.current),R(qa,e),Ja===null&&(Ja=e)):Qa(e)}function Qa(){R(eo,eo.current),R(qa,qa.current)}function $a(e){L(qa),Ja===e&&(Ja=null),L(eo)}var eo=ie(0);function to(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(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 no=0,X=null,ro=null,io=null,ao=!1,oo=!1,so=!1,co=0,lo=0,uo=null,fo=0;function po(){throw Error(i(321))}function mo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dr(e[n],t[n]))return!1;return!0}function ho(e,t,n,r,i,a){return no=a,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ms:Ns,so=!1,a=n(r,i),so=!1,oo&&(a=_o(t,n,r,i)),go(e),a}function go(e){F.H=js;var t=ro!==null&&ro.next!==null;if(no=0,io=ro=X=null,ao=!1,lo=0,uo=null,t)throw Error(i(300));e===null||Xs||(e=e.dependencies,e!==null&&Ui(e)&&(Xs=!0))}function _o(e,t,n,r){X=e;var a=0;do{if(oo&&(uo=null),lo=0,oo=!1,25<=a)throw Error(i(301));if(a+=1,io=ro=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Ps,o=t(n,r)}while(oo);return o}function vo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?To(t):t,e=e.useState()[0],(ro===null?null:ro.memoizedState)!==e&&(X.flags|=1024),t}function yo(){var e=co!==0;return co=0,e}function bo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function xo(e){if(ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ao=!1}no=0,io=ro=X=null,oo=!1,lo=co=0,uo=null}function So(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return io===null?X.memoizedState=io=e:io=io.next=e,io}function Co(){if(ro===null){var e=X.alternate;e=e===null?null:e.memoizedState}else e=ro.next;var t=io===null?X.memoizedState:io.next;if(t!==null)io=t,ro=e;else{if(e===null)throw X.alternate===null?Error(i(467)):Error(i(310));ro=e,e={memoizedState:ro.memoizedState,baseState:ro.baseState,baseQueue:ro.baseQueue,queue:ro.queue,next:null},io===null?X.memoizedState=io=e:io=io.next=e}return io}function wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(e){var t=lo;return lo+=1,uo===null&&(uo=[]),e=_a(uo,e,t),t=X,(io===null?t.memoizedState:io.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ms:Ns),e}function Eo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return To(e);if(e.$$typeof===C)return Gi(e)}throw Error(i(438,String(e)))}function Do(e){var t=null,n=X.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=X.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=wo(),X.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]=A;return t.index++,n}function Oo(e,t){return typeof t==`function`?t(e):t}function ko(e){return Ao(Co(),ro,e)}function Ao(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?(no&f)===f:(Q&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===na&&(d=!0);else if((no&p)===p){u=u.next,p===na&&(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,X.lanes|=p,Ul|=p;f=u.action,so&&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,X.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!dr(o,e.memoizedState)&&(Xs=!0,d&&(n=ra,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 jo(e){var t=Co(),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);dr(o,t.memoizedState)||(Xs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Mo(e,t,n){var r=X,a=Co(),o=wi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!dr((ro||a).memoizedState,n);if(s&&(a.memoizedState=n,Xs=!0),a=a.queue,rs(Fo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||io!==null&&io.memoizedState.tag&1){if(r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||no&127||No(r,t,n)}return n}function No(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t=wo(),X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Po(e,t,n,r){t.value=n,t.getSnapshot=r,Io(t)&&Lo(e)}function Fo(e,t,n){return n(function(){Io(t)&&Lo(e)})}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dr(e,n)}catch{return!0}}function Lo(e){var t=Kr(e,2);t!==null&&pu(t,e,2)}function Ro(e){var t=So();if(typeof e==`function`){var n=e;if(e=n(),so){Ne(!0);try{n()}finally{Ne(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:e},t}function zo(e,t,n,r){return e.baseState=n,Ao(e,ro,typeof r==`function`?r:Oo)}function Bo(e,t,n,r,a){if(Os(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)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Vo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Vo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Ho(e,t,s)}catch(n){Wo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Ho(e,t,a)}catch(n){Wo(e,t,n)}}function Ho(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Uo(e,t,n)},function(n){return Wo(e,t,n)}):Uo(e,t,n)}function Uo(e,t,n){t.status=`fulfilled`,t.value=n,Go(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Vo(e,n)))}function Wo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Go(t),t=t.next;while(t!==r)}e.action=null}function Go(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ko(e,t){return t}function qo(e,t){if(wi){var n=Fl.formState;if(n!==null){a:{var r=X;if(wi){if(Ci){b:{for(var i=Ci,a=Ei;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ci=lf(i.nextSibling),r=i.data===`F!`;break a}}Oi(r)}r=!1}r&&(t=n[0])}}return n=So(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:t},n.queue=r,n=Ts.bind(null,X,r),r.dispatch=n,r=Ro(!1),a=Ds.bind(null,X,!1,r.queue),r=So(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Bo.bind(null,X,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Jo(e){return Yo(Co(),ro,e)}function Yo(e,t,n){if(t=Ao(e,t,Ko)[0],e=ko(Oo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=To(t)}catch(e){throw e===fa?ma:e}else r=t;t=Co();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(X.flags|=2048,Qo(9,{destroy:void 0},Xo.bind(null,i,n),null)),[r,a,e]}function Xo(e,t){e.action=t}function Zo(e){var t=Co(),n=ro;if(n!==null)return Yo(t,n,e);Co(),t=t.memoizedState,n=Co();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Qo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=X.updateQueue,t===null&&(t=wo(),X.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 $o(){return Co().memoizedState}function es(e,t,n,r){var i=So();X.flags|=e,i.memoizedState=Qo(1|t,{destroy:void 0},n,r===void 0?null:r)}function ts(e,t,n,r){var i=Co();r=r===void 0?null:r;var a=i.memoizedState.inst;ro!==null&&r!==null&&mo(r,ro.memoizedState.deps)?i.memoizedState=Qo(t,a,n,r):(X.flags|=e,i.memoizedState=Qo(1|t,a,n,r))}function ns(e,t){es(8390656,8,e,t)}function rs(e,t){ts(2048,8,e,t)}function is(e){X.flags|=4;var t=X.updateQueue;if(t===null)t=wo(),X.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function as(e){var t=Co().memoizedState;return is({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function os(e,t){return ts(4,2,e,t)}function ss(e,t){return ts(4,4,e,t)}function cs(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 ls(e,t,n){n=n==null?null:n.concat([e]),ts(4,4,cs.bind(null,t,e),n)}function us(){}function ds(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&mo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fs(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&mo(t,r[1]))return r[0];if(r=e(),so){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r}function ps(e,t,n){return n===void 0||no&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),X.lanes|=e,Ul|=e,n)}function ms(e,t,n,r){return dr(n,t)?n:Ha.current===null?!(no&42)||no&1073741824&&!(Q&261930)?(Xs=!0,e.memoizedState=n):(e=fu(),X.lanes|=e,Ul|=e,t):(e=ps(e,n,r),dr(e,t)||(Xs=!0),e)}function hs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Ds(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Es(e,t,oa(c,r),du(e)):Es(e,t,r,du(e))}catch(n){Es(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function gs(){}function _s(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=vs(e).queue;hs(e,a,t,te,n===null?gs:function(){return ys(e),n(r)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},du())}function bs(){return Gi(Qf)}function xs(){return Co().memoizedState}function Ss(){return Co().memoizedState}function Cs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Na(n);var r=Pa(t,e,n);r!==null&&(pu(r,t,n),Fa(r,t,n)),t={cache:Qi()},e.payload=t;return}t=t.return}}function ws(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Os(e)?ks(t,n):(n=Gr(e,t,n,r),n!==null&&(pu(n,e,r),As(n,t,r)))}function Ts(e,t,n){Es(e,t,n,du())}function Es(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Os(e))ks(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,dr(s,o))return Wr(e,t,i,0),Fl===null&&Ur(),!1}catch{}if(n=Gr(e,t,i,r),n!==null)return pu(n,e,r),As(n,t,r),!0}return!1}function Ds(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(i(479))}else t=Gr(e,n,r,2),t!==null&&pu(t,e,2)}function Os(e){var t=e.alternate;return e===X||t!==null&&t===X}function ks(e,t){oo=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function As(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xe(e,n)}}var js={readContext:Gi,use:Eo,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useLayoutEffect:po,useInsertionEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useSyncExternalStore:po,useId:po,useHostTransitionStatus:po,useFormState:po,useActionState:po,useOptimistic:po,useMemoCache:po,useCacheRefresh:po};js.useEffectEvent=po;var Ms={readContext:Gi,use:Eo,useCallback:function(e,t){return So().memoizedState=[e,t===void 0?null:t],e},useContext:Gi,useEffect:ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),es(4194308,4,cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){es(4,2,e,t)},useMemo:function(e,t){var n=So();t=t===void 0?null:t;var r=e();if(so){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=So();if(n!==void 0){var i=n(t);if(so){Ne(!0);try{n(t)}finally{Ne(!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=ws.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=So();return e={current:e},t.memoizedState=e},useState:function(e){e=Ro(e);var t=e.queue,n=Ts.bind(null,X,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:us,useDeferredValue:function(e,t){return ps(So(),e,t)},useTransition:function(){var e=Ro(!1);return e=hs.bind(null,X,e.queue,!0,!1),So().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=X,a=So();if(wi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Q&127||No(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ns(Fo.bind(null,r,o,e),[e]),r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,o,n,t),null),n},useId:function(){var e=So(),t=Fl.identifierPrefix;if(wi){var n=gi,r=hi;n=(r&~(1<<32-Pe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=fo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:bs,useFormState:qo,useActionState:qo,useOptimistic:function(e){var t=So();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ds.bind(null,X,!0,n),n.dispatch=t,[e,t]},useMemoCache:Do,useCacheRefresh:function(){return So().memoizedState=Cs.bind(null,X)},useEffectEvent:function(e){var t=So(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ns={readContext:Gi,use:Eo,useCallback:ds,useContext:Gi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:ko,useRef:$o,useState:function(){return ko(Oo)},useDebugValue:us,useDeferredValue:function(e,t){return ms(Co(),ro.memoizedState,e,t)},useTransition:function(){var e=ko(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){return zo(Co(),ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ns.useEffectEvent=as;var Ps={readContext:Gi,use:Eo,useCallback:ds,useContext:Gi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:jo,useRef:$o,useState:function(){return jo(Oo)},useDebugValue:us,useDeferredValue:function(e,t){var n=Co();return ro===null?ps(n,e,t):ms(n,ro.memoizedState,e,t)},useTransition:function(){var e=jo(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){var n=Co();return ro===null?(n.baseState=e,[e,n.queue.dispatch]):zo(n,ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ps.useEffectEvent=as;function Fs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Na(r);i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(pu(t,e,r),Fa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Na(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(pu(t,e,r),Fa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Na(n);r.tag=2,t!=null&&(r.callback=t),t=Pa(e,r,n),t!==null&&(pu(t,e,n),Fa(t,e,n))}};function Ls(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?!fr(n,r)||!fr(i,a):!0}function Rs(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&&Is.enqueueReplaceState(t,t.state,null)}function zs(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Bs(e){zr(e)}function Vs(e){console.error(e)}function Hs(e){zr(e)}function Us(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ws(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 Gs(e,t,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){Us(e,t)},n}function Ks(e){return e=Na(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(){Ws(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ws(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Js(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Hi(t,n,a,!0),n=qa.current,n!==null){switch(n.tag){case 31:case 13:return Ja===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===ha?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)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(wi)return t=qa.current,t===null?(r!==Di&&(t=Error(i(423),{cause:r}),Pi(si(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=si(r,n),a=Gs(e.stateNode,r,a),Ia(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Di&&(e=Error(i(422),{cause:r}),Pi(si(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=si(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Gs(n.stateNode,r,e),Ia(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`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ks(a),qs(a,e,n,r),Ia(n,a),!1}n=n.return}while(n!==null);return!1}var Ys=Error(i(461)),Xs=!1;function Zs(e,t,n,r){t.child=e===null?ka(t,null,n,r):Oa(t,e.child,n,r)}function Qs(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 Wi(t),r=ho(e,t,n,o,a,i),s=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(wi&&s&&yi(t),t.flags|=1,Zs(e,t,r,i),t.child)}function $s(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Qr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ec(e,t,a,r,i)):(e=ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Cc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?fr:n,n(o,r)&&e.ref===t.ref)return Sc(e,t,i)}return t.flags|=1,e=$r(a,r),e.ref=t.ref,e.return=t,t.child=e}function ec(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(fr(a,r)&&e.ref===t.ref)if(Xs=!1,t.pendingProps=r=a,Cc(e,i))e.flags&131072&&(Xs=!0);else return t.lanes=e.lanes,Sc(e,t,i)}return cc(e,t,n,r,i)}function tc(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 rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ua(t,a===null?null:a.cachePool),a===null?Ga():Wa(t,a),Za(t);else return r=t.lanes=536870912,rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ua(t,null),Ga(),Qa(t)):(ua(t,a.cachePool),Wa(t,a),Qa(t),t.memoizedState=null);return Zs(e,t,i,n),t.child}function nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rc(e,t,n,r,i){var a=la();return a=a===null?null:{parent:Zi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ua(t,null),Ga(),Za(t),e!==null&&Hi(e,t,r,!0),t.childLanes=i,null}function ic(e,t){return t=_c({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ac(e,t,n){return Oa(t,e.child,null,n),e=ic(t,t.pendingProps),e.flags|=2,$a(t),t.memoizedState=null,e}function oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(wi){if(r.mode===`hidden`)return e=ic(t,r),t.lanes=536870912,nc(null,e);if(Xa(t),(e=Ci)?(e=af(e,Ei),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=ii(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return ic(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Xa(t),a)if(t.flags&256)t.flags&=-257,t=ac(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Xs||Hi(e,t,n,!1),a=(n&e.childLanes)!==0,Xs||a){if(r=Fl,r!==null&&(s=H(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Kr(e,s),pu(r,e,s),Ys;Tu(),t=ac(e,t,n)}else e=o.treeContext,Ci=lf(s.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=ic(t,r),t.flags|=4096;return t}return e=$r(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(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 cc(e,t,n,r,i){return Wi(t),n=ho(e,t,n,r,void 0,i),r=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(wi&&r&&yi(t),t.flags|=1,Zs(e,t,n,i),t.child)}function lc(e,t,n,r,i,a){return Wi(t),t.updateQueue=null,n=_o(t,r,n,i),go(e),r=yo(),e!==null&&!Xs?(bo(e,t,a),Sc(e,t,a)):(wi&&r&&yi(t),t.flags|=1,Zs(e,t,n,a),t.child)}function uc(e,t,n,r,i){if(Wi(t),t.stateNode===null){var a=Yr,o=n.contextType;typeof o==`object`&&o&&(a=Gi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Is,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ja(t),o=n.contextType,a.context=typeof o==`object`&&o?Gi(o):Yr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Fs(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&&Is.enqueueReplaceState(a,a.state,null),za(t,r,a,i),Ra(),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=zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Yr,typeof u==`object`&&u&&(o=Gi(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)&&Rs(t,a,r,o),Aa=!1;var f=t.memoizedState;a.state=f,za(t,r,a,i),Ra(),l=t.memoizedState,s||f!==l||Aa?(typeof d==`function`&&(Fs(t,n,d,r),l=t.memoizedState),(c=Aa||Ls(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,Ma(e,t),o=t.memoizedProps,u=zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Yr,typeof l==`object`&&l&&(c=Gi(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)&&Rs(t,a,r,c),Aa=!1,f=t.memoizedState,a.state=f,za(t,r,a,i),Ra();var p=t.memoizedState;o!==d||f!==p||Aa||e!==null&&e.dependencies!==null&&Ui(e.dependencies)?(typeof s==`function`&&(Fs(t,n,s,r),p=t.memoizedState),(u=Aa||Ls(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ui(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,sc(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=Oa(t,e.child,null,i),t.child=Oa(t,null,n,i)):Zs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Sc(e,t,i),e}function dc(e,t,n,r){return Mi(),t.flags|=256,Zs(e,t,n,r),t.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(e){return{baseLanes:e,cachePool:da()}}function mc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function hc(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:(eo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(wi){if(a?Ya(t):Qa(t),(e=Ci)?(e=af(e,Ei),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=ii(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Qa(t),a=t.mode,c=_c({mode:`hidden`,children:c},a),r=ni(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(null,r)):(Ya(t),gc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Ya(t),t.flags&=-257,t=vc(e,t,n)):t.memoizedState===null?(Qa(t),c=r.fallback,a=t.mode,r=_c({mode:`visible`,children:r.children},a),c=ni(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Oa(t,e.child,null,n),r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,t=nc(null,r)):(Qa(t),t.child=e.child,t.flags|=128,t=null);else if(Ya(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Pi({value:r,source:null,stack:null}),t=vc(e,t,n)}else if(Xs||Hi(e,t,n,!1),s=(n&e.childLanes)!==0,Xs||s){if(s=Fl,s!==null&&(r=H(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Kr(e,r),pu(s,e,r),Ys;of(c)||Tu(),t=vc(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ci=lf(c.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=gc(t,r.children),t.flags|=4096);return t}return a?(Qa(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=$r(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ni(c,a,n,null),c.flags|=2):c=$r(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,nc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=pc(n):(a=c.cachePool,a===null?a=da():(l=Zi._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(e.child,r)):(Ya(t),n=e.child,e=n.sibling,n=$r(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 gc(e,t){return t=_c({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function _c(e,t){return e=Zr(22,e,null,t),e.lanes=0,e}function vc(e,t,n){return Oa(t,e.child,null,n),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bi(e.return,t,n)}function bc(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 xc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=eo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(eo,o),Zs(e,t,r,n),r=wi?di:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yc(e,n,t);else if(e.tag===19)yc(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&&to(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bc(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&&to(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bc(t,!0,n,null,a,r);break;case`together`:bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Sc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Hi(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=$r(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$r(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ui(e))):!0}function wc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ri(t,Zi,e.memoizedState.cache),Mi();break;case 27:case 5:z(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ri(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ya(t),e=Sc(e,t,n),e===null?null:e.sibling):hc(e,t,n):(Ya(t),t.flags|=128,null);Ya(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Hi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return xc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(eo,eo.current),r)break;return null;case 22:return t.lanes=0,tc(e,t,n,t.pendingProps);case 24:Ri(t,Zi,e.memoizedState.cache)}return Sc(e,t,n)}function Tc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xs=!0;else{if(!Cc(e,n)&&!(t.flags&128))return Xs=!1,wc(e,t,n);Xs=!!(e.flags&131072)}else Xs=!1,wi&&t.flags&1048576&&vi(t,di,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=va(t.elementType),t.type=e,typeof e==`function`)Qr(e)?(r=zs(e,r),t.tag=1,t=uc(null,t,e,r,n)):(t.tag=0,t=cc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=Qs(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=$s(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=zs(r,t.pendingProps),uc(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ma(e,t),za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ri(t,Zi,r),r!==o.cache&&Vi(t,[Zi],n,!0),Ra(),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=dc(e,t,r,n);break a}else if(r!==a){a=si(Error(i(424)),t),Pi(a),t=dc(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(Ci=lf(e.firstChild),Si=t,wi=!0,Ti=null,Ei=!0,n=ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Mi(),r===a){t=Sc(e,t,n);break a}Zs(e,t,r,n)}t=t.child}return t;case 26:return sc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:wi||(n=t.type,e=t.pendingProps,r=Vd(se.current).createElement(n),r[nt]=t,r[rt]=e,Fd(r,n,e),pt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return z(t),e===null&&wi&&(r=t.stateNode=pf(t.type,t.pendingProps,se.current),Si=t,Ei=!0,a=Ci,Qd(t.type)?(uf=a,Ci=lf(r.firstChild)):Ci=a),Zs(e,t,t.pendingProps.children,n),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&wi&&((a=r=Ci)&&(r=nf(r,t.type,t.pendingProps,Ei),r===null?a=!1:(t.stateNode=r,Si=t,Ci=lf(r.firstChild),Ei=!1,a=!0)),a||Oi(t)),z(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ho(e,t,vo,null,null,n),Qf._currentValue=a),sc(e,t),Zs(e,t,r,n),t.child;case 6:return e===null&&wi&&((e=n=Ci)&&(n=rf(n,t.pendingProps,Ei),n===null?e=!1:(t.stateNode=n,Si=t,Ci=null,e=!0)),e||Oi(t)),null;case 13:return hc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):Zs(e,t,r,n),t.child;case 11:return Qs(e,t,t.type,t.pendingProps,n);case 7:return Zs(e,t,t.pendingProps,n),t.child;case 8:return Zs(e,t,t.pendingProps.children,n),t.child;case 12:return Zs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ri(t,t.type,r.value),Zs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Wi(t),a=Gi(a),r=r(a),t.flags|=1,Zs(e,t,r,n),t.child;case 14:return $s(e,t,t.type,t.pendingProps,n);case 15:return ec(e,t,t.type,t.pendingProps,n);case 19:return xc(e,t,n);case 31:return oc(e,t,n);case 22:return tc(e,t,n,t.pendingProps);case 24:return Wi(t),r=Gi(Zi),e===null?(a=la(),a===null&&(a=Fl,o=Qi(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ja(t),Ri(t,Zi,a)):((e.lanes&n)!==0&&(Ma(e,t),za(t,null,null,n),Ra()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ri(t,Zi,r),r!==a.cache&&Vi(t,[Zi],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ri(t,Zi,r))),Zs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ec(e){e.flags|=4}function Dc(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(Su())e.flags|=8192;else throw ya=ha,pa}else e.flags&=-16777217}function Oc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Su())e.flags|=8192;else throw ya=ha,pa}function kc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ge(),e.lanes|=t,ql|=t)}function Ac(e,t){if(!wi)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 jc(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 Mc(e,t,n){var r=t.pendingProps;switch(bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jc(t),null;case 1:return jc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),zi(Zi),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ji(t)?Ec(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ni())),jc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ec(t),o===null?(jc(t),Dc(t,a,null,r,n)):(jc(t),Oc(t,o))):o?o===e.memoizedState?(jc(t),t.flags&=-16777217):(Ec(t),jc(t),Oc(t,o)):(e=e.memoizedProps,e!==r&&Ec(t),jc(t),Dc(t,a,e,r,n)),null;case 27:if(de(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}e=ae.current,ji(t)?ki(t,e):(e=pf(a,r,n),t.stateNode=e,Ec(t))}return jc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}if(o=ae.current,ji(t))ki(t,o);else{var s=Vd(se.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[nt]=t,o[rt]=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(Fd(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&&Ec(t)}}return jc(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,ji(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Si,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Oi(t,!0)}else e=Vd(e).createTextNode(r),e[nt]=t,t.stateNode=e}return jc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ji(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[nt]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),e=!1}else n=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($a(t),t):($a(t),null);if(t.flags&128)throw Error(i(558))}return jc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ji(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[nt]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),a=!1}else a=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?($a(t),t):($a(t),null)}return $a(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),kc(t,t.updateQueue),jc(t),null);case 4:return ue(),e===null&&Sd(t.stateNode.containerInfo),jc(t),null;case 10:return zi(t.type),jc(t),null;case 19:if(L(eo),r=t.memoizedState,r===null)return jc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ac(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=to(e),o!==null){for(t.flags|=128,Ac(r,!1),e=o.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ei(n,e),n=n.sibling;return R(eo,eo.current&1|2),wi&&_i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&B()>$l&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304)}else{if(!a)if(e=to(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),Ac(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!wi)return jc(t),null}else 2*B()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,Ac(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?(jc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=B(),e.sibling=null,n=eo.current,R(eo,a?n&1|2:n&1),wi&&_i(t,r.treeForkCount),e);case 22:case 23:return $a(t),Ka(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(jc(t),t.subtreeFlags&6&&(t.flags|=8192)):jc(t),n=t.updateQueue,n!==null&&kc(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&&L(ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zi(Zi),jc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Nc(e,t){switch(bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zi(Zi),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if($a(t),t.alternate===null)throw Error(i(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(eo),null;case 4:return ue(),null;case 10:return zi(t.type),null;case 22:case 23:return $a(t),Ka(),e!==null&&L(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zi(Zi),null;case 25:return null;default:return null}}function Pc(e,t){switch(bi(t),t.tag){case 3:zi(Zi),ue();break;case 26:case 27:case 5:de(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&$a(t);break;case 13:$a(t);break;case 19:L(eo);break;case 10:zi(t.type);break;case 22:case 23:$a(t),Ka(),e!==null&&L(ca);break;case 24:zi(Zi)}}function Fc(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){Uu(t,t.return,e)}}function Ic(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){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Lc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Va(t,n)}catch(t){Uu(e,e.return,t)}}}function Rc(e,t,n){n.props=zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function zc(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){Uu(e,t,n)}}function Bc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(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){Uu(e,t,n)}else n.current=null}function Vc(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){Uu(e,e.return,t)}}function Hc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[rt]=t}catch(t){Uu(e,e.return,t)}}function Uc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function Wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Uc(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&&Qd(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 Gc(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=J));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(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&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(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]);Fd(t,r,n),t[nt]=e,t[rt]=n}catch(t){Uu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,zd=sp,e=gr(e),_r(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(Bd={focusedElem:e,selectionRange:n},sp=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,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=zs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(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,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Fc(5,n);break;case 1:if(hl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&Lc(n),r&512&&zc(n,n.return);break;case 3:if(hl(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{Va(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Vc(n),r&512&&zc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?_l(e,n,(n.subtreeFlags&8772)!=0):hl(e,n),Jc=i,Yc=a}break;case 30:break;default:hl(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lt(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 nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 26:Yc||Bc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Bc(n,t);var r=nl,i=rl;Qd(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),mf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Bc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null)if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:nl!==null&&(rl?(e=nl,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):$d(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Ic(2,n,t),Yc||Ic(4,n,t),il(e,t,n);break;case 1:Yc||(Bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Rc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(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){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(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(Qd(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(i(160));al(o,s,a),nl=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Ic(3,e,e.return),Fc(3,e),Ic(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&64&&Jc&&(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=dl;if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(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[ct]||o[nt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[nt]=e,pt(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),Fd(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),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[nt]=e,pt(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&&Hc(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:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),n!==null&&r&4&&Hc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),e.flags&32){a=e.stateNode;try{q(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Hc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=dl,dl=_f(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Xc&&(Xc=!1,ml(e));break;case 4:r=dl,dl=_f(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=B()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||a,Yc=d||l,ul(t,e),Yc=d,Jc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Jc||Yc||gl(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){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){Uu(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,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Uc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Kc(e,Wc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(q(o,``),n.flags&=-33),Kc(e,Wc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,Wc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ic(4,t,t.return),gl(t);break;case 1:Bc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Rc(t,t.return,n),gl(t);break;case 27:mf(t.stateNode);case 26:case 5:Bc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(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:_l(i,a,n),Fc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(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++)Ba(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Lc(a),zc(a,a.return);break;case 27:qc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Vc(a),zc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),zc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(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&&$i(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Fc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(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&&$i(e)));break;case 12:if(i&2048){bl(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){Uu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(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:Sl(a,o,s,c,i),Fc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(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:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=_f(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Ic(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ic(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Ic(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:$i(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var Ml={getCacheForType:function(e){var t=Gi(Zi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Gi(Zi).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Q=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Pl&2&&Q!==0?Q&-Q:F.T===null?$e():ud()}function fu(){if(Kl===0)if(!(Q&536870912)||wi){var e=ze;ze<<=1,!(ze&3932160)&&(ze=262144),Kl=e}else Kl=536870912;return e=qa.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Fl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Q,Kl,!1)),qe(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ue(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!gu(n)){a=Eu(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=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(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:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-B(),10<a)){if(_u(r,t,Kl,!Rl),He(r,0,!0)!==0)break a;au=t,r.timeoutHandle=qd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}}break}while(1);nd(e)}function hu(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:J},El(t,a,d);var m=(a&62914560)===a?Zl-B():(a&4194048)===a?Ql-B():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(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(!dr(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 _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Pe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ye(e,n,t)}function vu(){return Pl&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Li=Ii=null,xo(e),Sa=null,Ca=0,e=Z;for(;e!==null;)Pc(e.alternate,e),e=e.return;Z=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Fl=e,Z=n=$r(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=Ue(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Pe(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Ur(),n}function xu(e,t){X=null,F.H=js,t===fa||t===ma?(t=ba(),Il=3):t===pa?(t=ba(),Il=4):Il=t===Ys?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,Us(e,si(t,e.current)))}function Su(){var e=qa.current;return e===null?!0:(Q&4194048)===Q?Ja===null:(Q&62914560)===Q||Q&536870912?e===Ja:!1}function Cu(){var e=F.H;return F.H=js,e===null?js:e}function wu(){var e=F.A;return F.A=Ml,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&qa.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=Pl;Pl|=2;var i=Cu(),a=wu();(Fl!==e||Q!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Z!==null){var s=Z,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:qa.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Li=Ii=null,Pl=r,F.H=i,F.A=a,Z===null&&(Fl=null,Q=0,Ur()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=Pl;Pl|=2;var r=Cu(),a=wu();Fl!==e||Q!==t?(eu=null,$l=B()+500,bu(e,t)):zl=Ue(e,t);a:do try{if(Il!==0&&Z!==null){t=Z;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(ga(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Fl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:ga(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Li=Ii=null,F.H=r,F.A=a,Pl=n,Z===null?(Fl=null,Q=0,Ur(),Hl):0}function ku(){for(;Z!==null&&!Se();)Au(Z)}function Au(e){var t=Tc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=lc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:xo(t);default:Pc(n,t),t=Z=ei(t,Vl),t=Tc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Li=Ii=null,xo(t),Sa=null,Ca=0;var i=t.return;try{if(Js(e,i,t,n,Q)){Hl=1,Us(e,si(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,Us(e,si(n,e.current)),Z=null;return}t.flags&32768?(wi||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Mc(t.alternate,t,Vl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Nc(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Hl=6,Z=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Hr,Je(e,n,o,s,c,l),e===Fl&&(Z=Fl=null,Q=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(V,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Pl,Pl|=4;try{$c(e,t,n)}finally{Pl=s,I.p=a,F.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=Bd,o=gr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&hr(s.ownerDocument.documentElement,s)){if(c!==null&&_r(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 _=mr(s,h),v=mr(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=!!zd,Bd=zd=null}finally{Pl=i,I.p=r,F.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{el(e,t.alternate,t)}finally{Pl=i,I.p=r,F.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,Ce();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),Qe(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.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{F.T=t,I.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$i(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=Qe(au),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,rd(0,!1),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{I.p=a,F.T=r,zu(e,t)}}function Hu(e,t,n){t=si(n,t),t=Gs(e.stateNode,t,2),e=Pa(e,t,2),e!==null&&(qe(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=si(n,e),n=Ks(2),r=Pa(t,n,2),r!==null&&(qs(n,r,t,e),qe(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;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)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Q&n)===n&&(Hl===4||Hl===3&&(Q&62914560)===Q&&300>B()-Zl?!(Pl&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=Ge()),e=Kr(e,t),e!==null&&(qe(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(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),Ku(e,n)}function Yu(e,t){return be(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;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-Pe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Q,a=He(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ue(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Kd()&&(e=td);for(var t=B(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Pe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=We(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=He(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),Qe(n)){case 2:case 8:n=Ee;break;case 32:n=V;break;case 268435456:n=Oe;break;default:n=V}return r=sd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Q;return r=He(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,B()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Xd(function(){Pl&6?be(Te,id):ad()})}function ud(){if(td===0){var e=na;e===0&&(e=Re,Re<<=1,!(Re&261888)&&(Re=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Ut(``+e)}function fd(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 pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[rt]||null).action),o=r.submitter;o&&(t=(t=o[rt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new dn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);_s(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),_s(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Lr.length;md++){var hd=Lr[md];Rr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Rr(kr,`onAnimationEnd`),Rr(Ar,`onAnimationIteration`),Rr(jr,`onAnimationStart`),Rr(`dblclick`,`onDoubleClick`),Rr(`focusin`,`onFocus`),Rr(`focusout`,`onBlur`),Rr(Mr,`onTransitionRun`),Rr(Nr,`onTransitionStart`),Rr(Pr,`onTransitionCancel`),Rr(Fr,`onTransitionEnd`),_t(`onMouseEnter`,[`mouseout`,`mouseover`]),_t(`onMouseLeave`,[`mouseout`,`mouseover`]),_t(`onPointerEnter`,[`pointerout`,`pointerover`]),_t(`onPointerLeave`,[`pointerout`,`pointerover`]),gt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),gt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),gt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),gt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(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){zr(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){zr(e)}i.currentTarget=null,a=c}}}}function yd(e,t){var n=t[U];n===void 0&&(n=t[U]=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,mt.forEach(function(t){t!==`selectionchange`&&(_d.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,!$t||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=ut(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}Xt(function(){var r=a,i=Gt(n),s=[];a:{var c=Ir.get(e);if(c!==void 0){var l=dn,u=e;switch(e){case`keypress`:if(on(n)===0)break a;case`keydown`:case`keyup`:l=kn;break;case`focusin`:u=`focus`,l=bn;break;case`focusout`:u=`blur`,l=bn;break;case`beforeblur`:case`afterblur`:l=bn;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=vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=jn;break;case kr:case Ar:case jr:l=xn;break;case Fr:l=Y;break;case`scroll`:case`scrollend`:l=pn;break;case`wheel`:l=Mn;break;case`copy`:case`cut`:case`paste`:l=Sn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=An;break;case`toggle`:case`beforetoggle`:l=Nn}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=Zt(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!==Wt&&(u=n.relatedTarget||n.fromElement)&&(ut(u)||u[it]))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?ut(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=vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=An,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:dt(l),h=u==null?c:dt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ut(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?dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=$n;else if(qn(c))if(er)v=lr;else{v=sr;var y=or}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Bt(r.elementType)&&(v=$n):v=cr;if(v&&=v(e,r)){Jn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?dt(r):window,e){case`focusin`:(qn(y)||y.contentEditable===`true`)&&(yr=y,br=r,xr=null);break;case`focusout`:xr=br=yr=null;break;case`mousedown`:Sr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Sr=!1,Cr(s,n,i);break;case`selectionchange`:if(vr)break;case`keydown`:case`keyup`:Cr(s,n,i)}var b;if(Fn)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 Un?Vn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Rn&&n.locale!==`ko`&&(Un||x!==`onCompositionStart`?x===`onCompositionEnd`&&Un&&(b=an()):(tn=i,nn=`value`in tn?tn.value:tn.textContent,Un=!0)),y=Ed(r,x),0<y.length&&(x=new Cn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Hn(n),b!==null&&(x.data=b)))),(b=Ln?Wn(e,n):Gn(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Cn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(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=Zt(e,n),i!=null&&r.unshift(Td(e,i,a)),i=Zt(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=Zt(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=Zt(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 Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||q(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&q(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:zt(e,r,o);break;case`data`:if(t!==`object`){Ct(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=Ut(``+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`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ut(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=J);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`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=Ut(``+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`:yd(`beforetoggle`,e),yd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(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=Vt.get(n)||n,St(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:zt(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`?q(e,r):(typeof r==`number`||typeof r==`bigint`)&&q(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=J);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ht.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[rt]||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,``):St(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`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:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`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:Nd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in yd(`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:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in yd(`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:Nd(e,t,s,c,n,null)}K(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:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`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:Nd(e,t,u,r,n,null)}return;default:if(Bt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(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)||Nd(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&&Nd(e,t,p,m,r,f)}}Mt(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)||Nd(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&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(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:Nd(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&&Nd(e,t,s,a,r,o)}It(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:Nd(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:Nd(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)&&Nd(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:Nd(e,t,u,p,r,m)}return;default:if(Bt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(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||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(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||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){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&&Ld(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&&Ld(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 zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Ud(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 Wd(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 Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(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`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Np(t)}function ef(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 tf(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`:tf(n),lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(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[ct])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=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(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 lf(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 uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(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 pf(e,t,n){switch(t=Vd(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 mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lt(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=I.d;I.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:$,X:Df,S:Ef,M:Of};function yf(){var e=vf.f(),t=vu();return e||t}function bf(e){var t=W(e);t!==null&&t.tag===5&&t.type===`form`?ys(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}hf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Fd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function $(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!hf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),hf.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`),Fd(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ef(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=ft(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=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);pt(c),Fd(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){vf.X(e,t);var n=xf;if(n&&e){var r=ft(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=hf.get(i))&&zf(e,t),a=n.createElement(`script`),pt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=ft(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&zf(e,t),a=n.createElement(`script`),pt(a),Fd(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=se.current)?_f(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=ft(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=ft(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),hf.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},hf.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=ft(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="`+jt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},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}),Fd(t,`link`,n),pt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+jt(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~="`+jt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Fd(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,pt(o),o;r=Mf(n),(a=hf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(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,pt(a),a):(r=n,(a=hf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Fd(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[ct]||a[nt]||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,pt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=hf.get(i))&&Rf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(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*Rd());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:te,_currentValue2:te,_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=Ke(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ke(0),this.hiddenUpdates=Ke(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=Zr(3,null,null,t),e.current=a,a.stateNode=e,t=Qi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ja(a),e}function tp(e){return e?(e=Yr,e):Yr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Na(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Pa(e,r,t),n!==null&&(pu(n,e,t),Fa(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=Kr(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=Ze(t);var n=Kr(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.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=W(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ve(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=B()+500,rd(0,!1))}}break;case 31:case 13:s=Kr(a,2),s!==null&&pu(s,a,2),vu(),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=Gt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ut(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(we()){case Te:return 2;case Ee:return 8;case V:case De:return 32;case Oe: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=W(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=ut(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,et(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,et(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);Wt=r,n.target.dispatchEvent(r),Wt=null}else return t=W(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=W(n);a!==null&&(e.splice(t,3),t-=3,_s(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[rt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||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,du(),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),vu(),t[it]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();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.6`)throw Error(i(527,Lp,`19.2.6`));I.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=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{je=zp.inject(Rp),Me=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Bs,s=Vs,c=Hs;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[it]=t.current,Sd(e),new Fp(t)}})),y=s(((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=v()})),b=u(p()),x=u(y(),1),S=typeof window>`u`?null:window;S&&(S.process||={env:{},platform:`win32`,version:`0.0.0`,versions:{node:`0.0.0`,v8:`0.0.0`,uv:`0.0.0`,zlib:`0.0.0`,brotli:`0.0.0`,ares:`0.0.0`,modules:`0`,nghttp2:`0.0.0`,napi:`0`,llhttp:`0.0.0`,openssl:`0.0.0`,cldr:`0.0.0`,icu:`0.0.0`,tz:`0.0.0`,unicode:`0.0.0`,http_parser:`0.0.0`},argv:[],execArgv:[],pid:0,ppid:0,arch:`x64`,title:`browser`,browser:!0,execPath:``,cwd(){return`/`},chdir(){},umask(){return 0},nextTick(e,...t){setTimeout(()=>e(...t),0)},exit(){throw Error(`process.exit is unavailable in the browser`)},on(){return S.process},off(){return S.process},once(){return S.process},emit(){return!1},removeListener(){return S.process},addListener(){return S.process},prependListener(){return S.process},prependOnceListener(){return S.process},removeAllListeners(){return S.process},listeners(){return[]},rawListeners(){return[]},listenerCount(){return 0},eventNames(){return[]},getMaxListeners(){return 0},setMaxListeners(){return S.process},stdout:void 0,stderr:void 0,stdin:void 0,disconnect(){},connected:!1,kill(){return!1},memoryUsage(){return{rss:0,heapTotal:0,heapUsed:0,external:0,arrayBuffers:0}},cpuUsage(){return{user:0,system:0}},uptime(){return 0},hrtime(e){return[0,0]},dlopen(){throw Error(`process.dlopen is unavailable in the browser`)},release:{name:`node`,sourceUrl:``,headersUrl:``,libUrl:``},config:{variables:{}}},S.global||=globalThis);var C=u(_());function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}var T;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(T||={});var E=`popstate`;function D(e){e===void 0&&(e={});function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return M(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:N(t)}return ee(t,n,null,e)}function O(e,t){if(e===!1||e==null)throw Error(t)}function k(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function A(){return Math.random().toString(36).substr(2,8)}function j(e,t){return{usr:e.state,key:e.key,idx:t}}function M(e,t,n,r){return n===void 0&&(n=null),w({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?P(t):t,{state:n,key:t&&t.key||r||A()})}function N(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function P(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=T.Pop,c=null,l=u();l??(l=0,o.replaceState(w({},o.state,{idx:l}),``));function u(){return(o.state||{idx:null}).idx}function d(){s=T.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=T.Push;let r=M(h.location,e,t);n&&n(r,e),l=u()+1;let d=j(r,l),f=h.createHref(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=T.Replace;let r=M(h.location,e,t);n&&n(r,e),l=u();let i=j(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){let t=i.location.origin===`null`?i.location.href:i.location.origin,n=typeof e==`string`?e:N(e);return n=n.replace(/ $/,`%20`),O(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}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(E,d),c=e,()=>{i.removeEventListener(E,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}var F;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(F||={});function I(e,t,n){return n===void 0&&(n=`/`),te(e,t,n,!1)}function te(e,t,n,r){let i=he((typeof t==`string`?P(t):t).pathname||`/`,n);if(i==null)return null;let a=ne(e);ie(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=me(i);o=de(a[e],t,r)}return o}function ne(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(O(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let s=B([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(O(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+s+`".`)),ne(e.children,t,c,s)),!(e.path==null&&!e.index)&&t.push({path:s,score:ue(s,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of re(e.path))i(e,t,n)}),t}function re(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=re(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 ie(e){e.sort((e,t)=>e.score===t.score?z(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var L=/^:[\w-]+$/,R=3,ae=2,oe=1,se=10,ce=-2,le=e=>e===`*`;function ue(e,t){let n=e.split(`/`),r=n.length;return n.some(le)&&(r+=ce),t&&(r+=ae),n.filter(e=>!le(e)).reduce((e,t)=>e+(L.test(t)?R:t===``?oe:se),r)}function z(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 de(e,t,n){n===void 0&&(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=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:B([a,u.pathname]),pathnameBase:we(B([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=B([a,u.pathnameBase]))}return o}function fe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pe(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,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return i&&!c?e[r]=void 0:e[r]=(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function pe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),k(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)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function me(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return k(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function he(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 ge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_e=e=>ge.test(e);function ve(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?P(e):e,a;if(n)if(_e(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),k(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?ye(n.substring(1),`/`):ye(n,t)}else a=t;return{pathname:a,search:Te(r),hash:Ee(i)}}function ye(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 be(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 xe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Se(e,t){let n=xe(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Ce(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=P(e):(i=w({},e),O(!i.pathname||!i.pathname.includes(`?`),be(`?`,`pathname`,`search`,i)),O(!i.pathname||!i.pathname.includes(`#`),be(`#`,`pathname`,`hash`,i)),O(!i.search||!i.search.includes(`#`),be(`#`,`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=ve(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var B=e=>e.join(`/`).replace(/\/\/+/g,`/`),we=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Te=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ee=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e;function V(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var De=[`post`,`put`,`patch`,`delete`];new Set(De);var Oe=[`get`,...De];new Set(Oe);function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}var Ae=b.createContext(null),je=b.createContext(null),Me=b.createContext(null),Ne=b.createContext(null),Pe=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Fe=b.createContext(null);function Ie(e,t){let{relative:n}=t===void 0?{}:t;!Le()&&O(!1);let{basename:r,navigator:i}=b.useContext(Me),{hash:a,pathname:o,search:s}=Ge(e,{relative:n}),c=o;return r!==`/`&&(c=o===`/`?r:B([r,o])),i.createHref({pathname:c,search:s,hash:a})}function Le(){return b.useContext(Ne)!=null}function Re(){return!Le()&&O(!1),b.useContext(Ne).location}function ze(e){b.useContext(Me).static||b.useLayoutEffect(e)}function Be(){let{isDataRoute:e}=b.useContext(Pe);return e?U():Ve()}function Ve(){!Le()&&O(!1);let e=b.useContext(Ae),{basename:t,future:n,navigator:r}=b.useContext(Me),{matches:i}=b.useContext(Pe),{pathname:a}=Re(),o=JSON.stringify(Se(i,n.v7_relativeSplatPath)),s=b.useRef(!1);return ze(()=>{s.current=!0}),b.useCallback(function(n,i){if(i===void 0&&(i={}),!s.current)return;if(typeof n==`number`){r.go(n);return}let c=Ce(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:B([t,c.pathname])),(i.replace?r.replace:r.push)(c,i.state,i)},[t,r,o,a,e])}var He=b.createContext(null);function Ue(e){let t=b.useContext(Pe).outlet;return t&&b.createElement(He.Provider,{value:e},t)}function We(){let{matches:e}=b.useContext(Pe),t=e[e.length-1];return t?t.params:{}}function Ge(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Me),{matches:i}=b.useContext(Pe),{pathname:a}=Re(),o=JSON.stringify(Se(i,r.v7_relativeSplatPath));return b.useMemo(()=>Ce(e,JSON.parse(o),a,n===`path`),[e,o,a,n])}function Ke(e,t){return qe(e,t)}function qe(e,t,n,r){!Le()&&O(!1);let{navigator:i}=b.useContext(Me),{matches:a}=b.useContext(Pe),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:`/`;o&&o.route;let l=Re(),u;if(t){let e=typeof t==`string`?P(t):t;!(c===`/`||e.pathname?.startsWith(c))&&O(!1),u=e}else u=l;let d=u.pathname||`/`,f=d;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=I(e,{pathname:f}),m=Ze(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:B([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:B([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);return t&&m?b.createElement(Ne.Provider,{value:{location:ke({pathname:`/`,search:``,hash:``,state:null,key:`default`},u),navigationType:T.Pop}},m):m}function Je(){let e=it(),t=V(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return b.createElement(b.Fragment,null,b.createElement(`h2`,null,`Unexpected Application Error!`),b.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?b.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ye=b.createElement(Je,null),Xe=class extends b.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){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:b.createElement(Pe.Provider,{value:this.props.routeContext},b.createElement(Fe.Provider,{value:this.state.error,children:this.props.component}))}};function H(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(Ae);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Pe.Provider,{value:t},r)}function Ze(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);!(e>=0)&&O(!1),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let l,u=!1,d=null,f=null;n&&(l=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||Ye,s&&(c<0&&i===0?(ot(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,f=null):c===i&&(u=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=l?d:u?f:r.route.Component?b.createElement(r.route.Component,null):r.route.element?r.route.element:e,b.createElement(H,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?b.createElement(Xe,{location:n.location,revalidation:n.revalidation,component:d,error:l,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Qe=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(Qe||{}),$e=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}($e||{});function et(e){let t=b.useContext(Ae);return!t&&O(!1),t}function tt(e){let t=b.useContext(je);return!t&&O(!1),t}function nt(e){let t=b.useContext(Pe);return!t&&O(!1),t}function rt(e){let t=nt(e),n=t.matches[t.matches.length-1];return!n.route.id&&O(!1),n.route.id}function it(){let e=b.useContext(Fe),t=tt($e.UseRouteError),n=rt($e.UseRouteError);return e===void 0?t.errors?.[n]:e}function U(){let{router:e}=et(Qe.UseNavigateStable),t=rt($e.UseNavigateStable),n=b.useRef(!1);return ze(()=>{n.current=!0}),b.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,ke({fromRouteId:t},i)))},[e,t])}var at={};function ot(e,t,n){!t&&!at[e]&&(at[e]=!0)}var st=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function ct(e,t){e?.v7_startTransition===void 0&&st(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&st(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&st(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&st(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&st(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&st(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}b.startTransition;function lt(e){let{to:t,replace:n,state:r,relative:i}=e;!Le()&&O(!1);let{future:a,static:o}=b.useContext(Me),{matches:s}=b.useContext(Pe),{pathname:c}=Re(),l=Be(),u=Ce(t,Se(s,a.v7_relativeSplatPath),c,i===`path`),d=JSON.stringify(u);return b.useEffect(()=>l(JSON.parse(d),{replace:n,state:r,relative:i}),[l,d,i,n,r]),null}function ut(e){return Ue(e.context)}function W(e){O(!1)}function dt(e){let{basename:t=`/`,children:n=null,location:r,navigationType:i=T.Pop,navigator:a,static:o=!1,future:s}=e;Le()&&O(!1);let c=t.replace(/^\/*/,`/`),l=b.useMemo(()=>({basename:c,navigator:a,static:o,future:ke({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof r==`string`&&(r=P(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`}=r,h=b.useMemo(()=>{let e=he(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m},navigationType:i}},[c,u,d,f,p,m,i]);return h==null?null:b.createElement(Me.Provider,{value:l},b.createElement(Ne.Provider,{children:n,value:h}))}function ft(e){let{children:t,location:n}=e;return Ke(mt(t),n)}var pt=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(pt||{});new Promise(()=>{}),b.Component;function mt(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(e,r)=>{if(!b.isValidElement(e))return;let i=[...t,r];if(e.type===b.Fragment){n.push.apply(n,mt(e.props.children,i));return}e.type!==W&&O(!1),!(!e.props.index||!e.props.children)&&O(!1);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,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary: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=mt(e.props.children,i)),n.push(a)}),n}function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ht.apply(this,arguments)}function gt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _t(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vt(e,t){return e.button===0&&(!t||t===`_self`)&&!_t(e)}function yt(e){return e===void 0&&(e=``),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 bt(e,t){let n=yt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var xt=[`onClick`,`relative`,`reloadDocument`,`replace`,`state`,`target`,`to`,`preventScrollReset`,`viewTransition`],St=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`viewTransition`,`children`],Ct=`6`;try{window.__reactRouterVersion=Ct}catch{}var wt=b.createContext({isTransitioning:!1}),Tt=b.startTransition;C.flushSync,b.useId;function Et(e){let{basename:t,children:n,future:r,window:i}=e,a=b.useRef();a.current??=D({window:i,v5Compat:!0});let o=a.current,[s,c]=b.useState({action:o.action,location:o.location}),{v7_startTransition:l}=r||{},u=b.useCallback(e=>{l&&Tt?Tt(()=>c(e)):c(e)},[c,l]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>ct(r),[r]),b.createElement(dt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}var Dt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Ot=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,G=b.forwardRef(function(e,t){let{onClick:n,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u}=e,d=gt(e,xt),{basename:f}=b.useContext(Me),p,m=!1;if(typeof c==`string`&&Ot.test(c)&&(p=c,Dt))try{let e=new URL(window.location.href),t=c.startsWith(`//`)?new URL(e.protocol+c):new URL(c),n=he(t.pathname,f);t.origin===e.origin&&n!=null?c=n+t.search+t.hash:m=!0}catch{}let h=Ie(c,{relative:r}),g=Nt(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u});function _(e){n&&n(e),e.defaultPrevented||g(e)}return b.createElement(`a`,ht({},d,{href:p||h,onClick:m||i?n:_,ref:t,target:s}))}),kt=b.forwardRef(function(e,t){let{"aria-current":n=`page`,caseSensitive:r=!1,className:i=``,end:a=!1,style:o,to:s,viewTransition:c,children:l}=e,u=gt(e,St),d=Ge(s,{relative:u.relative}),f=Re(),p=b.useContext(je),{navigator:m,basename:h}=b.useContext(Me),g=p!=null&&Ft(d)&&c===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=he(y,h)||y);let x=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,S=v===_||!a&&v.startsWith(_)&&v.charAt(x)===`/`,C=y!=null&&(y===_||!a&&y.startsWith(_)&&y.charAt(_.length)===`/`),w={isActive:S,isPending:C,isTransitioning:g},T=S?n:void 0,E;E=typeof i==`function`?i(w):[i,S?`active`:null,C?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let D=typeof o==`function`?o(w):o;return b.createElement(G,ht({},u,{"aria-current":T,className:E,ref:t,style:D,to:s,viewTransition:c}),typeof l==`function`?l(w):l)}),At;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`,e.useViewTransitionState=`useViewTransitionState`})(At||={});var jt;(function(e){e.UseFetcher=`useFetcher`,e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(jt||={});function Mt(e){let t=b.useContext(Ae);return!t&&O(!1),t}function Nt(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=Be(),l=Re(),u=Ge(e,{relative:o});return b.useCallback(t=>{vt(t,n)&&(t.preventDefault(),c(e,{replace:r===void 0?N(l)===N(u):r,state:i,preventScrollReset:a,relative:o,viewTransition:s}))},[l,c,u,r,i,n,e,a,o,s])}function Pt(e){let t=b.useRef(yt(e)),n=b.useRef(!1),r=Re(),i=b.useMemo(()=>bt(r.search,n.current?null:t.current),[r.search]),a=Be();return[i,b.useCallback((e,t)=>{let r=yt(typeof e==`function`?e(i):e);n.current=!0,a(`?`+r,t)},[a,i])]}function Ft(e,t){t===void 0&&(t={});let n=b.useContext(wt);n??O(!1);let{basename:r}=Mt(At.useViewTransitionState),i=Ge(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=he(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=he(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fe(i.pathname,o)!=null||fe(i.pathname,a)!=null}var It=s((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})),K=s(((e,t)=>{t.exports=It()}))();function q(...e){return e.filter(Boolean).join(` `)}function Lt(e,t,n=!0){(0,b.useEffect)(()=>{if(!n)return;let r=n=>{let r=e.current;r&&!r.contains(n.target)&&t(n)};return document.addEventListener(`mousedown`,r),()=>document.removeEventListener(`mousedown`,r)},[n,t])}function Rt(e,t,n=!0){(0,b.useEffect)(()=>{if(!n)return;let r=n=>{n.key===e&&t(n)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e,n,t])}function zt(e,t,n){let[r,i]=(0,b.useState)(t),a=e!==void 0;return[a?e:r,(0,b.useCallback)(e=>{a||i(e),n&&n(e)},[a,n])]}function Bt(e,t,n=`bottom-start`){let[r,i]=(0,b.useState)({top:0,left:0,width:0});return(0,b.useLayoutEffect)(()=>{if(!t||!e.current)return;let r=()=>{let t=e.current.getBoundingClientRect(),r=t.bottom+4,a=t.left;n===`bottom-end`&&(a=t.right),n===`top-start`&&(r=t.top-4),i({top:r+window.scrollY,left:a+window.scrollX,width:t.width})};return r(),window.addEventListener(`scroll`,r,!0),window.addEventListener(`resize`,r),()=>{window.removeEventListener(`scroll`,r,!0),window.removeEventListener(`resize`,r)}},[t,n]),r}var Vt=({children:e})=>{let[t]=(0,b.useState)(()=>{let e=document.createElement(`div`);return e.setAttribute(`data-tkc-portal`,``),e});return(0,b.useEffect)(()=>(document.body.appendChild(t),()=>{document.body.removeChild(t)}),[t]),(0,C.createPortal)(e,t)},Ht={check:`M4 8l3 3 5-7`,dash:`M4 8h8`,caret:`M6 4l4 4-4 4`,x:`M4 4l8 8M12 4l-8 8`,plus:`M8 3v10M3 8h10`,minus:`M3 8h10`,search:[`M7.5 13a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11zM11.5 11.5L14 14`,null],folder:`M2 4.5C2 3.67 2.67 3 3.5 3h2.3l1 1.5H12.5c.83 0 1.5.67 1.5 1.5V12c0 .83-.67 1.5-1.5 1.5h-9A1.5 1.5 0 0 1 2 12z`,file:`M4 2h5l3 3v9H4z M9 2v3h3`,gear:`M8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM8 1v2M8 13v2M1 8h2M13 8h2M3 3l1.5 1.5M11.5 11.5L13 13M3 13l1.5-1.5M11.5 4.5L13 3`,calendar:`M3 5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zM3 7h10M5 3v2M11 3v2`,clock:[`M8 2.5A5.5 5.5 0 1 0 8 13.5 5.5 5.5 0 0 0 8 2.5zM8 5v3l2 1.5`,null],pencil:`M3 13l1-3 7-7 2 2-7 7-3 1z`,upload:`M8 11V3M5 6l3-3 3 3M3 13h10`,bell:`M4 11a4 4 0 0 1 8 0v1l1 1H3l1-1zM6 13a2 2 0 0 0 4 0`,info:[`M8 1.5A6.5 6.5 0 1 0 8 14.5 6.5 6.5 0 0 0 8 1.5zM8 7v4.5M8 5h.01`,null],chevronRight:`M6 3l5 5-5 5`,chevronDown:`M3 6l5 5 5-5`},Ut=({name:e,size:t=14,className:n=``,style:r})=>{let i=Ht[e]||``;return(0,K.jsx)(`svg`,{className:n,width:t,height:t,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`inline-block`,verticalAlign:`middle`,...r},children:Array.isArray(i)?i.map((e,t)=>e?(0,K.jsx)(`path`,{d:e},t):null):(0,K.jsx)(`path`,{d:i})})},J=({variant:e=`default`,size:t,loading:n,disabled:r,leading:i,trailing:a,className:o,children:s,onClick:c,...l})=>(0,K.jsxs)(`button`,{className:q(`tkc-btn`,e===`primary`&&`tkc-btn--primary`,e===`ghost`&&`tkc-btn--ghost`,t===`sm`&&`tkc-btn--sm`,o),disabled:r,"data-loading":n||void 0,onClick:c,...l,children:[n&&(0,K.jsx)(`span`,{className:`tkc-btn__spin`}),!n&&i,s,!n&&a]}),Wt=(0,b.forwardRef)(({className:e,invalid:t,...n},r)=>(0,K.jsx)(`input`,{ref:r,className:q(`tkc-input`,t&&`tkc-input--invalid`,e),...n}));Wt.displayName=`Input`;var Gt=(0,b.forwardRef)(({className:e,invalid:t,rows:n=3,...r},i)=>(0,K.jsx)(`textarea`,{ref:i,className:q(`tkc-textarea`,t&&`tkc-input--invalid`,e),rows:n,style:{resize:`vertical`},...r}));Gt.displayName=`Textarea`;var Kt=({label:e,hint:t,error:n,children:r})=>(0,K.jsxs)(`label`,{className:`tkc-field`,children:[e&&(0,K.jsx)(`span`,{className:`tkc-field__label`,children:e}),r,n?(0,K.jsx)(`span`,{className:`tkc-field__error`,children:n}):t?(0,K.jsx)(`span`,{className:`tkc-field__hint`,children:t}):null]}),qt=({children:e,onRemove:t,removing:n})=>(0,K.jsxs)(`span`,{className:q(`tkc-tag`,n&&`tkc-tag--removing`),children:[e,t&&(0,K.jsx)(`button`,{type:`button`,className:`tkc-tag__x`,onClick:t,"aria-label":`remove`,children:(0,K.jsx)(Ut,{name:`x`,size:10})})]}),Jt=e=>{let t=[[`X`,10],[`IX`,9],[`V`,5],[`IV`,4],[`I`,1]],n=``;for(let[r,i]of t)for(;e>=i;)n+=r,e-=i;return n},Yt=({items:e,defaultOpen:t=null,type:n=`single`})=>{let[r,i]=(0,b.useState)(n===`single`?t??null:Array.isArray(t)?t:[]),a=e=>n===`single`?r===e:r.includes(e),o=e=>{i(n===`single`?r===e?null:e:r.includes(e)?r.filter(t=>t!==e):[...r,e])};return(0,K.jsx)(`div`,{className:`tkc-acc`,children:e.map((e,t)=>(0,K.jsxs)(`div`,{className:`tkc-acc__item`,"data-open":a(t)||void 0,children:[(0,K.jsxs)(`button`,{type:`button`,className:`tkc-acc__trigger`,onClick:()=>o(t),children:[(0,K.jsx)(`span`,{className:`tkc-acc__num`,children:e.num||Jt(t+1)}),(0,K.jsx)(`span`,{children:e.title}),(0,K.jsx)(`span`,{className:`tkc-acc__caret`,children:(0,K.jsx)(Ut,{name:`chevronRight`,size:12})})]}),(0,K.jsx)(`div`,{className:`tkc-acc__panel`,children:(0,K.jsx)(`div`,{className:`tkc-acc__body`,children:e.body})})]},t))})},Xt=({value:e,defaultValue:t,onChange:n,items:r=[]})=>{let[i,a]=zt(e,t||r&&r[0]?.value,n);return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`tkc-tabs`,role:`tablist`,children:r.map(e=>(0,K.jsxs)(`button`,{type:`button`,role:`tab`,className:`tkc-tab`,"data-active":i===e.value||void 0,onClick:()=>a(e.value),children:[e.label,e.badge!=null&&(0,K.jsx)(`span`,{className:`tkc-badge`,style:{marginLeft:8},children:e.badge})]},e.value))}),r.map(e=>i===e.value?(0,K.jsx)(`div`,{role:`tabpanel`,style:{paddingTop:16},children:e.body},e.value):null)]})},Zt=({node:e,depth:t=0,expanded:n,setExpanded:r,selected:i,setSelected:a})=>{let o=n.has(e.id),s=!!(e.children&&e.children.length>0);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`tkc-tree__node`,"data-open":o||void 0,"data-selected":i===e.id||void 0,style:{paddingLeft:6+t*16},onClick:()=>{if(a(e.id),s){let t=new Set(n);t.has(e.id)?t.delete(e.id):t.add(e.id),r(t)}},children:[(0,K.jsx)(`span`,{className:`tkc-tree__caret`,children:s?(0,K.jsx)(Ut,{name:`chevronRight`,size:11}):null}),(0,K.jsx)(Ut,{name:s?`folder`:`file`,size:13,style:{color:`var(--tkc-ink-soft)`}}),(0,K.jsx)(`span`,{children:e.label}),e.count!=null&&(0,K.jsx)(`span`,{className:`tkc-tree__count`,children:e.count})]}),s&&o&&e.children.map(e=>(0,K.jsx)(Zt,{node:e,depth:t+1,expanded:n,setExpanded:r,selected:i,setSelected:a},e.id))]})},Qt=({item:e,active:t,onSelect:n,depth:r=0})=>{let[i,a]=(0,b.useState)(!1),o=!!(e.children&&e.children.length>0);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`tkc-tree__node`,"data-selected":t===e.value||void 0,style:{paddingLeft:6+r*16},onClick:()=>{o&&a(e=>!e),n&&n(e.value)},children:[e.icon&&(0,K.jsx)(Ut,{name:e.icon,size:13,style:{color:`var(--tkc-ink-soft)`}}),(0,K.jsx)(`span`,{children:e.label}),o&&(0,K.jsx)(`span`,{className:`tkc-tree__caret`,children:(0,K.jsx)(Ut,{name:`chevronRight`,size:11})})]}),o&&i&&e.children.map(e=>(0,K.jsx)(Qt,{item:e,active:t,onSelect:n,depth:r+1},e.value))]})},$t=({text:e,children:t,placement:n=`top`,delay:r=250})=>{let[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)({top:0,left:0}),c=(0,b.useRef)(null),l=(0,b.useRef)(null),u=()=>{if(!c.current)return;let e=c.current.getBoundingClientRect();s({top:(n===`bottom`?e.bottom+8:e.top-8)+window.scrollY,left:e.left+e.width/2+window.scrollX})},d=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{u(),a(!0)},r)},f=()=>{l.current&&clearTimeout(l.current),a(!1)};return(0,K.jsxs)(K.Fragment,{children:[b.cloneElement(t,{ref:e=>{c.current=e;let n=t.ref;typeof n==`function`?n(e):n&&typeof n==`object`&&`current`in n&&(n.current=e)},onMouseEnter:d,onMouseLeave:f,onFocus:d,onBlur:f}),i&&(0,K.jsx)(Vt,{children:(0,K.jsx)(`div`,{className:`tkc-tip`,style:{top:o.top,left:o.left,transform:`translate(-50%, ${n===`bottom`?`0`:`-100%`})`},children:e})})]})},en=({value:e,defaultValue:t,onChange:n,options:r,placeholder:i=`Select…`,disabled:a})=>{let[o,s]=zt(e,t,n),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(0),f=(0,b.useRef)(null),p=(0,b.useRef)(null),m=Bt(f,c),h=r.map(e=>typeof e==`string`?{value:e,label:e}:e);Lt(p,()=>l(!1),c),Rt(`Escape`,()=>l(!1),c);let g=h.find(e=>e.value===o),_=e=>{if(!c){(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(l(!0),e.preventDefault());return}e.key===`ArrowDown`?(d(e=>(e+1)%h.length),e.preventDefault()):e.key===`ArrowUp`?(d(e=>(e-1+h.length)%h.length),e.preventDefault()):e.key===`Enter`&&(s(h[u].value),l(!1),e.preventDefault())};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{ref:f,type:`button`,className:`tkc-select tkc-focus`,"data-open":c||void 0,disabled:a,onClick:()=>!a&&l(e=>!e),onKeyDown:_,children:[(0,K.jsx)(`span`,{className:g?``:`tkc-select__placeholder`,children:g?g.label:i}),(0,K.jsx)(`span`,{className:`tkc-select__caret`,children:(0,K.jsx)(Ut,{name:`chevronDown`,size:12})})]}),c&&(0,K.jsx)(Vt,{children:(0,K.jsx)(`div`,{ref:p,className:`tkc-pop`,style:{top:m.top,left:m.left,minWidth:m.width},onKeyDown:_,children:h.map((e,t)=>(0,K.jsxs)(`div`,{className:`tkc-pop__item`,"data-active":t===u||void 0,"data-selected":e.value===o||void 0,onMouseEnter:()=>d(t),onClick:()=>{s(e.value),l(!1)},children:[(0,K.jsx)(`span`,{children:e.label}),(0,K.jsx)(`span`,{className:`tkc-pop__check`,children:(0,K.jsx)(Ut,{name:`check`,size:12})})]},e.value))})})]})},tn=({open:e,onClose:t,title:n,children:r,footer:i})=>(Rt(`Escape`,()=>t&&t(),e),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]),e?(0,K.jsxs)(Vt,{children:[(0,K.jsx)(`div`,{className:`tkc-scrim`,onClick:t}),(0,K.jsxs)(`div`,{className:`tkc-modal`,role:`dialog`,"aria-modal":`true`,children:[n&&(0,K.jsxs)(`div`,{className:`tkc-modal__head`,children:[(0,K.jsx)(`span`,{style:{flex:1},children:n}),(0,K.jsx)(`button`,{type:`button`,className:`tkc-toast__x`,onClick:t,"aria-label":`close`,children:(0,K.jsx)(Ut,{name:`x`,size:14})})]}),(0,K.jsx)(`div`,{className:`tkc-modal__body`,children:r}),i&&(0,K.jsx)(`div`,{className:`tkc-modal__foot`,children:i})]})]}):null),nn=({open:e,onClose:t,items:n,placeholder:r=`Type a command…`,onSelect:i})=>{let[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(0),l=(0,b.useRef)(null);Rt(`Escape`,()=>t&&t(),e),(0,b.useEffect)(()=>{e&&(o(``),c(0),setTimeout(()=>l.current?.focus(),0))},[e]);let u=n.filter(e=>e.label.toLowerCase().includes(a.toLowerCase())),d=e=>{e.onSelect&&e.onSelect(),i&&i(e),t&&t()};return e?(0,K.jsxs)(Vt,{children:[(0,K.jsx)(`div`,{className:`tkc-scrim`,onClick:t}),(0,K.jsxs)(`div`,{className:`tkc-modal`,role:`dialog`,"aria-modal":`true`,style:{width:`min(520px, 92vw)`,padding:0},children:[(0,K.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`10px 14px`,borderBottom:`1.5px solid var(--tkc-rule-m)`},children:[(0,K.jsx)(Ut,{name:`search`,size:15,style:{color:`var(--tkc-ink-quiet)`}}),(0,K.jsx)(`input`,{ref:l,style:{border:0,background:`transparent`,outline:0,flex:1,font:`inherit`,fontSize:15,color:`var(--tkc-ink)`},placeholder:r,value:a,onChange:e=>{o(e.target.value),c(0)},onKeyDown:e=>{e.key===`ArrowDown`?(c(e=>Math.min(u.length-1,e+1)),e.preventDefault()):e.key===`ArrowUp`?(c(e=>Math.max(0,e-1)),e.preventDefault()):e.key===`Enter`&&u[s]&&(d(u[s]),e.preventDefault())}})]}),(0,K.jsx)(`div`,{style:{maxHeight:320,overflow:`auto`,padding:4},children:u.length===0?(0,K.jsx)(`div`,{className:`tkc-pop__empty`,children:`No commands found`}):u.map((e,t)=>(0,K.jsxs)(`div`,{className:`tkc-pop__item`,"data-active":t===s||void 0,onMouseEnter:()=>c(t),onClick:()=>d(e),children:[e.icon&&(0,K.jsx)(Ut,{name:e.icon,size:13}),(0,K.jsx)(`span`,{children:e.label}),e.shortcut&&(0,K.jsx)(`span`,{style:{marginLeft:`auto`,fontFamily:`var(--font-mono)`,fontSize:10,letterSpacing:`.1em`,color:`var(--tkc-ink-quiet)`},children:e.shortcut})]},e.id))})]})]}):null},rn=(0,b.createContext)(null),an=({children:e})=>{let[t,n]=(0,b.useState)([]),[r,i]=(0,b.useState)({}),a=(0,b.useCallback)(e=>{i(t=>({...t,[e]:!0})),setTimeout(()=>{n(t=>t.filter(t=>t.id!==e)),i(t=>{let n={...t};return delete n[e],n})},220)},[]),o=(0,b.useCallback)(e=>{let t=Math.random().toString(36).slice(2,9),r={id:t,kind:`info`,duration:4500,...typeof e==`string`?{title:e}:e};return n(e=>[...e,r]),r.duration&&setTimeout(()=>a(t),r.duration),t},[a]);return(0,K.jsxs)(rn.Provider,{value:{push:o,close:a},children:[e,(0,K.jsx)(`div`,{className:`tkc-toasts`,children:t.map((e,t)=>(0,K.jsxs)(`div`,{className:q(`tkc-toast`,e.kind&&`tkc-toast--${e.kind}`),"data-closing":r[e.id]||void 0,children:[(0,K.jsx)(`span`,{className:`tkc-toast__num`,children:e.kind===`success`?`✓`:e.kind===`warn`?`!`:e.kind===`error`?`×`:t+1}),(0,K.jsxs)(`div`,{className:`tkc-toast__body`,children:[e.title&&(0,K.jsx)(`div`,{className:`t`,children:e.title}),e.message&&(0,K.jsx)(`div`,{className:`s`,children:e.message})]}),(0,K.jsx)(`button`,{type:`button`,className:`tkc-toast__x`,onClick:()=>a(e.id),"aria-label":`dismiss`,children:(0,K.jsx)(Ut,{name:`x`,size:14})})]},e.id))})]})},on=()=>{let e=(0,b.useContext)(rn);if(!e)throw Error(`useToasts must be used within a ToastProvider`);return e},sn=e=>(0,K.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 400 120`,width:400,height:120,...e,children:[(0,K.jsxs)(`g`,{stroke:`#1B1611`,strokeWidth:1,fill:`none`,children:[(0,K.jsx)(`path`,{d:`M10 10 h14 M10 10 v14`}),(0,K.jsx)(`path`,{d:`M390 10 h-14 M390 10 v14`}),(0,K.jsx)(`path`,{d:`M10 110 h14 M10 110 v-14`}),(0,K.jsx)(`path`,{d:`M390 110 h-14 M390 110 v-14`})]}),(0,K.jsxs)(`g`,{transform:`translate(36, 30)`,fill:`none`,stroke:`#1B1611`,strokeWidth:1.6,strokeLinecap:`round`,children:[(0,K.jsx)(`circle`,{cx:30,cy:30,r:28}),(0,K.jsx)(`path`,{d:`M14 44 L30 10 L46 44 M20 36 H40`}),(0,K.jsx)(`text`,{x:30,y:56,textAnchor:`middle`,className:`wm-mono`,fontSize:9,fill:`#1B1611`,stroke:`none`,children:`V.c`})]}),(0,K.jsxs)(`text`,{x:112,y:62,className:`wm-serif`,fontSize:44,fill:`#1B1611`,children:[`a5c`,(0,K.jsx)(`tspan`,{fill:`#C03A2B`,children:`.`}),`ai`]}),(0,K.jsx)(`text`,{x:112,y:86,className:`wm-mono`,fontSize:9,fill:`#5A4E3C`,children:`CODEX · OF · RELIABLE · AUTONOMY`}),(0,K.jsx)(`text`,{x:390,y:118,textAnchor:`end`,className:`wm-mono`,fontSize:8,fill:`#8C7E65`,children:`fol. I`})]});function cn(e,t={}){let n=t.baseMs??500,r=t.maxMs??3e4,i=t.jitterFactor??.2,a=Math.min(r,n*2**Math.max(0,e-1)),o=a*i*Math.random();return Math.round(a+o)}var ln=class extends Error{constructor(e){super(e),this.name=`GatewayClientError`}},un=class extends ln{constructor(e){super(e),this.name=`GatewayClientTimeoutError`}},dn=class extends ln{constructor(e){super(e),this.name=`GatewayClientDisconnectedError`}};function fn(e){let t=new WebSocket(e);return{send(e){t.send(e)},close(e,n){t.close(e,n)},onOpen(e){t.addEventListener(`open`,e)},onMessage(e){t.addEventListener(`message`,t=>e(String(t.data)))},onClose(e){t.addEventListener(`close`,t=>e({code:t.code,reason:t.reason}))},onError(e){t.addEventListener(`error`,e)}}}var pn=class{socket=null;pending=new Map;listeners=new Map;runSubscriptions=new Map;sessionSubscriptions=new Map;requestTimeoutMs;shouldReconnect;reconnectTimer=null;reconnectAttempt=0;closedManually=!1;ready=!1;nextId=0;constructor(e){this.options=e,this.requestTimeoutMs=e.requestTimeoutMs??1e4,this.shouldReconnect=e.shouldReconnect??!0}async connect(){this.closedManually=!1,await this.openSocket()}async close(){this.closedManually=!0,this.ready=!1,this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this.socket?.close(1e3,`client close`),this.socket=null}async request(e){let t=typeof e.id==`string`?e.id:this.allocateId(),n={...e,id:t},r=this.socket;if(!r)throw new dn(`Gateway socket is not connected`);return await new Promise((e,i)=>{let a=setTimeout(()=>{this.pending.delete(t),i(new un(`Timed out waiting for response to frame ${t}`))},this.requestTimeoutMs);this.pending.set(t,{resolve:e,reject:i,timer:a}),r.send(JSON.stringify(n))})}async startSession(e){return await this.request({type:`session.start`,...e})}async sendSessionMessage(e){return await this.request({type:`session.message`,...e})}subscribeRun(e,t){let n=this.runSubscriptions.get(e),r=n??{runId:e,sinceSeq:0,callbacks:new Set,subscriberCount:0};return r.subscriberCount+=1,t&&r.callbacks.add(t),this.runSubscriptions.set(e,r),n||this.sendFrame({type:`subscribe`,runId:e,sinceSeq:r.sinceSeq}),()=>{let n=this.runSubscriptions.get(e);n&&(n.subscriberCount=Math.max(0,n.subscriberCount-1),t&&n.callbacks.delete(t),!(n.subscriberCount>0)&&(this.runSubscriptions.delete(e),this.sendFrame({type:`unsubscribe`,runId:e})))}}subscribeSession(e,t){return this.sessionSubscriptions.set(e,{sessionId:e,callback:t}),this.sendFrame({type:`session.subscribe`,sessionId:e}),()=>{this.sessionSubscriptions.delete(e),this.sendFrame({type:`session.unsubscribe`,sessionId:e})}}on(e,t){let n=this.listeners.get(e);return n||(n=new Set,this.listeners.set(e,n)),n.add(t),()=>{n?.delete(t)}}async openSocket(){let e=(this.options.createSocket??fn)(this.options.url,this.options.token);this.socket=e,this.ready=!1;let t=!1;await new Promise((n,r)=>{e.onOpen(()=>{e.send(JSON.stringify({type:`auth`,token:this.options.token}))}),e.onError(e=>{this.emit(`error`,e),t||r(e)}),e.onMessage(e=>{this.handleMessage(e),t||JSON.parse(e).type===`hello`&&(t=!0,this.ready=!0,this.reconnectAttempt=0,this.emit(`connected`),this.replaySubscriptions(),n())}),e.onClose(e=>{if(this.ready=!1,this.emit(`disconnected`,e??{}),!t){r(new dn(`Gateway socket closed before authentication completed`));return}!this.closedManually&&this.shouldReconnect&&this.scheduleReconnect()})})}sendFrame(e){!this.socket||!this.ready||this.socket.send(JSON.stringify(e))}handleMessage(e){let t=JSON.parse(e),n=typeof t.id==`string`?t.id:null;if(n){let e=this.pending.get(n);e&&(clearTimeout(e.timer),this.pending.delete(n),e.resolve(t))}if(t.type===`run.event`&&typeof t.runId==`string`&&typeof t.seq==`number`){let e=this.runSubscriptions.get(t.runId);if(e){e.sinceSeq=Math.max(e.sinceSeq,Number(t.seq));for(let n of e.callbacks)n(t)}}if(t.type===`hook.request`){let e=t,n=this.runSubscriptions.get(e.runId);if(n){let t={type:`run.event`,runId:e.runId,seq:e.deadlineTs,source:`gateway`,event:e};for(let e of n.callbacks)e(t)}}this.emit(`frame`,t)}replaySubscriptions(){for(let e of this.runSubscriptions.values())this.sendFrame({type:`subscribe`,runId:e.runId,sinceSeq:e.sinceSeq});for(let e of this.sessionSubscriptions.values())this.sendFrame({type:`session.subscribe`,sessionId:e.sessionId})}scheduleReconnect(){let e=cn(++this.reconnectAttempt);this.reconnectTimer=setTimeout(()=>{this.openSocket().catch(e=>{this.emit(`error`,e),this.scheduleReconnect()})},e)}emit(e,...t){let n=this.listeners.get(e);if(n)for(let e of n)e(...t)}allocateId(){return this.nextId+=1,`req-${this.nextId}`}},mn=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},hn=(e=>e?mn(e):mn);function gn(){return{seqs:[],sources:[],events:[]}}function _n(e,t,n,r){let i=0,a=e.seqs.length;for(;i<a;){let n=Math.floor((i+a)/2),r=e.seqs[n];if(r===t)return e;r<t?i=n+1:a=n}return{seqs:[...e.seqs.slice(0,i),t,...e.seqs.slice(i)],sources:[...e.sources.slice(0,i),n,...e.sources.slice(i)],events:[...e.events.slice(0,i),r,...e.events.slice(i)]}}function vn(e){return hn((t,n)=>({client:e,connection:{status:`disconnected`,error:null},agents:{items:[],byId:{}},sessions:{byId:{}},runs:{byId:{}},events:{byRunId:{}},hooks:{byRunId:{}},actions:{setConnection(e,n=null){t(t=>({...t,connection:{status:e,error:n}}))},setAgents(e){t(t=>({...t,agents:{items:e.map(e=>e.agent),byId:Object.fromEntries(e.map(e=>[e.agent,e]))}}))},mergeSession(e,n){t(t=>({...t,sessions:{byId:{...t.sessions.byId,[e]:{...t.sessions.byId[e]??{},sessionId:e,...n}}}}))},mergeRun(e,n){t(t=>({...t,runs:{byId:{...t.runs.byId,[e]:{...t.runs.byId[e]??{},runId:e,...n}}}}))},mergeRunEvent(e,n,r,i){t(t=>{let a=t.events.byRunId[e]??gn(),o=_n(a,n,r,i);return o===a?t:{...t,events:{byRunId:{...t.events.byRunId,[e]:o}}}})},addHookRequest(e){t(t=>({...t,hooks:{byRunId:{...t.hooks.byRunId,[e.runId]:[...(t.hooks.byRunId[e.runId]??[]).filter(t=>t.hookRequestId!==e.hookRequestId),e]}}}))},resolveHookRequest(e,n){t(t=>({...t,hooks:{byRunId:{...t.hooks.byRunId,[e]:(t.hooks.byRunId[e]??[]).filter(e=>e.hookRequestId!==n)}}}))}}}))}var yn=[];function bn(e,t){if(t)return e.hooks.byRunId[t]??yn;let n=Object.values(e.hooks.byRunId).flat();return n.length>0?n:yn}function xn(e,t=180){let n=e.replace(/\s+/g,` `).trim();return n.length<=t?n:`${n.slice(0,Math.max(0,t-1))}…`}function Sn(e){if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Cn(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Date.parse(e);if(Number.isFinite(t))return t}return null}function wn(e,t,n){let r=t!=null&&n!=null?Math.max(0,n-t):0;return r>0?Math.max(1,Math.min(10,Math.round(r/1e3)+1)):Math.max(1,Math.min(7,Math.ceil(Math.max(16,e.length)/28)))}function Tn(e,t){for(let n of t)n.length===0||e.includes(n)||e.push(n)}var En=new Set([`path`,`paths`,`file`,`files`,`file_path`,`filePath`,`filePaths`,`relative_path`,`relativePath`,`target`,`target_path`,`targetPath`,`source_path`,`sourcePath`,`oldPath`,`newPath`,`output_path`,`outputPath`]),Dn=/^(dockerfile|makefile|procfile|gemfile|rakefile|justfile|readme(?:\.[^.]+)?|license(?:\.[^.]+)?|jenkinsfile|brewfile|tiltfile|vagrantfile)$/i;function On(e){let t=e.trim().replace(/^["'`]+|["'`]+$/g,``);if(t.length===0||t.length>300||/[\r\n]/.test(t)||t.endsWith(`/`)||t.endsWith(`\\`))return null;let n=t.replace(/^vscode:\/\/file/,``),r=n.split(/[\\/]/).filter(Boolean).at(-1)??n;return/\.[A-Za-z0-9_-]{1,16}$/.test(r)||Dn.test(r)?n:null}function kn(e,t=0,n=new Set){if(t>5||e==null)return n;if(typeof e==`string`){let t=On(e);return t&&n.add(t),n}if(Array.isArray(e)){for(let r of e)kn(r,t+1,n);return n}if(typeof e==`object`)for(let[r,i]of Object.entries(e)){if(En.has(r)){kn(i,t+1,n);continue}t<4&&kn(i,t+1,n)}return n}function An(e,t){let n=e.timestamp??e.startedAt??0,r=t.timestamp??t.startedAt??0;return n===r?String(e.path??``).localeCompare(String(t.path??``)):n-r}function jn(e){return typeof e==`object`&&!!e}function Y(e){return typeof e==`string`?e:null}function Mn(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Nn(e){let t=e.timestamp;return typeof t==`string`||typeof t==`number`?t:void 0}function Pn(e){if(!jn(e))return null;let t={totalUsd:Mn(e.totalUsd)??void 0,inputTokens:Mn(e.inputTokens)??void 0,outputTokens:Mn(e.outputTokens)??void 0,thinkingTokens:Mn(e.thinkingTokens)??void 0,cachedTokens:Mn(e.cachedTokens)??void 0,cacheCreationTokens:Mn(e.cacheCreationTokens)??void 0,cacheReadTokens:Mn(e.cacheReadTokens)??void 0};return Object.values(t).some(e=>e!=null)?t:null}function Fn(e){let t=Y(e.toolCallId);if(!t)return null;let n=Nn(e);switch(e.type){case`tool_call_start`:{let r=Y(e.toolName),i=Y(e.inputAccumulated);return r&&i!=null?{type:`tool_call_start`,toolCallId:t,toolName:r,inputAccumulated:i,timestamp:n}:null}case`tool_call_ready`:{let r=Y(e.toolName);return r?{type:`tool_call_ready`,toolCallId:t,toolName:r,input:e.input,timestamp:n}:null}case`tool_input_delta`:{let r=Y(e.inputAccumulated);return r==null?null:{type:`tool_input_delta`,toolCallId:t,inputAccumulated:r,timestamp:n}}case`tool_result`:{let r=Y(e.toolName);return r?{type:`tool_result`,toolCallId:t,toolName:r,output:e.output,timestamp:n}:null}case`tool_error`:{let r=Y(e.toolName),i=Y(e.error);return r&&i!=null?{type:`tool_error`,toolCallId:t,toolName:r,error:i,timestamp:n}:null}default:return null}}function In(e){let t=Y(e.toolCallId),n=Y(e.server),r=Y(e.toolName);if(!t||!n||!r)return null;let i=Nn(e);switch(e.type){case`mcp_tool_call_start`:return{type:`mcp_tool_call_start`,toolCallId:t,server:n,toolName:r,input:e.input,timestamp:i};case`mcp_tool_result`:return{type:`mcp_tool_result`,toolCallId:t,server:n,toolName:r,output:e.output,timestamp:i};case`mcp_tool_error`:{let a=Y(e.error);return a==null?null:{type:`mcp_tool_error`,toolCallId:t,server:n,toolName:r,error:a,timestamp:i}}default:return null}}function Ln(e){let t=Y(e.agentName);if(!t)return null;let n=Nn(e);switch(e.type){case`subagent_spawn`:{let r=Y(e.prompt);return r==null?null:{type:`subagent_spawn`,agentName:t,prompt:r,timestamp:n}}case`subagent_result`:{let r=Y(e.summary);return r==null?null:{type:`subagent_result`,agentName:t,summary:r,timestamp:n}}case`subagent_error`:{let r=Y(e.error);return r==null?null:{type:`subagent_error`,agentName:t,error:r,timestamp:n}}default:return null}}function Rn(e){let t=Nn(e);switch(e.type){case`session_start`:case`session_resume`:case`session_end`:case`session_fork`:return{type:e.type,timestamp:t};case`turn_start`:case`turn_end`:{let n=Mn(e.turnIndex);return n==null?null:{type:e.type,turnIndex:n,timestamp:t}}case`step_start`:{let n=Y(e.stepType),r=Mn(e.stepIndex);return n!=null&&r!=null?{type:`step_start`,stepType:n,stepIndex:r,timestamp:t}:null}case`step_end`:{let n=Mn(e.stepIndex);return n==null?null:{type:`step_end`,stepIndex:n,timestamp:t}}default:return null}}function zn(e){let t=Y(e.path);if(!t)return null;let n=Nn(e);switch(e.type){case`file_read`:case`file_write`:case`file_create`:case`file_delete`:return{type:e.type,path:t,timestamp:n};case`file_patch`:return{type:`file_patch`,path:t,diff:Y(e.diff)??``,timestamp:n};default:return null}}function Bn(e){let t=Nn(e);switch(e.type){case`approval_request`:{let n=Y(e.interactionId),r=Y(e.action),i=Y(e.detail),a=Y(e.riskLevel);return!n||!r||i==null||a!==`low`&&a!==`medium`&&a!==`high`?null:{type:`approval_request`,interactionId:n,action:r,detail:i,toolName:Y(e.toolName)??void 0,riskLevel:a,timestamp:t}}case`approval_granted`:{let n=Y(e.interactionId);return n?{type:`approval_granted`,interactionId:n,timestamp:t}:null}case`approval_denied`:{let n=Y(e.interactionId);return n?{type:`approval_denied`,interactionId:n,reason:Y(e.reason)??void 0,timestamp:t}:null}case`hook_requested`:{let n=Y(e.hookRequestId),r=Y(e.hookKind);return!n||!r?null:{type:`hook_requested`,hookRequestId:n,hookKind:r,payload:e.payload,deadlineTs:Mn(e.deadlineTs)??void 0,timestamp:t}}case`hook_decision`:{let n=Y(e.hookRequestId),r=e.decision===`deny`?`deny`:e.decision===`allow`?`allow`:null;return!n||!r?null:{type:`hook_decision`,hookRequestId:n,hookKind:Y(e.hookKind)??void 0,decision:r,reason:Y(e.reason)??void 0,resolvedBy:Y(e.resolvedBy)??void 0,timestamp:t}}case`shell_start`:{let n=Y(e.command);return n==null?null:{type:`shell_start`,command:n,timestamp:t}}case`shell_exit`:{let n=Mn(e.exitCode);return n==null?null:{type:`shell_exit`,exitCode:n,timestamp:t}}case`plugin_loaded`:case`plugin_invoked`:{let n=Y(e.pluginName),r=Y(e.pluginId);return n&&r?{type:e.type,pluginName:n,pluginId:r,timestamp:t}:null}case`plugin_error`:{let n=Y(e.pluginName),r=Y(e.pluginId),i=Y(e.error);return n&&r&&i!=null?{type:`plugin_error`,pluginName:n,pluginId:r,error:i,timestamp:t}:null}case`skill_loaded`:case`skill_invoked`:{let n=Y(e.skillName);return n?{type:e.type,skillName:n,timestamp:t}:null}case`agentdoc_read`:{let n=Y(e.path);return n?{type:`agentdoc_read`,path:n,timestamp:t}:null}case`image_output`:return{type:`image_output`,filePath:Y(e.filePath)??void 0,timestamp:t};default:return null}}function Vn(e){if(!jn(e))return null;let t=Y(e.type);if(!t)return null;let n=e;switch(t){case`user_message`:{let e=Y(n.text);return e==null?null:{type:t,text:e,sessionId:Y(n.sessionId)??void 0,timestamp:Nn(n)}}case`thinking_delta`:{let e=Y(n.delta);return e==null?null:{type:t,delta:e,timestamp:Nn(n)}}case`thinking_stop`:{let e=Y(n.thinking);return e==null?null:{type:t,thinking:e,timestamp:Nn(n)}}case`text_delta`:{let e=Y(n.delta);return e==null?null:{type:t,delta:e,timestamp:Nn(n)}}case`message_stop`:{let e=Y(n.text);return e==null?null:{type:t,text:e,timestamp:Nn(n)}}case`tool_call_start`:case`tool_call_ready`:case`tool_input_delta`:case`tool_result`:case`tool_error`:return Fn(n);case`mcp_tool_call_start`:case`mcp_tool_result`:case`mcp_tool_error`:return In(n);case`subagent_spawn`:case`subagent_result`:case`subagent_error`:return Ln(n);case`session_start`:case`session_resume`:case`session_end`:case`session_fork`:case`turn_start`:case`turn_end`:case`step_start`:case`step_end`:return Rn(n);case`file_read`:case`file_write`:case`file_create`:case`file_delete`:case`file_patch`:return zn(n);case`shell_start`:case`shell_exit`:case`approval_request`:case`approval_granted`:case`approval_denied`:case`hook_requested`:case`hook_decision`:case`plugin_loaded`:case`plugin_invoked`:case`plugin_error`:case`skill_loaded`:case`skill_invoked`:case`agentdoc_read`:case`image_output`:return Bn(n);case`cost`:{let e=Pn(n.cost);return e?{type:`cost`,cost:e,timestamp:Nn(n)}:null}case`error`:{let e=Y(n.message)??Y(n.error);return e==null?null:{type:`error`,message:e,timestamp:Nn(n)}}default:return null}}function Hn(e){if(!e)return[];let t=[];for(let n of e.events){let e=Vn(n);e&&t.push(e)}return t}function Un(e){let t=typeof e.runId==`string`?e.runId:``;return t.length===0?null:{runId:t,agent:typeof e.agent==`string`&&e.agent.length>0?e.agent:`unknown`,status:typeof e.status==`string`&&e.status.length>0?e.status:`unknown`,startedAt:Cn(e.startedAt)??0}}function Wn(e,t){let n={totalUsd:0,inputTokens:0,outputTokens:0,thinkingTokens:0,cachedTokens:0,cacheCreationTokens:0,cacheReadTokens:0},r=!1;for(let i of e)for(let e of Hn(t[i]))e.type===`cost`&&(n.totalUsd=(n.totalUsd??0)+Number(e.cost.totalUsd??0),n.inputTokens=(n.inputTokens??0)+Number(e.cost.inputTokens??0),n.outputTokens=(n.outputTokens??0)+Number(e.cost.outputTokens??0),n.thinkingTokens=(n.thinkingTokens??0)+Number(e.cost.thinkingTokens??0),n.cachedTokens=(n.cachedTokens??0)+Number(e.cost.cachedTokens??0),n.cacheCreationTokens=(n.cacheCreationTokens??0)+Number(e.cost.cacheCreationTokens??0),n.cacheReadTokens=(n.cacheReadTokens??0)+Number(e.cost.cacheReadTokens??0),r=!0);return r?n:null}function Gn(e,t){let n=e.timestamp;if(n instanceof Date)return n.getTime();if(typeof n==`number`&&Number.isFinite(n))return n;if(typeof n==`string`){let e=Date.parse(n);if(Number.isFinite(e))return e}return t}function Kn(e){if(typeof e==`string`)return e;if(Array.isArray(e)){let t=e.flatMap(e=>{if(typeof e==`string`)return[e];if(!e||typeof e!=`object`)return[];let t=e,n=typeof t.type==`string`?t.type:``;return n===`tool_use`?[]:n===`text`&&typeof t.text==`string`?[t.text]:n===`tool_result`?[Kn(t.content??t.output??t.tool_use_result)]:typeof t.text==`string`?[t.text]:`content`in t?[Kn(t.content)]:[]}).filter(e=>e.length>0);if(t.length>0)return t.join(`
9
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||q(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&q(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:zt(e,r,o);break;case`data`:if(t!==`object`){Ct(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=Ut(``+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`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ut(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=J);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`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=Ut(``+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`:yd(`beforetoggle`,e),yd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(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=Vt.get(n)||n,St(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:zt(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`?q(e,r):(typeof r==`number`||typeof r==`bigint`)&&q(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=J);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ht.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[rt]||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,``):St(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`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:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`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:Nd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in yd(`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:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in yd(`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:Nd(e,t,s,c,n,null)}K(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:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`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:Nd(e,t,u,r,n,null)}return;default:if(Bt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(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)||Nd(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&&Nd(e,t,p,m,r,f)}}Mt(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)||Nd(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&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(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:Nd(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&&Nd(e,t,s,a,r,o)}It(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:Nd(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:Nd(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)&&Nd(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:Nd(e,t,u,p,r,m)}return;default:if(Bt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(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||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(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||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){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&&Ld(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&&Ld(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 zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Ud(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 Wd(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 Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(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`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Np(t)}function ef(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 tf(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`:tf(n),lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(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[ct])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=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(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 lf(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 uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(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 pf(e,t,n){switch(t=Vd(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 mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lt(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=I.d;I.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:$,X:Df,S:Ef,M:Of};function yf(){var e=vf.f(),t=vu();return e||t}function bf(e){var t=W(e);t!==null&&t.tag===5&&t.type===`form`?ys(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}hf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Fd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function $(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!hf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),hf.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`),Fd(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ef(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=ft(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=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);pt(c),Fd(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){vf.X(e,t);var n=xf;if(n&&e){var r=ft(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=hf.get(i))&&zf(e,t),a=n.createElement(`script`),pt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=ft(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&zf(e,t),a=n.createElement(`script`),pt(a),Fd(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=se.current)?_f(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=ft(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=ft(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),hf.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},hf.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=ft(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="`+jt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},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}),Fd(t,`link`,n),pt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+jt(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~="`+jt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Fd(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,pt(o),o;r=Mf(n),(a=hf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(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,pt(a),a):(r=n,(a=hf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Fd(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[ct]||a[nt]||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,pt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=hf.get(i))&&Rf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(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*Rd());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:te,_currentValue2:te,_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=Ke(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ke(0),this.hiddenUpdates=Ke(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=Zr(3,null,null,t),e.current=a,a.stateNode=e,t=Qi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ja(a),e}function tp(e){return e?(e=Yr,e):Yr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Na(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Pa(e,r,t),n!==null&&(pu(n,e,t),Fa(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=Kr(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=Ze(t);var n=Kr(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.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=W(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ve(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=B()+500,rd(0,!1))}}break;case 31:case 13:s=Kr(a,2),s!==null&&pu(s,a,2),vu(),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=Gt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ut(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(we()){case Te:return 2;case Ee:return 8;case V:case De:return 32;case Oe: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=W(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=ut(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,et(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,et(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);Wt=r,n.target.dispatchEvent(r),Wt=null}else return t=W(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=W(n);a!==null&&(e.splice(t,3),t-=3,_s(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[rt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||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,du(),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),vu(),t[it]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();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.6`)throw Error(i(527,Lp,`19.2.6`));I.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=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{je=zp.inject(Rp),Me=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Bs,s=Vs,c=Hs;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[it]=t.current,Sd(e),new Fp(t)}})),y=s(((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=v()})),b=u(p()),x=u(y(),1),S=typeof window>`u`?null:window;S&&(S.process||={env:{},platform:`win32`,version:`0.0.0`,versions:{node:`0.0.0`,v8:`0.0.0`,uv:`0.0.0`,zlib:`0.0.0`,brotli:`0.0.0`,ares:`0.0.0`,modules:`0`,nghttp2:`0.0.0`,napi:`0`,llhttp:`0.0.0`,openssl:`0.0.0`,cldr:`0.0.0`,icu:`0.0.0`,tz:`0.0.0`,unicode:`0.0.0`,http_parser:`0.0.0`},argv:[],execArgv:[],pid:0,ppid:0,arch:`x64`,title:`browser`,browser:!0,execPath:``,cwd(){return`/`},chdir(){},umask(){return 0},nextTick(e,...t){setTimeout(()=>e(...t),0)},exit(){throw Error(`process.exit is unavailable in the browser`)},on(){return S.process},off(){return S.process},once(){return S.process},emit(){return!1},removeListener(){return S.process},addListener(){return S.process},prependListener(){return S.process},prependOnceListener(){return S.process},removeAllListeners(){return S.process},listeners(){return[]},rawListeners(){return[]},listenerCount(){return 0},eventNames(){return[]},getMaxListeners(){return 0},setMaxListeners(){return S.process},stdout:void 0,stderr:void 0,stdin:void 0,disconnect(){},connected:!1,kill(){return!1},memoryUsage(){return{rss:0,heapTotal:0,heapUsed:0,external:0,arrayBuffers:0}},cpuUsage(){return{user:0,system:0}},uptime(){return 0},hrtime(e){return[0,0]},dlopen(){throw Error(`process.dlopen is unavailable in the browser`)},release:{name:`node`,sourceUrl:``,headersUrl:``,libUrl:``},config:{variables:{}}},S.global||=globalThis);var C=u(_());function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}var T;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(T||={});var E=`popstate`;function D(e){e===void 0&&(e={});function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return M(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:N(t)}return ee(t,n,null,e)}function O(e,t){if(e===!1||e==null)throw Error(t)}function k(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function A(){return Math.random().toString(36).substr(2,8)}function j(e,t){return{usr:e.state,key:e.key,idx:t}}function M(e,t,n,r){return n===void 0&&(n=null),w({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?P(t):t,{state:n,key:t&&t.key||r||A()})}function N(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function P(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=T.Pop,c=null,l=u();l??(l=0,o.replaceState(w({},o.state,{idx:l}),``));function u(){return(o.state||{idx:null}).idx}function d(){s=T.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=T.Push;let r=M(h.location,e,t);n&&n(r,e),l=u()+1;let d=j(r,l),f=h.createHref(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=T.Replace;let r=M(h.location,e,t);n&&n(r,e),l=u();let i=j(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){let t=i.location.origin===`null`?i.location.href:i.location.origin,n=typeof e==`string`?e:N(e);return n=n.replace(/ $/,`%20`),O(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}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(E,d),c=e,()=>{i.removeEventListener(E,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}var F;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(F||={});function I(e,t,n){return n===void 0&&(n=`/`),te(e,t,n,!1)}function te(e,t,n,r){let i=he((typeof t==`string`?P(t):t).pathname||`/`,n);if(i==null)return null;let a=ne(e);ie(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=me(i);o=de(a[e],t,r)}return o}function ne(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(O(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let s=B([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(O(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+s+`".`)),ne(e.children,t,c,s)),!(e.path==null&&!e.index)&&t.push({path:s,score:ue(s,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of re(e.path))i(e,t,n)}),t}function re(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=re(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 ie(e){e.sort((e,t)=>e.score===t.score?z(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var L=/^:[\w-]+$/,R=3,ae=2,oe=1,se=10,ce=-2,le=e=>e===`*`;function ue(e,t){let n=e.split(`/`),r=n.length;return n.some(le)&&(r+=ce),t&&(r+=ae),n.filter(e=>!le(e)).reduce((e,t)=>e+(L.test(t)?R:t===``?oe:se),r)}function z(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 de(e,t,n){n===void 0&&(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=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:B([a,u.pathname]),pathnameBase:we(B([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=B([a,u.pathnameBase]))}return o}function fe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pe(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,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return i&&!c?e[r]=void 0:e[r]=(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function pe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),k(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)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function me(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return k(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function he(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 ge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_e=e=>ge.test(e);function ve(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?P(e):e,a;if(n)if(_e(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),k(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?ye(n.substring(1),`/`):ye(n,t)}else a=t;return{pathname:a,search:Te(r),hash:Ee(i)}}function ye(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 be(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 xe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Se(e,t){let n=xe(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Ce(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=P(e):(i=w({},e),O(!i.pathname||!i.pathname.includes(`?`),be(`?`,`pathname`,`search`,i)),O(!i.pathname||!i.pathname.includes(`#`),be(`#`,`pathname`,`hash`,i)),O(!i.search||!i.search.includes(`#`),be(`#`,`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=ve(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var B=e=>e.join(`/`).replace(/\/\/+/g,`/`),we=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Te=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ee=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e;function V(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var De=[`post`,`put`,`patch`,`delete`];new Set(De);var Oe=[`get`,...De];new Set(Oe);function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}var Ae=b.createContext(null),je=b.createContext(null),Me=b.createContext(null),Ne=b.createContext(null),Pe=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Fe=b.createContext(null);function Ie(e,t){let{relative:n}=t===void 0?{}:t;!Le()&&O(!1);let{basename:r,navigator:i}=b.useContext(Me),{hash:a,pathname:o,search:s}=Ge(e,{relative:n}),c=o;return r!==`/`&&(c=o===`/`?r:B([r,o])),i.createHref({pathname:c,search:s,hash:a})}function Le(){return b.useContext(Ne)!=null}function Re(){return!Le()&&O(!1),b.useContext(Ne).location}function ze(e){b.useContext(Me).static||b.useLayoutEffect(e)}function Be(){let{isDataRoute:e}=b.useContext(Pe);return e?U():Ve()}function Ve(){!Le()&&O(!1);let e=b.useContext(Ae),{basename:t,future:n,navigator:r}=b.useContext(Me),{matches:i}=b.useContext(Pe),{pathname:a}=Re(),o=JSON.stringify(Se(i,n.v7_relativeSplatPath)),s=b.useRef(!1);return ze(()=>{s.current=!0}),b.useCallback(function(n,i){if(i===void 0&&(i={}),!s.current)return;if(typeof n==`number`){r.go(n);return}let c=Ce(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:B([t,c.pathname])),(i.replace?r.replace:r.push)(c,i.state,i)},[t,r,o,a,e])}var He=b.createContext(null);function Ue(e){let t=b.useContext(Pe).outlet;return t&&b.createElement(He.Provider,{value:e},t)}function We(){let{matches:e}=b.useContext(Pe),t=e[e.length-1];return t?t.params:{}}function Ge(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Me),{matches:i}=b.useContext(Pe),{pathname:a}=Re(),o=JSON.stringify(Se(i,r.v7_relativeSplatPath));return b.useMemo(()=>Ce(e,JSON.parse(o),a,n===`path`),[e,o,a,n])}function Ke(e,t){return qe(e,t)}function qe(e,t,n,r){!Le()&&O(!1);let{navigator:i}=b.useContext(Me),{matches:a}=b.useContext(Pe),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:`/`;o&&o.route;let l=Re(),u;if(t){let e=typeof t==`string`?P(t):t;!(c===`/`||e.pathname?.startsWith(c))&&O(!1),u=e}else u=l;let d=u.pathname||`/`,f=d;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=I(e,{pathname:f}),m=Ze(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:B([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:B([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);return t&&m?b.createElement(Ne.Provider,{value:{location:ke({pathname:`/`,search:``,hash:``,state:null,key:`default`},u),navigationType:T.Pop}},m):m}function Je(){let e=it(),t=V(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return b.createElement(b.Fragment,null,b.createElement(`h2`,null,`Unexpected Application Error!`),b.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?b.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ye=b.createElement(Je,null),Xe=class extends b.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){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:b.createElement(Pe.Provider,{value:this.props.routeContext},b.createElement(Fe.Provider,{value:this.state.error,children:this.props.component}))}};function H(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(Ae);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Pe.Provider,{value:t},r)}function Ze(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);!(e>=0)&&O(!1),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let l,u=!1,d=null,f=null;n&&(l=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||Ye,s&&(c<0&&i===0?(ot(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,f=null):c===i&&(u=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=l?d:u?f:r.route.Component?b.createElement(r.route.Component,null):r.route.element?r.route.element:e,b.createElement(H,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?b.createElement(Xe,{location:n.location,revalidation:n.revalidation,component:d,error:l,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Qe=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(Qe||{}),$e=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}($e||{});function et(e){let t=b.useContext(Ae);return!t&&O(!1),t}function tt(e){let t=b.useContext(je);return!t&&O(!1),t}function nt(e){let t=b.useContext(Pe);return!t&&O(!1),t}function rt(e){let t=nt(e),n=t.matches[t.matches.length-1];return!n.route.id&&O(!1),n.route.id}function it(){let e=b.useContext(Fe),t=tt($e.UseRouteError),n=rt($e.UseRouteError);return e===void 0?t.errors?.[n]:e}function U(){let{router:e}=et(Qe.UseNavigateStable),t=rt($e.UseNavigateStable),n=b.useRef(!1);return ze(()=>{n.current=!0}),b.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,ke({fromRouteId:t},i)))},[e,t])}var at={};function ot(e,t,n){!t&&!at[e]&&(at[e]=!0)}var st=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function ct(e,t){e?.v7_startTransition===void 0&&st(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&st(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&st(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&st(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&st(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&st(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}function lt(e){let{to:t,replace:n,state:r,relative:i}=e;!Le()&&O(!1);let{future:a,static:o}=b.useContext(Me),{matches:s}=b.useContext(Pe),{pathname:c}=Re(),l=Be(),u=Ce(t,Se(s,a.v7_relativeSplatPath),c,i===`path`),d=JSON.stringify(u);return b.useEffect(()=>l(JSON.parse(d),{replace:n,state:r,relative:i}),[l,d,i,n,r]),null}function ut(e){return Ue(e.context)}function W(e){O(!1)}function dt(e){let{basename:t=`/`,children:n=null,location:r,navigationType:i=T.Pop,navigator:a,static:o=!1,future:s}=e;Le()&&O(!1);let c=t.replace(/^\/*/,`/`),l=b.useMemo(()=>({basename:c,navigator:a,static:o,future:ke({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof r==`string`&&(r=P(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`}=r,h=b.useMemo(()=>{let e=he(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m},navigationType:i}},[c,u,d,f,p,m,i]);return h==null?null:b.createElement(Me.Provider,{value:l},b.createElement(Ne.Provider,{children:n,value:h}))}function ft(e){let{children:t,location:n}=e;return Ke(mt(t),n)}var pt=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(pt||{});new Promise(()=>{}),b.Component;function mt(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(e,r)=>{if(!b.isValidElement(e))return;let i=[...t,r];if(e.type===b.Fragment){n.push.apply(n,mt(e.props.children,i));return}e.type!==W&&O(!1),!(!e.props.index||!e.props.children)&&O(!1);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,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary: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=mt(e.props.children,i)),n.push(a)}),n}function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ht.apply(this,arguments)}function gt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _t(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vt(e,t){return e.button===0&&(!t||t===`_self`)&&!_t(e)}function yt(e){return e===void 0&&(e=``),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 bt(e,t){let n=yt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var xt=[`onClick`,`relative`,`reloadDocument`,`replace`,`state`,`target`,`to`,`preventScrollReset`,`viewTransition`],St=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`viewTransition`,`children`],Ct=`6`;try{window.__reactRouterVersion=Ct}catch{}var wt=b.createContext({isTransitioning:!1}),Tt=b.startTransition;function Et(e){let{basename:t,children:n,future:r,window:i}=e,a=b.useRef();a.current??=D({window:i,v5Compat:!0});let o=a.current,[s,c]=b.useState({action:o.action,location:o.location}),{v7_startTransition:l}=r||{},u=b.useCallback(e=>{l&&Tt?Tt(()=>c(e)):c(e)},[c,l]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>ct(r),[r]),b.createElement(dt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}var Dt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Ot=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,G=b.forwardRef(function(e,t){let{onClick:n,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u}=e,d=gt(e,xt),{basename:f}=b.useContext(Me),p,m=!1;if(typeof c==`string`&&Ot.test(c)&&(p=c,Dt))try{let e=new URL(window.location.href),t=c.startsWith(`//`)?new URL(e.protocol+c):new URL(c),n=he(t.pathname,f);t.origin===e.origin&&n!=null?c=n+t.search+t.hash:m=!0}catch{}let h=Ie(c,{relative:r}),g=Nt(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u});function _(e){n&&n(e),e.defaultPrevented||g(e)}return b.createElement(`a`,ht({},d,{href:p||h,onClick:m||i?n:_,ref:t,target:s}))}),kt=b.forwardRef(function(e,t){let{"aria-current":n=`page`,caseSensitive:r=!1,className:i=``,end:a=!1,style:o,to:s,viewTransition:c,children:l}=e,u=gt(e,St),d=Ge(s,{relative:u.relative}),f=Re(),p=b.useContext(je),{navigator:m,basename:h}=b.useContext(Me),g=p!=null&&Ft(d)&&c===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=he(y,h)||y);let x=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,S=v===_||!a&&v.startsWith(_)&&v.charAt(x)===`/`,C=y!=null&&(y===_||!a&&y.startsWith(_)&&y.charAt(_.length)===`/`),w={isActive:S,isPending:C,isTransitioning:g},T=S?n:void 0,E;E=typeof i==`function`?i(w):[i,S?`active`:null,C?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let D=typeof o==`function`?o(w):o;return b.createElement(G,ht({},u,{"aria-current":T,className:E,ref:t,style:D,to:s,viewTransition:c}),typeof l==`function`?l(w):l)}),At;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`,e.useViewTransitionState=`useViewTransitionState`})(At||={});var jt;(function(e){e.UseFetcher=`useFetcher`,e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(jt||={});function Mt(e){let t=b.useContext(Ae);return!t&&O(!1),t}function Nt(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=Be(),l=Re(),u=Ge(e,{relative:o});return b.useCallback(t=>{vt(t,n)&&(t.preventDefault(),c(e,{replace:r===void 0?N(l)===N(u):r,state:i,preventScrollReset:a,relative:o,viewTransition:s}))},[l,c,u,r,i,n,e,a,o,s])}function Pt(e){let t=b.useRef(yt(e)),n=b.useRef(!1),r=Re(),i=b.useMemo(()=>bt(r.search,n.current?null:t.current),[r.search]),a=Be();return[i,b.useCallback((e,t)=>{let r=yt(typeof e==`function`?e(i):e);n.current=!0,a(`?`+r,t)},[a,i])]}function Ft(e,t){t===void 0&&(t={});let n=b.useContext(wt);n??O(!1);let{basename:r}=Mt(At.useViewTransitionState),i=Ge(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=he(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=he(n.nextLocation.pathname,r)||n.nextLocation.pathname;return fe(i.pathname,o)!=null||fe(i.pathname,a)!=null}var It=s((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})),K=s(((e,t)=>{t.exports=It()}))();function q(...e){return e.filter(Boolean).join(` `)}function Lt(e,t,n=!0){(0,b.useEffect)(()=>{if(!n)return;let r=n=>{let r=e.current;r&&!r.contains(n.target)&&t(n)};return document.addEventListener(`mousedown`,r),()=>document.removeEventListener(`mousedown`,r)},[n,t])}function Rt(e,t,n=!0){(0,b.useEffect)(()=>{if(!n)return;let r=n=>{n.key===e&&t(n)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e,n,t])}function zt(e,t,n){let[r,i]=(0,b.useState)(t),a=e!==void 0;return[a?e:r,(0,b.useCallback)(e=>{a||i(e),n&&n(e)},[a,n])]}function Bt(e,t,n=`bottom-start`){let[r,i]=(0,b.useState)({top:0,left:0,width:0});return(0,b.useLayoutEffect)(()=>{if(!t||!e.current)return;let r=()=>{let t=e.current.getBoundingClientRect(),r=t.bottom+4,a=t.left;n===`bottom-end`&&(a=t.right),n===`top-start`&&(r=t.top-4),i({top:r+window.scrollY,left:a+window.scrollX,width:t.width})};return r(),window.addEventListener(`scroll`,r,!0),window.addEventListener(`resize`,r),()=>{window.removeEventListener(`scroll`,r,!0),window.removeEventListener(`resize`,r)}},[t,n]),r}var Vt=({children:e})=>{let[t]=(0,b.useState)(()=>{let e=document.createElement(`div`);return e.setAttribute(`data-tkc-portal`,``),e});return(0,b.useEffect)(()=>(document.body.appendChild(t),()=>{document.body.removeChild(t)}),[t]),(0,C.createPortal)(e,t)},Ht={check:`M4 8l3 3 5-7`,dash:`M4 8h8`,caret:`M6 4l4 4-4 4`,x:`M4 4l8 8M12 4l-8 8`,plus:`M8 3v10M3 8h10`,minus:`M3 8h10`,search:[`M7.5 13a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11zM11.5 11.5L14 14`,null],folder:`M2 4.5C2 3.67 2.67 3 3.5 3h2.3l1 1.5H12.5c.83 0 1.5.67 1.5 1.5V12c0 .83-.67 1.5-1.5 1.5h-9A1.5 1.5 0 0 1 2 12z`,file:`M4 2h5l3 3v9H4z M9 2v3h3`,gear:`M8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM8 1v2M8 13v2M1 8h2M13 8h2M3 3l1.5 1.5M11.5 11.5L13 13M3 13l1.5-1.5M11.5 4.5L13 3`,calendar:`M3 5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zM3 7h10M5 3v2M11 3v2`,clock:[`M8 2.5A5.5 5.5 0 1 0 8 13.5 5.5 5.5 0 0 0 8 2.5zM8 5v3l2 1.5`,null],pencil:`M3 13l1-3 7-7 2 2-7 7-3 1z`,upload:`M8 11V3M5 6l3-3 3 3M3 13h10`,bell:`M4 11a4 4 0 0 1 8 0v1l1 1H3l1-1zM6 13a2 2 0 0 0 4 0`,info:[`M8 1.5A6.5 6.5 0 1 0 8 14.5 6.5 6.5 0 0 0 8 1.5zM8 7v4.5M8 5h.01`,null],chevronRight:`M6 3l5 5-5 5`,chevronDown:`M3 6l5 5 5-5`},Ut=({name:e,size:t=14,className:n=``,style:r})=>{let i=Ht[e]||``;return(0,K.jsx)(`svg`,{className:n,width:t,height:t,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`inline-block`,verticalAlign:`middle`,...r},children:Array.isArray(i)?i.map((e,t)=>e?(0,K.jsx)(`path`,{d:e},t):null):(0,K.jsx)(`path`,{d:i})})},J=({variant:e=`default`,size:t,loading:n,disabled:r,leading:i,trailing:a,className:o,children:s,onClick:c,...l})=>(0,K.jsxs)(`button`,{className:q(`tkc-btn`,e===`primary`&&`tkc-btn--primary`,e===`ghost`&&`tkc-btn--ghost`,t===`sm`&&`tkc-btn--sm`,o),disabled:r,"data-loading":n||void 0,onClick:c,...l,children:[n&&(0,K.jsx)(`span`,{className:`tkc-btn__spin`}),!n&&i,s,!n&&a]}),Wt=(0,b.forwardRef)(({className:e,invalid:t,...n},r)=>(0,K.jsx)(`input`,{ref:r,className:q(`tkc-input`,t&&`tkc-input--invalid`,e),...n}));Wt.displayName=`Input`;var Gt=(0,b.forwardRef)(({className:e,invalid:t,rows:n=3,...r},i)=>(0,K.jsx)(`textarea`,{ref:i,className:q(`tkc-textarea`,t&&`tkc-input--invalid`,e),rows:n,style:{resize:`vertical`},...r}));Gt.displayName=`Textarea`;var Kt=({label:e,hint:t,error:n,children:r})=>(0,K.jsxs)(`label`,{className:`tkc-field`,children:[e&&(0,K.jsx)(`span`,{className:`tkc-field__label`,children:e}),r,n?(0,K.jsx)(`span`,{className:`tkc-field__error`,children:n}):t?(0,K.jsx)(`span`,{className:`tkc-field__hint`,children:t}):null]}),qt=({children:e,onRemove:t,removing:n})=>(0,K.jsxs)(`span`,{className:q(`tkc-tag`,n&&`tkc-tag--removing`),children:[e,t&&(0,K.jsx)(`button`,{type:`button`,className:`tkc-tag__x`,onClick:t,"aria-label":`remove`,children:(0,K.jsx)(Ut,{name:`x`,size:10})})]}),Jt=e=>{let t=[[`X`,10],[`IX`,9],[`V`,5],[`IV`,4],[`I`,1]],n=``;for(let[r,i]of t)for(;e>=i;)n+=r,e-=i;return n},Yt=({items:e,defaultOpen:t=null,type:n=`single`})=>{let[r,i]=(0,b.useState)(n===`single`?t??null:Array.isArray(t)?t:[]),a=e=>n===`single`?r===e:r.includes(e),o=e=>{i(n===`single`?r===e?null:e:r.includes(e)?r.filter(t=>t!==e):[...r,e])};return(0,K.jsx)(`div`,{className:`tkc-acc`,children:e.map((e,t)=>(0,K.jsxs)(`div`,{className:`tkc-acc__item`,"data-open":a(t)||void 0,children:[(0,K.jsxs)(`button`,{type:`button`,className:`tkc-acc__trigger`,onClick:()=>o(t),children:[(0,K.jsx)(`span`,{className:`tkc-acc__num`,children:e.num||Jt(t+1)}),(0,K.jsx)(`span`,{children:e.title}),(0,K.jsx)(`span`,{className:`tkc-acc__caret`,children:(0,K.jsx)(Ut,{name:`chevronRight`,size:12})})]}),(0,K.jsx)(`div`,{className:`tkc-acc__panel`,children:(0,K.jsx)(`div`,{className:`tkc-acc__body`,children:e.body})})]},t))})},Xt=({value:e,defaultValue:t,onChange:n,items:r=[]})=>{let[i,a]=zt(e,t||r&&r[0]?.value,n);return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`tkc-tabs`,role:`tablist`,children:r.map(e=>(0,K.jsxs)(`button`,{type:`button`,role:`tab`,className:`tkc-tab`,"data-active":i===e.value||void 0,onClick:()=>a(e.value),children:[e.label,e.badge!=null&&(0,K.jsx)(`span`,{className:`tkc-badge`,style:{marginLeft:8},children:e.badge})]},e.value))}),r.map(e=>i===e.value?(0,K.jsx)(`div`,{role:`tabpanel`,style:{paddingTop:16},children:e.body},e.value):null)]})},Zt=({node:e,depth:t=0,expanded:n,setExpanded:r,selected:i,setSelected:a})=>{let o=n.has(e.id),s=!!(e.children&&e.children.length>0);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`tkc-tree__node`,"data-open":o||void 0,"data-selected":i===e.id||void 0,style:{paddingLeft:6+t*16},onClick:()=>{if(a(e.id),s){let t=new Set(n);t.has(e.id)?t.delete(e.id):t.add(e.id),r(t)}},children:[(0,K.jsx)(`span`,{className:`tkc-tree__caret`,children:s?(0,K.jsx)(Ut,{name:`chevronRight`,size:11}):null}),(0,K.jsx)(Ut,{name:s?`folder`:`file`,size:13,style:{color:`var(--tkc-ink-soft)`}}),(0,K.jsx)(`span`,{children:e.label}),e.count!=null&&(0,K.jsx)(`span`,{className:`tkc-tree__count`,children:e.count})]}),s&&o&&e.children.map(e=>(0,K.jsx)(Zt,{node:e,depth:t+1,expanded:n,setExpanded:r,selected:i,setSelected:a},e.id))]})},Qt=({item:e,active:t,onSelect:n,depth:r=0})=>{let[i,a]=(0,b.useState)(!1),o=!!(e.children&&e.children.length>0);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`tkc-tree__node`,"data-selected":t===e.value||void 0,style:{paddingLeft:6+r*16},onClick:()=>{o&&a(e=>!e),n&&n(e.value)},children:[e.icon&&(0,K.jsx)(Ut,{name:e.icon,size:13,style:{color:`var(--tkc-ink-soft)`}}),(0,K.jsx)(`span`,{children:e.label}),o&&(0,K.jsx)(`span`,{className:`tkc-tree__caret`,children:(0,K.jsx)(Ut,{name:`chevronRight`,size:11})})]}),o&&i&&e.children.map(e=>(0,K.jsx)(Qt,{item:e,active:t,onSelect:n,depth:r+1},e.value))]})},$t=({text:e,children:t,placement:n=`top`,delay:r=250})=>{let[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)({top:0,left:0}),c=(0,b.useRef)(null),l=(0,b.useRef)(null),u=()=>{if(!c.current)return;let e=c.current.getBoundingClientRect();s({top:(n===`bottom`?e.bottom+8:e.top-8)+window.scrollY,left:e.left+e.width/2+window.scrollX})},d=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{u(),a(!0)},r)},f=()=>{l.current&&clearTimeout(l.current),a(!1)};return(0,K.jsxs)(K.Fragment,{children:[b.cloneElement(t,{ref:e=>{c.current=e;let n=t.ref;typeof n==`function`?n(e):n&&typeof n==`object`&&`current`in n&&(n.current=e)},onMouseEnter:d,onMouseLeave:f,onFocus:d,onBlur:f}),i&&(0,K.jsx)(Vt,{children:(0,K.jsx)(`div`,{className:`tkc-tip`,style:{top:o.top,left:o.left,transform:`translate(-50%, ${n===`bottom`?`0`:`-100%`})`},children:e})})]})},en=({value:e,defaultValue:t,onChange:n,options:r,placeholder:i=`Select…`,disabled:a})=>{let[o,s]=zt(e,t,n),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(0),f=(0,b.useRef)(null),p=(0,b.useRef)(null),m=Bt(f,c),h=r.map(e=>typeof e==`string`?{value:e,label:e}:e);Lt(p,()=>l(!1),c),Rt(`Escape`,()=>l(!1),c);let g=h.find(e=>e.value===o),_=e=>{if(!c){(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(l(!0),e.preventDefault());return}e.key===`ArrowDown`?(d(e=>(e+1)%h.length),e.preventDefault()):e.key===`ArrowUp`?(d(e=>(e-1+h.length)%h.length),e.preventDefault()):e.key===`Enter`&&(s(h[u].value),l(!1),e.preventDefault())};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{ref:f,type:`button`,className:`tkc-select tkc-focus`,"data-open":c||void 0,disabled:a,onClick:()=>!a&&l(e=>!e),onKeyDown:_,children:[(0,K.jsx)(`span`,{className:g?``:`tkc-select__placeholder`,children:g?g.label:i}),(0,K.jsx)(`span`,{className:`tkc-select__caret`,children:(0,K.jsx)(Ut,{name:`chevronDown`,size:12})})]}),c&&(0,K.jsx)(Vt,{children:(0,K.jsx)(`div`,{ref:p,className:`tkc-pop`,style:{top:m.top,left:m.left,minWidth:m.width},onKeyDown:_,children:h.map((e,t)=>(0,K.jsxs)(`div`,{className:`tkc-pop__item`,"data-active":t===u||void 0,"data-selected":e.value===o||void 0,onMouseEnter:()=>d(t),onClick:()=>{s(e.value),l(!1)},children:[(0,K.jsx)(`span`,{children:e.label}),(0,K.jsx)(`span`,{className:`tkc-pop__check`,children:(0,K.jsx)(Ut,{name:`check`,size:12})})]},e.value))})})]})},tn=({open:e,onClose:t,title:n,children:r,footer:i})=>(Rt(`Escape`,()=>t&&t(),e),(0,b.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]),e?(0,K.jsxs)(Vt,{children:[(0,K.jsx)(`div`,{className:`tkc-scrim`,onClick:t}),(0,K.jsxs)(`div`,{className:`tkc-modal`,role:`dialog`,"aria-modal":`true`,children:[n&&(0,K.jsxs)(`div`,{className:`tkc-modal__head`,children:[(0,K.jsx)(`span`,{style:{flex:1},children:n}),(0,K.jsx)(`button`,{type:`button`,className:`tkc-toast__x`,onClick:t,"aria-label":`close`,children:(0,K.jsx)(Ut,{name:`x`,size:14})})]}),(0,K.jsx)(`div`,{className:`tkc-modal__body`,children:r}),i&&(0,K.jsx)(`div`,{className:`tkc-modal__foot`,children:i})]})]}):null),nn=({open:e,onClose:t,items:n,placeholder:r=`Type a command…`,onSelect:i})=>{let[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(0),l=(0,b.useRef)(null);Rt(`Escape`,()=>t&&t(),e),(0,b.useEffect)(()=>{e&&(o(``),c(0),setTimeout(()=>l.current?.focus(),0))},[e]);let u=n.filter(e=>e.label.toLowerCase().includes(a.toLowerCase())),d=e=>{e.onSelect&&e.onSelect(),i&&i(e),t&&t()};return e?(0,K.jsxs)(Vt,{children:[(0,K.jsx)(`div`,{className:`tkc-scrim`,onClick:t}),(0,K.jsxs)(`div`,{className:`tkc-modal`,role:`dialog`,"aria-modal":`true`,style:{width:`min(520px, 92vw)`,padding:0},children:[(0,K.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`10px 14px`,borderBottom:`1.5px solid var(--tkc-rule-m)`},children:[(0,K.jsx)(Ut,{name:`search`,size:15,style:{color:`var(--tkc-ink-quiet)`}}),(0,K.jsx)(`input`,{ref:l,style:{border:0,background:`transparent`,outline:0,flex:1,font:`inherit`,fontSize:15,color:`var(--tkc-ink)`},placeholder:r,value:a,onChange:e=>{o(e.target.value),c(0)},onKeyDown:e=>{e.key===`ArrowDown`?(c(e=>Math.min(u.length-1,e+1)),e.preventDefault()):e.key===`ArrowUp`?(c(e=>Math.max(0,e-1)),e.preventDefault()):e.key===`Enter`&&u[s]&&(d(u[s]),e.preventDefault())}})]}),(0,K.jsx)(`div`,{style:{maxHeight:320,overflow:`auto`,padding:4},children:u.length===0?(0,K.jsx)(`div`,{className:`tkc-pop__empty`,children:`No commands found`}):u.map((e,t)=>(0,K.jsxs)(`div`,{className:`tkc-pop__item`,"data-active":t===s||void 0,onMouseEnter:()=>c(t),onClick:()=>d(e),children:[e.icon&&(0,K.jsx)(Ut,{name:e.icon,size:13}),(0,K.jsx)(`span`,{children:e.label}),e.shortcut&&(0,K.jsx)(`span`,{style:{marginLeft:`auto`,fontFamily:`var(--font-mono)`,fontSize:10,letterSpacing:`.1em`,color:`var(--tkc-ink-quiet)`},children:e.shortcut})]},e.id))})]})]}):null},rn=(0,b.createContext)(null),an=({children:e})=>{let[t,n]=(0,b.useState)([]),[r,i]=(0,b.useState)({}),a=(0,b.useCallback)(e=>{i(t=>({...t,[e]:!0})),setTimeout(()=>{n(t=>t.filter(t=>t.id!==e)),i(t=>{let n={...t};return delete n[e],n})},220)},[]),o=(0,b.useCallback)(e=>{let t=Math.random().toString(36).slice(2,9),r={id:t,kind:`info`,duration:4500,...typeof e==`string`?{title:e}:e};return n(e=>[...e,r]),r.duration&&setTimeout(()=>a(t),r.duration),t},[a]);return(0,K.jsxs)(rn.Provider,{value:{push:o,close:a},children:[e,(0,K.jsx)(`div`,{className:`tkc-toasts`,children:t.map((e,t)=>(0,K.jsxs)(`div`,{className:q(`tkc-toast`,e.kind&&`tkc-toast--${e.kind}`),"data-closing":r[e.id]||void 0,children:[(0,K.jsx)(`span`,{className:`tkc-toast__num`,children:e.kind===`success`?`✓`:e.kind===`warn`?`!`:e.kind===`error`?`×`:t+1}),(0,K.jsxs)(`div`,{className:`tkc-toast__body`,children:[e.title&&(0,K.jsx)(`div`,{className:`t`,children:e.title}),e.message&&(0,K.jsx)(`div`,{className:`s`,children:e.message})]}),(0,K.jsx)(`button`,{type:`button`,className:`tkc-toast__x`,onClick:()=>a(e.id),"aria-label":`dismiss`,children:(0,K.jsx)(Ut,{name:`x`,size:14})})]},e.id))})]})},on=()=>{let e=(0,b.useContext)(rn);if(!e)throw Error(`useToasts must be used within a ToastProvider`);return e},sn=e=>(0,K.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 400 120`,width:400,height:120,...e,children:[(0,K.jsxs)(`g`,{stroke:`#1B1611`,strokeWidth:1,fill:`none`,children:[(0,K.jsx)(`path`,{d:`M10 10 h14 M10 10 v14`}),(0,K.jsx)(`path`,{d:`M390 10 h-14 M390 10 v14`}),(0,K.jsx)(`path`,{d:`M10 110 h14 M10 110 v-14`}),(0,K.jsx)(`path`,{d:`M390 110 h-14 M390 110 v-14`})]}),(0,K.jsxs)(`g`,{transform:`translate(36, 30)`,fill:`none`,stroke:`#1B1611`,strokeWidth:1.6,strokeLinecap:`round`,children:[(0,K.jsx)(`circle`,{cx:30,cy:30,r:28}),(0,K.jsx)(`path`,{d:`M14 44 L30 10 L46 44 M20 36 H40`}),(0,K.jsx)(`text`,{x:30,y:56,textAnchor:`middle`,className:`wm-mono`,fontSize:9,fill:`#1B1611`,stroke:`none`,children:`V.c`})]}),(0,K.jsxs)(`text`,{x:112,y:62,className:`wm-serif`,fontSize:44,fill:`#1B1611`,children:[`a5c`,(0,K.jsx)(`tspan`,{fill:`#C03A2B`,children:`.`}),`ai`]}),(0,K.jsx)(`text`,{x:112,y:86,className:`wm-mono`,fontSize:9,fill:`#5A4E3C`,children:`CODEX · OF · RELIABLE · AUTONOMY`}),(0,K.jsx)(`text`,{x:390,y:118,textAnchor:`end`,className:`wm-mono`,fontSize:8,fill:`#8C7E65`,children:`fol. I`})]});function cn(e,t={}){let n=t.baseMs??500,r=t.maxMs??3e4,i=t.jitterFactor??.2,a=Math.min(r,n*2**Math.max(0,e-1)),o=a*i*Math.random();return Math.round(a+o)}var ln=class extends Error{constructor(e){super(e),this.name=`GatewayClientError`}},un=class extends ln{constructor(e){super(e),this.name=`GatewayClientTimeoutError`}},dn=class extends ln{constructor(e){super(e),this.name=`GatewayClientDisconnectedError`}};function fn(e){let t=new WebSocket(e);return{send(e){t.send(e)},close(e,n){t.close(e,n)},onOpen(e){t.addEventListener(`open`,e)},onMessage(e){t.addEventListener(`message`,t=>e(String(t.data)))},onClose(e){t.addEventListener(`close`,t=>e({code:t.code,reason:t.reason}))},onError(e){t.addEventListener(`error`,e)}}}var pn=class{options;socket=null;pending=new Map;listeners=new Map;runSubscriptions=new Map;sessionSubscriptions=new Map;requestTimeoutMs;shouldReconnect;reconnectTimer=null;reconnectAttempt=0;closedManually=!1;ready=!1;nextId=0;constructor(e){this.options=e,this.requestTimeoutMs=e.requestTimeoutMs??1e4,this.shouldReconnect=e.shouldReconnect??!0}async connect(){this.closedManually=!1,await this.openSocket()}async close(){this.closedManually=!0,this.ready=!1,this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this.socket?.close(1e3,`client close`),this.socket=null}async request(e){let t=typeof e.id==`string`?e.id:this.allocateId(),n={...e,id:t},r=this.socket;if(!r)throw new dn(`Gateway socket is not connected`);return await new Promise((e,i)=>{let a=setTimeout(()=>{this.pending.delete(t),i(new un(`Timed out waiting for response to frame ${t}`))},this.requestTimeoutMs);this.pending.set(t,{resolve:e,reject:i,timer:a}),r.send(JSON.stringify(n))})}async startSession(e){return await this.request({type:`session.start`,...e})}async sendSessionMessage(e){return await this.request({type:`session.message`,...e})}subscribeRun(e,t){let n=this.runSubscriptions.get(e),r=n??{runId:e,sinceSeq:0,callbacks:new Set,subscriberCount:0};return r.subscriberCount+=1,t&&r.callbacks.add(t),this.runSubscriptions.set(e,r),n||this.sendFrame({type:`subscribe`,runId:e,sinceSeq:r.sinceSeq}),()=>{let n=this.runSubscriptions.get(e);n&&(n.subscriberCount=Math.max(0,n.subscriberCount-1),t&&n.callbacks.delete(t),!(n.subscriberCount>0)&&(this.runSubscriptions.delete(e),this.sendFrame({type:`unsubscribe`,runId:e})))}}subscribeSession(e,t){return this.sessionSubscriptions.set(e,{sessionId:e,callback:t}),this.sendFrame({type:`session.subscribe`,sessionId:e}),()=>{this.sessionSubscriptions.delete(e),this.sendFrame({type:`session.unsubscribe`,sessionId:e})}}on(e,t){let n=this.listeners.get(e);return n||(n=new Set,this.listeners.set(e,n)),n.add(t),()=>{n?.delete(t)}}async openSocket(){let e=(this.options.createSocket??fn)(this.options.url,this.options.token);this.socket=e,this.ready=!1;let t=!1;await new Promise((n,r)=>{e.onOpen(()=>{e.send(JSON.stringify({type:`auth`,token:this.options.token}))}),e.onError(e=>{this.emit(`error`,e),t||r(e)}),e.onMessage(e=>{this.handleMessage(e),t||JSON.parse(e).type===`hello`&&(t=!0,this.ready=!0,this.reconnectAttempt=0,this.emit(`connected`),this.replaySubscriptions(),n())}),e.onClose(e=>{if(this.ready=!1,this.emit(`disconnected`,e??{}),!t){r(new dn(`Gateway socket closed before authentication completed`));return}!this.closedManually&&this.shouldReconnect&&this.scheduleReconnect()})})}sendFrame(e){!this.socket||!this.ready||this.socket.send(JSON.stringify(e))}handleMessage(e){let t=JSON.parse(e),n=typeof t.id==`string`?t.id:null;if(n){let e=this.pending.get(n);e&&(clearTimeout(e.timer),this.pending.delete(n),e.resolve(t))}if(t.type===`run.event`&&typeof t.runId==`string`&&typeof t.seq==`number`){let e=this.runSubscriptions.get(t.runId);if(e){e.sinceSeq=Math.max(e.sinceSeq,Number(t.seq));for(let n of e.callbacks)n(t)}}if(t.type===`hook.request`){let e=t,n=this.runSubscriptions.get(e.runId);if(n){let t={type:`run.event`,runId:e.runId,seq:e.deadlineTs,source:`gateway`,event:e};for(let e of n.callbacks)e(t)}}this.emit(`frame`,t)}replaySubscriptions(){for(let e of this.runSubscriptions.values())this.sendFrame({type:`subscribe`,runId:e.runId,sinceSeq:e.sinceSeq});for(let e of this.sessionSubscriptions.values())this.sendFrame({type:`session.subscribe`,sessionId:e.sessionId})}scheduleReconnect(){let e=cn(++this.reconnectAttempt);this.reconnectTimer=setTimeout(()=>{this.openSocket().catch(e=>{this.emit(`error`,e),this.scheduleReconnect()})},e)}emit(e,...t){let n=this.listeners.get(e);if(n)for(let e of n)e(...t)}allocateId(){return this.nextId+=1,`req-${this.nextId}`}},mn=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},hn=(e=>e?mn(e):mn);function gn(){return{seqs:[],sources:[],events:[]}}function _n(e,t,n,r){let i=0,a=e.seqs.length;for(;i<a;){let n=Math.floor((i+a)/2),r=e.seqs[n];if(r===t)return e;r<t?i=n+1:a=n}return{seqs:[...e.seqs.slice(0,i),t,...e.seqs.slice(i)],sources:[...e.sources.slice(0,i),n,...e.sources.slice(i)],events:[...e.events.slice(0,i),r,...e.events.slice(i)]}}function vn(e){return hn((t,n)=>({client:e,connection:{status:`disconnected`,error:null},agents:{items:[],byId:{}},sessions:{byId:{}},runs:{byId:{}},events:{byRunId:{}},hooks:{byRunId:{}},actions:{setConnection(e,n=null){t(t=>({...t,connection:{status:e,error:n}}))},setAgents(e){t(t=>({...t,agents:{items:e.map(e=>e.agent),byId:Object.fromEntries(e.map(e=>[e.agent,e]))}}))},mergeSession(e,n){t(t=>({...t,sessions:{byId:{...t.sessions.byId,[e]:{...t.sessions.byId[e]??{},sessionId:e,...n}}}}))},mergeRun(e,n){t(t=>({...t,runs:{byId:{...t.runs.byId,[e]:{...t.runs.byId[e]??{},runId:e,...n}}}}))},mergeRunEvent(e,n,r,i){t(t=>{let a=t.events.byRunId[e]??gn(),o=_n(a,n,r,i);return o===a?t:{...t,events:{byRunId:{...t.events.byRunId,[e]:o}}}})},addHookRequest(e){t(t=>({...t,hooks:{byRunId:{...t.hooks.byRunId,[e.runId]:[...(t.hooks.byRunId[e.runId]??[]).filter(t=>t.hookRequestId!==e.hookRequestId),e]}}}))},resolveHookRequest(e,n){t(t=>({...t,hooks:{byRunId:{...t.hooks.byRunId,[e]:(t.hooks.byRunId[e]??[]).filter(e=>e.hookRequestId!==n)}}}))}}}))}var yn=[];function bn(e,t){if(t)return e.hooks.byRunId[t]??yn;let n=Object.values(e.hooks.byRunId).flat();return n.length>0?n:yn}function xn(e,t=180){let n=e.replace(/\s+/g,` `).trim();return n.length<=t?n:`${n.slice(0,Math.max(0,t-1))}…`}function Sn(e){if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Cn(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Date.parse(e);if(Number.isFinite(t))return t}return null}function wn(e,t,n){let r=t!=null&&n!=null?Math.max(0,n-t):0;return r>0?Math.max(1,Math.min(10,Math.round(r/1e3)+1)):Math.max(1,Math.min(7,Math.ceil(Math.max(16,e.length)/28)))}function Tn(e,t){for(let n of t)n.length===0||e.includes(n)||e.push(n)}var En=new Set([`path`,`paths`,`file`,`files`,`file_path`,`filePath`,`filePaths`,`relative_path`,`relativePath`,`target`,`target_path`,`targetPath`,`source_path`,`sourcePath`,`oldPath`,`newPath`,`output_path`,`outputPath`]),Dn=/^(dockerfile|makefile|procfile|gemfile|rakefile|justfile|readme(?:\.[^.]+)?|license(?:\.[^.]+)?|jenkinsfile|brewfile|tiltfile|vagrantfile)$/i;function On(e){let t=e.trim().replace(/^["'`]+|["'`]+$/g,``);if(t.length===0||t.length>300||/[\r\n]/.test(t)||t.endsWith(`/`)||t.endsWith(`\\`))return null;let n=t.replace(/^vscode:\/\/file/,``),r=n.split(/[\\/]/).filter(Boolean).at(-1)??n;return/\.[A-Za-z0-9_-]{1,16}$/.test(r)||Dn.test(r)?n:null}function kn(e,t=0,n=new Set){if(t>5||e==null)return n;if(typeof e==`string`){let t=On(e);return t&&n.add(t),n}if(Array.isArray(e)){for(let r of e)kn(r,t+1,n);return n}if(typeof e==`object`)for(let[r,i]of Object.entries(e)){if(En.has(r)){kn(i,t+1,n);continue}t<4&&kn(i,t+1,n)}return n}function An(e,t){let n=e.timestamp??e.startedAt??0,r=t.timestamp??t.startedAt??0;return n===r?String(e.path??``).localeCompare(String(t.path??``)):n-r}function jn(e){return typeof e==`object`&&!!e}function Y(e){return typeof e==`string`?e:null}function Mn(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Nn(e){let t=e.timestamp;return typeof t==`string`||typeof t==`number`?t:void 0}function Pn(e){if(!jn(e))return null;let t={totalUsd:Mn(e.totalUsd)??void 0,inputTokens:Mn(e.inputTokens)??void 0,outputTokens:Mn(e.outputTokens)??void 0,thinkingTokens:Mn(e.thinkingTokens)??void 0,cachedTokens:Mn(e.cachedTokens)??void 0,cacheCreationTokens:Mn(e.cacheCreationTokens)??void 0,cacheReadTokens:Mn(e.cacheReadTokens)??void 0};return Object.values(t).some(e=>e!=null)?t:null}function Fn(e){let t=Y(e.toolCallId);if(!t)return null;let n=Nn(e);switch(e.type){case`tool_call_start`:{let r=Y(e.toolName),i=Y(e.inputAccumulated);return r&&i!=null?{type:`tool_call_start`,toolCallId:t,toolName:r,inputAccumulated:i,timestamp:n}:null}case`tool_call_ready`:{let r=Y(e.toolName);return r?{type:`tool_call_ready`,toolCallId:t,toolName:r,input:e.input,timestamp:n}:null}case`tool_input_delta`:{let r=Y(e.inputAccumulated);return r==null?null:{type:`tool_input_delta`,toolCallId:t,inputAccumulated:r,timestamp:n}}case`tool_result`:{let r=Y(e.toolName);return r?{type:`tool_result`,toolCallId:t,toolName:r,output:e.output,timestamp:n}:null}case`tool_error`:{let r=Y(e.toolName),i=Y(e.error);return r&&i!=null?{type:`tool_error`,toolCallId:t,toolName:r,error:i,timestamp:n}:null}default:return null}}function In(e){let t=Y(e.toolCallId),n=Y(e.server),r=Y(e.toolName);if(!t||!n||!r)return null;let i=Nn(e);switch(e.type){case`mcp_tool_call_start`:return{type:`mcp_tool_call_start`,toolCallId:t,server:n,toolName:r,input:e.input,timestamp:i};case`mcp_tool_result`:return{type:`mcp_tool_result`,toolCallId:t,server:n,toolName:r,output:e.output,timestamp:i};case`mcp_tool_error`:{let a=Y(e.error);return a==null?null:{type:`mcp_tool_error`,toolCallId:t,server:n,toolName:r,error:a,timestamp:i}}default:return null}}function Ln(e){let t=Y(e.agentName);if(!t)return null;let n=Nn(e);switch(e.type){case`subagent_spawn`:{let r=Y(e.prompt);return r==null?null:{type:`subagent_spawn`,agentName:t,prompt:r,timestamp:n}}case`subagent_result`:{let r=Y(e.summary);return r==null?null:{type:`subagent_result`,agentName:t,summary:r,timestamp:n}}case`subagent_error`:{let r=Y(e.error);return r==null?null:{type:`subagent_error`,agentName:t,error:r,timestamp:n}}default:return null}}function Rn(e){let t=Nn(e);switch(e.type){case`session_start`:case`session_resume`:case`session_end`:case`session_fork`:return{type:e.type,timestamp:t};case`turn_start`:case`turn_end`:{let n=Mn(e.turnIndex);return n==null?null:{type:e.type,turnIndex:n,timestamp:t}}case`step_start`:{let n=Y(e.stepType),r=Mn(e.stepIndex);return n!=null&&r!=null?{type:`step_start`,stepType:n,stepIndex:r,timestamp:t}:null}case`step_end`:{let n=Mn(e.stepIndex);return n==null?null:{type:`step_end`,stepIndex:n,timestamp:t}}default:return null}}function zn(e){let t=Y(e.path);if(!t)return null;let n=Nn(e);switch(e.type){case`file_read`:case`file_write`:case`file_create`:case`file_delete`:return{type:e.type,path:t,timestamp:n};case`file_patch`:return{type:`file_patch`,path:t,diff:Y(e.diff)??``,timestamp:n};default:return null}}function Bn(e){let t=Nn(e);switch(e.type){case`approval_request`:{let n=Y(e.interactionId),r=Y(e.action),i=Y(e.detail),a=Y(e.riskLevel);return!n||!r||i==null||a!==`low`&&a!==`medium`&&a!==`high`?null:{type:`approval_request`,interactionId:n,action:r,detail:i,toolName:Y(e.toolName)??void 0,riskLevel:a,timestamp:t}}case`approval_granted`:{let n=Y(e.interactionId);return n?{type:`approval_granted`,interactionId:n,timestamp:t}:null}case`approval_denied`:{let n=Y(e.interactionId);return n?{type:`approval_denied`,interactionId:n,reason:Y(e.reason)??void 0,timestamp:t}:null}case`hook_requested`:{let n=Y(e.hookRequestId),r=Y(e.hookKind);return!n||!r?null:{type:`hook_requested`,hookRequestId:n,hookKind:r,payload:e.payload,deadlineTs:Mn(e.deadlineTs)??void 0,timestamp:t}}case`hook_decision`:{let n=Y(e.hookRequestId),r=e.decision===`deny`?`deny`:e.decision===`allow`?`allow`:null;return!n||!r?null:{type:`hook_decision`,hookRequestId:n,hookKind:Y(e.hookKind)??void 0,decision:r,reason:Y(e.reason)??void 0,resolvedBy:Y(e.resolvedBy)??void 0,timestamp:t}}case`shell_start`:{let n=Y(e.command);return n==null?null:{type:`shell_start`,command:n,timestamp:t}}case`shell_exit`:{let n=Mn(e.exitCode);return n==null?null:{type:`shell_exit`,exitCode:n,timestamp:t}}case`plugin_loaded`:case`plugin_invoked`:{let n=Y(e.pluginName),r=Y(e.pluginId);return n&&r?{type:e.type,pluginName:n,pluginId:r,timestamp:t}:null}case`plugin_error`:{let n=Y(e.pluginName),r=Y(e.pluginId),i=Y(e.error);return n&&r&&i!=null?{type:`plugin_error`,pluginName:n,pluginId:r,error:i,timestamp:t}:null}case`skill_loaded`:case`skill_invoked`:{let n=Y(e.skillName);return n?{type:e.type,skillName:n,timestamp:t}:null}case`agentdoc_read`:{let n=Y(e.path);return n?{type:`agentdoc_read`,path:n,timestamp:t}:null}case`image_output`:return{type:`image_output`,filePath:Y(e.filePath)??void 0,timestamp:t};default:return null}}function Vn(e){if(!jn(e))return null;let t=Y(e.type);if(!t)return null;let n=e;switch(t){case`user_message`:{let e=Y(n.text);return e==null?null:{type:t,text:e,sessionId:Y(n.sessionId)??void 0,timestamp:Nn(n)}}case`thinking_delta`:{let e=Y(n.delta);return e==null?null:{type:t,delta:e,timestamp:Nn(n)}}case`thinking_stop`:{let e=Y(n.thinking);return e==null?null:{type:t,thinking:e,timestamp:Nn(n)}}case`text_delta`:{let e=Y(n.delta);return e==null?null:{type:t,delta:e,timestamp:Nn(n)}}case`message_stop`:{let e=Y(n.text);return e==null?null:{type:t,text:e,timestamp:Nn(n)}}case`tool_call_start`:case`tool_call_ready`:case`tool_input_delta`:case`tool_result`:case`tool_error`:return Fn(n);case`mcp_tool_call_start`:case`mcp_tool_result`:case`mcp_tool_error`:return In(n);case`subagent_spawn`:case`subagent_result`:case`subagent_error`:return Ln(n);case`session_start`:case`session_resume`:case`session_end`:case`session_fork`:case`turn_start`:case`turn_end`:case`step_start`:case`step_end`:return Rn(n);case`file_read`:case`file_write`:case`file_create`:case`file_delete`:case`file_patch`:return zn(n);case`shell_start`:case`shell_exit`:case`approval_request`:case`approval_granted`:case`approval_denied`:case`hook_requested`:case`hook_decision`:case`plugin_loaded`:case`plugin_invoked`:case`plugin_error`:case`skill_loaded`:case`skill_invoked`:case`agentdoc_read`:case`image_output`:return Bn(n);case`cost`:{let e=Pn(n.cost);return e?{type:`cost`,cost:e,timestamp:Nn(n)}:null}case`error`:{let e=Y(n.message)??Y(n.error);return e==null?null:{type:`error`,message:e,timestamp:Nn(n)}}default:return null}}function Hn(e){if(!e)return[];let t=[];for(let n of e.events){let e=Vn(n);e&&t.push(e)}return t}function Un(e){let t=typeof e.runId==`string`?e.runId:``;return t.length===0?null:{runId:t,agent:typeof e.agent==`string`&&e.agent.length>0?e.agent:`unknown`,status:typeof e.status==`string`&&e.status.length>0?e.status:`unknown`,startedAt:Cn(e.startedAt)??0}}function Wn(e,t){let n={totalUsd:0,inputTokens:0,outputTokens:0,thinkingTokens:0,cachedTokens:0,cacheCreationTokens:0,cacheReadTokens:0},r=!1;for(let i of e)for(let e of Hn(t[i]))e.type===`cost`&&(n.totalUsd=(n.totalUsd??0)+Number(e.cost.totalUsd??0),n.inputTokens=(n.inputTokens??0)+Number(e.cost.inputTokens??0),n.outputTokens=(n.outputTokens??0)+Number(e.cost.outputTokens??0),n.thinkingTokens=(n.thinkingTokens??0)+Number(e.cost.thinkingTokens??0),n.cachedTokens=(n.cachedTokens??0)+Number(e.cost.cachedTokens??0),n.cacheCreationTokens=(n.cacheCreationTokens??0)+Number(e.cost.cacheCreationTokens??0),n.cacheReadTokens=(n.cacheReadTokens??0)+Number(e.cost.cacheReadTokens??0),r=!0);return r?n:null}function Gn(e,t){let n=e.timestamp;if(n instanceof Date)return n.getTime();if(typeof n==`number`&&Number.isFinite(n))return n;if(typeof n==`string`){let e=Date.parse(n);if(Number.isFinite(e))return e}return t}function Kn(e){if(typeof e==`string`)return e;if(Array.isArray(e)){let t=e.flatMap(e=>{if(typeof e==`string`)return[e];if(!e||typeof e!=`object`)return[];let t=e,n=typeof t.type==`string`?t.type:``;return n===`tool_use`?[]:n===`text`&&typeof t.text==`string`?[t.text]:n===`tool_result`?[Kn(t.content??t.output??t.tool_use_result)]:typeof t.text==`string`?[t.text]:`content`in t?[Kn(t.content)]:[]}).filter(e=>e.length>0);if(t.length>0)return t.join(`
10
10
 
11
11
  `)}if(e&&typeof e==`object`){let t=e;if(typeof t.text==`string`)return t.text;if(`content`in t){let e=Kn(t.content);if(e.length>0)return e}}return e==null?``:Sn(e)}function qn(e,t){let n=[];for(let[r,i]of t.entries()){let t=`${e}:native:${r}`,a=Gn(i,r),o=Kn(i.content);if(i.role===`user`&&o.length>0){n.push({id:`${t}:user`,kind:`user`,label:`user`,text:o,runId:t,timestamp:a,filePaths:[]});continue}if(typeof i.thinking==`string`&&i.thinking.length>0&&n.push({id:`${t}:thinking`,kind:`thinking`,label:`thinking`,text:i.thinking,runId:t,timestamp:a+.1,filePaths:[]}),Array.isArray(i.toolCalls))for(let[e,r]of i.toolCalls.entries()){let i=[...kn(r.input),...kn(r.output)];n.push({id:`${t}:tool:${e}`,kind:`tool`,label:String(r.toolName??`tool`),text:Sn({input:r.input,output:r.output,durationMs:r.durationMs}),runId:t,timestamp:a+.2+e/10,filePaths:i})}if(i.role===`tool`&&i.toolResult){let e=o.length>0?o:Sn(i.toolResult.output);n.push({id:`${t}:tool-result`,kind:`tool`,label:String(i.toolResult.toolName??`tool`),text:e,runId:t,timestamp:a+.25,filePaths:[...kn(i.toolResult.output)]});continue}if(i.role===`assistant`&&o.length>0){n.push({id:`${t}:assistant`,kind:`assistant`,label:`assistant`,text:o,runId:t,timestamp:a+.3,filePaths:[]});continue}i.role===`system`&&o.length>0&&n.push({id:`${t}:system`,kind:`system`,label:`system`,text:o,runId:t,timestamp:a+.4,filePaths:[]})}return n}function Jn(e,t,n,r){if(t.length===0)return null;let i=qn(e,t).map((t,n)=>({id:`${e}:native:segment:${n}`,kind:t.kind,title:t.label,detail:xn(t.text,220),weight:wn(t.text,null,null),startedAt:typeof t.timestamp==`number`?t.timestamp:null,endedAt:typeof t.timestamp==`number`?t.timestamp:null,status:t.kind===`error`?`error`:`complete`,filePaths:t.filePaths})),a=i.filter(e=>e.kind===`tool`).length;return{runId:`${e}:native`,laneKey:`${e}:native`,agent:n,status:r,startedAt:0,lastEventAt:t.length,segmentCount:i.length,toolCount:a,totalUsd:null,segments:i}}function Yn(e,t,n,r,i,a){let o=e.get(t)??{path:t,reads:0,writes:0,touches:0,lastEventAt:null,runIds:[],tools:[]};n===`read`?o.reads+=1:o.writes+=1,o.touches+=1,o.lastEventAt=i??o.lastEventAt,o.runIds.includes(r)||o.runIds.push(r),a&&!o.tools.includes(a)&&o.tools.push(a),e.set(t,o)}function Xn(e,t){for(let n of t){let t=e.get(n.path);if(!t){e.set(n.path,{...n,runIds:[...n.runIds],tools:[...n.tools]});continue}t.reads+=n.reads,t.writes+=n.writes,t.touches+=n.touches,t.lastEventAt=Math.max(t.lastEventAt??0,n.lastEventAt??0)||null,Tn(t.runIds,n.runIds),Tn(t.tools,n.tools)}}function Zn(e){return e.type===`turn_start`||e.type===`turn_end`?`turn ${String(e.turnIndex??`?`)}`:e.type===`step_start`||e.type===`step_end`?`step ${String((`stepType`in e?e.stepType:void 0)??e.stepIndex??`?`)}`:e.type===`session_start`||e.type===`session_resume`||e.type===`session_end`||e.type===`session_fork`?`session ${e.type.replace(`session_`,``)}`:e.type.replace(/_/g,` `)}function Qn(e){switch(e.type){case`approval_request`:return`approval requested`;case`approval_granted`:return`approval granted`;case`approval_denied`:return`approval denied`;case`hook_requested`:return`runtime hook ${e.hookKind}`;case`hook_decision`:return`hook ${e.decision}`;case`shell_start`:return`shell ${xn(e.command,48)}`;case`shell_exit`:return`shell exit ${String(e.exitCode??`?`)}`;case`file_read`:case`file_write`:case`file_create`:case`file_delete`:case`file_patch`:return`${e.type.replace(`file_`,``)} ${xn(e.path,36)}`;case`mcp_tool_call_start`:case`mcp_tool_result`:case`mcp_tool_error`:return`${e.toolName} · ${e.server}`;case`plugin_loaded`:case`plugin_invoked`:case`plugin_error`:return`${e.type.replace(`plugin_`,``)} ${e.pluginName??e.pluginId??`plugin`}`;case`skill_loaded`:case`skill_invoked`:return`${e.type.replace(`skill_`,``)} ${e.skillName}`;case`agentdoc_read`:return`agent doc ${xn(e.path,36)}`;default:return e.type.replace(/_/g,` `)}}function $n(e,t){return t?`${e} · ${t}`:e}function er(e){let t=Sn(e.payload),n=e.deadlineTs?`deadline ${new Date(e.deadlineTs).toLocaleTimeString()}`:`pending`;return t.length>0?`Runtime hook ${e.hookKind} opened (${n}).\n${t}`:`Runtime hook ${e.hookKind} opened (${n}).`}function tr(e){let t=[`Runtime hook ${e.hookKind??e.hookRequestId} resolved: ${e.decision}.`];return e.reason&&t.push(`Reason: ${e.reason}`),e.resolvedBy&&t.push(`Resolved by: ${e.resolvedBy}`),t.join(`
12
12
  `)}function nr(e){if(e.type===`approval_request`){let t=[`Approval requested: ${e.action}.`,e.detail];return e.toolName&&t.push(`Tool: ${e.toolName}`),t.push(`Risk: ${e.riskLevel}`),t.join(`
@@ -28,7 +28,7 @@ Owner sees routing metadata`,className:`tkc-input min-h-24 resize-y`})}),(0,K.js
28
28
  `).map((e,t)=>{let n=e.trim();return n?n.startsWith(`# `)?(0,K.jsx)(`div`,{className:`text-lg font-semibold text-foreground`,children:n.slice(2)},`description-preview-${t}`):n.startsWith(`- [ ] `)?(0,K.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,K.jsx)(`span`,{className:`mt-1 h-4 w-4 rounded border border-border`}),(0,K.jsx)(`span`,{children:n.slice(6)})]},`description-preview-${t}`):n.startsWith(`- `)?(0,K.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,K.jsx)(`span`,{className:`mt-1.5 h-2 w-2 rounded-full bg-foreground-muted`}),(0,K.jsx)(`span`,{children:n.slice(2)})]},`description-preview-${t}`):(0,K.jsx)(`p`,{children:n},`description-preview-${t}`):(0,K.jsx)(`div`,{className:`h-2`},`description-preview-${t}`)})}):(0,K.jsx)(`p`,{className:`text-sm text-foreground-muted`,children:`No description authored yet.`})}return(0,K.jsxs)(`aside`,{className:`rounded-3xl border border-border bg-card p-5 shadow-lg`,"data-testid":`issue-detail-panel`,children:[(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-primary/80`,children:`Issue detail`}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`h3`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:e.key}),(0,K.jsx)(`span`,{className:`rounded-full border px-2.5 py-1 text-xs ${Ry(e.status)}`,children:Ly(e.status)}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2.5 py-1 text-xs text-foreground-muted`,children:e.dispatch.readiness})]}),(0,K.jsx)(`p`,{className:`mt-2 text-base font-semibold text-foreground`,children:e.title}),e.summary?(0,K.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-foreground-muted`,children:e.summary}):null,(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 text-xs text-foreground-muted`,children:[(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[e.childIssueIds.length,` child issues`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[e.dependencies.length,` dependencies`]}),t?(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[ny(t.workflowState),` context`]}):null]})]}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>g(e),className:`inline-flex h-11 items-center justify-center rounded-xl border border-border px-4 text-sm font-semibold text-foreground-muted`,children:`Open page`}),(0,K.jsx)(`button`,{type:`button`,onClick:_,className:`inline-flex h-11 items-center justify-center rounded-xl border border-border px-4 text-sm font-semibold text-foreground-muted`,children:`Close issue`})]}),be?(0,K.jsx)(`div`,{className:`mt-4 rounded-2xl border border-warning/30 bg-warning-muted px-4 py-3 text-sm text-warning`,children:`Server state changed while unsaved edits were still open. Reset to the latest version or keep your local draft and retry after refreshing.`}):null,xe?(0,K.jsx)(`div`,{className:`mt-4 rounded-2xl border border-error/30 bg-error-muted px-4 py-3 text-sm text-error`,children:xe}):null,(0,K.jsxs)(`section`,{className:`mt-5 rounded-2xl border border-border bg-background/80 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Issue profile`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Edit the core issue details here without leaving the planning flow.`})]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[My(`metadata`,u,e)?(0,K.jsx)(`button`,{type:`button`,onClick:()=>E(`metadata`),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted`,children:`Reset`}):null,(0,K.jsx)(`button`,{type:`button`,onClick:()=>S(`metadata`),disabled:!My(`metadata`,u,e)||d.metadata.status===`saving`,className:`inline-flex h-9 items-center justify-center rounded-xl border border-primary/30 bg-primary/10 px-3 text-xs font-semibold text-primary disabled:opacity-50`,children:d.metadata.status===`saving`?`Saving…`:`Save profile`})]})]}),(0,K.jsxs)(`div`,{className:`mt-4 grid gap-4 xl:grid-cols-2`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Title`,(0,K.jsx)(`input`,{value:u.title,onChange:e=>v(t=>({...t,title:e.target.value})),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Status`,(0,K.jsxs)(`select`,{value:u.status,onChange:e=>v(t=>({...t,status:e.target.value})),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,children:[(0,K.jsx)(`option`,{value:`backlog`,children:`Backlog`}),(0,K.jsx)(`option`,{value:`ready`,children:`Ready`}),(0,K.jsx)(`option`,{value:`in-progress`,children:`In Progress`}),(0,K.jsx)(`option`,{value:`blocked`,children:`Blocked`}),(0,K.jsx)(`option`,{value:`review`,children:`Review`}),(0,K.jsx)(`option`,{value:`done`,children:`Done`})]})]})]}),(0,K.jsxs)(`label`,{className:`mt-4 block text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Summary`,(0,K.jsx)(Tm,{taskTags:o,value:u.summary,onValueChange:e=>v(t=>({...t,summary:e})),className:`mt-2`,renderTextarea:e=>(0,K.jsx)(`textarea`,{...e,className:`min-h-24 w-full rounded-2xl border border-border bg-card px-3 py-3 text-sm text-foreground`})})]}),(0,K.jsxs)(`div`,{className:`mt-4 grid gap-4 xl:grid-cols-2`,children:[(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card p-4`,children:[(0,K.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Dependencies`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Link blockers and related work directly from the detail surface.`})]})}),(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,K.jsx)(`select`,{value:pe,onChange:e=>me(e.target.value),className:`h-10 min-w-[180px] flex-1 rounded-xl border border-border bg-background px-3 text-sm text-foreground`,children:L.map(e=>(0,K.jsxs)(`option`,{value:e.id,children:[e.key,` · `,e.title]},`dependency-option-${e.id}`))}),(0,K.jsxs)(`select`,{value:he,onChange:e=>ge(e.target.value),className:`h-10 rounded-xl border border-border bg-background px-3 text-sm text-foreground`,children:[(0,K.jsx)(`option`,{value:`blocked-by`,children:`Blocked by`}),(0,K.jsx)(`option`,{value:`blocks`,children:`Blocks`}),(0,K.jsx)(`option`,{value:`related`,children:`Related`})]}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>{pe&&v(e=>e.dependencies.some(e=>e.issueId===pe&&e.type===he)?e:{...e,dependencies:[...e.dependencies,{issueId:pe,type:he}]})},className:`inline-flex h-10 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Add`})]}),(0,K.jsx)(`div`,{className:`mt-3 space-y-2`,children:u.dependencies.length>0?u.dependencies.map((e,t)=>{let n=ee.get(e.issueId);return(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background px-3 py-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>n&&h(n),className:`text-sm font-semibold text-foreground underline-offset-4 hover:underline`,children:n?.key??e.issueId}),(0,K.jsx)(`span`,{className:`text-sm text-foreground-muted`,children:n?.title??`Linked dependency`})]}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,K.jsxs)(`select`,{value:e.type,onChange:e=>v(n=>({...n,dependencies:n.dependencies.map((n,r)=>r===t?{...n,type:e.target.value}:n)})),className:`h-9 rounded-xl border border-border bg-card px-3 text-sm text-foreground`,children:[(0,K.jsx)(`option`,{value:`blocked-by`,children:`Blocked by`}),(0,K.jsx)(`option`,{value:`blocks`,children:`Blocks`}),(0,K.jsx)(`option`,{value:`related`,children:`Related`})]}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>v(e=>({...e,dependencies:e.dependencies.filter((e,n)=>n!==t)})),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted`,children:`Remove`})]})]},`dependency-draft-${e.issueId}-${e.type}-${t}`)}):(0,K.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`No dependencies configured.`})})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Acceptance criteria`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Criteria now stay editable instead of living only in seeded snapshots.`})]}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>v(e=>({...e,acceptanceCriteria:[...e.acceptanceCriteria,{title:``,satisfied:!1,notes:``}]})),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Add criterion`})]}),(0,K.jsx)(`div`,{className:`mt-3 space-y-3`,children:u.acceptanceCriteria.length>0?u.acceptanceCriteria.map((e,t)=>(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background p-3`,children:[(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-foreground-muted`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.satisfied,onChange:e=>v(n=>({...n,acceptanceCriteria:n.acceptanceCriteria.map((n,r)=>r===t?{...n,satisfied:e.target.checked}:n)}))}),`Satisfied`]}),(0,K.jsx)(`input`,{value:e.title,onChange:e=>v(n=>({...n,acceptanceCriteria:n.acceptanceCriteria.map((n,r)=>r===t?{...n,title:e.target.value}:n)})),placeholder:`Describe the acceptance condition`,className:`mt-3 h-10 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`}),(0,K.jsx)(`input`,{value:e.notes,onChange:e=>v(n=>({...n,acceptanceCriteria:n.acceptanceCriteria.map((n,r)=>r===t?{...n,notes:e.target.value}:n)})),placeholder:`Optional note`,className:`mt-2 h-10 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`}),(0,K.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,K.jsx)(`button`,{type:`button`,onClick:()=>v(e=>({...e,acceptanceCriteria:e.acceptanceCriteria.filter((e,n)=>n!==t)})),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted`,children:`Remove`})})]},`criterion-draft-${e.id??t}`)):(0,K.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`No acceptance criteria authored yet.`})})]})]}),d.metadata.message?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border px-4 py-3 text-sm ${d.metadata.status===`error`?`border-error/30 bg-error-muted text-error`:`border-success/30 bg-success-muted text-success`}`,children:d.metadata.message}):null]}),(0,K.jsxs)(`section`,{className:`mt-5 rounded-2xl border border-border bg-background/80 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Description`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`The panel now behaves like an authoring surface, not a static summary.`})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(`span`,{className:`rounded-full border px-2.5 py-1 text-xs ${d.description.status===`error`?`border-error/25 bg-error-muted text-error`:d.description.status===`saving`?`border-warning/25 bg-warning-muted text-warning`:d.description.status===`saved`?`border-success/25 bg-success-muted text-success`:`border-border text-foreground-muted`}`,children:d.description.status===`saving`?`Autosaving`:d.description.status===`saved`?`Saved`:d.description.status===`error`?`Recovery needed`:ye?`Local draft`:`In sync`}),ye?(0,K.jsx)(`button`,{type:`button`,onClick:y,className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted`,children:`Reset draft`}):null]})]}),(0,K.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>Oe(`# `),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Heading`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>Oe(`- `),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Bullet`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>Oe(`- [ ] `),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Checklist`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>Oe("```\n\n```"),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Code`}),d.description.status===`error`?(0,K.jsx)(`button`,{type:`button`,onClick:x,className:`inline-flex h-9 items-center justify-center rounded-xl border border-error/30 bg-error-muted px-3 text-xs font-semibold text-error`,children:`Retry save`}):null]}),(0,K.jsxs)(`div`,{className:`mt-4 grid gap-3 xl:grid-cols-2`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Editor`,(0,K.jsx)(`textarea`,{ref:_e,value:u.description,onChange:e=>v(t=>({...t,description:e.target.value})),placeholder:`Describe the work, add checklists, and capture recovery notes.`,className:`mt-2 min-h-40 w-full rounded-2xl border border-border bg-card px-3 py-3 text-sm text-foreground`,"data-testid":`issue-description-editor`})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card p-4`,"data-testid":`issue-description-preview`,children:[(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:`Preview`}),(0,K.jsx)(`div`,{className:`mt-3`,children:ke(u.description)})]})]}),d.description.message?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border px-4 py-3 text-sm ${d.description.status===`error`?`border-error/30 bg-error-muted text-error`:`border-success/30 bg-success-muted text-success`}`,children:d.description.message}):null]}),(0,K.jsxs)(`div`,{className:`mt-5 grid gap-4`,children:[n||t?.repositoryLifecycle?(0,K.jsxs)(`article`,{className:`rounded-2xl border border-border bg-background/80 p-4`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Review and PR context`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Shared review output and linked PR state stay visible on the active issue, not only in the queue panel.`})]}),(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 text-xs`,children:[n?(0,K.jsxs)(`span`,{className:`rounded-full border px-2.5 py-1 ${iy(n.decision)}`,children:[`Review `,n.decision]}):null,(0,K.jsxs)(`span`,{className:`rounded-full border px-2.5 py-1 ${iy(Se?.reviewStatus??t?.repositoryLifecycle?.reviewStatus??`unlinked`)}`,children:[`PR review `,Se?.reviewStatus??t?.repositoryLifecycle?.reviewStatus??`unlinked`]}),(0,K.jsxs)(`span`,{className:`rounded-full border px-2.5 py-1 ${iy(Se?.mergeStatus??t?.repositoryLifecycle?.mergeStatus??`not-ready`)}`,children:[`Merge `,Se?.mergeStatus??t?.repositoryLifecycle?.mergeStatus??`not-ready`]}),(0,K.jsxs)(`span`,{className:`rounded-full border px-2.5 py-1 ${iy(Se?.publishStatus??t?.repositoryLifecycle?.publishStatus??`not-ready`)}`,children:[`Publish `,Se?.publishStatus??t?.repositoryLifecycle?.publishStatus??`not-ready`]})]}),Se?.title||t?.repositoryLifecycle?.pullRequest?.title?(0,K.jsxs)(`div`,{className:`mt-3 rounded-2xl border border-border bg-card px-4 py-3`,children:[(0,K.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:Se?.title??t?.repositoryLifecycle?.pullRequest?.title}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:Se?`${ay(Se.provider)} PR ${Se.number?`#${Se.number}`:``}`:t?.repositoryLifecycle?.pullRequest?`PR #${t.repositoryLifecycle.pullRequest.number}`:`Linked PR`})]}):null,Ce.length>0?(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2 text-xs`,children:Ce.map(e=>(0,K.jsxs)(`span`,{className:`rounded-full border px-2.5 py-1 ${iy(e.status)}`,children:[e.name,`: `,ly(e.status)]},`issue-detail-${e.id}`))}):null,B.length>0?(0,K.jsx)(`div`,{className:`mt-3 space-y-2`,children:B.map(e=>(0,K.jsxs)(`div`,{className:`rounded-xl border border-border bg-card px-3 py-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-[11px] text-foreground-muted`,children:[(0,K.jsx)(`span`,{children:e.author.name}),(0,K.jsx)(`span`,{children:e.anchor.filePath}),(0,K.jsxs)(`span`,{children:[e.anchor.side,`:`,e.anchor.line]})]}),(0,K.jsx)(`p`,{className:`mt-1 text-sm text-foreground`,children:e.body})]},`issue-review-${e.id}`))}):n?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`No review comments have been mapped back to this issue yet.`}):null]}):null,(0,K.jsxs)(`article`,{className:`rounded-2xl border border-border bg-background/80 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Priority`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Field-level save keeps rank changes separate from editor autosave.`})]}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:f?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>S(`priority`),disabled:!My(`priority`,u,e)||d.priority.status===`saving`,className:`inline-flex h-9 items-center justify-center rounded-xl border border-primary/30 bg-primary/10 px-3 text-xs font-semibold text-primary disabled:opacity-50`,children:d.priority.status===`saving`?`Saving…`:`Save`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>{E(`priority`),C(!1)},className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted`,children:`Cancel`})]}):(0,K.jsx)(`button`,{type:`button`,onClick:()=>C(!0),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Edit`})})]}),s?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`Loading priority controls…`}):f?(0,K.jsx)(`div`,{className:`mt-3`,children:(0,K.jsxs)(`select`,{"aria-label":`Issue priority`,value:u.priority,onChange:e=>v(t=>({...t,priority:e.target.value})),className:`h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,children:[(0,K.jsx)(`option`,{value:`critical`,children:`Critical`}),(0,K.jsx)(`option`,{value:`high`,children:`High`}),(0,K.jsx)(`option`,{value:`medium`,children:`Medium`}),(0,K.jsx)(`option`,{value:`low`,children:`Low`})]})}):(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-border bg-card px-4 py-3 text-sm text-foreground`,children:e.priority}),d.priority.message?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border px-4 py-3 text-sm ${d.priority.status===`error`?`border-error/30 bg-error-muted text-error`:`border-success/30 bg-success-muted text-success`}`,children:d.priority.message}):null]}),(0,K.jsxs)(`article`,{className:`rounded-2xl border border-border bg-background/80 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Assignees`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Empty, loading, edit, and error states stay explicit.`})]}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:p?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>S(`assignees`),disabled:!My(`assignees`,u,e)||d.assignees.status===`saving`,className:`inline-flex h-9 items-center justify-center rounded-xl border border-primary/30 bg-primary/10 px-3 text-xs font-semibold text-primary disabled:opacity-50`,children:d.assignees.status===`saving`?`Saving…`:`Save`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>{E(`assignees`),w(!1)},className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted`,children:`Cancel`})]}):(0,K.jsx)(`button`,{type:`button`,onClick:()=>w(!0),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Edit`})})]}),s?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`Loading assignee options…`}):p?(0,K.jsx)(`div`,{className:`mt-3 space-y-2`,"data-testid":`issue-assignee-edit`,children:r.team.members.map(e=>(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-foreground-muted`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:u.assigneeIds.includes(e.id),onChange:()=>v(t=>({...t,assigneeIds:Py(t.assigneeIds,e.id)}))}),(0,K.jsx)(`span`,{children:e.displayName})]},`issue-assignee-${e.id}`))}):e.assignees.length>0?(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:e.assignees.map(e=>(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2.5 py-1 text-xs text-foreground-muted`,children:e.displayName},`issue-assignee-chip-${e.id}`))}):(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`issue-assignee-empty`,children:`No assignees yet.`}),d.assignees.message?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border px-4 py-3 text-sm ${d.assignees.status===`error`?`border-error/30 bg-error-muted text-error`:`border-success/30 bg-success-muted text-success`}`,children:d.assignees.message}):null]}),(0,K.jsxs)(`article`,{className:`rounded-2xl border border-border bg-background/80 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Tags`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Shared project labels now behave like editable issue tags from the side panel.`})]}),ve.length>0?(0,K.jsx)(`div`,{className:`flex gap-2`,children:m?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>S(`labels`),disabled:!My(`labels`,u,e)||d.labels.status===`saving`,className:`inline-flex h-9 items-center justify-center rounded-xl border border-primary/30 bg-primary/10 px-3 text-xs font-semibold text-primary disabled:opacity-50`,children:d.labels.status===`saving`?`Saving…`:`Save`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>{E(`labels`),T(!1)},className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted`,children:`Cancel`})]}):(0,K.jsx)(`button`,{type:`button`,onClick:()=>T(!0),className:`inline-flex h-9 items-center justify-center rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,children:`Edit`})}):null]}),s?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`Loading tag controls…`}):ve.length===0?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`issue-tags-empty`,children:`No project tags configured yet.`}):m?(0,K.jsx)(`div`,{className:`mt-3 space-y-2`,"data-testid":`issue-tags-edit`,children:ve.map(e=>(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-foreground-muted`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:u.labelIds.includes(e.id),onChange:()=>v(t=>({...t,labelIds:Py(t.labelIds,e.id)}))}),(0,K.jsx)(`span`,{children:e.name})]},`issue-label-${e.id}`))}):e.labels.length>0?(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:e.labels.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-border px-2.5 py-1 text-xs text-foreground-muted`,children:[(0,K.jsx)(Xp,{className:`h-3.5 w-3.5`}),e.name]},`issue-label-chip-${e.id}`))}):(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`No tags applied to this issue.`}),d.labels.message?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border px-4 py-3 text-sm ${d.labels.status===`error`?`border-error/30 bg-error-muted text-error`:`border-success/30 bg-success-muted text-success`}`,children:d.labels.message}):null]}),(0,K.jsx)(Hy,{issue:e,dispatchContextLabels:a,mutating:c,onSave:k})]}),(0,K.jsxs)(`section`,{className:`mt-5 rounded-2xl border border-border bg-background/80 p-4`,"data-testid":`issue-workspace-panel`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-foreground`,children:[(0,K.jsx)(ip,{className:`h-4 w-4`}),`Linked workspaces`]}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:`Create a new execution workspace from this issue or attach one or more existing workspaces.`})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>M(e),disabled:c,className:`inline-flex h-10 items-center justify-center gap-2 rounded-xl border border-primary/30 bg-primary/10 px-3 text-xs font-semibold text-primary disabled:opacity-50`,children:[(0,K.jsx)(Ap,{className:`h-3.5 w-3.5`}),`Create workspace`]}),(0,K.jsxs)(`button`,{type:`button`,onClick:j,disabled:A.loading,className:`inline-flex h-10 items-center justify-center gap-2 rounded-xl border border-border px-3 text-xs font-semibold text-foreground-muted disabled:opacity-50`,children:[(0,K.jsx)(Pp,{className:`h-3.5 w-3.5`}),`Refresh`]})]})]}),A.loading?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`issue-workspace-loading`,children:`Loading workspace association state…`}):null,A.error?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-error/25 bg-error-muted p-3 text-sm text-error`,"data-testid":`issue-workspace-error`,children:A.error}):null,Te.length>0?(0,K.jsx)(`div`,{className:`mt-4 space-y-3`,"data-testid":`linked-workspaces-list`,children:Te.map(t=>{let n=we.get(t.workspacePath),r=n?.status??`stale-link`;return(0,K.jsx)(`div`,{className:`rounded-2xl border border-border bg-card p-4`,children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:t.workspaceName}),(0,K.jsx)(`span`,{className:`rounded-full border px-2.5 py-1 text-xs ${vy(r)}`,children:r===`stale-link`?`stale link`:r}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2.5 py-1 text-xs text-foreground-muted`,children:t.source===`created-from-issue`?`created from issue`:`linked existing workspace`})]}),(0,K.jsx)(`div`,{className:`mt-2 font-mono text-xs text-foreground-muted`,children:t.workspacePath}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-foreground-muted`,children:[t.branchName?(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:t.branchName}):null,(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[`Linked `,fy(t.linkedAt)]}),n?.issues&&n.issues.length>1?(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[n.issues.length,` issue associations`]}):null]})]}),n?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>P(n.path),className:`inline-flex h-10 items-center justify-center gap-2 rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,"data-testid":`open-workspace-${n.path}`,children:[(0,K.jsx)(gp,{className:`h-3.5 w-3.5`}),`Open workspace`]}):(0,K.jsxs)(`button`,{type:`button`,onClick:()=>P(),className:`inline-flex h-10 items-center justify-center gap-2 rounded-xl border border-border px-3 text-xs font-semibold text-foreground`,"data-testid":`recover-workspace-${t.workspacePath}`,children:[(0,K.jsx)(Pp,{className:`h-3.5 w-3.5`}),`Open workspaces`]})]})},`${e.id}-${t.workspacePath}`)})}):A.loading?null:(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`issue-workspace-empty`,children:`No workspaces are linked to this issue yet.`}),(0,K.jsxs)(`form`,{className:`mt-4 rounded-2xl border border-border bg-card p-4`,onSubmit:t=>{t.preventDefault(),V&&N({issueId:e.id,workspacePath:V}).then(()=>j())},"data-testid":`link-workspace-form`,children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Link existing workspace`}),Ee.length>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`select`,{"aria-label":`Existing workspace`,value:V,onChange:e=>De(e.target.value),className:`mt-3 h-11 w-full rounded-xl border border-border bg-background px-3 text-sm text-foreground`,children:Ee.map(e=>(0,K.jsxs)(`option`,{value:e.path,children:[e.name,` - `,e.path]},e.path))}),(0,K.jsx)(`button`,{type:`submit`,disabled:c||!V,className:`mt-3 inline-flex h-11 items-center justify-center rounded-xl border border-border bg-background px-4 text-sm font-semibold text-foreground disabled:opacity-50`,children:`Link workspace`})]}):(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`link-workspace-empty`,children:`Every available workspace is already attached or waiting on recovery.`})]})]}),(0,K.jsxs)(`section`,{className:`mt-5 rounded-2xl border border-border bg-background/80 p-4`,"data-testid":`issue-relationship-panel`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-foreground`,children:[(0,K.jsx)(am,{className:`h-4 w-4`}),`Parent and child issue flow`]}),(0,K.jsxs)(`div`,{className:`mt-4 grid gap-4 xl:grid-cols-2`,children:[(0,K.jsxs)(`article`,{className:`rounded-2xl border border-border bg-card p-4`,"data-testid":`parent-relationship-section`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-foreground`,children:[(0,K.jsx)(Of,{className:`h-4 w-4`}),`Parent issue`]}),s?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`parent-relationship-loading`,children:`Refreshing parent relationship state…`}):xe?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-error/25 bg-error-muted p-3 text-sm text-error`,"data-testid":`parent-relationship-error`,children:xe}):F?(0,K.jsxs)(`div`,{className:`mt-3 rounded-2xl border border-border bg-background p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>h(F),className:`text-sm font-semibold text-foreground underline-offset-4 hover:underline`,"data-testid":`back-to-parent-${F.key}`,children:[`Back to `,F.key]}),(0,K.jsx)(`span`,{className:`rounded-full border px-2.5 py-1 text-xs ${Ry(F.status)}`,children:Ly(F.status)})]}),(0,K.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:F.title}),(0,K.jsxs)(`div`,{className:`mt-2 text-xs text-foreground-muted`,children:[`Parent readiness: `,F.dispatch.readiness]})]}):(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`parent-relationship-empty`,children:`No parent issue linked.`})]}),(0,K.jsxs)(`article`,{className:`rounded-2xl border border-border bg-card p-4`,"data-testid":`child-relationship-section`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-foreground`,children:[(0,K.jsx)(am,{className:`h-4 w-4`}),`Child issues`]}),s?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`child-relationship-loading`,children:`Refreshing child relationship state…`}):xe?(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-error/25 bg-error-muted p-3 text-sm text-error`,"data-testid":`child-relationship-error`,children:xe}):I.length>0?(0,K.jsx)(`div`,{className:`mt-3 space-y-3`,children:I.map(e=>(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>h(e),className:`text-sm font-semibold text-foreground underline-offset-4 hover:underline`,"data-testid":`child-nav-${e.key}`,children:e.key}),(0,K.jsx)(`span`,{className:`rounded-full border px-2.5 py-1 text-xs ${Ry(e.status)}`,children:Ly(e.status)}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2.5 py-1 text-xs text-foreground-muted`,children:e.dispatch.readiness})]}),(0,K.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:e.title})]},e.id))}):(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`child-relationship-empty`,children:`No child issues linked yet.`}),(0,K.jsxs)(`form`,{className:`mt-4 grid gap-3 rounded-2xl border border-border bg-background p-4`,onSubmit:t=>{t.preventDefault(),R.trim()&&D({parentIssueId:e.id,title:R,summary:oe||void 0,priority:ce,status:ue}).then(()=>{ae(``),se(``),le(`medium`),z(`backlog`)}).catch(()=>void 0)},"data-testid":`create-sub-issue-form`,children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Create sub-issue`}),(0,K.jsx)(`input`,{"aria-label":`Sub-issue title`,value:R,onChange:e=>ae(e.target.value),placeholder:`Break out a child issue`,className:`h-11 rounded-xl border border-border bg-card px-3 text-sm text-foreground`}),(0,K.jsx)(Tm,{taskTags:o,value:oe,onValueChange:se,className:`min-h-24`,renderTextarea:e=>(0,K.jsx)(`textarea`,{...e,"aria-label":`Sub-issue summary`,placeholder:`Optional context for the child issue`,className:`min-h-24 rounded-xl border border-border bg-card px-3 py-3 text-sm text-foreground`})}),(0,K.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Priority`,(0,K.jsxs)(`select`,{"aria-label":`Sub-issue priority`,value:ce,onChange:e=>le(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,children:[(0,K.jsx)(`option`,{value:`critical`,children:`Critical`}),(0,K.jsx)(`option`,{value:`high`,children:`High`}),(0,K.jsx)(`option`,{value:`medium`,children:`Medium`}),(0,K.jsx)(`option`,{value:`low`,children:`Low`})]})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Initial status`,(0,K.jsxs)(`select`,{"aria-label":`Sub-issue status`,value:ue,onChange:e=>z(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,children:[(0,K.jsx)(`option`,{value:`backlog`,children:`Backlog`}),(0,K.jsx)(`option`,{value:`ready`,children:`Ready`}),(0,K.jsx)(`option`,{value:`in-progress`,children:`In Progress`}),(0,K.jsx)(`option`,{value:`blocked`,children:`Blocked`}),(0,K.jsx)(`option`,{value:`review`,children:`Review`}),(0,K.jsx)(`option`,{value:`done`,children:`Done`})]})]})]}),(0,K.jsx)(`button`,{type:`submit`,disabled:c,className:`inline-flex h-11 items-center justify-center rounded-xl border border-primary/30 bg-primary/10 px-4 text-sm font-semibold text-primary disabled:opacity-50`,children:`Create child issue`})]}),(0,K.jsxs)(`form`,{className:`mt-4 rounded-2xl border border-border bg-background p-4`,onSubmit:t=>{t.preventDefault(),de&&O({parentIssueId:e.id,childIssueId:de}).catch(()=>void 0)},"data-testid":`link-child-issue-form`,children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:`Link existing child issue`}),ie.length>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`select`,{"aria-label":`Existing child issue`,value:de,onChange:e=>fe(e.target.value),className:`mt-3 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,children:ie.map(e=>(0,K.jsxs)(`option`,{value:e.id,children:[e.key,` - `,e.title]},e.id))}),(0,K.jsx)(`button`,{type:`submit`,disabled:c,className:`mt-3 inline-flex h-11 items-center justify-center rounded-xl border border-border bg-card px-4 text-sm font-semibold text-foreground disabled:opacity-50`,children:`Link child issue`})]}):(0,K.jsx)(`div`,{className:`mt-3 rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,"data-testid":`link-child-issue-empty`,children:`No unparented sibling issues are available to link here.`})]})]})]})]})]})}function Gy({projectId:e,routeBasePath:t,forcedPresentation:n,routeMode:r=`board`,initialIssueId:i,initialIssueKey:a,initialProjectId:o}={}){let s=Be(),[c]=Pt(),{taskTags:l}=Qm(),{snapshot:u,board:d,summary:f,loading:p,error:m,moveIssue:h,linkRepository:g,updateRepositorySettings:_,createPullRequest:v,createIssue:y,updateProjectCollaboration:x,updateIssueCollaboration:S,updateIssueDispatchContextLabels:C,createSubIssue:w,linkChildIssue:T,updateIssueDetail:E,createIssueWorkspace:D,linkIssueWorkspace:O,movingIssueId:k,mutatingIssueId:A,creatingIssue:j,mutationError:M,refresh:N}=Zm(),P=Dv({targetType:`issue`}),ee=(0,b.useMemo)(()=>new Map(P.artifacts.map(e=>[e.targetId,e])),[P.artifacts]),F=r===`board`?c.get(`issueId`):i??null,I=r===`board`?c.get(`issueKey`):a??null,te=e??o??`default`,[ne,re]=Wh(`backlog-presentation`,`board`),ie=n??ne,[L,R]=Wh(`kanban-search-${te}`,``),[ae,oe]=Wh(`kanban-workflow-filter-${te}`,`all`),[se,ce]=Wh(`kanban-readiness-filter-${te}`,`all`),[le,ue]=Wh(`kanban-assignee-filter-${te}`,`all`),[z,de]=Wh(`kanban-tag-filter-${te}`,`all`),[fe,pe]=Wh(`kanban-sort-mode-${te}`,`board-order`),[me,he]=Wh(`kanban-show-empty-swimlanes-${te}`,!1),[ge,_e]=Wh(`kanban-show-policy-signals-v2-${te}`,!1),[ve,ye]=(0,b.useState)([]),[be,xe]=(0,b.useState)(`in-progress`),[Se,Ce]=(0,b.useState)(null),[B,we]=(0,b.useState)(null),[Te,Ee]=(0,b.useState)(r===`create`?{source:`header`,workflowState:`todo`}:null),[V,De]=Wh(`board-create-draft`,xy()),[Oe,ke]=(0,b.useState)(`idle`),[Ae,je]=(0,b.useState)(null),[Me,Ne]=(0,b.useState)(null),[Pe,Fe]=(0,b.useState)(null),[Ie,Le]=Wh(`issue-detail-drafts`,{}),[Re,ze]=(0,b.useState)(Oy()),[Ve,He]=(0,b.useState)(!1),[Ue,We]=(0,b.useState)(!1),[Ge,Ke]=(0,b.useState)(!1),[qe,Je]=(0,b.useState)({items:[],loading:!1,error:null}),Ye=(0,b.useRef)(null);(0,b.useEffect)(()=>{let e=F?document.getElementById(`kanban-issue-${F}`):I?document.querySelector(`[data-testid="kanban-card-${I}"]`):null;e&&typeof e.scrollIntoView==`function`&&e.scrollIntoView({behavior:`smooth`,block:`center`})},[F,I]),(0,b.useEffect)(()=>{if(!Te)return;let e=xy(Te.workflowState);if(V.title===e.title&&V.summary===e.summary&&V.description===e.description&&V.workflowState===e.workflowState&&V.status===e.status&&V.priority===e.priority&&ky(V.assigneeIds,e.assigneeIds)&&ky(V.labelIds,e.labelIds)&&Ay(V.dependencies,e.dependencies)&&jy(V.acceptanceCriteria,e.acceptanceCriteria)){ke(`idle`);return}ke(`saving`);let t=window.setTimeout(()=>{ke(`saved`)},250);return()=>window.clearTimeout(t)},[Te,V.acceptanceCriteria,V.assigneeIds,V.dependencies,V.description,V.labelIds,V.priority,V.status,V.summary,V.title,V.workflowState]);let Xe=new Map((u?.issues??[]).map(e=>[e.id,e])),H=(F?Xe.get(F):void 0)??(I?u?.issues.find(e=>e.key===I):void 0),Ze=(e?u?.projects.find(t=>t.id===e):void 0)??(o?u?.projects.find(e=>e.id===o):void 0)??(H?u?.projects.find(e=>e.id===H.projectId):void 0)??u?.projects[0],Qe=Ze?d?.projects.find(e=>e.projectId===Ze.id):void 0,$e=H&&Qe?Qe.cards.find(e=>e.issueId===H.id):void 0,et=H?Ie[H.id]??Dy(H):null,tt=u?.issues.find(e=>e.key===`KANBAN-GAP-004`)??u?.issues.find(e=>e.key===`KANBAN-DEBT-003`),nt=Cy(L);(0,b.useEffect)(()=>{let e=H?.id??null;Ye.current!==e&&(Ye.current=e,ze(Oy()),He(!1),We(!1),Ke(!1))},[H?.id]),(0,b.useEffect)(()=>{H&&Le(e=>{let t=e[H.id],n=Dy(H);return!t||!Ny(t,H)?{...e,[H.id]:n}:e})},[H,Le]),(0,b.useEffect)(()=>{if(!H||!et||!My(`description`,et,H)||et.baseUpdatedAt!==H.updatedAt)return;ze(e=>({...e,description:{status:`saving`,message:null}}));let e=window.setTimeout(()=>{vt(`description`)},450);return()=>window.clearTimeout(e)},[H,et]),(0,b.useEffect)(()=>{if(!H)return;let e=!1;return Je(e=>({...e,loading:!0,error:null})),by().then(t=>{e||Je({items:[...t.workspaces],loading:!1,error:null})}).catch(t=>{e||Je({items:[],loading:!1,error:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},[H?.id]);let rt=Qe?Qe.swimlanes.flatMap(e=>$v.flatMap(t=>ry(Qe,e.id,t))):[],it=new Map(rt.map((e,t)=>[e.issueId,t])),U=rt.filter(e=>{let t=Xe.get(e.issueId);return!(!t||ae!==`all`&&e.workflowState!==ae||se!==`all`&&e.readiness!==se||le!==`all`&&!t.assignees.some(e=>e.id===le)||z!==`all`&&!t.labels.some(e=>e.id===z)||nt.length>0&&!wy(e,t).includes(nt))}).slice().sort((e,t)=>fe===`priority`?Ty(e.priority)-Ty(t.priority)||(it.get(e.issueId)??0)-(it.get(t.issueId)??0):fe===`activity`?Date.parse(t.latestActivityAt??``)-Date.parse(e.latestActivityAt??``)||(it.get(e.issueId)??0)-(it.get(t.issueId)??0):fe===`title`?e.title.localeCompare(t.title)||e.issueKey.localeCompare(t.issueKey):(it.get(e.issueId)??0)-(it.get(t.issueId)??0)),at=new Set(U.map(e=>e.issueId)),ot=U.map(e=>e.issueId).join(`|`),st=U.filter(e=>ve.includes(e.issueId)),ct=U.length>0&&U.every(e=>ve.includes(e.issueId)),lt=Ze?.team.members??[],ut=Ze?.labels??[],W=[ae!==`all`,se!==`all`,le!==`all`,z!==`all`,nt.length>0].filter(Boolean).length,dt=t?`${t}/${ie}`:`/`,ft=$v.filter(e=>st.every(t=>t.moveTargets.some(t=>t.state===e)));if((0,b.useEffect)(()=>{ye(e=>{let t=e.filter(e=>at.has(e));return t.length===e.length?e:t})},[ot]),p&&!u)return(0,K.jsx)(`section`,{className:`mb-6 rounded-3xl border border-border bg-card p-6 shadow-lg`,"data-testid":`backlog-overview-loading`,children:(0,K.jsxs)(`div`,{className:`animate-pulse space-y-3`,children:[(0,K.jsx)(`div`,{className:`h-4 w-36 rounded bg-background-secondary`}),(0,K.jsx)(`div`,{className:`h-8 w-80 rounded bg-background-secondary`}),(0,K.jsx)(`div`,{className:`grid gap-3 md:grid-cols-4`,children:Array.from({length:4}).map((e,t)=>(0,K.jsx)(`div`,{className:`h-20 rounded-2xl bg-background-secondary`},t))})]})});if(m||!u||!f||!d)return(0,K.jsx)(`section`,{className:`mb-6 rounded-3xl border border-error/25 bg-error-muted p-6 text-sm text-error shadow-lg`,"data-testid":`backlog-overview-error`,children:`Failed to load issue backlog model.`});if(!Ze||!Qe)return null;if(r===`create`)return(0,K.jsxs)(`section`,{className:`mb-6 space-y-4`,"data-testid":`issue-create-route`,children:[(0,K.jsx)(`div`,{className:`rounded-3xl border border-border bg-card p-6 shadow-lg`,children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-primary/80`,children:`Issue authoring`}),(0,K.jsx)(`h2`,{className:`mt-2 text-2xl font-semibold tracking-tight text-foreground`,children:`Create a first-class issue`}),(0,K.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-foreground-muted`,children:`Create an issue in its own focused route, then return to the board when you want to keep moving work across columns.`})]}),(0,K.jsx)(`button`,{type:`button`,onClick:Dt,className:`inline-flex h-11 items-center justify-center rounded-xl border border-border px-4 text-sm font-semibold text-foreground-muted`,children:`Back to board`})]})}),Te?(0,K.jsx)(Fy,{draft:V,project:Ze,issues:u.issues.filter(e=>e.projectId===Ze.id),taskTags:l,autosaveStatus:Oe,creatingIssue:j,error:Ae,validationError:Me,onChange:e=>{Ne(null),je(null),De(t=>e(t))},onClose:Dt,onSubmit:()=>void yt()}):null]});if(r===`issue`)return!H||!et?(0,K.jsx)(`section`,{className:`mb-6 rounded-3xl border border-error/25 bg-error-muted p-6 text-sm text-error shadow-lg`,children:`Issue not found in the current backlog snapshot.`}):(0,K.jsxs)(`section`,{className:`mb-6 space-y-4`,"data-testid":`issue-detail-route`,children:[(0,K.jsx)(`div`,{className:`rounded-3xl border border-border bg-card p-6 shadow-lg`,children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-primary/80`,children:`Issue detail`}),(0,K.jsx)(`h2`,{className:`mt-2 text-2xl font-semibold tracking-tight text-foreground`,children:H.key}),(0,K.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-foreground-muted`,children:`Dedicated issue routes now sit beside the board so issue authoring and maintenance can happen on stable deep links instead of only inside the home-page side panel.`})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>s(hy(H.projectId)),className:`inline-flex h-11 items-center gap-2 rounded-xl border border-primary/30 bg-primary/10 px-4 text-sm font-semibold text-primary`,children:[(0,K.jsx)(Ap,{className:`h-4 w-4`}),`New issue`]}),(0,K.jsx)(`button`,{type:`button`,onClick:Dt,className:`inline-flex h-11 items-center justify-center rounded-xl border border-border px-4 text-sm font-semibold text-foreground-muted`,children:`Back to board`})]})]})}),(0,K.jsx)(Wy,{issue:H,card:$e,reviewArtifact:ee.get(H.id),project:Ze,issues:u.issues.filter(e=>e.projectId===Ze.id),dispatchContextLabels:u.dispatchContextLabels??[],taskTags:l,loading:p,mutating:A===H.id,mutationError:M,draft:et,fieldStates:Re,priorityEditing:Ve,assigneeEditing:Ue,labelEditing:Ge,onFocusIssue:Et,onOpenDedicatedPage:e=>s(my(e.projectId,e.id)),onClose:Dt,onChangeDraft:ht,onResetDraft:_t,onRetryDescriptionSave:()=>void vt(`description`),onSaveField:e=>void vt(e),onSetPriorityEditing:He,onSetAssigneeEditing:We,onSetLabelEditing:Ke,onResetField:gt,onCreateSubIssue:w,onLinkChildIssue:T,onSaveDispatchContextLabels:C,workspaceInventory:qe,onRefreshWorkspaceInventory:Ot,onCreateIssueWorkspace:kt,onLinkIssueWorkspace:O,onOpenWorkspacePath:G})]});function pt(e,t=`todo`){Dt(),Ee({source:e,workflowState:t}),De(xy(t)),je(null),Ne(null),ke(`idle`),Fe(null)}function mt(){Ee(null),De(xy()),je(null),Ne(null),ke(`idle`)}function ht(e){H&&Le(t=>{let n=t[H.id]??Dy(H);return{...t,[H.id]:e(n)}})}function gt(e){if(!H)return;let t=Dy(H);ht(n=>({...n,title:e===`metadata`?t.title:n.title,summary:e===`metadata`?t.summary:n.summary,status:e===`metadata`?t.status:n.status,priority:e===`priority`?t.priority:n.priority,assigneeIds:e===`assignees`?t.assigneeIds:n.assigneeIds,labelIds:e===`labels`?t.labelIds:n.labelIds,dependencies:e===`metadata`?t.dependencies:n.dependencies,acceptanceCriteria:e===`metadata`?t.acceptanceCriteria:n.acceptanceCriteria})),ze(t=>({...t,[e]:{status:`idle`,message:null}}))}function _t(){H&&(Le(e=>({...e,[H.id]:Dy(H)})),ze(Oy()))}async function vt(e){if(!H||!et)return;let t=e===`metadata`?{title:et.title,summary:et.summary,status:et.status,dependencies:et.dependencies,acceptanceCriteria:et.acceptanceCriteria.map(e=>({id:e.id,title:e.title,satisfied:e.satisfied,notes:e.notes.trim()||void 0}))}:e===`description`?{description:et.description}:e===`priority`?{priority:et.priority}:e===`assignees`?{assigneeIds:et.assigneeIds}:{labelIds:et.labelIds};ze(t=>({...t,[e]:{status:`saving`,message:null}}));try{let n=(await E({issueId:H.id,expectedUpdatedAt:et.baseUpdatedAt,...t})).snapshot.issues.find(e=>e.id===H.id);n&&Le(e=>({...e,[H.id]:Dy(n)})),ze(t=>({...t,[e]:{status:`saved`,message:e===`metadata`?`Issue profile saved.`:e===`description`?`Description saved.`:e===`priority`?`Priority saved.`:e===`assignees`?`Assignees saved.`:`Tags saved.`}})),e===`priority`&&He(!1),e===`assignees`&&We(!1),e===`labels`&&Ke(!1)}catch(t){ze(n=>({...n,[e]:{status:`error`,message:t instanceof Error?t.message:e===`metadata`?`Issue profile save failed.`:e===`description`?`Description save failed.`:`Field save failed.`}}))}}async function yt(){if(Te){if(!V.title.trim()){Ne(`Title is required before the issue can be created.`);return}if(Ne(null),je(null),!Ze){Ne(`A project must be selected before creating an issue.`);return}try{let t=await y({projectId:e??o??Ze.id,title:V.title.trim(),summary:V.summary.trim()||void 0,description:V.description.trim()||void 0,status:V.status,assigneeIds:V.assigneeIds,labelIds:V.labelIds,dependencies:V.dependencies,acceptanceCriteria:V.acceptanceCriteria.map(e=>({id:e.id,title:e.title,satisfied:e.satisfied,notes:e.notes.trim()||void 0})),priority:V.priority,metadata:{createSource:Te.source,createWorkflowState:V.workflowState,createMode:r===`create`?`route`:`board`}});if(r===`create`){s(my(t.issue.projectId,t.issue.id));return}Fe(`Created ${t.issue.key} from ${Te.source===`column`?`column header`:`board header`} create mode.`),mt()}catch(e){je(e instanceof Error?e.message:`Failed to create issue.`),ke(`partial`)}}}let bt=e=>{if(t){let n=new URLSearchParams(c.toString()).toString();s(n?`${t}/${e}?${n}`:`${t}/${e}`);return}re(e)},xt=e=>{ye(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},St=()=>{ye(e=>ct?e.filter(e=>!at.has(e)):Array.from(new Set([...e,...U.map(e=>e.issueId)])))},Ct=(e,t)=>{h(e,t)};async function wt(){if(st.length===0)return;Ce(`move`),we(null);let e=0,t=0;try{for(let n of st){if(!n.moveTargets.find(e=>e.state===be)?.allowed){t+=1;continue}await h(n.issueId,be),e+=1}ye([]),we(t>0?`Moved ${e} issue${e===1?``:`s`} to ${ny(be)}. ${t} stayed put because policy checks blocked the transition.`:`Moved ${e} issue${e===1?``:`s`} to ${ny(be)}.`)}finally{Ce(null)}}async function Tt(){if(st.length===0)return;Ce(`workspace`),we(null);let e=0,t=0;try{for(let n of st){let r=Xe.get(n.issueId);if(!r||(r.workspaceLinks?.length??0)>0){t+=1;continue}await D(n.issueId),e+=1}ye([]),we(t>0?`Provisioned ${e} workspace${e===1?``:`s`}. ${t} issue${t===1?``:`s`} already had a linked workspace.`:`Provisioned ${e} workspace${e===1?``:`s`} from the current selection.`)}finally{Ce(null)}}function Et(e){if(r===`issue`){s(my(e.projectId,e.id));return}mt();let t=new URLSearchParams(c.toString());t.set(`issueId`,e.id),t.set(`issueKey`,e.key),s(`${dt}?${t.toString()}`)}function Dt(){if(r===`issue`||r===`create`){s(dt);return}let e=new URLSearchParams(c.toString());e.delete(`issueId`),e.delete(`issueKey`);let t=e.toString();s(t?`${dt}?${t}`:dt)}function Ot(){H&&(Je(e=>({...e,loading:!0,error:null})),by().then(e=>{Je({items:[...e.workspaces],loading:!1,error:null})}).catch(e=>{Je({items:[],loading:!1,error:e instanceof Error?e.message:String(e)})}))}function G(e){s(e?py(e):`/workspaces`)}function kt(e){s(_y(e.projectId,e.id))}let At=H?`issue`:Te?`create`:null;return(0,K.jsxs)(`section`,{className:`backlog-overview-surface mb-4 rounded-3xl border border-border bg-card p-4 shadow-lg`,"data-testid":`backlog-overview`,children:[(0,K.jsx)(`div`,{className:`backlog-overview__hero flex flex-wrap items-end justify-between gap-3`,children:(0,K.jsxs)(`div`,{className:`flex min-w-[280px] flex-1 flex-col gap-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2 text-xs text-foreground-muted`,children:[(0,K.jsx)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1.5 font-semibold uppercase tracking-[0.2em] text-primary/80`,children:`Kanban board`}),(0,K.jsx)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1.5`,children:Ze.name}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1.5`,children:[f.issueCount,` issues`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1.5`,children:[f.inProgressCount,` in progress`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1.5`,children:[(P.summary?.pendingCount??0)+(P.summary?.changesRequestedCount??0),` in review`]}),Ze.linkedRunSummary?(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1.5`,children:[Ze.linkedRunSummary.activeRuns,` live runs linked`]}):null]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight text-foreground`,children:`Move work first and reveal planning detail only when needed`}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>bt(`board`),className:`inline-flex h-10 items-center gap-2 rounded-xl border px-3 text-sm font-semibold ${ie===`board`?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-background text-foreground-muted`}`,children:[(0,K.jsx)(pp,{className:`h-4 w-4`}),`Board view`]}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>bt(`list`),className:`inline-flex h-10 items-center gap-2 rounded-xl border px-3 text-sm font-semibold ${ie===`list`?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-background text-foreground-muted`}`,children:[(0,K.jsx)(_p,{className:`h-4 w-4`}),`List view`]}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>pt(`header`),className:`inline-flex h-10 items-center gap-2 rounded-xl border border-primary/30 bg-primary/10 px-4 text-sm font-semibold text-primary`,"data-testid":`board-header-create`,children:[(0,K.jsx)(Ap,{className:`h-4 w-4`}),`Create issue`]}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>s(gy(Ze.id)),className:`inline-flex h-10 items-center gap-2 rounded-xl border border-border bg-background px-4 text-sm font-semibold text-foreground`,"data-testid":`board-header-create-workspace`,children:[(0,K.jsx)(ip,{className:`h-4 w-4`}),`Create workspace`]})]})]})]})}),(0,K.jsxs)(`div`,{className:`backlog-overview__controls mt-2 rounded-3xl border border-border bg-background/70 p-3`,children:[(0,K.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-[minmax(0,1.9fr)_auto]`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Search`,(0,K.jsxs)(`div`,{className:`mt-2 flex h-11 items-center gap-2 rounded-xl border border-border bg-card px-3`,children:[(0,K.jsx)(Lp,{className:`h-4 w-4 text-foreground-muted`}),(0,K.jsx)(`input`,{value:L,onChange:e=>R(e.target.value),placeholder:`Search key, title, summary, tags, or assignees`,className:`w-full bg-transparent text-sm text-foreground outline-none`,"aria-label":`Planning search`})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-3 py-2 text-xs text-foreground-muted`,children:[U.length,` visible`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-3 py-2 text-xs text-foreground-muted`,children:[W,` active filter`,W===1?``:`s`]}),st.length>0?(0,K.jsxs)(`span`,{className:`rounded-full border border-primary/20 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary`,children:[st.length,` selected`]}):null]})]}),(0,K.jsxs)(`details`,{className:`backlog-overview__planning-details mt-4`,"data-testid":`board-controls-details`,open:st.length>0||H?!0:void 0,children:[(0,K.jsxs)(`summary`,{className:`backlog-overview__planning-summary`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-foreground-muted`,children:`Board controls`}),(0,K.jsx)(`h3`,{className:`mt-1 text-lg font-semibold text-foreground`,children:`Open filters, triage, and bulk actions only when you need them`})]}),(0,K.jsxs)(`div`,{className:`backlog-overview__planning-badges`,children:[(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[`Sort `,fe.replace(`-`,` `)]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[st.length,` selected`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[W,` active filters`]})]})]}),(0,K.jsxs)(`div`,{className:`backlog-overview__planning-body`,children:[(0,K.jsxs)(`div`,{className:`backlog-overview__metrics-grid grid gap-3 md:grid-cols-4`,children:[(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-foreground-muted`,children:[(0,K.jsx)(pp,{className:`h-4 w-4`}),`Scope`]}),(0,K.jsx)(`div`,{className:`mt-3 text-2xl font-semibold text-foreground`,children:f.issueCount}),(0,K.jsxs)(`div`,{className:`text-sm text-foreground-muted`,children:[f.projectCount,` project models`]})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-warning/25 bg-warning-muted p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-warning`,children:[(0,K.jsx)(am,{className:`h-4 w-4`}),`Active WIP`]}),(0,K.jsx)(`div`,{className:`mt-3 text-2xl font-semibold text-warning`,children:f.inProgressCount}),(0,K.jsxs)(`div`,{className:`text-sm text-warning/80`,children:[f.needsDecompositionCount,` waiting on decomposition`]})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-primary/25 bg-primary/10 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-primary`,children:[(0,K.jsx)(Zp,{className:`h-4 w-4`}),`Review Queue`]}),(0,K.jsx)(`div`,{className:`mt-3 text-2xl font-semibold text-primary`,children:(P.summary?.pendingCount??0)+(P.summary?.changesRequestedCount??0)}),(0,K.jsx)(`div`,{className:`text-sm text-primary/80`,children:`reviews waiting for action`})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-error/25 bg-error-muted p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-error`,children:[(0,K.jsx)(Bf,{className:`h-4 w-4`}),`Blocked`]}),(0,K.jsx)(`div`,{className:`mt-3 text-2xl font-semibold text-error`,children:f.blockedCount}),(0,K.jsxs)(`div`,{className:`text-sm text-error/80`,children:[f.completedCount,` completed`]})]})]}),(0,K.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-[repeat(2,minmax(0,220px))_auto]`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Workflow`,(0,K.jsxs)(`select`,{value:ae,onChange:e=>oe(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,"aria-label":`Workflow filter`,children:[(0,K.jsx)(`option`,{value:`all`,children:`All columns`}),$v.map(e=>(0,K.jsx)(`option`,{value:e,children:ny(e)},e))]})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Readiness`,(0,K.jsxs)(`select`,{value:se,onChange:e=>ce(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,"aria-label":`Readiness filter`,children:[(0,K.jsx)(`option`,{value:`all`,children:`All readiness`}),(0,K.jsx)(`option`,{value:`needs-decomposition`,children:`Needs decomposition`}),(0,K.jsx)(`option`,{value:`ready`,children:`Ready`}),(0,K.jsx)(`option`,{value:`blocked`,children:`Blocked`}),(0,K.jsx)(`option`,{value:`dispatched`,children:`Dispatched`}),(0,K.jsx)(`option`,{value:`completed`,children:`Completed`})]})]})]}),(0,K.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-[repeat(2,minmax(0,180px))_auto]`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Assignee`,(0,K.jsxs)(`select`,{value:le,onChange:e=>ue(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,"aria-label":`Assignee filter`,children:[(0,K.jsx)(`option`,{value:`all`,children:`All assignees`}),lt.map(e=>(0,K.jsx)(`option`,{value:e.id,children:e.displayName},e.id))]})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Tag`,(0,K.jsxs)(`select`,{value:z,onChange:e=>de(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,"aria-label":`Tag filter`,children:[(0,K.jsx)(`option`,{value:`all`,children:`All tags`}),ut.map(e=>(0,K.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Sort`,(0,K.jsxs)(`div`,{className:`mt-2 flex items-center gap-2 rounded-xl border border-border bg-card px-3`,children:[(0,K.jsx)(jf,{className:`h-4 w-4 text-foreground-muted`}),(0,K.jsxs)(`select`,{value:fe,onChange:e=>pe(e.target.value),className:`h-11 bg-transparent pr-2 text-sm text-foreground outline-none`,"aria-label":`Sort cards`,children:[(0,K.jsx)(`option`,{value:`board-order`,children:`Board order`}),(0,K.jsx)(`option`,{value:`priority`,children:`Priority`}),(0,K.jsx)(`option`,{value:`activity`,children:`Recent activity`}),(0,K.jsx)(`option`,{value:`title`,children:`Title`})]})]})]}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-sm text-foreground-muted`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:me,onChange:e=>he(e.target.checked),className:`h-4 w-4 rounded border border-border`}),`Show empty swimlanes`]}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-sm text-foreground-muted`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:ge,onChange:e=>_e(e.target.checked),className:`h-4 w-4 rounded border border-border`}),`Show policy feedback`]})]})]}),(0,K.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-3 rounded-2xl border border-border bg-card px-4 py-3`,children:[(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-sm text-foreground`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:ct,onChange:St,className:`h-4 w-4 rounded border border-border`,"aria-label":`Select visible issues`}),`Select visible`]}),(0,K.jsxs)(`span`,{className:`text-sm text-foreground-muted`,children:[st.length,` selected`]}),(0,K.jsx)(`select`,{value:be,onChange:e=>xe(e.target.value),className:`h-11 rounded-xl border border-border bg-background px-3 text-sm text-foreground`,"aria-label":`Bulk move target`,children:$v.map(e=>(0,K.jsxs)(`option`,{value:e,disabled:!ft.includes(e),children:[`Move to `,ny(e)]},e))}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>void wt(),disabled:st.length===0||Se!==null||!ft.includes(be),className:`inline-flex h-11 items-center gap-2 rounded-xl border border-border bg-background px-4 text-sm font-semibold text-foreground disabled:opacity-50`,children:`Move selected`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>void Tt(),disabled:st.length===0||Se!==null,className:`inline-flex h-11 items-center gap-2 rounded-xl border border-primary/30 bg-primary/10 px-4 text-sm font-semibold text-primary disabled:opacity-50`,children:`Create workspaces`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>ye([]),disabled:st.length===0||Se!==null,className:`inline-flex h-11 items-center gap-2 rounded-xl border border-border bg-background px-4 text-sm font-semibold text-foreground-muted disabled:opacity-50`,children:`Clear selection`})]}),(0,K.jsxs)(`div`,{className:`mt-4 grid gap-3 xl:grid-cols-[minmax(0,1.45fr)_repeat(3,minmax(0,180px))]`,children:[(0,K.jsx)(`div`,{className:`rounded-2xl border border-border bg-card px-4 py-3`,children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-foreground-muted`,children:`Board focus`}),(0,K.jsx)(`p`,{className:`mt-2 text-sm font-semibold text-foreground`,children:H?`${H.key} · ${H.title}`:`No issue selected`}),(0,K.jsx)(`p`,{className:`mt-1 text-sm text-foreground-muted`,children:H?`The detail panel is open beside the board so you can edit without losing column context.`:`Open any card to inspect acceptance criteria, review state, workspace links, and child issues.`})]}),H?(0,K.jsx)(`button`,{type:`button`,onClick:Dt,className:`inline-flex h-10 items-center rounded-xl border border-border bg-background px-3 text-xs font-semibold text-foreground`,children:`Clear focus`}):null]})}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card px-4 py-3`,children:[(0,K.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-foreground-muted`,children:`Filters`}),(0,K.jsx)(`p`,{className:`mt-2 text-base font-semibold text-foreground`,children:W}),(0,K.jsx)(`p`,{className:`mt-1 text-sm text-foreground-muted`,children:W===0?`Board showing the default scope.`:`Filters actively narrowing the board.`})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card px-4 py-3`,children:[(0,K.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-foreground-muted`,children:`Selection`}),(0,K.jsx)(`p`,{className:`mt-2 text-base font-semibold text-foreground`,children:st.length}),(0,K.jsx)(`p`,{className:`mt-1 text-sm text-foreground-muted`,children:`Cards ready for bulk move or workspace creation.`})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card px-4 py-3`,children:[(0,K.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-foreground-muted`,children:`Review queue`}),(0,K.jsx)(`p`,{className:`mt-2 text-base font-semibold text-foreground`,children:(P.summary?.pendingCount??0)+(P.summary?.changesRequestedCount??0)}),(0,K.jsx)(`p`,{className:`mt-1 text-sm text-foreground-muted`,children:`Artifacts waiting on review, approval, or rework.`})]})]})]})]})]}),Pe?(0,K.jsx)(`div`,{className:`mt-4 rounded-2xl border border-success/30 bg-success-muted px-4 py-3 text-sm text-success`,children:Pe}):null,B?(0,K.jsx)(`div`,{className:`mt-4 rounded-2xl border border-primary/20 bg-primary/10 px-4 py-3 text-sm text-primary`,children:B}):null,(0,K.jsxs)(`div`,{className:`backlog-overview__workspace mt-6 grid gap-5 ${At?`xl:grid-cols-[minmax(0,1.7fr)_minmax(320px,400px)]`:`grid-cols-1`}`,children:[(0,K.jsxs)(`div`,{className:`backlog-overview__board-stack space-y-5`,children:[U.length===0?(0,K.jsx)(`div`,{className:`rounded-3xl border border-dashed border-border bg-background/70 p-6 text-sm text-foreground-muted`,children:`No issues match the current planning filters. Adjust search, workflow, readiness, assignee, or tag filters to widen the board.`}):null,ie===`board`?(0,K.jsx)(`div`,{className:`backlog-overview__board space-y-5`,"data-testid":`kanban-board`,children:Qe.swimlanes.filter(e=>{let t=U.filter(t=>t.swimlaneId===e.id).length;return me||t>0}).map(e=>(0,K.jsxs)(`section`,{className:`backlog-overview__swimlane rounded-3xl border border-border bg-background/70 p-4`,"data-testid":`kanban-swimlane-${e.id}`,children:[(0,K.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-foreground-muted`,children:`Swimlane`}),(0,K.jsx)(`h3`,{className:`mt-1 text-lg font-semibold text-foreground`,children:e.name})]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-3 py-1 text-xs text-foreground-muted`,children:[U.filter(t=>t.swimlaneId===e.id).length,` visible`]})]}),(0,K.jsx)(`div`,{className:`backlog-overview__swimlane-grid grid gap-4`,children:$v.map(t=>{let n=Qe.columns.find(e=>e.id===t),r=U.filter(n=>n.swimlaneId===e.id&&n.workflowState===t);return n?(0,K.jsxs)(`div`,{className:`backlog-overview__column rounded-2xl border p-4 ${ty(t,n.isOverLimit)}`,"data-testid":`kanban-column-${e.id}-${t}`,children:[(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:ny(t)}),(0,K.jsxs)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:[r.length,` visible in this lane`]})]}),(0,K.jsxs)(`div`,{className:`text-right text-xs text-foreground-muted`,children:[(0,K.jsxs)(`div`,{children:[n.issueCount,` total`]}),typeof n.wipLimit==`number`?(0,K.jsxs)(`div`,{className:n.isOverLimit?`text-error`:void 0,children:[`WIP `,n.issueCount,`/`,n.wipLimit]}):(0,K.jsx)(`div`,{children:`No WIP cap`})]})]}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>pt(`column`,t),className:`mt-4 inline-flex h-10 items-center gap-2 rounded-xl border border-border bg-card px-3 text-xs font-semibold text-foreground`,"data-testid":`create-column-${e.id}-${t}`,children:[(0,K.jsx)(Ap,{className:`h-3.5 w-3.5`}),`Add issue`]}),(0,K.jsxs)(`div`,{className:`backlog-overview__column-cards mt-4 space-y-3`,children:[r.length===0?(0,K.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border p-3 text-sm text-foreground-muted`,children:`No cards`}):null,r.map(e=>{let t=Xe.get(e.issueId),n=t?.parentIssueId?Xe.get(t.parentIssueId):void 0,r=t?.workspaceLinks?.length??0,i=t?.workspaceLinks?.[0],a=e.moveTargets.filter(e=>e.allowed),o=a[0]??null,c=a.slice(1),l=t!=null,d=!!e.repositoryLifecycle||e.collaboratorNames.length>0||e.assigneeNames.length>0||e.labelNames.length>0,f=l||d||c.length>0||e.dependencyCount>0||e.childCount>0||e.acceptanceProgress.total>0||ge&&(e.policySignals.length>0||e.moveTargets.some(e=>e.signals.length>0));return(0,K.jsxs)(`article`,{id:`kanban-issue-${e.issueId}`,className:`backlog-overview__card rounded-2xl border p-4 ${ey(e)} ${F===e.issueId||I===e.issueKey?`ring-2 ring-primary/50 ring-offset-2 ring-offset-background`:``}`,"data-testid":`kanban-card-${e.issueKey}`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`label`,{className:`inline-flex items-center gap-2 text-xs text-foreground-muted`,children:(0,K.jsx)(`input`,{type:`checkbox`,checked:ve.includes(e.issueId),onChange:()=>xt(e.issueId),className:`h-4 w-4 rounded border border-border`,"aria-label":`Select ${e.issueKey}`})}),(0,K.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.18em]`,children:e.issueKey}),(0,K.jsx)(`span`,{className:`rounded-full border border-current/20 px-2 py-0.5 text-xs`,children:e.priority}),(0,K.jsx)(`span`,{className:`rounded-full border border-current/20 px-2 py-0.5 text-xs`,children:e.readiness})]}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>t&&Et(t),className:`mt-2 text-left text-base font-semibold underline-offset-4 hover:underline`,"data-testid":`open-issue-${e.issueKey}`,children:e.title}),e.summary?(0,K.jsx)(`p`,{className:`backlog-overview__card-summary-copy mt-2 text-sm leading-6 opacity-90`,children:e.summary}):null,n||e.review?(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 text-xs`,children:[n?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>Et(n),className:`rounded-full border border-current/20 px-2.5 py-1 text-left font-semibold opacity-85`,"data-testid":`open-parent-${e.issueKey}`,children:[`Parent `,n.key]}):null,e.review?(0,K.jsxs)(`span`,{className:`rounded-full border border-current/20 px-2.5 py-1 opacity-85`,children:[`Review `,e.review.decision,e.review.openCommentCount>0?` · ${e.review.openCommentCount} open`:``]}):null]}):null,(0,K.jsx)(`div`,{className:`mt-4 rounded-2xl border border-current/15 bg-card/70 p-3 text-current/90`,children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.18em] opacity-70`,children:`Workspace`}),(0,K.jsx)(`div`,{className:`mt-1 text-sm font-medium`,children:r>0?`${r} linked workspace${r===1?``:`s`}`:`No workspace linked yet`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs opacity-75`,children:r>1?`${r-1} additional link${r-1==1?``:`s`} in details`:r===1?`Open the linked workspace`:`Create or link it when the issue is ready`})]}),(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r===0?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>s(_y(Ze.id,e.issueId)),className:`inline-flex h-10 items-center gap-2 rounded-xl border border-current/20 bg-background/70 px-3 text-xs font-semibold`,"data-testid":`create-workspace-${e.issueKey}`,children:[(0,K.jsx)(Ap,{className:`h-3.5 w-3.5`}),`Create workspace`]}):(0,K.jsx)(K.Fragment,{children:i?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>G(i.workspacePath),className:`inline-flex h-10 items-center gap-2 rounded-xl border border-current/20 bg-background/70 px-3 text-xs font-semibold`,"data-testid":`open-linked-workspace-${e.issueKey}`,children:[(0,K.jsx)(ip,{className:`h-3.5 w-3.5`}),`Open workspace`]}):null})})]})}),o?(0,K.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`button`,{type:`button`,disabled:k===e.issueId,onClick:()=>Ct(e.issueId,o.state),className:`inline-flex h-11 items-center justify-center gap-2 rounded-xl border border-primary/25 bg-primary/10 px-4 text-xs font-semibold tracking-[0.04em] text-primary transition-all duration-200 hover:border-primary/40 hover:bg-primary/15 hover:shadow-sm disabled:pointer-events-none disabled:opacity-50`,"data-testid":`move-${e.issueKey}-${o.state}`,children:[(0,K.jsx)(Af,{className:`h-3.5 w-3.5`}),`Move to `,ny(o.state)]}),c.length>0?(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background/70 px-3 py-1.5 text-xs text-foreground-muted`,children:[`+`,c.length,` more move`,c.length===1?``:`s`,` in details`]}):null]}):null,f?(0,K.jsxs)(`details`,{className:`backlog-overview__card-details mt-4`,children:[(0,K.jsxs)(`summary`,{className:`backlog-overview__card-summary`,children:[(0,K.jsx)(`span`,{children:`More details`}),(0,K.jsxs)(`span`,{children:[e.dependencyCount,` dep`,e.dependencyCount===1?``:`s`,` · `,e.childCount,` child`,e.childCount===1?``:`ren`]})]}),(0,K.jsxs)(`div`,{className:`backlog-overview__card-details-body`,children:[l?(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-[0.18em] text-foreground-muted`,children:`Workspace options`}),r>0?(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(t?.workspaceLinks??[]).map(t=>(0,K.jsxs)(`button`,{type:`button`,onClick:()=>G(t.workspacePath),className:`rounded-full border border-current/20 bg-background/70 px-3 py-1.5 text-left text-xs`,"data-testid":`card-workspace-${e.issueKey}-${t.workspaceName}`,children:[(0,K.jsx)(`span`,{className:`font-semibold`,children:t.workspaceName}),(0,K.jsx)(`span`,{className:`ml-2 opacity-75`,children:yy(t)})]},`${e.issueId}-${t.workspacePath}`))}):null,(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[i?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>G(i.workspacePath),className:`inline-flex h-10 items-center gap-2 rounded-xl border border-current/20 bg-background/70 px-3 text-xs font-semibold`,"data-testid":`open-linked-workspace-details-${e.issueKey}`,children:[(0,K.jsx)(ip,{className:`h-3.5 w-3.5`}),`Open workspace`]}):null,r===0?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>t&&Et(t),className:`inline-flex h-10 items-center gap-2 rounded-xl border border-border bg-background px-3 text-xs font-semibold text-foreground transition-all duration-200 hover:border-primary/30 hover:bg-card hover:shadow-sm`,"data-testid":`link-existing-${e.issueKey}`,children:[(0,K.jsx)(gp,{className:`h-3.5 w-3.5`}),`Link existing workspace`]}):(0,K.jsxs)(`button`,{type:`button`,onClick:()=>t&&Et(t),className:`inline-flex h-10 items-center gap-2 rounded-xl border border-border bg-background px-3 text-xs font-semibold text-foreground transition-all duration-200 hover:border-primary/30 hover:bg-card hover:shadow-sm`,"data-testid":`manage-workspaces-${e.issueKey}`,children:[(0,K.jsx)(gp,{className:`h-3.5 w-3.5`}),`Manage workspace links`]})]})]}):null,(0,K.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,K.jsxs)(`div`,{className:`rounded-xl border border-border bg-background px-3 py-2 text-xs text-foreground-muted`,children:[(0,K.jsx)(`div`,{className:`font-semibold text-foreground`,children:`Dependencies`}),(0,K.jsx)(`div`,{className:`mt-1`,children:e.dependencyCount})]}),(0,K.jsxs)(`div`,{className:`rounded-xl border border-border bg-background px-3 py-2 text-xs text-foreground-muted`,children:[(0,K.jsx)(`div`,{className:`font-semibold text-foreground`,children:`Child issues`}),(0,K.jsx)(`div`,{className:`mt-1`,children:e.childCount})]}),(0,K.jsxs)(`div`,{className:`rounded-xl border border-border bg-background px-3 py-2 text-xs text-foreground-muted`,children:[(0,K.jsx)(`div`,{className:`font-semibold text-foreground`,children:`Acceptance`}),(0,K.jsxs)(`div`,{className:`mt-1`,children:[e.acceptanceProgress.satisfied,`/`,e.acceptanceProgress.total,` accepted`]})]})]}),ge&&e.policySignals.length>0?(0,K.jsx)(`div`,{className:`space-y-2`,children:e.policySignals.map((t,n)=>(0,K.jsx)(`div`,{className:`rounded-xl border border-current/15 bg-card/70 px-3 py-2 text-xs`,children:t.message},`${e.issueId}-${t.hookId}-${n}`))}):null,ge&&e.moveTargets.some(e=>e.signals.length>0)?(0,K.jsx)(`div`,{className:`space-y-2`,children:e.moveTargets.flatMap(t=>t.signals.map((n,r)=>(0,K.jsxs)(`div`,{className:`rounded-xl border border-border bg-background px-3 py-2 text-xs text-foreground-muted`,children:[ny(t.state),`: `,n.message]},`${e.issueId}-${t.state}-${n.hookId}-${r}`)))}):null,c.length>0?(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-[0.18em] text-foreground-muted`,children:`Alternate moves`}),(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:c.map(t=>(0,K.jsxs)(`button`,{type:`button`,disabled:k===e.issueId,onClick:()=>Ct(e.issueId,t.state),className:`inline-flex h-10 items-center justify-center gap-2 rounded-xl border border-border bg-background px-3 text-xs font-semibold text-foreground transition-all duration-200 hover:border-primary/30 hover:bg-card hover:shadow-sm disabled:pointer-events-none disabled:opacity-50`,"data-testid":`move-secondary-${e.issueKey}-${t.state}`,children:[(0,K.jsx)(Af,{className:`h-3.5 w-3.5`}),`Move to `,ny(t.state)]},`${e.issueId}-${t.state}`))})]}):null,(0,K.jsx)(Uy,{card:e,mutating:k===e.issueId||A===e.issueId,onLinkRepository:g,onUpdateRepositorySettings:_,onCreatePullRequest:v}),(0,K.jsx)(Vy,{card:e,project:Ze,activityEntries:u.issues.find(t=>t.id===e.issueId)?.activity??[],mutating:k===e.issueId||A===e.issueId,onSave:S})]})]}):null]},e.issueId)})]})]},`${e.id}-${t}`):null})})]},e.id))}):(0,K.jsxs)(`div`,{className:`backlog-overview__list space-y-4`,"data-testid":`kanban-list`,children:[(0,K.jsx)(`div`,{className:`rounded-3xl border border-border bg-background/70 p-4`,children:(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-foreground-muted`,children:`List view`}),(0,K.jsx)(`h3`,{className:`mt-1 text-lg font-semibold text-foreground`,children:`Shared issue inventory in linear order`})]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-3 py-1 text-xs text-foreground-muted`,children:[U.length,` cards`]})]})}),U.map(e=>Iy(e,Xe.get(e.issueId),F===e.issueId||I===e.issueKey,Et,ve.includes(e.issueId),xt,Ct,k,ge))]})]}),H&&et?(0,K.jsx)(Wy,{issue:H,card:$e,reviewArtifact:ee.get(H.id),project:Ze,issues:u.issues.filter(e=>e.projectId===Ze.id),dispatchContextLabels:u.dispatchContextLabels??[],taskTags:l,loading:p,mutating:A===H.id,mutationError:M,draft:et,fieldStates:Re,priorityEditing:Ve,assigneeEditing:Ue,labelEditing:Ge,onFocusIssue:Et,onOpenDedicatedPage:e=>s(my(e.projectId,e.id)),onClose:Dt,onChangeDraft:ht,onResetDraft:_t,onRetryDescriptionSave:()=>void vt(`description`),onSaveField:e=>void vt(e),onSetPriorityEditing:He,onSetAssigneeEditing:We,onSetLabelEditing:Ke,onResetField:gt,onCreateSubIssue:w,onLinkChildIssue:T,onSaveDispatchContextLabels:C,workspaceInventory:qe,onRefreshWorkspaceInventory:Ot,onCreateIssueWorkspace:kt,onLinkIssueWorkspace:O,onOpenWorkspacePath:G}):Te?(0,K.jsx)(Fy,{draft:V,project:Ze,issues:u.issues.filter(e=>e.projectId===Ze.id),taskTags:l,autosaveStatus:Oe,creatingIssue:j,error:Ae,validationError:Me,onChange:e=>{Ne(null),je(null),De(t=>e(t))},onClose:mt,onSubmit:()=>void yt()}):null]}),(0,K.jsxs)(`details`,{className:`backlog-overview__support-details`,children:[(0,K.jsxs)(`summary`,{className:`backlog-overview__support-summary`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-foreground-muted`,children:`Supporting context`}),(0,K.jsx)(`h3`,{className:`mt-1 text-lg font-semibold text-foreground`,children:`Board notes and shared settings`}),(0,K.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-foreground-muted`,children:`Keep the board primary. Open this only when you need project-wide notes, repository settings, or collaboration rules.`})]}),(0,K.jsxs)(`div`,{className:`backlog-overview__support-badges`,children:[tt?(0,K.jsx)(`span`,{className:`rounded-full border border-primary/25 bg-primary/10 px-3 py-1 text-xs font-semibold text-primary`,children:tt.key}):null,(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[Ze.repositories.length,` repos`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[Qe.policyHooks.length,` policies`]})]})]}),(0,K.jsxs)(`div`,{className:`backlog-overview__support-body`,children:[tt?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`rounded-full border border-primary/25 bg-primary/10 px-2.5 py-1 text-xs font-semibold text-primary`,children:tt.key}),(0,K.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:tt.title}),(0,K.jsx)(`span`,{className:`text-sm text-foreground-muted`,children:tt.status})]}),tt.summary?(0,K.jsx)(`p`,{className:`mt-3 text-sm leading-6 text-foreground-muted`,children:tt.summary}):null,(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:tt.acceptanceCriteria.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-border bg-card px-2.5 py-1 text-xs text-foreground-secondary`,children:[(0,K.jsx)(Vf,{className:`h-3.5 w-3.5`}),e.title]},e.id))})]}):null,Ze.repositories.length>0?(0,K.jsxs)(`div`,{className:`rounded-3xl border border-border bg-background p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-foreground-muted`,children:`Repository context`}),(0,K.jsx)(`h3`,{className:`mt-1 text-lg font-semibold text-foreground`,children:`Shared repository settings`})]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-3 py-1 text-xs text-foreground-muted`,children:[Ze.repositories.length,` linked repos`]})]}),(0,K.jsx)(`div`,{className:`mt-4 grid gap-3 xl:grid-cols-2`,children:Ze.repositories.map(e=>(0,K.jsxs)(`article`,{className:`rounded-2xl border border-border bg-card p-4`,"data-testid":`repository-context-${e.id}`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-foreground`,children:[(0,K.jsx)(ip,{className:`h-4 w-4`}),e.fullName]}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2.5 py-1 text-xs text-foreground-muted`,children:ay(e.provider)})]}),(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 text-xs text-foreground-muted`,children:[(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[`Base `,e.settings.baseBranch]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[`CI `,e.settings.ciProvider??`Unconfigured`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[`Publish `,e.settings.publishTarget??`Unconfigured`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2.5 py-1`,children:[e.settings.requiredApprovals,` approvals`]})]})]},e.id))})]}):null,(0,K.jsx)(By,{project:Ze,mutating:!!A,onSave:x}),Qe.policyHooks.length>0?(0,K.jsx)(`div`,{className:`backlog-overview__policy-strip mt-5 flex flex-wrap gap-2`,children:Qe.policyHooks.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[(0,K.jsx)(Vp,{className:`h-3.5 w-3.5`}),e.name]},e.id))}):null]})]}),(0,K.jsxs)(`details`,{className:`backlog-overview__support-details mt-6`,"data-testid":`board-review-details`,children:[(0,K.jsxs)(`summary`,{className:`backlog-overview__support-summary`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-foreground-muted`,children:`Review queue`}),(0,K.jsx)(`h3`,{className:`mt-1 text-lg font-semibold text-foreground`,children:`Issue diff and feedback loop`}),(0,K.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-foreground-muted`,children:`Keep comments and approvals available, but out of the main board until you explicitly open them.`})]}),(0,K.jsxs)(`div`,{className:`backlog-overview__support-badges`,children:[(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[P.artifacts.length,` reviews`]}),(0,K.jsxs)(`span`,{className:`rounded-full border border-border bg-background px-3 py-1 text-xs text-foreground-muted`,children:[(P.summary?.pendingCount??0)+(P.summary?.changesRequestedCount??0),` waiting`]})]})]}),(0,K.jsx)(`div`,{className:`backlog-overview__support-body`,children:(0,K.jsx)(Qv,{title:`Issue diff and feedback loop`,description:`Review, comments, and approval state for issues stay together here.`,empty:`No issue reviews are queued yet.`,loading:P.loading,error:P.error,artifacts:P.artifacts,queue:P.queue,summary:P.summary,pendingArtifactId:P.pendingArtifactId,onApprove:e=>P.actOnReview({action:`approve`,artifactId:e}).then(()=>N()),onRequestChanges:e=>P.actOnReview({action:`request-changes`,artifactId:e}).then(()=>N()),onSubmitReview:e=>P.actOnReview({action:`submit-review`,...e}).then(()=>N()),onAddComment:e=>P.actOnReview({action:`add-comment`,...e}).then(()=>N())})})]})]})}async function Ky(e,t,n){let r=n.trim();if(!e||!t||!r)return{success:!1,error:`Run ID, effect ID, and answer are required`};let i=await Pm(`/api/runs/${encodeURIComponent(e)}/tasks/${encodeURIComponent(t)}/approve`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({answer:r}),retries:0});return i.ok?i.data.success===!0?{success:!0}:{success:!1,error:i.data.error??`Breakpoint approval failed`}:{success:!1,error:i.error.message}}var qy=2e4,Jy=12e4,Yy=`kanban:dismissed-breakpoints`;function Xy({bp:e,stale:t,onDismiss:n}){let[r,i]=(0,b.useTransition)(),[a,o]=(0,b.useState)(null);return a?.ok?(0,K.jsxs)(`div`,{className:q(`group relative flex items-center gap-3 px-4 py-3 rounded-lg`,`bg-success-muted border border-success/30`),children:[(0,K.jsx)(Vf,{className:`h-5 w-5 text-success shrink-0`}),(0,K.jsxs)(`span`,{className:`text-sm text-success font-medium`,children:[`Approved — `,e.projectName]})]}):(0,K.jsxs)(`div`,{className:q(`group relative flex items-center gap-3 px-4 py-3 rounded-lg`,`bg-warning-muted border border-warning/30`,`shadow-breakpoint-glow animate-breakpoint-glow`,t&&`opacity-70`),children:[(0,K.jsxs)(G,{to:`/dispatches/${e.runId}`,className:`flex items-center gap-3 flex-1 min-w-0`,children:[(0,K.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,K.jsx)(lp,{className:`h-5 w-5 text-warning animate-pulse-dot`}),(0,K.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-warning animate-ping`})]}),(0,K.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5`,children:[(0,K.jsx)($p,{className:`h-3 w-3 text-warning shrink-0`}),(0,K.jsx)(`span`,{className:`text-xs font-bold text-warning uppercase tracking-wider`,children:`Approval Needed`}),t&&(0,K.jsx)(`span`,{className:`text-xs text-foreground-muted italic`,"data-testid":`staleness-indicator`,children:`(checking...)`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-muted font-medium`,children:e.projectName}),(0,K.jsx)(`span`,{className:`font-mono text-xs text-info`,children:e.runId.slice(0,8)})]}),(0,K.jsx)(`p`,{className:`text-sm text-foreground truncate`,children:e.breakpointQuestion})]})]}),(0,K.jsxs)(`button`,{onClick:t=>{t.preventDefault(),t.stopPropagation(),i(()=>{Ky(e.runId,e.effectId,`Approved from dashboard`).then(e=>{o(e.success?{ok:!0}:{ok:!1,msg:e.error})})})},disabled:r||!e.effectId,className:q(`shrink-0 flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold`,`bg-success/20 text-success border border-success/30`,`hover:bg-success/30 hover:border-success/50`,`disabled:opacity-50 disabled:cursor-not-allowed`,`transition-colors`),title:`Approve this breakpoint`,children:[(0,K.jsx)(Ff,{className:`h-3.5 w-3.5`}),r?`Approving...`:`Approve`]}),t&&n&&(0,K.jsx)(`button`,{onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},className:q(`shrink-0 p-1 rounded text-foreground-muted/50`,`hover:text-foreground-muted hover:bg-foreground-muted/10`,`transition-colors`),title:`Dismiss this stale breakpoint`,"data-testid":`dismiss-breakpoint`,children:(0,K.jsx)(sm,{className:`h-3.5 w-3.5`})}),a&&!a.ok&&(0,K.jsx)(`span`,{className:`text-xs text-error ml-2`,children:a.msg})]})}function Zy({breakpointRuns:e}){let[t,n]=(0,b.useState)([]),r=(0,b.useRef)(new Map),i=(0,b.useRef)(new Map),[a,o]=(0,b.useState)(new Set);(0,b.useLayoutEffect)(()=>{try{let e=localStorage.getItem(Yy);e&&o(new Set(JSON.parse(e)))}catch{}},[]);let s=(0,b.useCallback)(e=>{o(t=>{let n=new Set(t);n.add(e);try{localStorage.setItem(Yy,JSON.stringify([...n]))}catch{}return n})},[]);(0,b.useEffect)(()=>{let t=new Set(e.map(e=>e.runId));o(e=>{let n=new Set([...e].filter(e=>t.has(e)));if(n.size!==e.size){try{localStorage.setItem(Yy,JSON.stringify([...n]))}catch{}return n}return e})},[e]);let[,c]=(0,b.useState)(0);(0,b.useEffect)(()=>{let t=new Set(e.map(e=>e.runId)),a=Date.now(),o=[];for(let[e,n]of r.current)t.has(e)||(o.push({bp:n,resolvedAt:a}),i.current.delete(e));o.length>0&&n(e=>[...e,...o]);for(let t of e)i.current.has(t.runId)||i.current.set(t.runId,a);r.current=new Map(e.map(e=>[e.runId,e]))},[e]),(0,b.useEffect)(()=>{if(e.length===0)return;let t=setInterval(()=>{c(e=>e+1)},1e4);return()=>clearInterval(t)},[e.length]);let l=(0,b.useCallback)(e=>{let t=i.current.get(e);return t?Date.now()-t>Jy:!1},[]);(0,b.useEffect)(()=>{if(t.length===0)return;let e=setInterval(()=>{let e=Date.now();n(t=>t.filter(t=>e-t.resolvedAt<qy))},1e3);return()=>clearInterval(e)},[t.length]);let u=e.filter(e=>!a.has(e.runId)),d=u.length>0,f=t.length>0;return!d&&!f?null:(0,K.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,"aria-atomic":`true`,className:`flex flex-col gap-2 mb-6`,"data-testid":`breakpoint-banner`,children:[u.map(e=>(0,K.jsx)(Xy,{bp:e,stale:l(e.runId),onDismiss:()=>s(e.runId)},e.runId)),t.map(e=>(0,K.jsxs)(G,{to:`/dispatches/${e.bp.runId}`,className:q(`group relative flex items-center gap-3 px-4 py-3 rounded-lg`,`bg-success-muted border border-success/30`,`shadow-glow-success`,`hover:border-success/50`,`transition-colors cursor-pointer`),children:[(0,K.jsx)(`div`,{className:`relative shrink-0`,children:(0,K.jsx)(Vf,{className:`h-5 w-5 text-success`})}),(0,K.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5`,children:[(0,K.jsx)(Vf,{className:`h-3 w-3 text-success shrink-0`}),(0,K.jsx)(`span`,{className:`text-xs font-bold text-success uppercase tracking-wider`,children:`Approved`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-muted font-medium`,children:e.bp.projectName}),(0,K.jsx)(`span`,{className:`font-mono text-xs text-info`,children:e.bp.runId.slice(0,8)})]}),(0,K.jsx)(`p`,{className:`text-sm text-foreground-muted truncate`,children:e.bp.breakpointQuestion})]})]},`resolved-${e.bp.runId}`)),u.length>1&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1`,children:[(0,K.jsx)(lp,{className:`h-3.5 w-3.5 text-warning`}),(0,K.jsxs)(`span`,{className:`text-xs font-semibold text-warning`,children:[u.length,` approvals pending`]})]})]})}function Qy(e){if(!e)return null;let t=[];return e.failedRuns>0&&t.push(`${e.failedRuns} failed`),e.pendingBreakpoints>0&&t.push(`${e.pendingBreakpoints} awaiting input`),e.completedRuns>0&&t.push(`${e.completedRuns} completed`),t.length===0?null:t.join(`, `)}function $y({catchUp:e,summary:t}){if(!e.active)return null;let n=Qy(t);return(0,K.jsxs)(`div`,{"data-testid":`catch-up-banner`,className:q(`flex items-center gap-3 px-4 py-2.5 mb-4 rounded-lg`,`bg-info-muted border border-info/20`,`animate-in fade-in slide-in-from-top-2 duration-300`),children:[(0,K.jsx)(`div`,{className:`rounded-md p-1.5 bg-info/10`,children:(0,K.jsx)(dp,{className:`h-4 w-4 text-info`})}),(0,K.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,K.jsxs)(`p`,{className:`text-sm text-foreground`,children:[(0,K.jsx)(`span`,{className:`font-semibold tabular-nums`,children:e.bufferedCount}),` `,`runs updated while you were away`]}),n&&(0,K.jsx)(`p`,{"data-testid":`catch-up-summary`,className:`text-xs text-foreground-muted mt-0.5 truncate`,children:n})]}),(0,K.jsxs)(`button`,{onClick:e.flush,"data-testid":`catch-up-refresh-btn`,className:q(`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold`,`bg-info/10 border border-info/20 text-info`,`hover:bg-info/20 transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-info/50`),children:[(0,K.jsx)(Pp,{className:`h-3 w-3`}),`Refresh now`]})]})}function eb(e){let t=[],n=`healthy`;if(e.failedRuns>0&&(t.push({text:`${e.failedRuns} run${e.failedRuns===1?``:`s`} failing`,filter:`failed`}),n=`red`),e.pendingBreakpoints>0&&(t.push({text:`${e.pendingBreakpoints} approval${e.pendingBreakpoints===1?``:`s`} need${e.pendingBreakpoints===1?`s`:``} your attention`,filter:`waiting`}),n!==`red`&&(n=`amber`)),e.staleRuns>0&&(t.push({text:`${e.staleRuns} stale run${e.staleRuns===1?``:`s`}`,filter:`stale`}),n!==`red`&&(n=`amber`)),t.length===0){let t=e.totalProjects===1?`project`:`projects`;return{severity:`healthy`,issues:[{text:e.activeRuns>0?`All ${e.totalProjects} ${t} healthy \u2014 ${e.activeRuns} run${e.activeRuns===1?``:`s`} in progress`:`All ${e.totalProjects} ${t} healthy`,filter:null}],icon:(0,K.jsx)(Vf,{className:`h-4 w-4 shrink-0`,"aria-hidden":`true`})}}return{severity:n,issues:t,icon:n===`red`?(0,K.jsx)(Uf,{className:`h-4 w-4 shrink-0`,"aria-hidden":`true`}):(0,K.jsx)($p,{className:`h-4 w-4 shrink-0`,"aria-hidden":`true`})}}var tb={healthy:{container:`border-success/25 bg-success-muted shadow-neon-glow-success-sm`,text:`text-success`,iconColor:`text-success`},amber:{container:`border-warning/25 bg-warning-muted shadow-neon-glow-warning-sm`,text:`text-warning`,iconColor:`text-warning`},red:{container:`border-error/25 bg-error-muted shadow-neon-glow-error-sm`,text:`text-error`,iconColor:`text-error`}};function nb({metrics:e,onFilterChange:t,dismissed:n,onDismiss:r}){let i=(0,b.useMemo)(()=>eb(e),[e]),a=tb[i.severity];return n?null:(0,K.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`executive-summary-banner`,className:q(`flex items-center gap-2.5 rounded-xl border px-4 py-3 mb-6 shadow-sm transition-all duration-300`,a.container),children:[(0,K.jsx)(`span`,{className:a.iconColor,children:i.icon}),(0,K.jsx)(`p`,{className:q(`text-sm font-medium leading-snug flex-1`,a.text),children:i.issues.map((e,n)=>(0,K.jsxs)(`span`,{children:[n>0&&`, `,e.filter&&t?(0,K.jsx)(`button`,{onClick:()=>t(e.filter),className:`underline decoration-dotted underline-offset-2 hover:decoration-solid transition-all`,children:e.text}):e.text]},n))}),i.severity!==`healthy`&&r&&(0,K.jsx)(`button`,{"data-testid":`executive-summary-dismiss`,onClick:r,className:q(`rounded-md p-1.5 min-h-[44px] min-w-[44px] flex items-center justify-center transition-colors`,a.iconColor,`opacity-60 hover:opacity-100`),"aria-label":`Dismiss banner`,children:(0,K.jsx)(sm,{className:`h-3.5 w-3.5`})})]})}function rb(){let e=Be(),[t,n]=(0,b.useState)(``),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)([]),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(-1),[p,m]=(0,b.useState)(!1),h=(0,b.useRef)(null),g=(0,b.useRef)(null),_=(0,b.useRef)(null);(0,b.useEffect)(()=>{let e=setTimeout(()=>{i(t.trim())},300);return()=>clearTimeout(e)},[t]),(0,b.useEffect)(()=>{if(!r){o([]),m(!1),f(-1);return}let e=!1;async function t(){u(!0);try{let t=new URLSearchParams({search:r,limit:`10`}),n=await fetch(`/api/runs?${t}`);if(!n.ok)throw Error(`Search failed`);let i=await n.json();e||(o(i.runs??[]),m(!0),f(-1))}catch{e||(o([]),m(!0))}finally{e||u(!1)}}return t(),()=>{e=!0}},[r]);let v=(0,b.useCallback)(t=>{c(!1),n(``),o([]),m(!1),e(`/dispatches/${t}`)},[e]),y=(0,b.useCallback)(e=>{if(s)switch(e.key){case`ArrowDown`:e.preventDefault(),f(e=>e<a.length-1?e+1:0);break;case`ArrowUp`:e.preventDefault(),f(e=>e>0?e-1:a.length-1);break;case`Enter`:e.preventDefault(),d>=0&&d<a.length&&v(a[d].runId);break;case`Escape`:e.preventDefault(),c(!1),h.current?.blur();break}},[s,a,d,v]);(0,b.useEffect)(()=>{d>=0&&_.current&&_.current.querySelectorAll(`[data-search-item]`)[d]?.scrollIntoView({block:`nearest`})},[d]),(0,b.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),h.current?.focus(),c(!0)),e.key===`/`&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!(e.target instanceof HTMLInputElement)&&!(e.target instanceof HTMLTextAreaElement)&&!(e.target instanceof HTMLSelectElement)&&!e.target?.isContentEditable&&(e.preventDefault(),h.current?.focus(),c(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,b.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let x=s&&t.trim().length>0;return(0,K.jsxs)(`div`,{ref:g,className:`relative w-full max-w-xl mx-auto mb-6`,children:[(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(Lp,{className:`absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-foreground-muted pointer-events-none`}),(0,K.jsx)(`input`,{ref:h,type:`text`,value:t,onChange:e=>{n(e.target.value),c(!0)},onFocus:()=>{t.trim()&&c(!0)},onKeyDown:y,placeholder:`Search runs by ID, process name, or task title...`,className:q(`w-full rounded-lg border border-border bg-card/80 backdrop-blur-sm`,`pl-10 pr-20 py-2.5 text-sm text-foreground`,`placeholder:text-foreground-muted/60`,`focus:border-primary/40 focus:outline-none focus:ring-2 focus:ring-primary/30`,`focus:shadow-neon-glow-primary-focus transition-all`),"data-testid":`global-search-input`}),(0,K.jsxs)(`div`,{className:`absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1.5`,children:[t&&(0,K.jsx)(`button`,{onClick:()=>{n(``),o([]),m(!1),c(!1),h.current?.focus()},className:`rounded-md p-2 min-h-[44px] min-w-[44px] flex items-center justify-center text-foreground-muted hover:text-foreground-secondary transition-colors`,"aria-label":`Clear search`,children:(0,K.jsx)(sm,{className:`h-3.5 w-3.5`})}),(0,K.jsxs)(`kbd`,{className:`hidden sm:inline-flex items-center gap-0.5 rounded border border-border bg-background-secondary px-1.5 py-0.5 text-xs font-medium text-foreground-muted`,children:[(0,K.jsx)(`span`,{className:`text-xs`,children:typeof navigator<`u`&&/Mac/i.test(navigator.userAgent)?`⌘`:`Ctrl`}),(0,K.jsx)(`span`,{children:`K`})]})]})]}),x&&(0,K.jsxs)(`div`,{className:q(`absolute z-50 top-full left-0 right-0 mt-1.5`,`rounded-lg border border-border bg-card/95 backdrop-blur-md shadow-xl`,`overflow-hidden`),"data-testid":`global-search-dropdown`,children:[l&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-foreground-muted`,children:[(0,K.jsx)(`div`,{className:`h-3 w-3 rounded-full border-2 border-primary/40 border-t-primary animate-spin`}),`Searching...`]}),!l&&p&&a.length===0&&(0,K.jsxs)(`div`,{className:`px-4 py-6 text-center`,children:[(0,K.jsx)(Lp,{className:`h-5 w-5 text-foreground-muted/30 mx-auto mb-2`}),(0,K.jsxs)(`p`,{className:`text-xs text-foreground-muted`,children:[`No dispatches found for “`,r,`”`]})]}),!l&&a.length>0&&(0,K.jsx)(`ul`,{ref:_,className:`max-h-80 overflow-y-auto py-1`,role:`listbox`,children:a.map((e,t)=>(0,K.jsxs)(`li`,{"data-search-item":!0,role:`option`,"aria-selected":t===d,onClick:()=>v(e.runId),className:q(`flex items-center gap-3 px-4 py-2.5 cursor-pointer transition-colors`,t===d?`bg-primary/10`:`hover:bg-background-secondary/60`),children:[(0,K.jsx)(`span`,{className:q(`h-2 w-2 rounded-full shrink-0`,e.status===`completed`?`bg-success`:e.status===`failed`?`bg-error`:e.status===`waiting`||e.status===`pending`?`bg-warning`:`bg-foreground-muted`)}),(0,K.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground truncate`,children:r_(e.processId)}),(0,K.jsx)(Lg,{status:e.status,waitingKind:e.waitingKind,isStale:e.isStale})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mt-0.5`,children:[e.projectName&&(0,K.jsx)(`span`,{className:`text-xs text-foreground-muted`,children:e.projectName}),(0,K.jsx)(`span`,{className:`font-mono text-xs text-info`,children:n_(e.runId,8)})]})]}),(0,K.jsx)(Af,{className:q(`h-3.5 w-3.5 shrink-0 transition-colors`,t===d?`text-primary`:`text-foreground-muted/40`)})]},e.runId))})]})]})}function ib(e,t=600){let[n,r]=(0,b.useState)(e),i=(0,b.useRef)(null),a=(0,b.useRef)(null),o=(0,b.useRef)(e),s=(0,b.useRef)(e),c=(0,b.useCallback)(e=>1-(1-e)**3,[]);return(0,b.useEffect)(()=>{let n=o.current;if(o.current=e,n===e)return;i.current!==null&&(cancelAnimationFrame(i.current),i.current=null);let l=s.current,u=e-l;if(u===0){r(e),s.current=e;return}if(Math.abs(u)<=2){r(e),s.current=e;return}let d=performance.now();a.current={value:l,time:d};function f(n){let a=n-d,o=Math.min(a/t,1),p=c(o),m=Math.round(l+u*p);s.current=m,r(m),o<1?i.current=requestAnimationFrame(f):(i.current=null,s.current=e,r(e))}return i.current=requestAnimationFrame(f),()=>{i.current!==null&&(cancelAnimationFrame(i.current),i.current=null)}},[e,t,c]),n}var ab={primary:{text:`text-primary`,bg:`bg-primary/10`,glow:`shadow-neon-glow-primary-xs`,borderL:``,ring:`ring-primary/50`},success:{text:`text-success`,bg:`bg-success/10`,glow:`shadow-neon-glow-success-sm`,borderL:`border-l-success/60`,ring:`ring-success/50`},warning:{text:`text-warning`,bg:`bg-warning/10`,glow:`shadow-neon-glow-warning-sm`,borderL:`border-l-warning/60`,ring:`ring-warning/50`},error:{text:`text-error`,bg:`bg-error/10`,glow:`shadow-neon-glow-error-sm`,borderL:`border-l-error/60`,ring:`ring-error/50`},muted:{text:`text-zinc-500`,bg:`bg-zinc-500/10`,glow:``,borderL:`border-l-zinc-500/60`,ring:`ring-zinc-500/50`}};function ob({label:e,value:t,icon:n,color:r,pulse:i,testId:a,active:o,onClick:s}){let c=ab[r],l=!!s,u=ib(t);return(0,K.jsxs)(`div`,{"data-testid":a,role:l?`button`:void 0,"aria-pressed":l?!!o:void 0,tabIndex:l?0:void 0,onClick:s,onKeyDown:l?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s?.())}:void 0,className:q(`rounded-xl border border-border bg-card/90 p-3 flex items-center gap-3 transition-all shadow-sm`,t>0&&r!==`primary`&&`border-l-2`,t>0&&r!==`primary`&&c.borderL,c.glow,l&&`cursor-pointer hover:bg-background-secondary/65 hover:shadow-md`,o&&`ring-2`,o&&c.ring),children:[(0,K.jsx)(`div`,{className:q(`rounded-md p-2`,c.bg),children:(0,K.jsx)(`span`,{className:q(c.text,i&&`animate-pulse-dot`),children:n})}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:q(`text-lg font-bold tabular-nums leading-none mb-0.5`,c.text),children:u}),(0,K.jsx)(`p`,{className:`text-[11px] leading-tight text-foreground-muted uppercase tracking-[0.12em] font-medium`,children:e})]})]})}function sb({metrics:e,statusFilter:t,hasStaleRuns:n,onToggleFilter:r}){return(0,K.jsxs)(`div`,{"data-testid":`kpi-grid`,"aria-live":`polite`,"aria-label":`Key metrics`,className:q(`grid gap-3 mb-6`,n?`grid-cols-2 sm:grid-cols-5`:`grid-cols-2 sm:grid-cols-4`),children:[(0,K.jsx)(ob,{label:`Total Dispatches`,value:e.totalRuns,icon:(0,K.jsx)(pp,{className:`h-4 w-4`}),color:`primary`,testId:`metric-tile-total-runs`,onClick:()=>r(`all`),active:t===`all`}),(0,K.jsx)(ob,{label:`In Progress`,value:e.activeRuns,icon:(0,K.jsx)(Ef,{className:`h-4 w-4`}),color:`warning`,pulse:e.activeRuns>0,testId:`metric-tile-active`,onClick:()=>r(`waiting`),active:t===`waiting`}),n&&(0,K.jsx)(ob,{label:`Stale`,value:e.staleRuns,icon:(0,K.jsx)(Ep,{className:`h-4 w-4`}),color:`muted`,testId:`metric-tile-stale`,onClick:()=>r(`stale`),active:t===`stale`}),(0,K.jsx)(ob,{label:`Completed`,value:e.completedRuns,icon:(0,K.jsx)(Vf,{className:`h-4 w-4`}),color:`success`,testId:`metric-tile-completed`,onClick:()=>r(`completed`),active:t===`completed`}),(0,K.jsx)(ob,{label:`Failed`,value:e.failedRuns,icon:(0,K.jsx)(Bf,{className:`h-4 w-4`}),color:`error`,testId:`metric-tile-failed`,onClick:()=>r(`failed`),active:t===`failed`})]})}var cb=class extends b.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`ErrorBoundary caught an error:`,e,t)}handleRetry=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?this.props.section?(0,K.jsxs)(`div`,{className:`rounded-lg border border-error/20 bg-error-muted p-4 text-center`,children:[(0,K.jsxs)(`p`,{className:`text-sm font-medium text-error mb-1`,children:[this.props.section,` failed to load`]}),(0,K.jsx)(`p`,{className:`text-xs text-foreground-muted mb-2`,children:`This section encountered an error. Other sections are unaffected.`}),(0,K.jsx)(J,{onClick:this.handleRetry,size:`sm`,variant:`primary`,children:`Retry`})]}):(0,K.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background p-6`,children:(0,K.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,K.jsx)(`h2`,{className:`mb-2 text-lg font-semibold text-foreground`,children:`Something went wrong`}),(0,K.jsx)(`p`,{className:`mb-4 text-sm text-foreground-muted`,children:`An unexpected error occurred. Please try again.`}),(0,K.jsx)(J,{onClick:()=>window.location.reload(),variant:`primary`,children:`Try Again`})]})}):this.props.children}};function lb({sessionId:e,active:t=!1,className:n}){let[r,i]=(0,b.useState)(!1);return e?(0,K.jsx)($t,{text:r?`Copied!`:`Session: ${e} (click to copy)`,children:(0,K.jsxs)(`span`,{className:q(`relative inline-flex items-center gap-1.5 rounded-full bg-background-secondary px-2.5 py-0.5 text-xs font-mono text-foreground-muted cursor-pointer transition-all hover:bg-background-tertiary select-none`,t&&`shadow-neon-glow-cyan-sm`,n),onClick:t=>{t.stopPropagation(),t.preventDefault(),navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),1500)},children:[(0,K.jsx)(`span`,{className:q(`h-1.5 w-1.5 rounded-full`,t?`bg-secondary shadow-[0_0_6px_var(--secondary)] animate-pulse-dot`:`bg-foreground-muted/40`)}),n_(e,4),r&&(0,K.jsx)(`span`,{className:`absolute -top-7 left-1/2 -translate-x-1/2 rounded-md bg-primary px-2 py-0.5 text-xs leading-tight font-sans font-medium text-primary-foreground whitespace-nowrap animate-slide-in-right`,children:`Copied!`})]})}):null}function ub({id:e,chars:t=4,className:n}){let[r,i]=(0,b.useState)(!1),a=t=>{t.stopPropagation(),t.preventDefault(),navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),1500)};return(0,K.jsx)($t,{text:r?`Copied!`:e,children:(0,K.jsx)(`span`,{className:q(`inline-flex items-center justify-center rounded px-2 py-1 min-h-[44px] min-w-[44px] font-mono text-xs`,`bg-background-secondary text-info/80`,`hover:bg-background-tertiary hover:text-info`,`cursor-pointer transition-colors select-none`,r&&`text-primary`,n),onClick:a,role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a(e))},children:n_(e,t)})})}function db(e){switch(e){case`completed`:return`success`;case`failed`:return`error`;case`waiting`:return`warning`;default:return`default`}}function fb(e){return e.status===`completed`?100:e.totalTasks>0?Math.round(e.completedTasks/e.totalTasks*100):0}function pb(e){let t=t_(e);return t?`Stale (${t})`:`Stale`}function mb(e,t){if(e.selected!==t.selected||e.stopping!==t.stopping)return!1;let n=e.run,r=t.run;return n.runId===r.runId&&n.status===r.status&&n.updatedAt===r.updatedAt&&n.completedTasks===r.completedTasks&&n.totalTasks===r.totalTasks&&n.duration===r.duration&&n.isStale===r.isStale&&n.waitingKind===r.waitingKind&&n.breakpointQuestion===r.breakpointQuestion&&n.failedStep===r.failedStep&&n.failureMessage===r.failureMessage}var hb=(0,b.memo)(function({run:e,selected:t,stopping:n=!1,onStop:r}){let i=fb(e),a=e.status===`waiting`||e.status===`pending`,o=e.isStale===!0,s=typeof r==`function`&&a&&!o,c=e.tasks.find(e=>e.kind===`breakpoint`&&e.status===`requested`),l=e.breakpointQuestion??c?.breakpointQuestion,u=!o&&(!!c||e.status===`waiting`&&e.waitingKind===`breakpoint`),d=e.status===`failed`?e.failedStep||(e.failureMessage?`${e.failureMessage}`:void 0):void 0;return(0,K.jsx)(`div`,{className:q(`tkc-panel`,`cursor-pointer p-4 transition-all card-hover-lift`,`hover:shadow-md`,t&&`ring-1 ring-primary shadow-glow-primary`,a&&!o&&!u&&`border-[var(--border-hover)]`,u&&`border-warning/40 shadow-glow-warning ring-1 ring-warning/20 animate-breakpoint-glow`,o&&`opacity-50`),children:(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsxs)(G,{to:`/dispatches/${e.runId}`,className:`flex-1 min-w-0 block`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:[(0,K.jsx)(`span`,{className:q(`h-2 w-2 rounded-full shrink-0`,o?`bg-zinc-500`:u?`bg-warning shadow-[0_0_8px_var(--warning)] animate-pulse-dot`:e.status===`completed`?`bg-success shadow-[0_0_6px_var(--success)]`:e.status===`failed`?`bg-error shadow-[0_0_6px_var(--error)]`:e.status===`waiting`?`bg-warning shadow-[0_0_6px_var(--warning)] animate-pulse-dot`:`bg-pending`)}),(0,K.jsx)(`span`,{className:`text-lg font-semibold italic font-serif text-foreground truncate`,children:r_(e.processId)}),u&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-warning/15 border border-warning/30 px-2.5 py-1 text-[11px] leading-tight font-bold text-warning uppercase tracking-[0.12em] shrink-0 animate-pulse-dot`,children:[(0,K.jsx)(lp,{className:`h-2.5 w-2.5`}),`Approval Required`]})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mb-1`,children:[(0,K.jsx)(Lg,{status:e.status,waitingKind:e.waitingKind,isStale:o}),o&&(0,K.jsx)(`span`,{className:`inline-flex items-center rounded-full bg-zinc-500/10 border border-zinc-500/20 px-2 py-0.5 text-xs leading-tight font-medium text-zinc-500 shrink-0`,children:pb(e.updatedAt)}),(0,K.jsx)(ub,{id:e.runId,chars:4,className:`text-foreground-secondary`}),e.projectName&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-background-secondary px-2 py-0.5 text-xs leading-tight font-medium text-foreground-muted shrink-0`,children:[(0,K.jsx)(Xp,{className:`h-2.5 w-2.5`}),e.projectName]})]}),d&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 mt-2 px-2 py-1 rounded-md bg-error-muted border border-error/20 border-l-2 border-l-error shadow-glow-error`,children:[(0,K.jsx)(Bf,{className:`h-3.5 w-3.5 text-error shrink-0`}),(0,K.jsxs)(`span`,{className:`text-xs text-error truncate`,children:[`Failed at: `,d.length>80?d.slice(0,80)+`...`:d]})]}),u&&l&&(0,K.jsx)(`div`,{className:`mt-2 px-3 py-2 rounded-md bg-warning-muted border border-warning/25 border-l-2 border-l-warning shadow-breakpoint-glow`,children:(0,K.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,K.jsx)(lp,{className:`h-4 w-4 text-warning shrink-0 mt-0.5 animate-pulse-dot`}),(0,K.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,K.jsx)(`span`,{className:`text-xs font-bold text-warning uppercase tracking-wider block mb-0.5`,children:`Awaiting approval`}),(0,K.jsx)(`span`,{className:`text-sm text-foreground leading-snug block`,children:l})]}),(0,K.jsxs)(`span`,{className:q(`shrink-0 inline-flex items-center gap-1 px-2 py-1 rounded-md`,`bg-warning/10 border border-warning/20`,`text-xs font-semibold text-warning`,`hover:bg-warning/20 transition-colors`),children:[`Review & Approve`,(0,K.jsx)(Xf,{className:`h-2.5 w-2.5`})]})]})}),u&&!l&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mt-2 px-3 py-2 rounded-md bg-warning-muted border border-warning/25 border-l-2 border-l-warning shadow-breakpoint-glow`,children:[(0,K.jsx)(lp,{className:`h-4 w-4 text-warning shrink-0 animate-pulse-dot`}),(0,K.jsx)(`span`,{className:`text-xs font-semibold text-warning`,children:`Approval needed`}),(0,K.jsxs)(`span`,{className:q(`ml-auto shrink-0 inline-flex items-center gap-1 px-2 py-1 rounded-md`,`bg-warning/10 border border-warning/20`,`text-xs font-semibold text-warning`),children:[`Review & Approve`,(0,K.jsx)(Xf,{className:`h-2.5 w-2.5`})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3 mt-2 text-xs text-foreground-muted`,children:[(0,K.jsx)(lb,{sessionId:e.sessionId,active:a&&!o}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(pp,{className:`h-3 w-3`}),e.completedTasks,`/`,e.totalTasks,` tasks`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(Kf,{className:`h-3 w-3`}),e_(e.duration)]})]}),e.totalTasks>0&&(0,K.jsx)(Sm,{value:i,variant:db(e.status),glow:a&&!o,className:`mt-4`})]}),s?(0,K.jsxs)(`button`,{type:`button`,"aria-label":`Stop dispatch ${e.runId}`,disabled:n,onClick:t=>{t.preventDefault(),t.stopPropagation(),r?.(e)},className:q(`inline-flex min-h-[40px] shrink-0 items-center gap-1 rounded-md border px-3 py-2 text-xs font-semibold transition-colors`,n?`cursor-wait border-warning/30 bg-warning/10 text-warning`:`border-error/25 bg-error/8 text-error hover:bg-error/14`),title:n?`Stopping dispatch`:`Stop dispatch`,children:[n?(0,K.jsx)(vp,{className:`h-3.5 w-3.5 animate-spin`}):(0,K.jsx)(Jp,{className:`h-3.5 w-3.5`}),n?`Stopping`:`Stop`]}):null]})})},mb);function gb(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o;n.key&&n.debug?.call(n)&&(o=Date.now());let s=e();if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug?.call(n)&&(c=Date.now()),i=t(...s),n.key&&n.debug?.call(n)){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
29
29
  font-size: .6rem;
30
30
  font-weight: bold;
31
- color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function _b(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var vb=(e,t)=>Math.abs(e-t)<1.01,yb=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},bb=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},xb=e=>e,Sb=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},Cb=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(bb(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(bb(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},wb={passive:!0},Tb=typeof window>`u`?!0:`onscrollend`in window,Eb=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&Tb?()=>void 0:yb(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,wb);let l=e.options.useScrollendEvent&&Tb;return l&&n.addEventListener(`scrollend`,c,wb),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},Db=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Ob=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},kb=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:xb,rangeExtractor:Sb,onChange:()=>{},measureElement:Db,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=gb(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=gb(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=gb(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e<s;e++){let t=c[e];t&&(l[t.lane]=e)}for(let i=s;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,u;if(a!==void 0&&this.options.lanes>1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=gb(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?jb({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=gb(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&(this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.getVirtualItems=gb(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return _b(t[Ab(0,t.length-1,e=>_b(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t);this.scrollState={index:null,align:t,behavior:n,startedAt:this.now(),lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e;this.scrollState={index:null,align:`start`,behavior:t,startedAt:this.now(),lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&vb(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior=`auto`,this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}));this.scheduleScrollReconcile()}},Ab=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function jb({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=Ab(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Mb=typeof document<`u`?b.useLayoutEffect:b.useEffect;function Nb({useFlushSync:e=!0,...t}){let n=b.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,C.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=b.useState(()=>new kb(r));return i.setOptions(r),Mb(()=>i._didMount(),[]),Mb(()=>i._willUpdate()),i}function Pb(e){return Nb({observeElementRect:Cb,observeElementOffset:Eb,scrollToFn:Ob,...e})}var Fb=140,Ib=3,Lb=15;function Rb({runs:e,className:t,maxHeight:n=600,renderItem:r,onStopRun:i,stoppingRunIds:a}){let o=(0,b.useRef)(null),s=(0,b.useMemo)(()=>e,[e]),c=(0,b.useCallback)(e=>s[e]?.runId??e,[s]),l=Pb({count:s.length,getScrollElement:()=>o.current,estimateSize:()=>Fb,overscan:Ib,getItemKey:c});if(s.length<Lb)return(0,K.jsx)(`div`,{className:t,"data-testid":`run-list-flat`,children:(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>r?(0,K.jsx)(`div`,{children:r(e,t)},e.runId):(0,K.jsx)(hb,{run:e,onStop:i,stopping:a?.has(e.runId)},e.runId))})});let u=l.getVirtualItems();return(0,K.jsx)(`div`,{ref:o,className:t,"data-testid":`run-list-virtualized`,style:{maxHeight:n,overflow:`auto`,contain:`strict`},children:(0,K.jsx)(`div`,{style:{height:`${l.getTotalSize()}px`,width:`100%`,position:`relative`},children:u.map(e=>{let t=s[e.index];return t?(0,K.jsx)(`div`,{"data-index":e.index,ref:l.measureElement,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:(0,K.jsx)(`div`,{style:{paddingBottom:8},children:r?r(t,e.index):(0,K.jsx)(hb,{run:t,onStop:i,stopping:a?.has(t.runId)})})},e.key):null})})})}function zb({currentPage:e,totalItems:t,itemsPerPage:n,onPageChange:r,className:i}){let a=Math.ceil(t/n),o=e*n+1,s=Math.min((e+1)*n,t),c=e>0,l=e<a-1;if(t===0)return null;let u=[];if(a<=5)for(let e=0;e<a;e++)u.push(e);else{u.push(0),e>2&&u.push(`ellipsis`);for(let t=Math.max(1,e-1);t<=Math.min(a-2,e+1);t++)u.push(t);e<a-3&&u.push(`ellipsis`),u.push(a-1)}return(0,K.jsxs)(`div`,{className:q(`flex items-center justify-between border-t border-border pt-3`,i),children:[(0,K.jsxs)(`span`,{className:`text-xs text-foreground-muted tabular-nums`,children:[o,`–`,s,` of `,t]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,K.jsx)(`button`,{onClick:()=>r(e-1),disabled:!c,className:q(`inline-flex h-11 w-11 items-center justify-center rounded-md text-xs transition-all`,c?`text-foreground hover:bg-primary-muted hover:text-primary hover:shadow-neon-glow-primary-xs cursor-pointer`:`text-foreground-muted cursor-not-allowed opacity-40`),"aria-label":`Previous page`,children:(0,K.jsx)(Lf,{className:`h-4 w-4`})}),u.map((t,n)=>t===`ellipsis`?(0,K.jsx)(`span`,{className:`inline-flex h-11 w-5 items-center justify-center text-xs text-foreground-muted`,children:`...`},`ellipsis-${n}`):(0,K.jsx)(`button`,{onClick:()=>r(t),className:q(`inline-flex h-11 min-w-[44px] items-center justify-center rounded-md px-1.5 text-xs font-medium tabular-nums transition-all`,t===e?`text-primary bg-primary/10`:`text-foreground-muted hover:bg-background-secondary hover:text-foreground-secondary cursor-pointer`),children:t+1},t)),(0,K.jsx)(`button`,{onClick:()=>r(e+1),disabled:!l,className:q(`inline-flex h-11 w-11 items-center justify-center rounded-md text-xs transition-all`,l?`text-foreground hover:bg-primary-muted hover:text-primary hover:shadow-neon-glow-primary-xs cursor-pointer`:`text-foreground-muted cursor-not-allowed opacity-40`),"aria-label":`Next page`,children:(0,K.jsx)(Rf,{className:`h-4 w-4`})})]})]})}function Bb(e,t={}){let{limit:n=10,offset:r=0,search:i=``,status:a=``,sort:o=`status`,enabled:s=!0}=t,c=new URLSearchParams;c.set(`project`,e),c.set(`limit`,String(n)),c.set(`offset`,String(r)),i&&c.set(`search`,i),a&&c.set(`status`,a),o&&o!==`status`&&c.set(`sort`,o);let{data:l,loading:u,error:d,refresh:f}=Um(`/api/runs?${c.toString()}`,{interval:5e3,sseFilter:()=>!0,enabled:s});return{runs:s&&l?l.runs:[],totalCount:s&&l?l.totalCount:0,loading:u,error:d,refresh:f}}function Vb(e){return e.failedRuns>0?`failing`:e.activeRuns>0?`active`:e.staleRuns>0?`stale`:`healthy`}var Hb={healthy:{dotClass:`bg-success shadow-[0_0_6px_var(--success)]`,borderClass:`border-success/20 hover:border-success/40`,icon:Vf,label:`Healthy`,barColor:`bg-success`},active:{dotClass:`bg-warning shadow-[0_0_6px_var(--warning)] animate-pulse-dot`,borderClass:`border-warning/20 hover:border-warning/40`,icon:Ef,label:`Active`,barColor:`bg-warning`},stale:{dotClass:`bg-zinc-500`,borderClass:`border-zinc-500/20 hover:border-zinc-500/40`,icon:Ep,label:`Stale`,barColor:`bg-zinc-500`},failing:{dotClass:`bg-error shadow-[0_0_6px_var(--error)]`,borderClass:`border-error/20 hover:border-error/40`,icon:Bf,label:`Failing`,barColor:`bg-error`}},Ub=5;function Wb({project:e,statusFilter:t,sortMode:n=`status`,onHide:r,onStopRun:i,stoppingRunIds:a}){let[o,s]=(0,b.useState)(!1),c=(0,b.useCallback)(async t=>{t.stopPropagation(),s(!0);let n=await Pm(`/api/config`);if(!n.ok){s(!1);return}let i=n.data.hiddenProjects??[];if(i.includes(e.projectName)){s(!1),r?.(e.projectName);return}let a=[...i,e.projectName],o=await Pm(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sources:n.data.sources,pollInterval:n.data.pollInterval,theme:n.data.theme,retentionDays:n.data.retentionDays,hiddenProjects:a})});s(!1),o.ok&&r?.(e.projectName)},[e.projectName,r]),[l,u]=Wh(`project-expanded:${e.projectName}`,!1),[d,f]=(0,b.useState)(0),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(`all`),y=Hb[Vb(e)],x=y.icon,S=e.totalTasks>0?Math.round(e.completedTasksAggregate/e.totalTasks*100):0,C=_===`all`?t:_,{runs:w,totalCount:T,loading:E}=Bb(e.projectName,{limit:Ub,offset:d*Ub,status:C===`all`?``:C,sort:n,enabled:l}),D=e=>{v(t=>t===e?`all`:e),f(0)};return(0,K.jsxs)(`div`,{"data-testid":`project-card-${e.projectName}`,className:q(`transition-all duration-200 overflow-hidden card-hover-lift`,y.borderClass,l&&`ring-1 ring-primary/20`),children:[(0,K.jsxs)(`button`,{onClick:()=>u(e=>!e),className:`w-full text-left p-4 hover:bg-background-secondary/30 transition-colors`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 truncate flex-1`,children:[(0,K.jsx)(`h3`,{className:`text-lg font-semibold text-foreground truncate`,children:e.projectName}),e.pendingBreakpoints>0&&(0,K.jsxs)(`span`,{className:q(`inline-flex items-center gap-1 rounded-full px-2 py-0.5 shrink-0`,`bg-warning/15 border border-warning/30`,`text-xs leading-tight font-bold text-warning`,`animate-pulse-dot`),children:[(0,K.jsx)(lp,{className:`h-2.5 w-2.5`}),e.pendingBreakpoints,` Pending`]})]}),(0,K.jsxs)(`div`,{className:`flex items-center shrink-0 ml-2 gap-1`,children:[(0,K.jsx)(`span`,{role:`button`,tabIndex:0,onClick:c,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),c(e))},className:q(`rounded-md p-2 min-h-[44px] min-w-[44px] inline-flex items-center justify-center transition-colors`,o?`text-foreground-muted cursor-wait`:`text-foreground-muted/40 hover:text-foreground-muted hover:bg-background-secondary`),title:`Hide project from dashboard`,children:o?(0,K.jsx)(vp,{className:`h-3.5 w-3.5 animate-spin`}):(0,K.jsx)(Zf,{className:`h-3.5 w-3.5`})}),l?(0,K.jsx)(zf,{className:`h-4 w-4 text-foreground-muted`}):(0,K.jsx)(If,{className:`h-4 w-4 text-foreground-muted`})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-foreground-muted`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:q(`h-2.5 w-2.5 rounded-full shrink-0`,y.dotClass)}),(0,K.jsx)(x,{className:`h-3 w-3`}),y.label]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(pp,{className:`h-3 w-3`}),e.totalRuns]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(Kf,{className:`h-3 w-3`}),t_(e.latestUpdate)]})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[e.activeRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-warning/10 border border-warning/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-warning tabular-nums`,title:`${e.activeRuns} active`,children:[(0,K.jsx)(Ef,{className:`h-3 w-3`}),e.activeRuns]}),e.staleRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-zinc-500/10 border border-zinc-500/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-zinc-500 tabular-nums`,title:`${e.staleRuns} stale`,children:[(0,K.jsx)(Ep,{className:`h-3 w-3`}),e.staleRuns]}),e.completedRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-success/10 border border-success/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-success tabular-nums`,title:`${e.completedRuns} completed`,children:[(0,K.jsx)(Vf,{className:`h-3 w-3`}),e.completedRuns]}),e.failedRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-error/10 border border-error/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-error tabular-nums`,title:`${e.failedRuns} failed`,children:[(0,K.jsx)(Bf,{className:`h-3 w-3`}),e.failedRuns]})]})]}),e.totalTasks>0&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,K.jsxs)(`span`,{className:`text-xs leading-tight text-foreground-muted`,children:[e.completedTasksAggregate,`/`,e.totalTasks,` tasks`]}),(0,K.jsxs)(`span`,{className:`text-xs leading-tight text-foreground-muted tabular-nums`,children:[S,`%`]})]}),(0,K.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-background-secondary overflow-hidden`,children:(0,K.jsx)(`div`,{className:q(`h-full rounded-full transition-all duration-500`,y.barColor),style:{width:`${S}%`}})})]})]}),l&&(()=>{let t=w.filter(e=>e.status===`waiting`||e.status===`pending`||e.isStale),r=w.filter(e=>e.status===`completed`&&!e.isStale),o=w.filter(e=>e.status===`failed`&&!e.isStale),s=t.length>0,c=r.length>0,l=o.length>0;return(0,K.jsxs)(`div`,{className:`border-t border-border px-4 pb-4 pt-3`,children:[E&&w.length===0?(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:[1,2].map(e=>(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-background p-3 animate-pulse`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,K.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-foreground-muted/20`}),(0,K.jsx)(`div`,{className:`h-3 w-32 rounded bg-foreground-muted/10`})]}),(0,K.jsx)(`div`,{className:`h-2 w-full rounded bg-foreground-muted/10`})]},e))}):w.length===0?(0,K.jsx)(`p`,{className:`text-xs text-foreground-muted text-center py-4`,children:`No matching runs`}):n===`activity`?(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:q(`grid gap-2 mb-3`,e.staleRuns>0?`grid-cols-4`:`grid-cols-3`),children:[(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ef,{className:`h-3.5 w-3.5`}),count:e.activeRuns,label:`Active`,colorClass:`text-warning`,bgClass:`bg-warning/10`,pulse:e.activeRuns>0,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),e.staleRuns>0&&(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ep,{className:`h-3.5 w-3.5`}),count:e.staleRuns,label:`Stale`,colorClass:`text-zinc-500`,bgClass:`bg-zinc-500/10`,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Vf,{className:`h-3.5 w-3.5`}),count:e.completedRuns,label:`Completed`,colorClass:`text-success`,bgClass:`bg-success/10`,active:_===`completed`,onClick:e=>{e.stopPropagation(),D(`completed`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Bf,{className:`h-3.5 w-3.5`}),count:e.failedRuns,label:`Failed`,colorClass:`text-error`,bgClass:`bg-error/10`,active:_===`failed`,onClick:e=>{e.stopPropagation(),D(`failed`)}})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,K.jsx)(Kf,{className:`h-3.5 w-3.5 text-primary`}),(0,K.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:`Timeline`}),(0,K.jsx)(`span`,{className:`rounded-full bg-primary/10 border border-primary/20 px-2 py-px text-xs font-semibold text-primary tabular-nums`,children:w.length})]}),(0,K.jsx)(Rb,{runs:w,maxHeight:500,renderItem:e=>(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(hb,{run:e,onStop:i,stopping:a?.has(e.runId)}),(0,K.jsxs)(`span`,{className:`absolute top-2 right-2 inline-flex items-center gap-1 rounded-full bg-background/80 backdrop-blur-sm border border-border px-2 py-0.5 text-xs text-foreground-muted tabular-nums pointer-events-none z-10`,children:[(0,K.jsx)(Kf,{className:`h-2.5 w-2.5`}),t_(e.updatedAt)]})]})})]}):(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:q(`grid gap-2 mb-3`,e.staleRuns>0?`grid-cols-4`:`grid-cols-3`),children:[(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ef,{className:`h-3.5 w-3.5`}),count:e.activeRuns,label:`Active`,colorClass:`text-warning`,bgClass:`bg-warning/10`,pulse:e.activeRuns>0,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),e.staleRuns>0&&(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ep,{className:`h-3.5 w-3.5`}),count:e.staleRuns,label:`Stale`,colorClass:`text-zinc-500`,bgClass:`bg-zinc-500/10`,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Vf,{className:`h-3.5 w-3.5`}),count:e.completedRuns,label:`Completed`,colorClass:`text-success`,bgClass:`bg-success/10`,active:_===`completed`,onClick:e=>{e.stopPropagation(),D(`completed`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Bf,{className:`h-3.5 w-3.5`}),count:e.failedRuns,label:`Failed`,colorClass:`text-error`,bgClass:`bg-error/10`,active:_===`failed`,onClick:e=>{e.stopPropagation(),D(`failed`)}})]}),s&&(0,K.jsxs)(`div`,{className:`mb-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,K.jsx)(Ef,{className:`h-3.5 w-3.5 text-warning animate-pulse-dot`}),(0,K.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:`In Progress`}),(0,K.jsx)(`span`,{className:`rounded-full bg-warning/10 border border-warning/20 px-2 py-px text-xs font-semibold text-warning tabular-nums`,children:t.length})]}),(0,K.jsx)(Rb,{runs:t,maxHeight:500,onStopRun:i,stoppingRunIds:a})]}),l&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),g(e=>!e)},className:`flex items-center gap-2 py-1.5 text-xs group w-fit`,children:[(0,K.jsx)(Bf,{className:`h-3.5 w-3.5 text-error/70`}),(0,K.jsx)(`span`,{className:`font-semibold text-error/80 group-hover:text-error transition-colors`,children:`Failed Dispatches`}),(0,K.jsx)(`span`,{className:`rounded-full bg-error/10 border border-error/20 px-2 py-px text-xs font-semibold text-error tabular-nums`,children:o.length}),h?(0,K.jsx)(zf,{className:`h-3 w-3 text-error/40 group-hover:text-error/60`}):(0,K.jsx)(If,{className:`h-3 w-3 text-error/40 group-hover:text-error/60`})]}),h&&(0,K.jsx)(`div`,{className:`mt-1 opacity-70`,children:(0,K.jsx)(Rb,{runs:o,maxHeight:400,onStopRun:i,stoppingRunIds:a})})]}),c&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),m(e=>!e)},className:`flex items-center gap-2 py-1.5 text-xs group w-fit`,children:[(0,K.jsx)(up,{className:`h-3.5 w-3.5 text-foreground-muted/70`}),(0,K.jsx)(`span`,{className:`font-semibold text-foreground-muted group-hover:text-foreground-secondary transition-colors`,children:`Completed History`}),(0,K.jsx)(`span`,{className:`rounded-full bg-background-secondary border border-border px-2 py-px text-xs font-semibold text-foreground-muted tabular-nums`,children:r.length}),p?(0,K.jsx)(zf,{className:`h-3 w-3 text-foreground-muted/60 group-hover:text-foreground-muted`}):(0,K.jsx)(If,{className:`h-3 w-3 text-foreground-muted/60 group-hover:text-foreground-muted`})]}),p&&(0,K.jsx)(`div`,{className:`mt-1 opacity-60`,children:(0,K.jsx)(Rb,{runs:r,maxHeight:400,onStopRun:i,stoppingRunIds:a})})]})]}),T>Ub&&(0,K.jsx)(zb,{currentPage:d,totalItems:T,itemsPerPage:Ub,onPageChange:f,className:`mt-3`})]})})()]})}function Gb({icon:e,count:t,label:n,colorClass:r,bgClass:i,pulse:a,active:o,onClick:s}){let c=!!s;return(0,K.jsxs)(`div`,{role:c?`button`:void 0,tabIndex:c?0:void 0,onClick:s,onKeyDown:c?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s?.(e))}:void 0,className:q(`rounded-md px-2.5 py-1.5 flex items-center gap-2 transition-all`,i,c&&`cursor-pointer hover:opacity-80`,o&&`ring-2 ring-offset-1 ring-offset-card`,o&&r.replace(`text-`,`ring-`).replace(/\/\d+$/,`/50`)),children:[(0,K.jsx)(`span`,{className:q(r,a&&`animate-pulse`),children:e}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:q(`text-sm font-bold tabular-nums leading-none`,r),children:t}),(0,K.jsx)(`p`,{className:`text-xs leading-tight text-foreground-muted uppercase tracking-wider`,children:n})]})]})}function Kb(){return(0,K.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:[1,2,3].map(e=>(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 animate-pulse`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,K.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-foreground-muted/20`}),(0,K.jsx)(`div`,{className:`h-4 w-32 rounded bg-foreground-muted/10`})]}),(0,K.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-foreground-muted/10 mb-3`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`h-5 w-16 rounded-full bg-foreground-muted/10`}),(0,K.jsx)(`div`,{className:`h-5 w-16 rounded-full bg-foreground-muted/10`}),(0,K.jsx)(`div`,{className:`h-3 w-12 rounded bg-foreground-muted/10`})]})]},e))})}function qb({error:e}){return(0,K.jsxs)(`div`,{"data-testid":`error-banner`,className:`rounded-lg border border-error/20 bg-error-muted p-4 text-sm text-error`,children:[`Failed to load projects: `,e]})}function Jb(){return(0,K.jsxs)(`div`,{"data-testid":`empty-state`,className:`text-center py-16`,children:[(0,K.jsx)(op,{className:`h-10 w-10 text-foreground-muted/30 mx-auto mb-3`}),(0,K.jsx)(`p`,{className:`text-sm text-foreground-muted mb-1`,children:`No projects found`}),(0,K.jsxs)(`p`,{className:`text-xs text-foreground-muted/60`,children:[`Configure watch sources in`,` `,(0,K.jsx)(`button`,{onClick:()=>window.dispatchEvent(new CustomEvent(`open-settings`)),className:`text-primary hover:underline`,children:`Settings`}),` `,`or edit `,(0,K.jsx)(`span`,{className:`font-mono`,children:`~/.a5c/kanban.json`})]})]})}function Yb(){return(0,K.jsxs)(`div`,{"data-testid":`idle-empty-state`,className:`text-center py-16`,children:[(0,K.jsx)(Qf,{className:`h-10 w-10 text-foreground-muted/30 mx-auto mb-3`}),(0,K.jsx)(`p`,{className:`text-sm text-foreground-muted mb-1`,children:`All quiet — no active orchestration runs`}),(0,K.jsx)(`p`,{className:`text-xs text-foreground-muted/60`,children:`Dispatches will appear here when babysitter processes are started`})]})}function Xb({loading:e,error:t,filteredProjects:n,activeProjects:r,historyProjects:i,statusFilter:a,sortMode:o,cardStatusFilter:s,historyCollapsed:c,onHistoryCollapsedChange:l,onHideProject:u,onStopRun:d,stoppingRunIds:f}){return e?(0,K.jsx)(Kb,{}):t?(0,K.jsx)(qb,{error:t}):n.length===0?(0,K.jsx)(Jb,{}):(0,K.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[r.length===0&&i.length===0&&(0,K.jsx)(Yb,{}),r.length===0&&i.length>0&&(a===`all`||a===`stale`)&&(0,K.jsxs)(`div`,{"data-testid":`idle-with-history-banner`,className:`flex items-center gap-2 px-3 py-2 rounded-md bg-background-secondary/50 border border-border w-fit`,children:[(0,K.jsx)(Ef,{className:`h-3.5 w-3.5 text-foreground-muted/50`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-muted`,children:o===`activity`?`No activity in the last 24 hours`:`No dispatches in progress`})]}),r.length>0&&(a===`all`||a===`stale`||a===`waiting`)&&(0,K.jsx)(cb,{section:`Active Dispatches`,children:(0,K.jsxs)(`section`,{"data-testid":`active-runs-section`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[o===`activity`?(0,K.jsx)(Kf,{className:`h-4 w-4 text-primary`}):(0,K.jsx)(Ef,{className:`h-4 w-4 text-warning animate-pulse-dot`}),(0,K.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:o===`activity`?`Recent Activity`:`In Progress`}),(0,K.jsx)(`span`,{className:q(`rounded-full px-2 py-px text-xs font-semibold tabular-nums`,o===`activity`?`bg-primary/10 border border-primary/20 text-primary`:`bg-warning/10 border border-warning/20 text-warning`),children:r.length})]}),(0,K.jsx)(`div`,{"data-testid":`project-grid-active`,className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:r.map(e=>(0,K.jsx)(Wb,{project:e,statusFilter:s,sortMode:o,onHide:u,onStopRun:d,stoppingRunIds:f},e.projectName))})]})}),(a===`completed`||a===`failed`)&&(0,K.jsx)(cb,{section:`Filtered Results`,children:(0,K.jsx)(`div`,{"data-testid":`project-grid-filtered`,className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:n.map(e=>(0,K.jsx)(Wb,{project:e,statusFilter:s,sortMode:o,onStopRun:d,stoppingRunIds:f},e.projectName))})}),i.length>0&&(a===`all`||a===`stale`)&&(0,K.jsx)(cb,{section:`Recent History`,children:(0,K.jsxs)(`section`,{"data-testid":`recent-history-section`,children:[(0,K.jsxs)(`button`,{onClick:()=>l(e=>!e),className:`flex items-center gap-2 mb-3 group w-fit`,children:[(0,K.jsx)(up,{className:`h-4 w-4 text-foreground-muted/70`}),(0,K.jsx)(`h2`,{className:`text-sm font-semibold text-foreground-muted group-hover:text-foreground-secondary transition-colors`,children:o===`activity`?`Earlier`:`Recent History`}),(0,K.jsx)(`span`,{className:`rounded-full bg-background-secondary border border-border px-2 py-px text-xs font-semibold text-foreground-muted tabular-nums`,children:i.length}),c?(0,K.jsx)(If,{className:`h-3.5 w-3.5 text-foreground-muted/60 group-hover:text-foreground-muted transition-colors`}):(0,K.jsx)(zf,{className:`h-3.5 w-3.5 text-foreground-muted/60 group-hover:text-foreground-muted transition-colors`})]}),!c&&(0,K.jsx)(`div`,{className:`opacity-70`,children:(0,K.jsx)(`div`,{"data-testid":`project-grid-history`,className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:i.map(e=>(0,K.jsx)(Wb,{project:e,statusFilter:s,sortMode:o,onStopRun:d,stoppingRunIds:f},e.projectName))})})]})})]})}var Zb=[{label:`All`,value:`all`},{label:`Running`,value:`waiting`},{label:`Stale`,value:`stale`},{label:`Completed`,value:`completed`},{label:`Failed`,value:`failed`}];function Qb({statusFilter:e,onStatusFilterChange:t,filterCounts:n,sortMode:r,onSortModeToggle:i,filteredProjectCount:a}){return(0,K.jsx)(`div`,{className:`mb-5`,children:(0,K.jsxs)(`div`,{"data-testid":`filter-bar`,className:`flex items-center gap-1`,children:[Zb.map(r=>{let i=n[r.value]??0;return r.value===`stale`&&i===0?null:(0,K.jsxs)(`button`,{"data-testid":`filter-pill-${r.value}`,"aria-pressed":e===r.value,onClick:()=>t(r.value),className:q(`rounded-md px-3 py-1.5 min-h-[44px] text-xs font-medium transition-all inline-flex items-center gap-1.5`,e===r.value?r.value===`stale`?`bg-zinc-500/10 text-zinc-500`:`bg-primary/10 text-primary shadow-neon-glow-primary-xs`:`text-foreground-muted hover:text-foreground-secondary hover:bg-background-secondary`),children:[r.label,i>0&&(0,K.jsx)(`span`,{className:q(`rounded-full px-1.5 py-px text-xs leading-tight font-semibold tabular-nums`,e===r.value?r.value===`stale`?`bg-zinc-500/20 text-zinc-500`:`bg-primary/20 text-primary`:`bg-background-secondary text-foreground-muted`),children:i})]},r.value)}),(0,K.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,K.jsxs)(`button`,{"data-testid":`sort-toggle`,onClick:i,className:q(`rounded-md px-2.5 py-1.5 min-h-[44px] text-xs font-medium inline-flex items-center gap-1.5`,`transition-all duration-200 ease-in-out`,r===`status`?`bg-warning/10 border border-warning/30 text-warning hover:bg-warning/15 hover:border-warning/40 shadow-sm`:`bg-primary/10 border border-primary/30 text-primary hover:bg-primary/15 hover:border-primary/40 shadow-sm`),title:r===`status`?`Currently sorting by status priority (active first, then failed, then completed). Click to switch to chronological activity view.`:`Currently sorting by most recent activity (newest updates first). Click to switch to status-grouped view.`,children:[r===`status`?(0,K.jsx)(jf,{className:`h-3 w-3 transition-transform duration-200`}):(0,K.jsx)(Kf,{className:`h-3 w-3 transition-transform duration-200`}),r===`status`?`By Status`:`By Activity`]}),(0,K.jsxs)(`span`,{"data-testid":`project-count`,className:`text-xs text-foreground-muted tabular-nums`,children:[a,` project`,a===1?``:`s`]})]})]})})}function $b(e,t){return`/projects/${encodeURIComponent(e)}/issues/${encodeURIComponent(t)}`}function ex(e){return`/projects/${encodeURIComponent(e)}/board`}function tx(e){return e===`azure-repos`?`Azure Repos`:`GitHub`}function nx(e){return e.mode===`issue`&&e.issueKey?e.issueKey:e.mode===`host`&&e.projectKey&&e.hostProvider?`${e.projectKey}-${e.hostProvider}`:e.projectKey??`workspace`}function rx(e){let t=Be(),{snapshot:n,loading:r,error:i}=Zm(),[a,o]=(0,b.useState)(e.projectId??``),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(``),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(null),h=n?.projects??[],g=(0,b.useMemo)(()=>h.find(e=>e.id===a)??(e.projectId?void 0:h[0]),[h,e.projectId,a]),_=(0,b.useMemo)(()=>e.issueId?n?.issues.find(t=>t.id===e.issueId&&(!g||t.projectId===g.id)):void 0,[e.issueId,g,n?.issues]),v=g?.integrations??[];(0,b.useEffect)(()=>{!a&&g?.id&&o(g.id)},[g?.id,a]),(0,b.useEffect)(()=>{if(v.length===0){c(``);return}s&&v.some(e=>e.provider===s)||c((v.find(e=>e.prerequisites.every(e=>e.satisfied))??v[0])?.provider??``)},[v,s]),(0,b.useEffect)(()=>{u(nx({mode:e.mode,projectKey:g?.key,issueKey:_?.key,hostProvider:s||void 0}))},[e.mode,s,_?.key,g?.key]);let y=(0,b.useMemo)(()=>v.find(e=>e.provider===s),[v,s]),x=e.mode===`issue`?`Create issue-owned workspace`:e.mode===`project`?`Create project-owned workspace`:`Create host-scoped workspace`,S=e.mode===`issue`?`This route provisions a workspace from the current issue and redirects directly into the workspace shell.`:e.mode===`project`?`This route provisions a workspace owned by the current project without requiring an issue-first entry point.`:`This route starts from the workspace host surface and still records the selected project and host context explicitly.`,C=e.mode===`issue`&&_?$b(_.projectId,_.id):g?ex(g.id):`/workspaces`;async function w(n){if(n.preventDefault(),!(!g||!l.trim())){f(!0),m(null);try{let n=await fetch(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`provision`,scope:e.mode,projectId:g.id,issueId:e.mode===`issue`?_?.id:void 0,hostProvider:(e.mode===`host`||e.mode,s||void 0),workspaceName:l.trim()})});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.error??`Workspace provisioning failed: ${n.status}`)}let r=await n.json();t(`/workspaces?workspace=${encodeURIComponent(r.workspace.workspacePath)}`)}catch(e){m(e instanceof Error?e.message:String(e))}finally{f(!1)}}}return r&&!n?(0,K.jsx)(`div`,{className:`mx-auto flex w-full max-w-[960px] flex-1 px-4 py-6 sm:px-6`,children:(0,K.jsxs)(`section`,{className:`w-full animate-pulse rounded-3xl border border-border bg-card p-6`,children:[(0,K.jsx)(`div`,{className:`h-5 w-48 rounded bg-background-secondary`}),(0,K.jsx)(`div`,{className:`mt-4 h-20 rounded-2xl bg-background-secondary`})]})}):i||!n?(0,K.jsx)(`div`,{className:`mx-auto flex w-full max-w-[960px] flex-1 px-4 py-6 sm:px-6`,children:(0,K.jsx)(`section`,{className:`w-full rounded-3xl border border-error/25 bg-error-muted p-6 text-sm text-error`,children:`Failed to load workspace provisioning context.`})}):(0,K.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[960px] flex-1 flex-col gap-6 px-4 py-6 sm:px-6`,children:[(0,K.jsxs)(`section`,{className:`rounded-3xl border border-border bg-card p-6 shadow-lg`,children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-primary/80`,children:`Workspace provisioning`}),(0,K.jsx)(`h1`,{className:`mt-2 text-3xl font-semibold tracking-tight text-foreground`,children:x}),(0,K.jsx)(`p`,{className:`mt-3 max-w-3xl text-sm leading-6 text-foreground-muted`,children:S})]}),(0,K.jsx)(`section`,{className:`rounded-3xl border border-border bg-card p-6 shadow-lg`,children:(0,K.jsxs)(`form`,{className:`grid gap-5`,onSubmit:w,children:[e.mode===`host`?(0,K.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium text-foreground`,children:[`Project`,(0,K.jsx)(`select`,{value:a,onChange:e=>o(e.target.value),className:`h-11 rounded-xl border border-border bg-background px-3 text-sm text-foreground`,children:h.map(e=>(0,K.jsxs)(`option`,{value:e.id,children:[e.key,` - `,e.name]},e.id))})]}):null,g?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/70 p-4 text-sm text-foreground-muted`,children:[(0,K.jsx)(`div`,{className:`font-semibold text-foreground`,children:g.key}),(0,K.jsx)(`div`,{className:`mt-1`,children:g.name}),_?(0,K.jsxs)(`div`,{className:`mt-3 rounded-xl border border-border bg-card px-3 py-2 text-xs text-foreground-muted`,children:[`Issue owner: `,(0,K.jsx)(`span`,{className:`font-semibold text-foreground`,children:_.key}),` ·`,` `,_.title]}):null]}):null,v.length>0?(0,K.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium text-foreground`,children:[`Host context`,(0,K.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),className:`h-11 rounded-xl border border-border bg-background px-3 text-sm text-foreground`,children:v.map(e=>(0,K.jsxs)(`option`,{value:e.provider,children:[e.label,` · `,e.accountLabel??e.status]},e.provider))})]}):null,y?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/70 p-4 text-sm text-foreground-muted`,children:[(0,K.jsxs)(`div`,{className:`font-semibold text-foreground`,children:[tx(y.provider),` ownership metadata will be attached`]}),(0,K.jsx)(`div`,{className:`mt-1`,children:y.guidance})]}):null,(0,K.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium text-foreground`,children:[`Workspace name`,(0,K.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),className:`h-11 rounded-xl border border-border bg-background px-3 text-sm text-foreground outline-none`,placeholder:`workspace name`})]}),p?(0,K.jsx)(`div`,{className:`rounded-2xl border border-error/25 bg-error-muted px-4 py-3 text-sm text-error`,children:p}):null,(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,K.jsx)(J,{type:`submit`,variant:`primary`,disabled:!g||!l.trim(),loading:d,children:`Create workspace`}),(0,K.jsx)(J,{variant:`ghost`,onClick:()=>t(C),children:`Cancel`})]})]})})]})}function ix(e){return Array.from(new Set(e.map(e=>e.labelId?.trim()||``).filter(Boolean))).map(e=>({labelId:e}))}function ax(e){let t=Array.from(new Set(e.labelIds??[])),n=e.labels??[],r=e.projectKey?.trim()?e.projectName?.trim()?`${e.projectKey} (${e.projectName})`:e.projectKey:e.projectName?.trim()||e.projectId,i=n.length>0?n.map(e=>`- ${e.key} (${e.labelId}): ${e.label}`).join(`
31
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function _b(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var vb=(e,t)=>Math.abs(e-t)<1.01,yb=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},bb=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},xb=e=>e,Sb=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},Cb=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(bb(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(bb(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},wb={passive:!0},Tb=typeof window>`u`?!0:`onscrollend`in window,Eb=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&Tb?()=>void 0:yb(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,wb);let l=e.options.useScrollendEvent&&Tb;return l&&n.addEventListener(`scrollend`,c,wb),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},Db=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Ob=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},kb=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:xb,rangeExtractor:Sb,onChange:()=>{},measureElement:Db,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=gb(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=gb(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=gb(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let l=this.measurementsCache.slice(0,c),u=Array(a).fill(void 0);for(let e=0;e<c;e++){let t=l[e];t&&(u[t.lane]=e)}for(let i=c;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),c,d,f=o===`estimate`||s.has(e);if(a!==void 0&&this.options.lanes>1){c=a;let e=u[c],r=e===void 0?void 0:l[e];d=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?l[i-1]:this.getFurthestMeasurement(l,i);d=e?e.end+this.options.gap:t+n,c=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,c)}let p=s.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=d+m;l[i]={index:i,start:d,size:m,end:h,key:e,lane:c},u[c]=i}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=gb(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?jb({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=gb(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&(this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.getVirtualItems=gb(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return _b(t[Ab(0,t.length-1,e=>_b(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&vb(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior=`auto`,this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}));this.scheduleScrollReconcile()}},Ab=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function jb({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=Ab(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Mb=typeof document<`u`?b.useLayoutEffect:b.useEffect;function Nb({useFlushSync:e=!0,...t}){let n=b.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,C.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=b.useState(()=>new kb(r));return i.setOptions(r),Mb(()=>i._didMount(),[]),Mb(()=>i._willUpdate()),i}function Pb(e){return Nb({observeElementRect:Cb,observeElementOffset:Eb,scrollToFn:Ob,...e})}var Fb=140,Ib=3,Lb=15;function Rb({runs:e,className:t,maxHeight:n=600,renderItem:r,onStopRun:i,stoppingRunIds:a}){let o=(0,b.useRef)(null),s=(0,b.useMemo)(()=>e,[e]),c=(0,b.useCallback)(e=>s[e]?.runId??e,[s]),l=Pb({count:s.length,getScrollElement:()=>o.current,estimateSize:()=>Fb,overscan:Ib,getItemKey:c});if(s.length<Lb)return(0,K.jsx)(`div`,{className:t,"data-testid":`run-list-flat`,children:(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>r?(0,K.jsx)(`div`,{children:r(e,t)},e.runId):(0,K.jsx)(hb,{run:e,onStop:i,stopping:a?.has(e.runId)},e.runId))})});let u=l.getVirtualItems();return(0,K.jsx)(`div`,{ref:o,className:t,"data-testid":`run-list-virtualized`,style:{maxHeight:n,overflow:`auto`,contain:`strict`},children:(0,K.jsx)(`div`,{style:{height:`${l.getTotalSize()}px`,width:`100%`,position:`relative`},children:u.map(e=>{let t=s[e.index];return t?(0,K.jsx)(`div`,{"data-index":e.index,ref:l.measureElement,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:(0,K.jsx)(`div`,{style:{paddingBottom:8},children:r?r(t,e.index):(0,K.jsx)(hb,{run:t,onStop:i,stopping:a?.has(t.runId)})})},e.key):null})})})}function zb({currentPage:e,totalItems:t,itemsPerPage:n,onPageChange:r,className:i}){let a=Math.ceil(t/n),o=e*n+1,s=Math.min((e+1)*n,t),c=e>0,l=e<a-1;if(t===0)return null;let u=[];if(a<=5)for(let e=0;e<a;e++)u.push(e);else{u.push(0),e>2&&u.push(`ellipsis`);for(let t=Math.max(1,e-1);t<=Math.min(a-2,e+1);t++)u.push(t);e<a-3&&u.push(`ellipsis`),u.push(a-1)}return(0,K.jsxs)(`div`,{className:q(`flex items-center justify-between border-t border-border pt-3`,i),children:[(0,K.jsxs)(`span`,{className:`text-xs text-foreground-muted tabular-nums`,children:[o,`–`,s,` of `,t]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,K.jsx)(`button`,{onClick:()=>r(e-1),disabled:!c,className:q(`inline-flex h-11 w-11 items-center justify-center rounded-md text-xs transition-all`,c?`text-foreground hover:bg-primary-muted hover:text-primary hover:shadow-neon-glow-primary-xs cursor-pointer`:`text-foreground-muted cursor-not-allowed opacity-40`),"aria-label":`Previous page`,children:(0,K.jsx)(Lf,{className:`h-4 w-4`})}),u.map((t,n)=>t===`ellipsis`?(0,K.jsx)(`span`,{className:`inline-flex h-11 w-5 items-center justify-center text-xs text-foreground-muted`,children:`...`},`ellipsis-${n}`):(0,K.jsx)(`button`,{onClick:()=>r(t),className:q(`inline-flex h-11 min-w-[44px] items-center justify-center rounded-md px-1.5 text-xs font-medium tabular-nums transition-all`,t===e?`text-primary bg-primary/10`:`text-foreground-muted hover:bg-background-secondary hover:text-foreground-secondary cursor-pointer`),children:t+1},t)),(0,K.jsx)(`button`,{onClick:()=>r(e+1),disabled:!l,className:q(`inline-flex h-11 w-11 items-center justify-center rounded-md text-xs transition-all`,l?`text-foreground hover:bg-primary-muted hover:text-primary hover:shadow-neon-glow-primary-xs cursor-pointer`:`text-foreground-muted cursor-not-allowed opacity-40`),"aria-label":`Next page`,children:(0,K.jsx)(Rf,{className:`h-4 w-4`})})]})]})}function Bb(e,t={}){let{limit:n=10,offset:r=0,search:i=``,status:a=``,sort:o=`status`,enabled:s=!0}=t,c=new URLSearchParams;c.set(`project`,e),c.set(`limit`,String(n)),c.set(`offset`,String(r)),i&&c.set(`search`,i),a&&c.set(`status`,a),o&&o!==`status`&&c.set(`sort`,o);let{data:l,loading:u,error:d,refresh:f}=Um(`/api/runs?${c.toString()}`,{interval:5e3,sseFilter:()=>!0,enabled:s});return{runs:s&&l?l.runs:[],totalCount:s&&l?l.totalCount:0,loading:u,error:d,refresh:f}}function Vb(e){return e.failedRuns>0?`failing`:e.activeRuns>0?`active`:e.staleRuns>0?`stale`:`healthy`}var Hb={healthy:{dotClass:`bg-success shadow-[0_0_6px_var(--success)]`,borderClass:`border-success/20 hover:border-success/40`,icon:Vf,label:`Healthy`,barColor:`bg-success`},active:{dotClass:`bg-warning shadow-[0_0_6px_var(--warning)] animate-pulse-dot`,borderClass:`border-warning/20 hover:border-warning/40`,icon:Ef,label:`Active`,barColor:`bg-warning`},stale:{dotClass:`bg-zinc-500`,borderClass:`border-zinc-500/20 hover:border-zinc-500/40`,icon:Ep,label:`Stale`,barColor:`bg-zinc-500`},failing:{dotClass:`bg-error shadow-[0_0_6px_var(--error)]`,borderClass:`border-error/20 hover:border-error/40`,icon:Bf,label:`Failing`,barColor:`bg-error`}},Ub=5;function Wb({project:e,statusFilter:t,sortMode:n=`status`,onHide:r,onStopRun:i,stoppingRunIds:a}){let[o,s]=(0,b.useState)(!1),c=(0,b.useCallback)(async t=>{t.stopPropagation(),s(!0);let n=await Pm(`/api/config`);if(!n.ok){s(!1);return}let i=n.data.hiddenProjects??[];if(i.includes(e.projectName)){s(!1),r?.(e.projectName);return}let a=[...i,e.projectName],o=await Pm(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sources:n.data.sources,pollInterval:n.data.pollInterval,theme:n.data.theme,retentionDays:n.data.retentionDays,hiddenProjects:a})});s(!1),o.ok&&r?.(e.projectName)},[e.projectName,r]),[l,u]=Wh(`project-expanded:${e.projectName}`,!1),[d,f]=(0,b.useState)(0),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(!1),[_,v]=(0,b.useState)(`all`),y=Hb[Vb(e)],x=y.icon,S=e.totalTasks>0?Math.round(e.completedTasksAggregate/e.totalTasks*100):0,C=_===`all`?t:_,{runs:w,totalCount:T,loading:E}=Bb(e.projectName,{limit:Ub,offset:d*Ub,status:C===`all`?``:C,sort:n,enabled:l}),D=e=>{v(t=>t===e?`all`:e),f(0)};return(0,K.jsxs)(`div`,{"data-testid":`project-card-${e.projectName}`,className:q(`transition-all duration-200 overflow-hidden card-hover-lift`,y.borderClass,l&&`ring-1 ring-primary/20`),children:[(0,K.jsxs)(`button`,{onClick:()=>u(e=>!e),className:`w-full text-left p-4 hover:bg-background-secondary/30 transition-colors`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 truncate flex-1`,children:[(0,K.jsx)(`h3`,{className:`text-lg font-semibold text-foreground truncate`,children:e.projectName}),e.pendingBreakpoints>0&&(0,K.jsxs)(`span`,{className:q(`inline-flex items-center gap-1 rounded-full px-2 py-0.5 shrink-0`,`bg-warning/15 border border-warning/30`,`text-xs leading-tight font-bold text-warning`,`animate-pulse-dot`),children:[(0,K.jsx)(lp,{className:`h-2.5 w-2.5`}),e.pendingBreakpoints,` Pending`]})]}),(0,K.jsxs)(`div`,{className:`flex items-center shrink-0 ml-2 gap-1`,children:[(0,K.jsx)(`span`,{role:`button`,tabIndex:0,onClick:c,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),c(e))},className:q(`rounded-md p-2 min-h-[44px] min-w-[44px] inline-flex items-center justify-center transition-colors`,o?`text-foreground-muted cursor-wait`:`text-foreground-muted/40 hover:text-foreground-muted hover:bg-background-secondary`),title:`Hide project from dashboard`,children:o?(0,K.jsx)(vp,{className:`h-3.5 w-3.5 animate-spin`}):(0,K.jsx)(Zf,{className:`h-3.5 w-3.5`})}),l?(0,K.jsx)(zf,{className:`h-4 w-4 text-foreground-muted`}):(0,K.jsx)(If,{className:`h-4 w-4 text-foreground-muted`})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-foreground-muted`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:q(`h-2.5 w-2.5 rounded-full shrink-0`,y.dotClass)}),(0,K.jsx)(x,{className:`h-3 w-3`}),y.label]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(pp,{className:`h-3 w-3`}),e.totalRuns]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(Kf,{className:`h-3 w-3`}),t_(e.latestUpdate)]})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[e.activeRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-warning/10 border border-warning/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-warning tabular-nums`,title:`${e.activeRuns} active`,children:[(0,K.jsx)(Ef,{className:`h-3 w-3`}),e.activeRuns]}),e.staleRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-zinc-500/10 border border-zinc-500/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-zinc-500 tabular-nums`,title:`${e.staleRuns} stale`,children:[(0,K.jsx)(Ep,{className:`h-3 w-3`}),e.staleRuns]}),e.completedRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-success/10 border border-success/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-success tabular-nums`,title:`${e.completedRuns} completed`,children:[(0,K.jsx)(Vf,{className:`h-3 w-3`}),e.completedRuns]}),e.failedRuns>0&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded-full bg-error/10 border border-error/20 px-1.5 py-0.5 text-xs leading-tight font-medium text-error tabular-nums`,title:`${e.failedRuns} failed`,children:[(0,K.jsx)(Bf,{className:`h-3 w-3`}),e.failedRuns]})]})]}),e.totalTasks>0&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,K.jsxs)(`span`,{className:`text-xs leading-tight text-foreground-muted`,children:[e.completedTasksAggregate,`/`,e.totalTasks,` tasks`]}),(0,K.jsxs)(`span`,{className:`text-xs leading-tight text-foreground-muted tabular-nums`,children:[S,`%`]})]}),(0,K.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-background-secondary overflow-hidden`,children:(0,K.jsx)(`div`,{className:q(`h-full rounded-full transition-all duration-500`,y.barColor),style:{width:`${S}%`}})})]})]}),l&&(()=>{let t=w.filter(e=>e.status===`waiting`||e.status===`pending`||e.isStale),r=w.filter(e=>e.status===`completed`&&!e.isStale),o=w.filter(e=>e.status===`failed`&&!e.isStale),s=t.length>0,c=r.length>0,l=o.length>0;return(0,K.jsxs)(`div`,{className:`border-t border-border px-4 pb-4 pt-3`,children:[E&&w.length===0?(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:[1,2].map(e=>(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-background p-3 animate-pulse`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,K.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-foreground-muted/20`}),(0,K.jsx)(`div`,{className:`h-3 w-32 rounded bg-foreground-muted/10`})]}),(0,K.jsx)(`div`,{className:`h-2 w-full rounded bg-foreground-muted/10`})]},e))}):w.length===0?(0,K.jsx)(`p`,{className:`text-xs text-foreground-muted text-center py-4`,children:`No matching runs`}):n===`activity`?(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:q(`grid gap-2 mb-3`,e.staleRuns>0?`grid-cols-4`:`grid-cols-3`),children:[(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ef,{className:`h-3.5 w-3.5`}),count:e.activeRuns,label:`Active`,colorClass:`text-warning`,bgClass:`bg-warning/10`,pulse:e.activeRuns>0,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),e.staleRuns>0&&(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ep,{className:`h-3.5 w-3.5`}),count:e.staleRuns,label:`Stale`,colorClass:`text-zinc-500`,bgClass:`bg-zinc-500/10`,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Vf,{className:`h-3.5 w-3.5`}),count:e.completedRuns,label:`Completed`,colorClass:`text-success`,bgClass:`bg-success/10`,active:_===`completed`,onClick:e=>{e.stopPropagation(),D(`completed`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Bf,{className:`h-3.5 w-3.5`}),count:e.failedRuns,label:`Failed`,colorClass:`text-error`,bgClass:`bg-error/10`,active:_===`failed`,onClick:e=>{e.stopPropagation(),D(`failed`)}})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,K.jsx)(Kf,{className:`h-3.5 w-3.5 text-primary`}),(0,K.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:`Timeline`}),(0,K.jsx)(`span`,{className:`rounded-full bg-primary/10 border border-primary/20 px-2 py-px text-xs font-semibold text-primary tabular-nums`,children:w.length})]}),(0,K.jsx)(Rb,{runs:w,maxHeight:500,renderItem:e=>(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(hb,{run:e,onStop:i,stopping:a?.has(e.runId)}),(0,K.jsxs)(`span`,{className:`absolute top-2 right-2 inline-flex items-center gap-1 rounded-full bg-background/80 backdrop-blur-sm border border-border px-2 py-0.5 text-xs text-foreground-muted tabular-nums pointer-events-none z-10`,children:[(0,K.jsx)(Kf,{className:`h-2.5 w-2.5`}),t_(e.updatedAt)]})]})})]}):(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:q(`grid gap-2 mb-3`,e.staleRuns>0?`grid-cols-4`:`grid-cols-3`),children:[(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ef,{className:`h-3.5 w-3.5`}),count:e.activeRuns,label:`Active`,colorClass:`text-warning`,bgClass:`bg-warning/10`,pulse:e.activeRuns>0,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),e.staleRuns>0&&(0,K.jsx)(Gb,{icon:(0,K.jsx)(Ep,{className:`h-3.5 w-3.5`}),count:e.staleRuns,label:`Stale`,colorClass:`text-zinc-500`,bgClass:`bg-zinc-500/10`,active:_===`waiting`,onClick:e=>{e.stopPropagation(),D(`waiting`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Vf,{className:`h-3.5 w-3.5`}),count:e.completedRuns,label:`Completed`,colorClass:`text-success`,bgClass:`bg-success/10`,active:_===`completed`,onClick:e=>{e.stopPropagation(),D(`completed`)}}),(0,K.jsx)(Gb,{icon:(0,K.jsx)(Bf,{className:`h-3.5 w-3.5`}),count:e.failedRuns,label:`Failed`,colorClass:`text-error`,bgClass:`bg-error/10`,active:_===`failed`,onClick:e=>{e.stopPropagation(),D(`failed`)}})]}),s&&(0,K.jsxs)(`div`,{className:`mb-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,K.jsx)(Ef,{className:`h-3.5 w-3.5 text-warning animate-pulse-dot`}),(0,K.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:`In Progress`}),(0,K.jsx)(`span`,{className:`rounded-full bg-warning/10 border border-warning/20 px-2 py-px text-xs font-semibold text-warning tabular-nums`,children:t.length})]}),(0,K.jsx)(Rb,{runs:t,maxHeight:500,onStopRun:i,stoppingRunIds:a})]}),l&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),g(e=>!e)},className:`flex items-center gap-2 py-1.5 text-xs group w-fit`,children:[(0,K.jsx)(Bf,{className:`h-3.5 w-3.5 text-error/70`}),(0,K.jsx)(`span`,{className:`font-semibold text-error/80 group-hover:text-error transition-colors`,children:`Failed Dispatches`}),(0,K.jsx)(`span`,{className:`rounded-full bg-error/10 border border-error/20 px-2 py-px text-xs font-semibold text-error tabular-nums`,children:o.length}),h?(0,K.jsx)(zf,{className:`h-3 w-3 text-error/40 group-hover:text-error/60`}):(0,K.jsx)(If,{className:`h-3 w-3 text-error/40 group-hover:text-error/60`})]}),h&&(0,K.jsx)(`div`,{className:`mt-1 opacity-70`,children:(0,K.jsx)(Rb,{runs:o,maxHeight:400,onStopRun:i,stoppingRunIds:a})})]}),c&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),m(e=>!e)},className:`flex items-center gap-2 py-1.5 text-xs group w-fit`,children:[(0,K.jsx)(up,{className:`h-3.5 w-3.5 text-foreground-muted/70`}),(0,K.jsx)(`span`,{className:`font-semibold text-foreground-muted group-hover:text-foreground-secondary transition-colors`,children:`Completed History`}),(0,K.jsx)(`span`,{className:`rounded-full bg-background-secondary border border-border px-2 py-px text-xs font-semibold text-foreground-muted tabular-nums`,children:r.length}),p?(0,K.jsx)(zf,{className:`h-3 w-3 text-foreground-muted/60 group-hover:text-foreground-muted`}):(0,K.jsx)(If,{className:`h-3 w-3 text-foreground-muted/60 group-hover:text-foreground-muted`})]}),p&&(0,K.jsx)(`div`,{className:`mt-1 opacity-60`,children:(0,K.jsx)(Rb,{runs:r,maxHeight:400,onStopRun:i,stoppingRunIds:a})})]})]}),T>Ub&&(0,K.jsx)(zb,{currentPage:d,totalItems:T,itemsPerPage:Ub,onPageChange:f,className:`mt-3`})]})})()]})}function Gb({icon:e,count:t,label:n,colorClass:r,bgClass:i,pulse:a,active:o,onClick:s}){let c=!!s;return(0,K.jsxs)(`div`,{role:c?`button`:void 0,tabIndex:c?0:void 0,onClick:s,onKeyDown:c?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s?.(e))}:void 0,className:q(`rounded-md px-2.5 py-1.5 flex items-center gap-2 transition-all`,i,c&&`cursor-pointer hover:opacity-80`,o&&`ring-2 ring-offset-1 ring-offset-card`,o&&r.replace(`text-`,`ring-`).replace(/\/\d+$/,`/50`)),children:[(0,K.jsx)(`span`,{className:q(r,a&&`animate-pulse`),children:e}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:q(`text-sm font-bold tabular-nums leading-none`,r),children:t}),(0,K.jsx)(`p`,{className:`text-xs leading-tight text-foreground-muted uppercase tracking-wider`,children:n})]})]})}function Kb(){return(0,K.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:[1,2,3].map(e=>(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 animate-pulse`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,K.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-foreground-muted/20`}),(0,K.jsx)(`div`,{className:`h-4 w-32 rounded bg-foreground-muted/10`})]}),(0,K.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-foreground-muted/10 mb-3`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`h-5 w-16 rounded-full bg-foreground-muted/10`}),(0,K.jsx)(`div`,{className:`h-5 w-16 rounded-full bg-foreground-muted/10`}),(0,K.jsx)(`div`,{className:`h-3 w-12 rounded bg-foreground-muted/10`})]})]},e))})}function qb({error:e}){return(0,K.jsxs)(`div`,{"data-testid":`error-banner`,className:`rounded-lg border border-error/20 bg-error-muted p-4 text-sm text-error`,children:[`Failed to load projects: `,e]})}function Jb(){return(0,K.jsxs)(`div`,{"data-testid":`empty-state`,className:`text-center py-16`,children:[(0,K.jsx)(op,{className:`h-10 w-10 text-foreground-muted/30 mx-auto mb-3`}),(0,K.jsx)(`p`,{className:`text-sm text-foreground-muted mb-1`,children:`No projects found`}),(0,K.jsxs)(`p`,{className:`text-xs text-foreground-muted/60`,children:[`Configure watch sources in`,` `,(0,K.jsx)(`button`,{onClick:()=>window.dispatchEvent(new CustomEvent(`open-settings`)),className:`text-primary hover:underline`,children:`Settings`}),` `,`or edit `,(0,K.jsx)(`span`,{className:`font-mono`,children:`~/.a5c/kanban.json`})]})]})}function Yb(){return(0,K.jsxs)(`div`,{"data-testid":`idle-empty-state`,className:`text-center py-16`,children:[(0,K.jsx)(Qf,{className:`h-10 w-10 text-foreground-muted/30 mx-auto mb-3`}),(0,K.jsx)(`p`,{className:`text-sm text-foreground-muted mb-1`,children:`All quiet — no active orchestration runs`}),(0,K.jsx)(`p`,{className:`text-xs text-foreground-muted/60`,children:`Dispatches will appear here when babysitter processes are started`})]})}function Xb({loading:e,error:t,filteredProjects:n,activeProjects:r,historyProjects:i,statusFilter:a,sortMode:o,cardStatusFilter:s,historyCollapsed:c,onHistoryCollapsedChange:l,onHideProject:u,onStopRun:d,stoppingRunIds:f}){return e?(0,K.jsx)(Kb,{}):t?(0,K.jsx)(qb,{error:t}):n.length===0?(0,K.jsx)(Jb,{}):(0,K.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[r.length===0&&i.length===0&&(0,K.jsx)(Yb,{}),r.length===0&&i.length>0&&(a===`all`||a===`stale`)&&(0,K.jsxs)(`div`,{"data-testid":`idle-with-history-banner`,className:`flex items-center gap-2 px-3 py-2 rounded-md bg-background-secondary/50 border border-border w-fit`,children:[(0,K.jsx)(Ef,{className:`h-3.5 w-3.5 text-foreground-muted/50`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-muted`,children:o===`activity`?`No activity in the last 24 hours`:`No dispatches in progress`})]}),r.length>0&&(a===`all`||a===`stale`||a===`waiting`)&&(0,K.jsx)(cb,{section:`Active Dispatches`,children:(0,K.jsxs)(`section`,{"data-testid":`active-runs-section`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[o===`activity`?(0,K.jsx)(Kf,{className:`h-4 w-4 text-primary`}):(0,K.jsx)(Ef,{className:`h-4 w-4 text-warning animate-pulse-dot`}),(0,K.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:o===`activity`?`Recent Activity`:`In Progress`}),(0,K.jsx)(`span`,{className:q(`rounded-full px-2 py-px text-xs font-semibold tabular-nums`,o===`activity`?`bg-primary/10 border border-primary/20 text-primary`:`bg-warning/10 border border-warning/20 text-warning`),children:r.length})]}),(0,K.jsx)(`div`,{"data-testid":`project-grid-active`,className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:r.map(e=>(0,K.jsx)(Wb,{project:e,statusFilter:s,sortMode:o,onHide:u,onStopRun:d,stoppingRunIds:f},e.projectName))})]})}),(a===`completed`||a===`failed`)&&(0,K.jsx)(cb,{section:`Filtered Results`,children:(0,K.jsx)(`div`,{"data-testid":`project-grid-filtered`,className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:n.map(e=>(0,K.jsx)(Wb,{project:e,statusFilter:s,sortMode:o,onStopRun:d,stoppingRunIds:f},e.projectName))})}),i.length>0&&(a===`all`||a===`stale`)&&(0,K.jsx)(cb,{section:`Recent History`,children:(0,K.jsxs)(`section`,{"data-testid":`recent-history-section`,children:[(0,K.jsxs)(`button`,{onClick:()=>l(e=>!e),className:`flex items-center gap-2 mb-3 group w-fit`,children:[(0,K.jsx)(up,{className:`h-4 w-4 text-foreground-muted/70`}),(0,K.jsx)(`h2`,{className:`text-sm font-semibold text-foreground-muted group-hover:text-foreground-secondary transition-colors`,children:o===`activity`?`Earlier`:`Recent History`}),(0,K.jsx)(`span`,{className:`rounded-full bg-background-secondary border border-border px-2 py-px text-xs font-semibold text-foreground-muted tabular-nums`,children:i.length}),c?(0,K.jsx)(If,{className:`h-3.5 w-3.5 text-foreground-muted/60 group-hover:text-foreground-muted transition-colors`}):(0,K.jsx)(zf,{className:`h-3.5 w-3.5 text-foreground-muted/60 group-hover:text-foreground-muted transition-colors`})]}),!c&&(0,K.jsx)(`div`,{className:`opacity-70`,children:(0,K.jsx)(`div`,{"data-testid":`project-grid-history`,className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 items-start`,children:i.map(e=>(0,K.jsx)(Wb,{project:e,statusFilter:s,sortMode:o,onStopRun:d,stoppingRunIds:f},e.projectName))})})]})})]})}var Zb=[{label:`All`,value:`all`},{label:`Running`,value:`waiting`},{label:`Stale`,value:`stale`},{label:`Completed`,value:`completed`},{label:`Failed`,value:`failed`}];function Qb({statusFilter:e,onStatusFilterChange:t,filterCounts:n,sortMode:r,onSortModeToggle:i,filteredProjectCount:a}){return(0,K.jsx)(`div`,{className:`mb-5`,children:(0,K.jsxs)(`div`,{"data-testid":`filter-bar`,className:`flex items-center gap-1`,children:[Zb.map(r=>{let i=n[r.value]??0;return r.value===`stale`&&i===0?null:(0,K.jsxs)(`button`,{"data-testid":`filter-pill-${r.value}`,"aria-pressed":e===r.value,onClick:()=>t(r.value),className:q(`rounded-md px-3 py-1.5 min-h-[44px] text-xs font-medium transition-all inline-flex items-center gap-1.5`,e===r.value?r.value===`stale`?`bg-zinc-500/10 text-zinc-500`:`bg-primary/10 text-primary shadow-neon-glow-primary-xs`:`text-foreground-muted hover:text-foreground-secondary hover:bg-background-secondary`),children:[r.label,i>0&&(0,K.jsx)(`span`,{className:q(`rounded-full px-1.5 py-px text-xs leading-tight font-semibold tabular-nums`,e===r.value?r.value===`stale`?`bg-zinc-500/20 text-zinc-500`:`bg-primary/20 text-primary`:`bg-background-secondary text-foreground-muted`),children:i})]},r.value)}),(0,K.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,K.jsxs)(`button`,{"data-testid":`sort-toggle`,onClick:i,className:q(`rounded-md px-2.5 py-1.5 min-h-[44px] text-xs font-medium inline-flex items-center gap-1.5`,`transition-all duration-200 ease-in-out`,r===`status`?`bg-warning/10 border border-warning/30 text-warning hover:bg-warning/15 hover:border-warning/40 shadow-sm`:`bg-primary/10 border border-primary/30 text-primary hover:bg-primary/15 hover:border-primary/40 shadow-sm`),title:r===`status`?`Currently sorting by status priority (active first, then failed, then completed). Click to switch to chronological activity view.`:`Currently sorting by most recent activity (newest updates first). Click to switch to status-grouped view.`,children:[r===`status`?(0,K.jsx)(jf,{className:`h-3 w-3 transition-transform duration-200`}):(0,K.jsx)(Kf,{className:`h-3 w-3 transition-transform duration-200`}),r===`status`?`By Status`:`By Activity`]}),(0,K.jsxs)(`span`,{"data-testid":`project-count`,className:`text-xs text-foreground-muted tabular-nums`,children:[a,` project`,a===1?``:`s`]})]})]})})}function $b(e,t){return`/projects/${encodeURIComponent(e)}/issues/${encodeURIComponent(t)}`}function ex(e){return`/projects/${encodeURIComponent(e)}/board`}function tx(e){return e===`azure-repos`?`Azure Repos`:`GitHub`}function nx(e){return e.mode===`issue`&&e.issueKey?e.issueKey:e.mode===`host`&&e.projectKey&&e.hostProvider?`${e.projectKey}-${e.hostProvider}`:e.projectKey??`workspace`}function rx(e){let t=Be(),{snapshot:n,loading:r,error:i}=Zm(),[a,o]=(0,b.useState)(e.projectId??``),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(``),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(null),h=n?.projects??[],g=(0,b.useMemo)(()=>h.find(e=>e.id===a)??(e.projectId?void 0:h[0]),[h,e.projectId,a]),_=(0,b.useMemo)(()=>e.issueId?n?.issues.find(t=>t.id===e.issueId&&(!g||t.projectId===g.id)):void 0,[e.issueId,g,n?.issues]),v=g?.integrations??[];(0,b.useEffect)(()=>{!a&&g?.id&&o(g.id)},[g?.id,a]),(0,b.useEffect)(()=>{if(v.length===0){c(``);return}s&&v.some(e=>e.provider===s)||c((v.find(e=>e.prerequisites.every(e=>e.satisfied))??v[0])?.provider??``)},[v,s]),(0,b.useEffect)(()=>{u(nx({mode:e.mode,projectKey:g?.key,issueKey:_?.key,hostProvider:s||void 0}))},[e.mode,s,_?.key,g?.key]);let y=(0,b.useMemo)(()=>v.find(e=>e.provider===s),[v,s]),x=e.mode===`issue`?`Create issue-owned workspace`:e.mode===`project`?`Create project-owned workspace`:`Create host-scoped workspace`,S=e.mode===`issue`?`This route provisions a workspace from the current issue and redirects directly into the workspace shell.`:e.mode===`project`?`This route provisions a workspace owned by the current project without requiring an issue-first entry point.`:`This route starts from the workspace host surface and still records the selected project and host context explicitly.`,C=e.mode===`issue`&&_?$b(_.projectId,_.id):g?ex(g.id):`/workspaces`;async function w(n){if(n.preventDefault(),!(!g||!l.trim())){f(!0),m(null);try{let n=await fetch(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`provision`,scope:e.mode,projectId:g.id,issueId:e.mode===`issue`?_?.id:void 0,hostProvider:(e.mode===`host`||e.mode,s||void 0),workspaceName:l.trim()})});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.error??`Workspace provisioning failed: ${n.status}`)}let r=await n.json();t(`/workspaces?workspace=${encodeURIComponent(r.workspace.workspacePath)}`)}catch(e){m(e instanceof Error?e.message:String(e))}finally{f(!1)}}}return r&&!n?(0,K.jsx)(`div`,{className:`mx-auto flex w-full max-w-[960px] flex-1 px-4 py-6 sm:px-6`,children:(0,K.jsxs)(`section`,{className:`w-full animate-pulse rounded-3xl border border-border bg-card p-6`,children:[(0,K.jsx)(`div`,{className:`h-5 w-48 rounded bg-background-secondary`}),(0,K.jsx)(`div`,{className:`mt-4 h-20 rounded-2xl bg-background-secondary`})]})}):i||!n?(0,K.jsx)(`div`,{className:`mx-auto flex w-full max-w-[960px] flex-1 px-4 py-6 sm:px-6`,children:(0,K.jsx)(`section`,{className:`w-full rounded-3xl border border-error/25 bg-error-muted p-6 text-sm text-error`,children:`Failed to load workspace provisioning context.`})}):(0,K.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[960px] flex-1 flex-col gap-6 px-4 py-6 sm:px-6`,children:[(0,K.jsxs)(`section`,{className:`rounded-3xl border border-border bg-card p-6 shadow-lg`,children:[(0,K.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-primary/80`,children:`Workspace provisioning`}),(0,K.jsx)(`h1`,{className:`mt-2 text-3xl font-semibold tracking-tight text-foreground`,children:x}),(0,K.jsx)(`p`,{className:`mt-3 max-w-3xl text-sm leading-6 text-foreground-muted`,children:S})]}),(0,K.jsx)(`section`,{className:`rounded-3xl border border-border bg-card p-6 shadow-lg`,children:(0,K.jsxs)(`form`,{className:`grid gap-5`,onSubmit:w,children:[e.mode===`host`?(0,K.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium text-foreground`,children:[`Project`,(0,K.jsx)(`select`,{value:a,onChange:e=>o(e.target.value),className:`h-11 rounded-xl border border-border bg-background px-3 text-sm text-foreground`,children:h.map(e=>(0,K.jsxs)(`option`,{value:e.id,children:[e.key,` - `,e.name]},e.id))})]}):null,g?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/70 p-4 text-sm text-foreground-muted`,children:[(0,K.jsx)(`div`,{className:`font-semibold text-foreground`,children:g.key}),(0,K.jsx)(`div`,{className:`mt-1`,children:g.name}),_?(0,K.jsxs)(`div`,{className:`mt-3 rounded-xl border border-border bg-card px-3 py-2 text-xs text-foreground-muted`,children:[`Issue owner: `,(0,K.jsx)(`span`,{className:`font-semibold text-foreground`,children:_.key}),` ·`,` `,_.title]}):null]}):null,v.length>0?(0,K.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium text-foreground`,children:[`Host context`,(0,K.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),className:`h-11 rounded-xl border border-border bg-background px-3 text-sm text-foreground`,children:v.map(e=>(0,K.jsxs)(`option`,{value:e.provider,children:[e.label,` · `,e.accountLabel??e.status]},e.provider))})]}):null,y?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/70 p-4 text-sm text-foreground-muted`,children:[(0,K.jsxs)(`div`,{className:`font-semibold text-foreground`,children:[tx(y.provider),` ownership metadata will be attached`]}),(0,K.jsx)(`div`,{className:`mt-1`,children:y.guidance})]}):null,(0,K.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium text-foreground`,children:[`Workspace name`,(0,K.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),className:`h-11 rounded-xl border border-border bg-background px-3 text-sm text-foreground outline-none`,placeholder:`workspace name`})]}),p?(0,K.jsx)(`div`,{className:`rounded-2xl border border-error/25 bg-error-muted px-4 py-3 text-sm text-error`,children:p}):null,(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,K.jsx)(J,{type:`submit`,variant:`primary`,disabled:!g||!l.trim(),loading:d,children:`Create workspace`}),(0,K.jsx)(J,{variant:`ghost`,onClick:()=>t(C),children:`Cancel`})]})]})})]})}function ix(e){return Array.from(new Set(e.map(e=>e.labelId?.trim()||``).filter(Boolean))).map(e=>({labelId:e}))}function ax(e){let t=Array.from(new Set(e.labelIds??[])),n=e.labels??[],r=e.projectKey?.trim()?e.projectName?.trim()?`${e.projectKey} (${e.projectName})`:e.projectKey:e.projectName?.trim()||e.projectId,i=n.length>0?n.map(e=>`- ${e.key} (${e.labelId}): ${e.label}`).join(`
32
32
  `):t.length>0?t.map(e=>`- ${e}`).join(`
33
33
  `):`- none`,a=e.renderedContext?.trim()||`- none`,o=(e.runIds??[]).length>0?(e.runIds??[]).join(`, `):`none`,s=(e.sessionIds??[]).length>0?(e.sessionIds??[]).join(`, `):`none`;return[`Execution Context`,`Project: ${r}`,`Issue: ${e.issueKey} (${e.issueId})`,`Title: ${e.issueTitle}`,`Applied Dispatch Context Labels (${t.length}):`,i,`Run IDs: ${o}`,`Session IDs: ${s}`,`Last Dispatched At: ${e.lastDispatchedAt??`none`}`,`Rendered Dispatch Context:`,a].join(`
34
34
  `)}function ox(e){let t=ix(e.issue.dispatch.contextLabels).map(e=>e.labelId),n=e.issue.dispatch.contextLabelProjections??[],r=e.issue.dispatch.renderedContext?.trim()||void 0;if(!(t.length===0&&n.length===0&&!r))return{kind:`dispatch-context-labels`,project:{id:e.project?.id??e.issue.projectId,key:e.project?.key,name:e.project?.name},issue:{id:e.issue.id,key:e.issue.key,title:e.issue.title},dispatch:{runIds:Array.from(new Set(e.issue.dispatch.runIds??[])),sessionIds:Array.from(new Set(e.issue.dispatch.sessionIds??[])),labelIds:t,labels:n,renderedContext:r,lastDispatchedAt:e.issue.dispatch.lastDispatchedAt},block:ax({projectId:e.project?.id??e.issue.projectId,projectKey:e.project?.key,projectName:e.project?.name,issueId:e.issue.id,issueKey:e.issue.key,issueTitle:e.issue.title,runIds:e.issue.dispatch.runIds,sessionIds:e.issue.dispatch.sessionIds,labelIds:t,labels:n,renderedContext:r,lastDispatchedAt:e.issue.dispatch.lastDispatchedAt})}}function sx(e,t){let n=new Map(e.projects.map(e=>[e.id,e]));return e.issues.filter(t).map(e=>ox({issue:e,project:n.get(e.projectId)})).filter(e=>!!e).sort((e,t)=>e.issue.key.localeCompare(t.issue.key)||e.issue.id.localeCompare(t.issue.id))}function cx(e,t){let n=t.trim();return n?sx(e,e=>e.dispatch.sessionIds.includes(n)):[]}function lx(e){return e?new Date(e).toLocaleString():`Unavailable`}function ux(e){return!e||!Number.isFinite(e)?`Unavailable`:new Date(e).toLocaleString()}function dx(e){return e===`success`?`border-success/20 bg-success/10 text-success`:e===`warning`?`border-warning/20 bg-warning/10 text-warning`:e===`error`?`border-error/20 bg-error/10 text-error`:`border-border text-foreground-muted`}function fx(e){return e===`approved`||e===`ready`||e===`passing`||e===`published`||e===`merged`?`border-success/20 bg-success/10 text-success`:e===`pending`||e===`in-review`?`border-warning/20 bg-warning/10 text-warning`:e===`changes-requested`||e===`blocked`||e===`failing`||e===`failed`?`border-error/20 bg-error/10 text-error`:`border-border text-foreground-muted`}function px(e){return e===`azure-repos`?`Azure Repos`:`GitHub`}function mx(e){return e?[...e.terminal.commands].sort((e,t)=>t.startedAt-e.startedAt)[0]??null:null}function hx(e){return[...e].sort((e,t)=>{let n=e=>e===`running`||e===`pending`||e===`waiting`?0:e===`failed`?1:e===`completed`?2:3,r=n(e.status)-n(t.status);return r===0?e.runId.localeCompare(t.runId):r})}function gx(e){return e===`active`||e===`running`||e===`ready`||e===`completed`?`success`:e===`starting`||e===`pending`||e===`queued`?`warning`:e===`inactive`||e===`failed`||e===`error`||e===`blocked`?`error`:`neutral`}function _x(e){let t=Be(),n=e.workspace.notes?.value??``,r=e.workspace.notes?.updatedAt??null,[i,a]=(0,b.useState)(n),o=(0,b.useMemo)(()=>mx(e.runtime),[e.runtime]),s=e.reviewArtifact?.linkedPullRequest,c=e.reviewArtifact?.integration,l=e.runtime?.preview.primaryUrl??e.runtime?.devServer.primaryUrl??null,u=e.workspace.git.root?.split(`/`).filter(Boolean).at(-1)??`Unavailable`,d=!e.workspace.git.root||!e.workspace.git.branch,f=e.workspace.git.uncommittedCount,p=e.workspace.links?.editorHref??null,m=e.workspace.sessions.items.find(t=>t.sessionId===e.sessionId)??(e.sessionId==null?e.workspace.sessions.items[0]??null:null),h=(0,b.useMemo)(()=>hx(e.workspace.runs.items??[]).slice(0,3),[e.workspace.runs.items]),g=h[0]??null,_=e.workspace.git.ahead==null||e.workspace.git.behind==null?`No upstream tracking`:`${e.workspace.git.ahead} ahead / ${e.workspace.git.behind} behind`,[v,y]=(0,b.useState)(c?.provider??s?.provider??`github`),[x,S]=(0,b.useState)(s?.branchName??e.workspace.git.branch??e.workspace.name),[C,w]=(0,b.useState)(s?.baseBranch??e.workspace.git.trackingBranch?.split(`/`).at(-1)??`main`),[T,E]=(0,b.useState)(s?.title??`${e.workspace.name}: ${e.workspace.git.branch??`workspace`} review`),[D,O]=(0,b.useState)(`kanban-maintainers`),[k,A]=(0,b.useState)(s?.number?String(s.number):``),[j,M]=(0,b.useState)(s?.title??``),N=(0,b.useMemo)(()=>[...e.reviewArtifact?.comments??[]].slice(-2).reverse(),[e.reviewArtifact?.comments]),P=!!(e.runtime||o),ee=!!(e.reviewArtifact||s||c||N.length>0);(0,b.useEffect)(()=>{a(n)},[n,e.workspace.path]),(0,b.useEffect)(()=>{y(c?.provider??s?.provider??`github`),S(s?.branchName??e.workspace.git.branch??e.workspace.name),w(s?.baseBranch??e.workspace.git.trackingBranch?.split(`/`).at(-1)??`main`),E(s?.title??`${e.workspace.name}: ${e.workspace.git.branch??`workspace`} review`),A(s?.number?String(s.number):``),M(s?.title??``)},[c?.provider,s?.baseBranch,s?.branchName,s?.number,s?.provider,s?.title,e.workspace.git.branch,e.workspace.git.trackingBranch,e.workspace.name]);let F=t=>`${t}:${e.workspace.path}`,I=e.pendingAction!=null||e.reviewPending;return(0,K.jsxs)(`aside`,{className:`rounded-[28px] border border-border bg-card p-4 shadow-lg`,"aria-label":`Workspace details for ${e.workspace.name}`,children:[(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.22em] text-primary/80`,children:`Workspace`}),(0,K.jsx)(`h2`,{className:`mt-2 text-lg font-semibold tracking-tight`,children:`Context and handoff`})]}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2.5 py-1 text-[11px] text-foreground-muted`,children:e.workspace.status})]}),(0,K.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,K.jsx)(vx,{title:`Status`,icon:Bf,children:(0,K.jsxs)(`div`,{className:`space-y-3`,"data-testid":`workspace-status-panel`,children:[m?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card/80 px-3 py-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:q(`rounded-full border px-2 py-0.5`,dx(gx(e.sessionStatus??m.status))),children:e.sessionStatus??m.status}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-foreground-muted`,children:m.agent})]}),(0,K.jsx)(`p`,{className:`mt-2 text-sm font-semibold text-foreground`,children:m.title??m.sessionId}),(0,K.jsxs)(`p`,{className:`mt-1 text-xs text-foreground-muted`,children:[`Session `,m.sessionId]}),(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:(0,K.jsx)(J,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>t(`/sessions/${m.sessionId}`),children:`Open session`})})]}):(0,K.jsx)(xx,{tone:`neutral`,title:`No active session selected`,body:`Select a session to align this sidebar with the chat and runtime panels.`}),e.runtime?(0,K.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,K.jsx)(bx,{label:`Runtime updated`,value:ux(e.runtime.updatedAt)}),(0,K.jsx)(bx,{label:`Terminal`,value:`${e.runtime.terminal.status} · ${e.runtime.terminal.commands.length} command${e.runtime.terminal.commands.length===1?``:`s`}`}),(0,K.jsx)(bx,{label:`Dev server`,value:e.runtime.devServer.status}),(0,K.jsx)(bx,{label:`Preview`,value:l?`Available`:`Unavailable`})]}):(0,K.jsx)(xx,{tone:`error`,title:`Runtime disconnected`,body:`Runtime, terminal, and preview status will appear here when the selected session publishes again.`}),g?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card/80 px-3 py-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-foreground-muted`,children:`Recent dispatches`}),(0,K.jsx)(`span`,{className:q(`rounded-full border px-2 py-0.5`,fx(g.status)),children:g.status})]}),(0,K.jsx)(`div`,{className:`mt-3 grid gap-2`,children:h.map(t=>(0,K.jsx)(G,{to:`/dispatches/${encodeURIComponent(t.runId)}`,"data-testid":`workspace-status-run-${t.runId}`,className:`rounded-xl border border-border bg-background/70 px-3 py-2 transition-colors hover:border-primary/30`,children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`font-mono text-xs text-primary`,children:t.runId}),(0,K.jsx)(`span`,{className:q(`rounded-full border px-2 py-0.5 text-[11px]`,fx(t.status)),children:t.status})]})},`${e.workspace.path}:${t.runId}`))})]}):(0,K.jsx)(xx,{tone:`neutral`,title:`No workspace dispatches yet`,body:`Dispatch status will appear here once this workspace starts publishing executions.`})]})}),(0,K.jsx)(vx,{title:`Git`,icon:sp,children:d?(0,K.jsx)(xx,{tone:`error`,title:`Repository metadata unavailable`,body:`The workspace path exists, but git root or branch metadata could not be resolved.`}):(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsx)(bx,{label:`Repository`,value:u,mono:!1}),(0,K.jsx)(bx,{label:`Branch`,value:e.workspace.git.branch??`Unavailable`,mono:!0}),(0,K.jsx)(bx,{label:`Tracking`,value:e.workspace.git.trackingBranch??`Unavailable`,mono:!0}),(0,K.jsx)(bx,{label:`Sync`,value:_}),(0,K.jsx)(bx,{label:`Uncommitted`,value:f==null?`Unavailable`:f===0?`0 changes`:`${f} change${f===1?``:`s`}`})]})}),P?(0,K.jsx)(yx,{title:`Terminal`,summary:o?`Most recent command and captured output`:`Runtime shell output is available`,defaultOpen:!!o,children:e.runtime?o?(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`span`,{className:q(`rounded-full border px-2 py-0.5 text-[11px] uppercase`,dx(o.status===`completed`?`success`:o.status===`failed`?`error`:`warning`)),children:o.status}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-[11px] text-foreground-muted`,children:o.source}),o.toolName?(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-[11px] text-foreground-muted`,children:o.toolName}):null]}),(0,K.jsx)(`pre`,{className:`overflow-x-auto rounded-2xl border border-border bg-slate-950 px-3 py-2 text-xs text-slate-100`,children:o.command}),(0,K.jsxs)(`p`,{className:`text-xs text-foreground-muted`,children:[`Captured `,ux(o.startedAt),o.exitCode==null?``:` · exit ${o.exitCode}`]}),o.logs.length>0?(0,K.jsx)(`div`,{className:`rounded-2xl border border-border bg-background/80 px-3 py-2 text-xs text-foreground-muted`,children:o.logs.slice(-2).map((e,t)=>(0,K.jsxs)(`p`,{className:`break-words`,children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.stream}),`: `,e.text]},`${e.timestamp}:${t}`))}):(0,K.jsx)(xx,{tone:`neutral`,title:`No command output yet`,body:`The runtime captured the command but has not attached log lines.`})]}):(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(xx,{tone:`neutral`,title:`No terminal activity yet`,body:`The selected session has not published a captured command yet.`}),(0,K.jsx)(`pre`,{className:`overflow-x-auto rounded-2xl border border-border bg-background/80 px-3 py-2 text-xs text-foreground-muted`,children:`cd ${e.workspace.path}\ngit status --short`})]}):(0,K.jsx)(xx,{tone:`error`,title:`Runtime disconnected`,body:`No active runtime is currently publishing shell state for this workspace.`})}):null,(0,K.jsx)(vx,{title:`Notes`,icon:np,children:(0,K.jsxs)(`div`,{className:`space-y-3`,children:[n.trim().length===0?(0,K.jsx)(xx,{tone:`neutral`,title:`No workspace notes yet`,body:`Capture next steps, blockers, or handoff notes for this workspace.`}):(0,K.jsxs)(`p`,{className:`text-xs text-foreground-muted`,children:[`Last updated `,lx(r)]}),(0,K.jsx)(`textarea`,{value:i,onChange:e=>a(e.target.value),className:`min-h-28 w-full rounded-2xl border border-border bg-background/80 px-3 py-2 text-sm outline-none transition focus:border-primary/50`,placeholder:`Add workspace notes, follow-up context, or handoff details.`,"aria-label":`Notes for ${e.workspace.name}`}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(J,{type:`button`,size:`sm`,variant:`ghost`,disabled:e.notesSaving,onClick:()=>e.onSaveNote(e.workspace,i),children:[e.notesSaving?(0,K.jsx)(vp,{className:`mr-2 h-4 w-4 animate-spin`}):null,`Save note`]}),(0,K.jsx)(J,{type:`button`,size:`sm`,variant:`ghost`,disabled:e.notesSaving||i.length===0,onClick:()=>e.onSaveNote(e.workspace,``),children:`Clear`})]})]})}),(0,K.jsx)(yx,{title:`Pull request`,summary:s?`Linked review state and status`:`Create or attach a pull request only when needed`,defaultOpen:ee,children:(0,K.jsxs)(`div`,{className:`space-y-3`,children:[s?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card/80 px-3 py-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,K.jsxs)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-foreground-muted`,children:[px(s.provider),` PR `,s.number?`#${s.number}`:``]}),(0,K.jsx)(`span`,{className:q(`rounded-full border px-2 py-0.5`,fx(s.status)),children:s.status}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-foreground-muted`,children:s.linkState===`partially-linked`?`partially linked`:s.linkState})]}),(0,K.jsx)(`h4`,{className:`mt-2 text-sm font-semibold`,children:s.title}),(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 text-xs`,children:[s.reviewStatus?(0,K.jsxs)(`span`,{className:q(`rounded-full border px-2 py-0.5`,fx(s.reviewStatus)),children:[`Review `,s.reviewStatus]}):null,s.mergeStatus?(0,K.jsxs)(`span`,{className:q(`rounded-full border px-2 py-0.5`,fx(s.mergeStatus)),children:[`Merge `,s.mergeStatus]}):null,s.publishStatus?(0,K.jsxs)(`span`,{className:q(`rounded-full border px-2 py-0.5`,fx(s.publishStatus)),children:[`Publish `,s.publishStatus]}):null]}),s.ciGates?.length?(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2 text-xs`,children:s.ciGates.map(t=>(0,K.jsxs)(`span`,{className:q(`rounded-full border px-2 py-0.5`,fx(t.status)),children:[t.name,`: `,t.status]},`${e.workspace.path}-${t.id}`))}):null,(0,K.jsx)(`p`,{className:`mt-3 text-xs text-foreground-muted`,children:c?.guidance??s.guidance??`No linked PR guidance available.`}),(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:s.url?(0,K.jsxs)(J,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>window.open(s.url,`_blank`,`noopener,noreferrer`),children:[`Open PR`,(0,K.jsx)(Xf,{className:`ml-2 h-4 w-4`})]}):null})]}):(0,K.jsx)(xx,{tone:`neutral`,title:`No linked PR yet`,body:`Create a PR from this workspace or attach an existing one to keep review and merge status visible.`}),c?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/70 px-3 py-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-foreground-muted`,children:px(c.provider)}),(0,K.jsx)(`span`,{className:q(`rounded-full border px-2 py-0.5`,fx(c.status)),children:c.status.replace(/-/g,` `)})]}),(0,K.jsx)(`p`,{className:`mt-2 text-xs text-foreground-muted`,children:c.guidance}),c.actions.reason?(0,K.jsx)(`div`,{className:`mt-3 rounded-xl border border-warning/20 bg-warning/10 px-3 py-2 text-xs text-warning`,children:c.actions.reason}):null,c.missingScopes?.length?(0,K.jsxs)(`div`,{className:`mt-2 rounded-xl border border-warning/20 bg-warning/10 px-3 py-2 text-xs text-warning`,children:[`Missing scopes: `,c.missingScopes.join(`, `)]}):null]}):null,s?null:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`form`,{className:`grid gap-3`,onSubmit:t=>{t.preventDefault(),e.onCreatePullRequest(e.workspace,{provider:v,title:T,reviewers:D,branchName:x,baseBranch:C})},children:[(0,K.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Provider`,(0,K.jsx)(`div`,{className:`mt-2`,children:(0,K.jsx)(en,{value:v,onChange:e=>y(e===`azure-repos`?`azure-repos`:`github`),options:[{label:`GitHub`,value:`github`},{label:`Azure Repos`,value:`azure-repos`}]})})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Branch`,(0,K.jsx)(`input`,{value:x,onChange:e=>S(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Base branch`,(0,K.jsx)(`input`,{value:C,onChange:e=>w(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`Reviewers`,(0,K.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`})]})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`PR title`,(0,K.jsx)(`input`,{value:T,onChange:e=>E(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`})]}),(0,K.jsx)(J,{type:`submit`,size:`sm`,disabled:I||(c?!c.actions.canCreatePullRequest:!1),children:`Create PR`})]}),(0,K.jsxs)(`form`,{className:`grid gap-3 rounded-2xl border border-border bg-background/70 px-3 py-3`,onSubmit:t=>{t.preventDefault(),e.onLinkPullRequest(e.workspace,{provider:v,number:Number(k),title:j,branchName:x,baseBranch:C})},children:[(0,K.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.18em] text-foreground-muted`,children:`Link existing PR`}),(0,K.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`PR number`,(0,K.jsx)(`input`,{type:`number`,min:1,value:k,onChange:e=>A(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`})]}),(0,K.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-[0.16em] text-foreground-muted`,children:[`PR title`,(0,K.jsx)(`input`,{value:j,onChange:e=>M(e.target.value),className:`mt-2 h-11 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`})]})]}),(0,K.jsx)(J,{type:`submit`,size:`sm`,variant:`ghost`,disabled:I||(c?!c.actions.canManagePullRequest:!1),children:`Link PR`})]})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/70 px-3 py-3`,children:[(0,K.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.18em] text-foreground-muted`,children:`Review feedback`}),N.length>0?(0,K.jsx)(`div`,{className:`mt-3 space-y-2`,children:N.map(t=>(0,K.jsxs)(`div`,{className:`rounded-xl border border-border bg-card/80 px-3 py-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-[11px] text-foreground-muted`,children:[(0,K.jsx)(`span`,{children:t.author.name}),(0,K.jsx)(`span`,{children:t.anchor.filePath}),(0,K.jsxs)(`span`,{children:[t.anchor.side,`:`,t.anchor.line]})]}),(0,K.jsx)(`p`,{className:`mt-1 text-sm text-foreground`,children:t.body})]},`${e.workspace.path}-${t.id}`))}):(0,K.jsx)(`p`,{className:`mt-2 text-xs text-foreground-muted`,children:`No review comments have been mapped back to this workspace yet.`})]})]})}),(0,K.jsx)(vx,{title:`Actions`,icon:om,children:(0,K.jsxs)(`div`,{className:`space-y-3`,children:[e.workspace.rebase?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card/80 px-3 py-3`,children:[(0,K.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.18em] text-foreground-muted`,children:`Rebase workflow`}),(0,K.jsx)(`h4`,{className:`mt-1 text-sm font-semibold`,children:e.workspace.rebase.status===`rebase-needed`?`Rebase required before this workspace can move forward`:e.workspace.rebase.status===`rebase-conflicts`?`Resolve conflicts before returning to review or merge`:`Ready for ${e.workspace.rebase.readyFor}`}),(0,K.jsxs)(`p`,{className:`mt-1 text-xs text-foreground-muted`,children:[`Attempt `,e.workspace.rebase.attemptCount," · target `",e.workspace.rebase.targetBranch??`main`,"`"]}),e.workspace.rebase.followUpInstructions.length>0?(0,K.jsx)(`div`,{className:`mt-3 grid gap-2 text-xs text-foreground-muted`,children:e.workspace.rebase.followUpInstructions.map(e=>(0,K.jsx)(`div`,{className:`rounded-xl border border-border bg-background/70 px-3 py-2`,children:e},e))}):null]}):null,(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(J,{type:`button`,size:`sm`,variant:`default`,onClick:()=>e.workspace.actions.canRebaseOpenInEditor?e.onAction(`rebase-open-in-editor`,e.workspace):e.onOpenInEditor(e.workspace,p),disabled:I||!p,children:`Open in editor`}),e.sessionId?(0,K.jsx)(J,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>t(`/sessions/${e.sessionId}`),children:`View session`}):null,l?(0,K.jsxs)(J,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>window.open(l,`_blank`,`noopener,noreferrer`),children:[`Open preview`,(0,K.jsx)(Xf,{className:`ml-2 h-4 w-4`})]}):(0,K.jsx)(J,{type:`button`,size:`sm`,variant:`ghost`,disabled:!0,children:`Open preview`})]}),e.workspace.rebase?(0,K.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[e.workspace.actions.canRebaseStart?(0,K.jsx)(Sx,{disabled:e.pendingAction===F(`rebase-start`),onClick:()=>e.onAction(`rebase-start`,e.workspace),children:`Retry rebase`}):null,e.workspace.actions.canRebaseAutoResolve?(0,K.jsx)(Sx,{disabled:e.pendingAction===F(`rebase-auto-resolve`),onClick:()=>e.onAction(`rebase-auto-resolve`,e.workspace),children:`Auto-resolve`}):null,e.workspace.actions.canRebaseMarkResolved?(0,K.jsx)(Sx,{disabled:e.pendingAction===F(`rebase-mark-resolved`),onClick:()=>e.onAction(`rebase-mark-resolved`,e.workspace),children:`Mark resolved`}):null,e.workspace.actions.canRebaseAbort?(0,K.jsx)(Sx,{disabled:e.pendingAction===F(`rebase-abort`),onClick:()=>e.onAction(`rebase-abort`,e.workspace),children:`Abort rebase`}):null]}):null,e.feedback?(0,K.jsx)(xx,{tone:e.feedback.tone,title:e.feedback.tone===`error`?`Action failed`:`Action updated`,body:e.feedback.message}):(0,K.jsx)(`p`,{className:`text-xs text-foreground-muted`,children:`Keep editor, preview, and rebase helpers close, without taking over the main workspace summary.`})]})})]})]})}function vx(e){let t=e.icon;return(0,K.jsxs)(`section`,{className:`rounded-2xl border border-border bg-background/60 p-3`,children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 text-xs font-semibold uppercase tracking-[0.18em] text-foreground-muted`,children:[(0,K.jsx)(t,{className:`h-4 w-4`}),(0,K.jsx)(`span`,{children:e.title})]}),e.children]})}function yx(e){let[t,n]=(0,b.useState)(e.defaultOpen??!1);return(0,b.useEffect)(()=>{n(e.defaultOpen??!1)},[e.defaultOpen,e.title]),(0,K.jsxs)(`section`,{className:`rounded-2xl border border-border bg-background/60 p-3`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-start justify-between gap-3 text-left`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-[0.18em] text-foreground-muted`,children:e.title}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-foreground-muted`,children:e.summary})]}),(0,K.jsx)(`span`,{className:`rounded-full border border-border px-2 py-0.5 text-[11px] text-foreground-muted`,children:t?`Hide`:`Show`})]}),t?(0,K.jsx)(`div`,{className:`mt-3`,children:e.children}):null]})}function bx(e){return(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card/80 px-3 py-2`,children:[(0,K.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-foreground-muted`,children:e.label}),(0,K.jsx)(`p`,{className:q(`mt-1 text-sm font-medium`,e.mono?`break-all font-mono text-xs`:``),children:e.value})]})}function xx(e){return(0,K.jsxs)(`div`,{className:q(`rounded-2xl border px-3 py-2`,dx(e.tone===`success`?`success`:e.tone===`error`?`error`:`neutral`)),children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[e.tone===`error`?(0,K.jsx)(Bf,{className:`h-4 w-4`}):e.tone===`success`?(0,K.jsx)(jf,{className:`h-4 w-4`}):null,(0,K.jsx)(`span`,{children:e.title})]}),(0,K.jsx)(`p`,{className:`mt-1 text-xs`,children:e.body})]})}function Sx(e){return(0,K.jsx)(J,{type:`button`,size:`sm`,variant:`ghost`,disabled:e.disabled,onClick:e.onClick,className:`justify-start`,children:e.children})}var Cx=[{key:`sidebar`,label:`Workspace`,shortcut:`Shift+W`,icon:wp},{key:`conversation`,label:`Chat`,shortcut:`Shift+C`,icon:Sp},{key:`context`,label:`Trace`,shortcut:`Shift+X`,icon:am},{key:`details`,label:`Runtime`,shortcut:`Shift+D`,icon:Tp}],wx={sidebar:22,conversation:58,context:12,details:8};function Tx(e,t){let n=e.ownership?.project?.projectId??e.issues?.find(e=>e.issueId===t)?.projectId;return n?`/projects/${encodeURIComponent(n)}/issues/${encodeURIComponent(t)}`:`/issues/${encodeURIComponent(t)}`}function Ex(e,t){let n=Yh(e);return n.includes(t)?t:n[0]}function Dx(e){return!e||!Number.isFinite(e)?`No live session heartbeat`:new Date(e).toLocaleString()}function Ox(e){return e===`active`?`border-success/20 bg-success/10 text-success`:`border-border text-foreground-muted`}function kx(e){let t=(0,b.useMemo)(()=>e.panels.map(t=>({id:t.key,label:t.label,shortcut:t.shortcut,group:`Panels`,onSelect:()=>{e.onTogglePanel(t.key),e.onOpenChange(!1)}})),[e]);return(0,K.jsx)(nn,{open:e.open,onClose:()=>e.onOpenChange(!1),items:t,placeholder:`Toggle workspace panels`})}function Ax(e){return(0,K.jsxs)(`section`,{"data-testid":`workspace-panel-${e.panelKey}`,className:`flex h-full min-h-0 flex-col rounded-3xl border border-border bg-card shadow-lg`,children:[(0,K.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,children:[(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-primary/80`,children:e.title}),e.subtitle?(0,K.jsx)(`div`,{className:`mt-1 text-sm text-foreground-muted`,children:e.subtitle}):null]}),(0,K.jsx)(`div`,{className:e.bodyClassName??`min-h-0 flex-1 overflow-auto p-4`,children:e.children})]})}function jx(e){return(0,K.jsx)(`button`,{type:`button`,"data-testid":e.testId,"aria-label":`Resize panels`,onMouseDown:e.onMouseDown,className:`group flex h-full w-full cursor-col-resize items-center justify-center rounded-full bg-transparent text-foreground-muted transition-colors hover:bg-primary/8 hover:text-primary`,children:(0,K.jsx)(cp,{className:`h-4 w-4`})})}function Mx(e){return(0,K.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border px-4 py-6 text-sm`,children:[(0,K.jsx)(`div`,{className:`font-medium text-foreground`,children:e.title}),(0,K.jsx)(`p`,{className:`mt-2 leading-6 text-foreground-muted`,children:e.body})]})}function Nx(e){let t=Be(),n=`workspace-detail-layout-v4.${e.workspace.path}`,[r,i]=Wh(`${n}.sidebar-open`,!0),[a,o]=Wh(`${n}.conversation-open`,!0),[s,c]=Wh(`${n}.context-open`,!1),[l,u]=Wh(`${n}.details-open`,!1),[d,f]=Wh(`${n}.desktop-sizes`,wx),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(`conversation`),[_,v]=(0,b.useState)(()=>typeof window>`u`?qh:window.innerWidth),[y,x]=(0,b.useState)(null),S=(0,b.useRef)(null),C=e.workspace.issues?.[0]??null,w=`/sessions/new?workspacePath=${encodeURIComponent(e.workspace.path)}${C?`&issueId=${encodeURIComponent(C.issueId)}&issueKey=${encodeURIComponent(C.issueKey)}`:``}`,T=e.sessions.length>0,E=T?Cx:Cx.filter(e=>e.key===`sidebar`),D=(0,b.useMemo)(()=>Jh({sidebar:r,conversation:a,context:s,details:l}),[s,a,l,r]),O=(0,b.useMemo)(()=>Yh(D),[D]),k=(0,b.useMemo)(()=>Zh(d,D),[d,D]),A=_<qh;(0,b.useEffect)(()=>{let e=()=>v(window.innerWidth);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,b.useEffect)(()=>{g(e=>Ex(D,e))},[D]),(0,b.useEffect)(()=>{let e=e=>{let t=e.target;if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`){if(t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.tagName===`SELECT`||t?.isContentEditable)return;e.preventDefault(),m(!0)}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let j=e=>{let t=Jh(e);i(t.sidebar),o(t.conversation),c(t.context),u(t.details),g(e=>Ex(t,e))},M=e=>{!T&&e!==`sidebar`||j(Xh(D,e))},N=(e,t)=>n=>{if(A||!S.current)return;n.preventDefault();let r=S.current.getBoundingClientRect().width||1,i=n.clientX,a=d,o=n=>{f(Qh({sizes:a,visibility:D,leftPanel:e,rightPanel:t,deltaPercentage:(n.clientX-i)/r*100}))},s=()=>{window.removeEventListener(`mousemove`,o),window.removeEventListener(`mouseup`,s)};window.addEventListener(`mousemove`,o),window.addEventListener(`mouseup`,s)};Vh([{key:`W`,shift:!0,action:()=>M(`sidebar`),description:`Toggle workspace sidebar`},{key:`C`,shift:!0,action:()=>M(`conversation`),description:`Toggle session panel`},{key:`X`,shift:!0,action:()=>M(`context`),description:`Toggle context panel`},{key:`D`,shift:!0,action:()=>M(`details`),description:`Toggle runtime panel`}]);let P=(0,b.useMemo)(()=>{let e=[];return O.forEach((t,n)=>{e.push(`minmax(0, ${k[t]}fr)`),n<O.length-1&&e.push(`0.85rem`)}),e.join(` `)},[k,O]),ee=e.activeSession?.title??e.activeSession?.sessionId??`No session selected`,F=e.activeSession?.runtime,I=e.canSendMessages??!0,te=!e.activeSession&&e.sessions.length===0;(0,b.useEffect)(()=>{if(!te){x(null);return}y!==e.workspace.path&&(o(!1),c(!1),u(!1),x(e.workspace.path))},[te,y,e.workspace.path,c,o,u]),(0,b.useEffect)(()=>{e.activeSession&&(i(!0),o(!0),g(`conversation`))},[e.activeSession,e.workspace.path,o,i]);let ne=n=>n===`sidebar`?(0,K.jsx)(Ax,{panelKey:`sidebar`,title:`Workspace`,subtitle:T?`Issue link, session roster, and quick actions`:`Issue link, workspace status, and next steps`,children:(0,K.jsxs)(`div`,{className:`grid gap-4`,children:[T?(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/65 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(mp,{className:`h-4 w-4 text-primary`}),(0,K.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Workspace sessions`})]}),(0,K.jsx)(`div`,{className:`mt-4 grid gap-3`,children:e.sessions.map(t=>(0,K.jsxs)(`button`,{type:`button`,onClick:()=>e.onSelectSession(t.sessionId),className:`rounded-2xl border bg-card/80 p-3 text-left transition-colors hover:border-primary/30 ${t.sessionId===e.selectedSessionId?`border-primary/40`:`border-border`}`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`font-medium text-foreground`,children:t.title??t.sessionId}),(0,K.jsx)(`span`,{className:`rounded-full border px-2 py-0.5 text-xs ${Ox(t.status)}`,children:t.status})]}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-foreground-muted`,children:[(0,K.jsx)(`span`,{children:t.agent}),t.latestRunId?(0,K.jsx)(`span`,{children:t.latestRunId}):null]})]},t.sessionId))})]}):(0,K.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border bg-background/65 p-4`,children:[(0,K.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`No linked session yet`}),(0,K.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-foreground-muted`,children:`This workspace still keeps its issue and repo context here. Link or start a session from the board when you want the chat and runtime to appear beside it.`}),(0,K.jsx)(`div`,{className:`mt-4`,children:(0,K.jsx)(J,{type:`button`,size:`sm`,onClick:()=>t(w),children:`Start workspace session`})})]}),(0,K.jsx)(_x,{workspace:e.workspace,runtime:F,reviewArtifact:e.reviewArtifact,sessionId:e.activeSession?.sessionId,sessionStatus:e.activeSession?.status,pendingAction:e.pendingAction,notesSaving:e.notesSaving,reviewPending:e.reviewPending,feedback:e.feedback,onAction:e.onAction,onOpenInEditor:e.onOpenInEditor,onSaveNote:e.onSaveNote,onCreatePullRequest:e.onCreatePullRequest,onLinkPullRequest:e.onLinkPullRequest})]})}):n===`conversation`?I?(0,K.jsx)(Ax,{panelKey:`conversation`,title:`Session chat`,subtitle:`Transcript first, controls second`,bodyClassName:`min-h-0 flex-1 overflow-hidden p-4`,children:(0,K.jsx)(Ch,{sessionId:e.activeSession?.sessionId??`no-session`,sessionLabel:ee,sessionAgent:e.activeSession?.agent??`unknown`,sessionStatus:e.activeSession?.status??`inactive`,sessionModel:null,runs:e.runs,eventBuffers:e.eventBuffers,workspacePath:e.workspace.path,runtime:F,disabled:!e.activeSession||!I,emptyStateTitle:`No transcript events`,emptyStateBody:e.activeSession?I?`The selected session has not published transcript, tool, or file attention events yet.`:`Connect the gateway to continue this session from the workspace view.`:`Select a session from this workspace to inspect transcript activity and continue the conversation.`,openSessionHref:e.activeSession?`/sessions/${e.activeSession.sessionId}`:void 0,placeholder:e.activeSession?I?`Continue the selected session...`:`Connect the gateway to send a new message.`:`Select a session to continue the conversation.`,onSubmit:e.onSubmit})}):(0,K.jsx)(Ax,{panelKey:`conversation`,title:`Session chat`,subtitle:`Selected session transcript, runtime notes, and next-turn input`,children:(0,K.jsx)(Mx,{title:`Connect the gateway to open live chat`,body:`This workspace can still be browsed locally, but session transcript and new messages require a connected gateway.`})}):n===`context`?(0,K.jsx)(Ax,{panelKey:`context`,title:`Trace`,subtitle:`Dispatch trace, files, and execution history`,children:e.activeSession?(0,K.jsx)(Bh,{sessionId:e.activeSession.sessionId,runs:e.runs,eventBuffers:e.eventBuffers,workspacePath:e.workspace.path,runtime:F}):(0,K.jsx)(Mx,{title:`No session context`,body:`Choose a session to unlock trace and file activity beside the chat.`})}):(0,K.jsx)(Ax,{panelKey:`details`,title:`Runtime`,subtitle:`Preview, shell, and workspace output`,children:F?(0,K.jsx)(fg,{runtime:F,rebase:e.workspace.rebase,sessionId:e.activeSession?.sessionId,sessionStatus:e.activeSession?.status??`inactive`,className:`border-0 bg-transparent p-0 shadow-none`}):(0,K.jsx)(Mx,{title:`Runtime details unavailable`,body:`The selected session is not currently publishing preview, terminal, or dev-server output.`})});return(0,K.jsxs)(`div`,{"data-testid":`workspace-shell`,className:`flex h-full min-h-0 w-full flex-1 flex-col gap-4 overflow-hidden px-3 py-4 sm:px-5 sm:py-6 xl:px-6`,children:[(0,K.jsxs)(`section`,{className:`shrink-0 rounded-3xl border border-border bg-card p-4 shadow-lg`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-sm text-foreground-muted`,children:[(0,K.jsxs)(G,{to:`/workspaces`,className:`inline-flex items-center gap-1 text-primary`,children:[(0,K.jsx)(Lf,{className:`h-4 w-4`}),`Workspaces`]}),(0,K.jsx)(`span`,{children:`/`}),(0,K.jsx)(`span`,{className:`font-mono text-xs text-foreground-secondary`,children:e.workspace.path})]}),(0,K.jsx)(`h1`,{className:`mt-2 text-2xl font-semibold tracking-tight`,style:{fontSize:`1.5rem`,lineHeight:1.1},children:e.workspace.name}),(0,K.jsx)(`p`,{className:`mt-1 max-w-3xl text-sm leading-6 text-foreground-muted`,children:C?`${C.issueKey} stays pinned here while the linked session chat and runtime stay beside it.`:`Keep the workspace, chat, and runtime together so you can continue work without losing context.`}),C?(0,K.jsx)(`div`,{className:`mt-3`,children:(0,K.jsxs)(G,{to:Tx(e.workspace,C.issueId),className:`inline-flex rounded-full border border-border px-3 py-1.5 text-sm text-primary`,"data-testid":`workspace-primary-issue-link-${C.issueKey}`,children:[C.issueKey,(0,K.jsxs)(`span`,{className:`ml-1 text-foreground-muted`,children:[`· `,C.issueTitle]})]})}):null]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(J,{type:`button`,variant:`ghost`,onClick:()=>e.onOpenInEditor(e.workspace,e.workspace.links.editorHref),children:[(0,K.jsx)(Xf,{className:`h-4 w-4`}),`Open in editor`]}),e.activeSession?(0,K.jsx)(J,{type:`button`,variant:`ghost`,onClick:()=>t(`/sessions/${e.activeSession.sessionId}`),children:`View session`}):null,(0,K.jsx)(J,{type:`button`,variant:`ghost`,onClick:()=>t(w),children:`New session`}),E.map(e=>{let t=e.icon;return(0,K.jsxs)(J,{type:`button`,variant:D[e.key]?`default`:`ghost`,size:`sm`,"data-testid":`panel-toggle-${e.key}`,"aria-pressed":D[e.key],onClick:()=>M(e.key),children:[(0,K.jsx)(t,{className:`h-4 w-4`}),e.label]},e.key)})]})]}),(0,K.jsxs)(`div`,{className:`mt-4 grid gap-4 xl:grid-cols-[minmax(0,1.3fr)_minmax(18rem,0.7fr)]`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,K.jsxs)(`div`,{className:`rounded-full border border-border bg-background/65 px-3 py-1.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`text-foreground-muted`,children:`Status`}),(0,K.jsx)(`span`,{className:`ml-2 font-medium text-foreground`,children:e.workspace.status})]}),(0,K.jsxs)(`div`,{className:`rounded-full border border-border bg-background/65 px-3 py-1.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`text-foreground-muted`,children:`Branch`}),(0,K.jsx)(`span`,{className:`ml-2 font-mono text-foreground`,children:e.workspace.git.branch??`Unavailable`})]}),(0,K.jsxs)(`div`,{className:`rounded-full border border-border bg-background/65 px-3 py-1.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`text-foreground-muted`,children:`Sessions`}),(0,K.jsxs)(`span`,{className:`ml-2 font-medium text-foreground`,children:[e.workspace.sessions.active,`/`,e.workspace.sessions.total]})]}),(0,K.jsxs)(`div`,{className:`rounded-full border border-border bg-background/65 px-3 py-1.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`text-foreground-muted`,children:`Dispatches`}),(0,K.jsxs)(`span`,{className:`ml-2 font-medium text-foreground`,children:[e.workspace.runs.active,`/`,e.workspace.runs.total]})]})]}),(0,K.jsxs)(`div`,{className:`rounded-2xl border border-border bg-background/65 p-4`,"data-testid":`workspace-context-bar`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-foreground-muted`,children:T?`Session`:`Workspace focus`}),(0,K.jsx)(`p`,{className:`mt-1 text-sm font-medium text-foreground`,children:T?ee:`Issue and repo stay visible here until a session attaches`}),e.activeSession?(0,K.jsxs)(`p`,{className:`mt-1 text-xs text-foreground-muted`,children:[`Updated `,Dx(e.activeSession.updatedAt)]}):T?null:(0,K.jsx)(`p`,{className:`mt-1 text-xs text-foreground-muted`,children:`Open the linked issue or board when you want to create a session against this workspace.`}),e.workspace.ownership?(0,K.jsxs)(`div`,{className:`mt-3 text-xs text-foreground-muted`,"data-testid":`workspace-ownership-summary`,children:[(0,K.jsx)(`span`,{className:`font-semibold text-foreground`,children:`Linked to:`}),` `,e.workspace.ownership.project?e.workspace.ownership.project.projectKey:`Unassigned`,e.workspace.ownership.issue?` / ${e.workspace.ownership.issue.issueKey}`:``,e.workspace.ownership.host?` · ${e.workspace.ownership.host.label}`:``]}):null]}),T?(0,K.jsxs)(`label`,{className:`w-full xl:max-w-sm`,"data-testid":`workspace-session-select`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:`Select workspace session`}),(0,K.jsx)(en,{value:e.selectedSessionId??``,onChange:e.onSelectSession,options:e.sessions.map(e=>({label:`${e.title??e.sessionId} · ${e.status} · ${e.agent}`,value:e.sessionId}))})]}):(0,K.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border px-4 py-3 text-sm text-foreground-muted`,children:`No sessions attached`})]}),(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:(e.workspace.issues??[]).length>0?(e.workspace.issues??[]).map(t=>(0,K.jsxs)(G,{to:Tx(e.workspace,t.issueId),className:`rounded-full border border-border px-3 py-1.5 text-xs text-primary`,"data-testid":`workspace-issue-link-${t.issueKey}`,title:t.issueTitle,children:[t.issueKey,(0,K.jsxs)(`span`,{className:`ml-1 text-foreground-muted`,children:[`· `,t.issueTitle]})]},`${e.workspace.path}-${t.issueId}`)):(0,K.jsx)(`span`,{className:`rounded-full border border-border px-3 py-1.5 text-xs text-foreground-muted`,children:`No linked issues`})})]})]})]}),A?(0,K.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-3xl border border-border bg-card p-4 shadow-lg`,children:[(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,"data-testid":`workspace-mobile-panel-selector`,children:O.map(e=>(0,K.jsx)(J,{type:`button`,"data-testid":`workspace-mobile-panel-${e}`,variant:h===e?`default`:`ghost`,size:`sm`,onClick:()=>g(e),children:Cx.find(t=>t.key===e)?.label??e},e))}),(0,K.jsx)(`div`,{className:`mt-4 min-h-0 flex-1`,children:ne(h)})]}):(0,K.jsx)(`div`,{ref:S,"data-testid":`workspace-desktop-panels`,className:`grid min-h-0 flex-1 items-stretch overflow-hidden`,style:{gridTemplateColumns:P},children:O.map((e,t)=>{let n=O[t+1];return(0,K.jsxs)(`div`,{className:`contents`,children:[ne(e),n?(0,K.jsx)(`div`,{className:`flex items-stretch justify-center py-2`,children:(0,K.jsx)(jx,{testId:`workspace-resize-${e}-${n}`,onMouseDown:N(e,n)})}):null]},e)})}),(0,K.jsx)(kx,{open:p,panels:E,visibility:D,onOpenChange:m,onTogglePanel:M})]})}function Px(e){return e?new Date(e).toLocaleString():`No recent activity`}function Fx(e){return e.length<=72?e:`${e.slice(0,32)}...${e.slice(-28)}`}function Ix(e){return`/workspaces?workspace=${encodeURIComponent(e)}`}function Lx(e){let t=e.replace(/[\\/]+/g,`/`).replace(/\/$/,``).split(`/`);return t[t.length-1]||e}function Rx(e){return e==null||!Number.isFinite(e)?`unavailable`:new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:e>=1?2:4,maximumFractionDigits:4}).format(e)}function zx(e){return e===`approved`||e===`ready`||e===`passing`||e===`published`||e===`merged`?`border-success/20 bg-success/10 text-success`:e===`pending`||e===`in-review`?`border-warning/20 bg-warning/10 text-warning`:e===`changes-requested`||e===`blocked`||e===`failing`||e===`failed`?`border-error/20 bg-error/10 text-error`:`border-border text-foreground-muted`}function Bx(e,t){let n=!1,r=0;for(let i of e){let e=t[i];if(e)for(let t of e.events)t.type!==`cost`||!t.cost||typeof t.cost!=`object`||(r+=Number(t.cost.totalUsd??0),n=!0)}return n?r:null}function Vx(e,t,n=[]){return n.length>0?`Explicit ownership: ${n.filter(e=>!!e.ownership?.issue).length} issue, ${n.filter(e=>e.ownership?.source===`created-from-project`).length} project, ${n.filter(e=>e.ownership?.source===`created-from-host`).length} host`:e?`${t.length} live session${t.length===1?``:`s`} attached to the current workspace inventory`:`Gateway disconnected: browsing saved workspaces and local worktrees only`}function Hx(e,t){let n=e.ownership?.project?.projectId??e.issues?.find(e=>e.issueId===t)?.projectId;return n?`/projects/${encodeURIComponent(n)}/issues/${encodeURIComponent(t)}`:`/issues/${encodeURIComponent(t)}`}function Ux(e){return e.ownership?.issue&&e.ownership.project?`${e.ownership.project.projectKey} / ${e.ownership.issue.issueKey}`:e.ownership?.source===`created-from-host`&&e.ownership.project&&e.ownership.host?`${e.ownership.project.projectKey} / ${e.ownership.host.label}`:e.ownership?.project?`${e.ownership.project.projectKey} project`:e.ownership?.host?`${e.ownership.host.label} host`:null}function Wx(e){return e.trim().toLowerCase()}function Gx(e){return[e.name,e.path,e.git.branch??``,e.git.root??``,Ux(e)??``,...(e.issues??[]).flatMap(e=>[e.issueKey,e.issueTitle,e.projectKey,e.projectName])].join(`
@@ -42,4 +42,4 @@ Minimum version required to store current data is: `+c+`.
42
42
  `;return typeof a==`function`&&a(null,p),p}})),dC=u(s((e=>{var t=RS(),n=sC(),r=lC(),i=uC();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),1);async function fC(e){await navigator.clipboard.writeText(e)}function pC(){return Array.from({length:8},()=>Math.floor(Math.random()*10)).join(``)}function mC(){let{auth:e}=Qd(),t=$d(),[n]=(0,b.useState)(()=>pC()),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(null),s=(0,b.useMemo)(()=>JSON.stringify({url:e?.gatewayUrl,token:e?.token}),[e?.gatewayUrl,e?.token]);return(0,b.useEffect)(()=>{dC.toDataURL(s,{margin:1,width:256}).then(i)},[s]),(0,b.useEffect)(()=>{e&&t(`/api/v1/pairing/register`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({code:n,url:e.gatewayUrl,token:e.token})}).then(e=>e.json()).then(e=>o(e.expiresAt))},[e,n,t]),(0,K.jsxs)(`section`,{className:`pairing-layout`,children:[(0,K.jsxs)(`article`,{className:`panel`,children:[(0,K.jsx)(`header`,{children:(0,K.jsx)(`h2`,{children:`Direct QR pairing`})}),(0,K.jsx)(`p`,{children:`Scan this from a phone to attach immediately with the current token.`}),r?(0,K.jsx)(`img`,{className:`qr`,src:r,alt:`Pairing QR code`}):(0,K.jsx)(`p`,{children:`Rendering QR…`})]}),(0,K.jsxs)(`article`,{className:`panel`,children:[(0,K.jsx)(`header`,{children:(0,K.jsx)(`h2`,{children:`Short code pairing`})}),(0,K.jsx)(`p`,{children:`Use this for TV and no-camera flows. Codes expire after five minutes and are consumed once.`}),(0,K.jsx)(`div`,{className:`pairing-code`,children:n}),(0,K.jsxs)(`div`,{className:`actions`,children:[(0,K.jsx)(J,{type:`button`,onClick:()=>void fC(n),children:`Copy code`}),(0,K.jsx)(J,{type:`button`,variant:`ghost`,onClick:()=>void fC(s),children:`Copy QR payload`})]}),(0,K.jsx)(`p`,{children:a?`Expires at ${new Date(a).toLocaleTimeString()}`:`Registering code…`})]})]})}function hC(){let e=$d(),[t,n]=(0,b.useState)([]),[r,i]=(0,b.useState)(!0),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(`session-workspace`),[d,f]=(0,b.useState)(`worktree`),[p,m]=(0,b.useState)(``);async function h(){i(!0),c(null);try{let t=await e(`/api/v1/workspaces`);if(!t.ok)throw Error(`Gateway request failed: ${t.status}`);n((await t.json()).workspaces??[])}catch(e){c(e instanceof Error?e.message:String(e))}finally{i(!1)}}(0,b.useEffect)(()=>{h()},[]);async function g(t){t.preventDefault();let n=p.split(`
43
43
  `).map(e=>e.trim()).filter(Boolean);if(!(!l.trim()||n.length===0)){o(!0),c(null);try{let t=await e(`/api/v1/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`create`,name:l,mode:d,repos:n.map(e=>({path:e}))})});if(!t.ok)throw Error(`Workspace creation failed: ${t.status}`);m(``),await h()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}}}async function _(t,n){o(!0),c(null);try{let r=await e(`/api/v1/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:n,workspaceId:t,force:n===`delete`})});if(!r.ok)throw Error(`Workspace action failed: ${r.status}`);await h()}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}}return(0,K.jsxs)(`section`,{className:`flow-grid`,children:[(0,K.jsxs)(`article`,{className:`panel hero-panel`,children:[(0,K.jsx)(`p`,{className:`eyebrow`,children:`Workspaces`}),(0,K.jsx)(`h2`,{children:`Stage temp directories, worktrees, and linked repos`}),(0,K.jsxs)(`p`,{className:`lede`,children:[`Workspaces live under `,(0,K.jsx)(`code`,{children:`~/.a5c/workspaces`}),` and can bind directly to live sessions.`]})]}),(0,K.jsxs)(`article`,{className:`panel`,children:[(0,K.jsx)(`header`,{children:(0,K.jsx)(`h2`,{children:`Create workspace`})}),(0,K.jsxs)(`form`,{className:`stack`,onSubmit:g,children:[(0,K.jsx)(Kt,{label:`Name`,children:(0,K.jsx)(`input`,{value:l,onChange:e=>u(e.target.value)})}),(0,K.jsx)(Kt,{label:`Mode`,children:(0,K.jsx)(en,{value:d,onChange:e=>f(e===`symlink`?`symlink`:`worktree`),options:[{label:`Git worktrees`,value:`worktree`},{label:`Symbolic links`,value:`symlink`}]})}),(0,K.jsx)(Kt,{label:`Repo paths`,children:(0,K.jsx)(Gt,{value:p,onChange:e=>m(e.target.value),rows:5,placeholder:`/abs/path/to/repo-one
44
44
  /abs/path/to/repo-two`})}),s?(0,K.jsx)(`p`,{className:`error-banner`,children:s}):null,(0,K.jsx)(`div`,{className:`actions`,children:(0,K.jsx)(J,{type:`submit`,variant:`primary`,loading:a,disabled:a,children:`Create workspace`})})]})]}),(0,K.jsxs)(`article`,{className:`panel`,children:[(0,K.jsx)(`header`,{children:(0,K.jsx)(`h2`,{children:`Tracked workspaces`})}),r?(0,K.jsx)(`p`,{className:`muted-copy`,children:`Loading workspaces…`}):null,!r&&t.length===0?(0,K.jsx)(`p`,{className:`muted-copy`,children:`No workspaces have been created yet.`}):null,(0,K.jsx)(`div`,{className:`stack`,children:t.map(e=>(0,K.jsx)(`article`,{className:`panel panel-muted`,children:(0,K.jsxs)(`div`,{className:`stack`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`strong`,{children:e.name}),` `,(0,K.jsxs)(`span`,{className:`muted-copy`,children:[`(`,e.id,`)`]})]}),(0,K.jsx)(`p`,{className:`muted-copy`,children:e.defaultCwd}),e.defaultCwd===e.rootPath?null:(0,K.jsxs)(`p`,{className:`muted-copy`,children:[`root: `,e.rootPath]}),(0,K.jsxs)(`p`,{className:`muted-copy`,children:[e.status,` · `,e.mode,` · `,e.sessions.length,` session`,e.sessions.length===1?``:`s`]}),(0,K.jsxs)(`div`,{className:`actions`,children:[(0,K.jsx)(J,{variant:`default`,disabled:a,onClick:()=>void _(e.id,`archive`),children:`Archive`}),(0,K.jsx)(J,{variant:`default`,disabled:a,onClick:()=>void _(e.id,`cleanup`),children:`Cleanup`}),(0,K.jsx)(J,{variant:`default`,disabled:a,onClick:()=>void _(e.id,`recover`),children:`Recover`}),(0,K.jsx)(J,{variant:`default`,disabled:a,onClick:()=>void _(e.id,`delete`),children:`Delete`})]})]})},e.id))})]})]})}function gC(e){let t=(0,b.useMemo)(()=>e.actions.map(e=>({id:e.id,label:e.label,onSelect:e.run})),[e.actions]);return(0,K.jsx)(nn,{open:e.open,items:t,placeholder:`Jump, toggle, start…`,onClose:e.onClose})}function _C(e){return e===`/`||e===`/projects`?`Projects`:/^\/projects\/[^/]+\/board$/.test(e)?`Project Board`:/^\/projects\/[^/]+\/list$/.test(e)?`Project List`:/^\/projects\/[^/]+\/issues\/new$/.test(e)?`New Issue`:/^\/projects\/[^/]+\/issues\/[^/]+$/.test(e)?`Issue Detail`:/^\/projects\/[^/]+\/workspaces\/new$/.test(e)?`New Workspace`:/^\/projects\/[^/]+\/issues\/[^/]+\/workspace\/new$/.test(e)?`Provision Workspace`:e===`/dispatches`||e===`/runs`?`Dispatches`:/^\/(?:dispatches|runs)\/[^/]+$/.test(e)?`Dispatch Detail`:e===`/automations`?`Automations`:e===`/sessions`?`Sessions`:e===`/sessions/new`?`New Session`:e.startsWith(`/sessions/pending/`)?`Creating Session`:e.startsWith(`/sessions/`)?`Session Chat`:e===`/workspaces/new`?`New Workspace`:/^\/issues\/[^/]+$/.test(e)?`Issue Detail`:e.startsWith(`/projects/`)?`Project`:e===`/agents`?`Agents`:e===`/inbox`?`Hook Inbox`:e===`/pair-device`?`Pair Device`:e===`/workspaces`?`Workspaces`:e===`/settings`?`Settings`:e}function vC(e,t=8){return[...e].filter(e=>typeof e.sessionId==`string`&&e.sessionId.length>0).sort((e,t)=>Number(t.updatedAt??0)-Number(e.updatedAt??0)).slice(0,t).map(e=>{let t=e.sessionId,n=typeof e.title==`string`&&e.title.trim().length>0?e.title.trim():t,r=typeof e.agent==`string`&&e.agent.length>0?` · ${e.agent}`:``;return{id:`session:${t}`,label:`Open session ${n}${r}`,to:`/sessions/${t}`}})}function yC(e){return Object.values(e).reduce((e,t)=>e+(t?.length??0),0)}function bC(){let{store:e}=dr(),t=pr(e,xr(e=>Object.values(e.sessions.byId))),n=pr(e,xr(e=>Object.values(e.runs.byId))),r=pr(e,e=>yC(e.hooks.byRunId)),i=(0,b.useMemo)(()=>t.filter(e=>e.status===`active`).length,[t]),a=(0,b.useMemo)(()=>n.filter(e=>e.status===`running`).length,[n]),o=(0,b.useMemo)(()=>[{to:`/projects`,label:`Projects`,section:`Plan`,icon:ap},{to:`/sessions`,label:`Sessions`,section:`Plan`,icon:pp,badge:i>0?i:null},{to:`/workspaces`,label:`Workspaces`,section:`Plan`,icon:am},{to:`/dispatches`,label:`Dispatches`,section:`Operate`,icon:Kp,badge:a>0?a:null},{to:`/inbox`,label:`Inbox`,section:`Operate`,icon:dp,badge:r>0?r:null},{to:`/automations`,label:`Automations`,section:`Operate`,icon:Gp},{to:`/agents`,label:`Agents`,section:`System`,icon:Nf},{to:`/settings`,label:`Settings`,section:`System`,icon:zp}],[i,r,a]);return(0,K.jsxs)(`aside`,{className:`app-sidebar`,children:[(0,K.jsxs)(`div`,{className:`app-sidebar__brand`,children:[(0,K.jsx)(`p`,{className:`app-sidebar__label`,children:`agent-mux`}),(0,K.jsx)(`h1`,{className:`app-sidebar__title`,children:`Operate`}),(0,K.jsxs)(`div`,{className:`app-sidebar__mini-status`,children:[(0,K.jsxs)(`span`,{className:`connection-pill`,children:[i,` live`]}),(0,K.jsxs)(`span`,{className:`connection-pill`,children:[a,` dispatches`]})]})]}),(0,K.jsx)(`nav`,{className:`app-sidebar__nav`,"aria-label":`Main navigation`,children:[`Plan`,`Operate`,`System`].map(e=>(0,K.jsxs)(`div`,{className:`app-sidebar__section`,children:[(0,K.jsx)(`p`,{className:`app-sidebar__section-label`,children:e}),(0,K.jsx)(`div`,{className:`app-sidebar__section-items`,children:o.filter(t=>t.section===e).map(e=>{let t=e.icon;return(0,K.jsxs)(kt,{to:e.to,className:({isActive:e})=>[`app-sidebar__link`,e?`app-sidebar__link--active`:null].filter(Boolean).join(` `),children:[(0,K.jsx)(`span`,{className:`app-sidebar__link-icon`,children:(0,K.jsx)(t,{className:`h-4 w-4`})}),(0,K.jsx)(`span`,{className:`app-sidebar__link-label`,children:e.label}),e.badge?(0,K.jsx)(`span`,{className:`app-sidebar__link-badge`,children:e.badge}):null]},e.to)})})]},e))})]})}function xC(e){return e.startsWith(`/sessions/pending/`)?{label:`Dispatch handoff`,subtitle:`Promoting this dispatch into a durable chat.`}:/^\/(?:dispatches|runs)\/[^/]+$/.test(e)?{label:`Dispatch handoff`,subtitle:`Opening the bound session chat for this dispatch.`}:e.startsWith(`/sessions/`)?{label:`Chat`}:e===`/sessions`?{label:`Directory`}:e.startsWith(`/workspaces`)?{label:`Workspace`}:e.startsWith(`/projects/`)?{label:`Board`}:e.startsWith(`/dispatches`)||e.startsWith(`/runs`)?{label:`Dispatch queue`}:e===`/inbox`?{label:`Attention`}:{label:`Workspace`}}function SC(e){let t=Be(),n=mr(),{store:r}=dr(),i=pr(r,xr(e=>Object.values(e.sessions.byId))),a=pr(r,xr(e=>Object.values(e.runs.byId))),o=(0,b.useMemo)(()=>xC(e.pathname),[e.pathname]),s=!o.subtitle,c=(0,b.useMemo)(()=>i.filter(e=>e.status===`active`).length,[i]),l=(0,b.useMemo)(()=>a.filter(e=>e.status===`running`).length,[a]);return(0,K.jsxs)(`header`,{className:`app-topbar${s?` app-topbar--compact`:``}`,children:[(0,K.jsxs)(`div`,{className:`app-topbar__copy`,children:[(0,K.jsxs)(`div`,{className:`app-topbar__title-row`,children:[(0,K.jsx)(`h2`,{children:_C(e.pathname)}),(0,K.jsx)(`span`,{className:`connection-pill app-topbar__chip app-topbar__chip--route`,children:o.label}),(0,K.jsx)(`span`,{className:`connection-pill connection-${n.status}`,"data-testid":`topbar-connection-status`,children:n.status})]}),o.subtitle?(0,K.jsx)(`p`,{className:`app-topbar__subtitle`,children:o.subtitle}):null]}),(0,K.jsxs)(`div`,{className:`app-topbar__actions`,children:[(0,K.jsxs)(`div`,{className:`app-topbar__chips`,children:[(0,K.jsxs)(`span`,{className:`connection-pill app-topbar__chip`,children:[c,` active`]}),(0,K.jsxs)(`span`,{className:`connection-pill app-topbar__chip`,children:[l,` dispatching`]})]}),(0,K.jsxs)(`details`,{className:`app-topbar__details`,"data-testid":`topbar-tools-details`,children:[(0,K.jsx)(`summary`,{className:`app-topbar__details-summary`,children:`Tools`}),(0,K.jsxs)(`div`,{className:`app-topbar__details-body`,children:[(0,K.jsx)(J,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>window.dispatchEvent(new Event(`open-shortcuts-help`)),children:`Shortcuts`}),(0,K.jsxs)(J,{type:`button`,size:`sm`,variant:`ghost`,onClick:e.onOpenPalette,children:[(0,K.jsx)(qf,{className:`h-4 w-4`}),`Command palette`]})]})]}),(0,K.jsx)(`div`,{className:`app-topbar__buttons`,children:(0,K.jsxs)(J,{type:`button`,size:`sm`,onClick:()=>t(`/sessions/new`),children:[(0,K.jsx)(Hf,{className:`h-4 w-4`}),`New session`]})})]})]})}function CC(e){let t=t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`k`&&(t.preventDefault(),e.openPalette())};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)}function wC(){let e=Re(),t=e.pathname.match(/^\/sessions\/[^/]+\/([^/?#]+)/)?.[1];return(0,K.jsx)(lt,{to:t?`/sessions/${t}${e.search}`:`/sessions`,replace:!0})}function TC(){let e=Re(),t=e.pathname.match(/^\/runs(?:\/([^/?#]+))?/)?.[1];return(0,K.jsx)(lt,{to:t?`/dispatches/${t}${e.search}`:`/dispatches${e.search}`,replace:!0})}function EC(){return(0,K.jsx)(`main`,{className:`login-page`,children:(0,K.jsxs)(`section`,{className:`login-card auth-card`,children:[(0,K.jsx)(`p`,{className:`eyebrow`,children:`agent-mux webui`}),(0,K.jsx)(`h1`,{children:`Checking gateway access`}),(0,K.jsx)(`p`,{className:`lede auth-note`,children:`Reconnecting to the saved gateway before loading live sessions, workspaces, and dispatch activity.`})]})})}function DC(e){let{auth:t,isAuthenticated:n,isReady:r}=Qd(),i=Re();return t&&!r?(0,K.jsx)(EC,{}):n?(0,K.jsx)(K.Fragment,{children:e.children}):(0,K.jsx)(lt,{to:`/login`,replace:!0,state:{from:i.pathname}})}function OC(){let{auth:e,isAuthenticated:t,isReady:n}=Qd();return e&&!n?(0,K.jsx)(EC,{}):t?(0,K.jsx)(kC,{children:(0,K.jsx)(MS,{})}):(0,K.jsx)(MS,{})}function kC(e){let t=Be(),n=Re(),{store:r}=dr(),{logout:i}=Qd(),{mode:a,toggle:o}=lf(),[s,c]=(0,b.useState)(!1),l=pr(r,xr(e=>Object.values(e.sessions.byId))),u=(0,b.useMemo)(()=>vC(l).map(e=>({id:e.id,label:e.label,run:()=>t(e.to)})),[t,l]),d=(0,b.useMemo)(()=>[{id:`projects`,label:`Open projects`,run:()=>t(`/projects`)},{id:`runs`,label:`Open dispatches`,run:()=>t(`/dispatches`)},{id:`new-session`,label:`Start session`,run:()=>t(`/sessions/new`)},{id:`sessions`,label:`Browse sessions`,run:()=>t(`/sessions`)},{id:`workspaces`,label:`Open workspaces`,run:()=>t(`/workspaces`)},{id:`inbox`,label:`Open hook inbox`,run:()=>t(`/inbox`)},{id:`pair`,label:`Pair device`,run:()=>t(`/pair-device`)},{id:`theme`,label:`Switch to ${a===`light`?`dark`:`light`} theme`,run:()=>o()},{id:`logout`,label:`Forget token`,run:()=>i()},...u],[i,a,t,u,o]);return b.useEffect(()=>CC({openPalette:()=>c(!0)}),[]),(0,K.jsxs)(`div`,{className:`app-shell`,children:[(0,K.jsx)(bC,{}),(0,K.jsxs)(`div`,{className:`app-main`,children:[(0,K.jsx)(SC,{pathname:n.pathname,onOpenPalette:()=>c(!0)}),(0,K.jsx)(`main`,{className:`app-content`,children:e.children})]}),(0,K.jsx)(gC,{actions:d,open:s,onClose:()=>c(!1)})]})}function AC(){return(0,K.jsx)(kC,{children:(0,K.jsxs)(ft,{children:[(0,K.jsx)(W,{path:`/`,element:(0,K.jsx)(lt,{to:`/projects`,replace:!0})}),(0,K.jsx)(W,{path:`/agents`,element:(0,K.jsx)(xf,{})}),(0,K.jsx)(W,{path:`/sessions`,element:(0,K.jsx)(ym,{})}),(0,K.jsx)(W,{path:`/sessions/new`,element:(0,K.jsx)(Xg,{})}),(0,K.jsx)(W,{path:`/sessions/pending/:runId`,element:(0,K.jsx)(Gg,{})}),(0,K.jsx)(W,{path:`/dispatches/:runId`,element:(0,K.jsx)(Kg,{})}),(0,K.jsx)(W,{path:`/runs/:runId`,element:(0,K.jsx)(TC,{})}),(0,K.jsx)(W,{path:`/sessions/:sessionId`,element:(0,K.jsx)(Pg,{})}),(0,K.jsx)(W,{path:`/sessions/:agent/:sessionId`,element:(0,K.jsx)(wC,{})}),(0,K.jsx)(W,{path:`/pair-device`,element:(0,K.jsx)(mC,{})}),(0,K.jsxs)(W,{element:(0,K.jsx)(f_,{}),children:[(0,K.jsx)(W,{path:`/projects`,element:(0,K.jsx)(bS,{})}),(0,K.jsx)(W,{path:`/projects/:projectId/board`,element:(0,K.jsx)(CS,{})}),(0,K.jsx)(W,{path:`/projects/:projectId/list`,element:(0,K.jsx)(wS,{})}),(0,K.jsx)(W,{path:`/projects/:projectId/issues/new`,element:(0,K.jsx)(DS,{})}),(0,K.jsx)(W,{path:`/projects/:projectId/issues/:issueId`,element:(0,K.jsx)(TS,{})}),(0,K.jsx)(W,{path:`/projects/:projectId/workspaces/new`,element:(0,K.jsx)(OS,{})}),(0,K.jsx)(W,{path:`/projects/:projectId/issues/:issueId/workspace/new`,element:(0,K.jsx)(kS,{})}),(0,K.jsx)(W,{path:`/issues/:issueId`,element:(0,K.jsx)(ES,{})}),(0,K.jsx)(W,{path:`/dispatches`,element:(0,K.jsx)(jS,{})}),(0,K.jsx)(W,{path:`/runs`,element:(0,K.jsx)(TC,{})}),(0,K.jsx)(W,{path:`/workspaces`,element:(0,K.jsx)(MS,{})}),(0,K.jsx)(W,{path:`/workspaces/new`,element:(0,K.jsx)(AS,{})}),(0,K.jsx)(W,{path:`/inbox`,element:(0,K.jsx)(FS,{})}),(0,K.jsx)(W,{path:`/automations`,element:(0,K.jsx)(xS,{})}),(0,K.jsx)(W,{path:`/settings`,element:(0,K.jsx)(SS,{})})]}),(0,K.jsx)(W,{path:`/legacy-home`,element:(0,K.jsx)(yf,{})}),(0,K.jsx)(W,{path:`/legacy-workspaces`,element:(0,K.jsx)(hC,{})}),(0,K.jsx)(W,{path:`/legacy-inbox`,element:(0,K.jsx)(Zg,{})}),(0,K.jsx)(W,{path:`/legacy-settings`,element:(0,K.jsx)(LS,{})})]})})}function jC(){return(0,K.jsxs)(ft,{children:[(0,K.jsx)(W,{path:`/login`,element:(0,K.jsx)(bf,{})}),(0,K.jsx)(W,{path:`/workspaces`,element:(0,K.jsx)(OC,{})}),(0,K.jsx)(W,{path:`*`,element:(0,K.jsx)(DC,{children:(0,K.jsx)(AC,{})})})]})}function MC(){return(0,K.jsx)(Et,{children:(0,K.jsx)(cf,{children:(0,K.jsx)(an,{children:(0,K.jsx)(Zd,{children:(0,K.jsx)(rf,{children:(0,K.jsx)(jC,{})})})})})})}x.createRoot(document.getElementById(`root`)).render((0,K.jsx)(b.StrictMode,{children:(0,K.jsx)(MC,{})}));
45
- //# sourceMappingURL=index-YDOm3B-J.js.map
45
+ //# sourceMappingURL=index-DlpS8Edx.js.map