@a-t-h-i/bot-lobby 0.6.48 → 0.6.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/prompts/designer.md +15 -1
- package/prompts/master.md +4 -1
- package/src/ask/project-styles.ts +64 -0
- package/src/ask/tool.ts +23 -4
- package/src/ask/types.ts +1 -1
- package/src/ask/web.ts +27 -6
- package/src/lobby/service.ts +4 -3
- package/src/lobby/session-questions.ts +49 -0
- package/src/lobby/sessions.ts +31 -0
- package/src/pi/tools.ts +2 -2
- package/src/webui/palette-core.ts +228 -228
- package/webui/dist/assets/{index-CznnCkjK.js → index-C3p3zxoV.js} +12 -12
- package/webui/dist/assets/index-DE9jHz-C.css +2 -0
- package/webui/dist/build.json +7 -7
- package/webui/dist/index.html +2 -2
- package/webui/dist/assets/index-B5AnxwRU.css +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(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},c=(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},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=document.querySelector(`meta[property="csp-nonce"]`),d=u?.nonce||u?.content;d&&(window.__webpack_nonce__=d);var f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 P(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,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(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 F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ee=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)};function te(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ne(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else te(ne.bind(null,e))}var re={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=re,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ne,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),p=o(((e,t)=>{t.exports=f()})),m=l(p(),1),h,g=new Set;function _(){for(let e of[...g])e()}typeof window<`u`&&(window.addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),h=e,_()}),window.addEventListener(`appinstalled`,()=>{h=void 0,_()}));function v(e){return g.add(e),()=>{g.delete(e)}}function y(){return{available:(0,m.useSyncExternalStore)(v,()=>h!==void 0,()=>!1),install:async()=>{let e=h;e&&(await e.prompt().catch(()=>void 0),await e.userChoice?.catch(()=>void 0),h=void 0,_())}}}function b(){let e=`(display-mode: fullscreen), (display-mode: standalone), (display-mode: minimal-ui)`,[t,n]=(0,m.useState)(()=>typeof window<`u`&&window.matchMedia(e).matches);return(0,m.useEffect)(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]),t}function x(){let e=typeof document<`u`&&typeof document.documentElement.requestFullscreen==`function`,[t,n]=(0,m.useState)(()=>typeof document<`u`&&document.fullscreenElement!==null);return(0,m.useEffect)(()=>{let e=()=>n(document.fullscreenElement!==null);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),{supported:e,on:t,toggle:async()=>{document.fullscreenElement?await document.exitFullscreen().catch(()=>void 0):await document.documentElement.requestFullscreen().catch(()=>void 0)}}}var S=[`background`,`foreground`,`card`,`card-foreground`,`popover`,`popover-foreground`,`primary`,`primary-foreground`,`secondary`,`secondary-foreground`,`muted`,`muted-foreground`,`accent`,`accent-foreground`,`destructive`,`border`,`input`,`ring`,`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`],C=[`font-sans`,`font-mono`],w=new Set([...S,...C]),T=/^[\w\s#%.,()/+*'"-]{1,300}$/,E=/url\s*\(|expression|import|javascript|\\|<|>/i;function D(e){let t=e.replace(/!important/gi,``).trim();if(t&&T.test(t)&&!E.test(t))return t}function O(e,t,n){let r=e.replace(/^--/,``).toLowerCase();if(!w.has(r))return;let i=D(t);i&&(n[r]=i)}function k(e){let t={};for(let n of e.matchAll(/--([a-z0-9-]+)\s*:\s*([^;}]+)/gi))O(n[1],n[2],t);return t}function A(e){if(!e||typeof e!=`object`)return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&O(n,r,t);return Object.keys(t).length>0?t:void 0}function j(e){let t=e.trim();if(!t)return{error:`Paste a theme first.`};if(t.length>2e5)return{error:`That file is too large to be a theme.`};let n={},r={},i;if(t.startsWith(`{`)){let e;try{e=JSON.parse(t)}catch{return{error:`That is not valid JSON or CSS.`}}let a=e,o=a.cssVars;if(!o||typeof o!=`object`)return{error:`That JSON has no cssVars. Copy the theme's CSS from tweakcn instead.`};let s=e=>{let t={};for(let[n,r]of Object.entries(e??{}))typeof r==`string`&&O(n,r,t);return t};n={...s(o.theme),...s(o.light)},r={...s(o.theme),...s(o.dark)},i=typeof a.title==`string`?a.title:typeof a.name==`string`?a.name:void 0}else for(let e of t.matchAll(/(?<=^|[}\s])((?::root|html|\.dark|:root\.dark|html\.dark)(?:\s*,\s*[^{]+)?)\s*\{([^}]*)\}/g)){let t=e[1].trim(),i=k(e[2]);/\.dark/.test(t)?r={...r,...i}:n={...n,...i}}let a=e=>Object.keys(e).filter(e=>S.includes(e)).length;return a(n)<5&&a(r)<5?{error:`No theme colours found. Copy the code from tweakcn's Code panel (the :root and .dark blocks).`}:{...a(n)>=5?{light:n}:{},...a(r)>=5?{dark:r}:{},...i?{name:i}:{}}}var M={"glass-border":`var(--border)`,typing:`var(--ring)`,"tab-active":`color-mix(in oklab, var(--primary) 14%, var(--background))`,you:`color-mix(in oklab, var(--primary) 9%, var(--card))`,heading:`var(--foreground)`,link:`var(--primary)`,bullet:`var(--primary)`},N=`"Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,P=`ui-monospace, "JetBrains Mono", "Cascadia Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`;function F(e,t){let n=[];for(let[e,r]of Object.entries(t))e===`font-sans`?n.push(`--app-font-sans:${r},${N};`):e===`font-mono`?n.push(`--app-font-mono:${r},${P};`):n.push(`--${e}:${r};`);for(let[e,r]of Object.entries(M))e in t||n.push(`--${e}:${r};`);return`${e}{${n.join(``)}}`}function I(e){let t=[];return e.light&&t.push(F(`:root`,e.light)),e.dark&&t.push(F(`.dark`,e.dark)),t.join(`
|
|
2
|
-
`)}var ee=`mist`,te=[{id:ee,name:`Default`},{id:`blossom`,name:`Blossom`,light:{background:`oklch(0.982446 0.010114 325.653)`,foreground:`oklch(0.325698 0.116116 325.037)`,card:`oklch(0.971835 0.012884 321.894)`,"card-foreground":`oklch(0.325698 0.116116 325.037)`,popover:`oklch(1 0 0)`,"popover-foreground":`oklch(0.325698 0.116116 325.037)`,primary:`oklch(0.591646 0.217985 0.584)`,"primary-foreground":`oklch(1 0 0)`,secondary:`oklch(0.869588 0.06751 334.899)`,"secondary-foreground":`oklch(0.444777 0.134061 324.799)`,muted:`oklch(0.802407 0.090963 345.892)`,"muted-foreground":`oklch(0.428932 0.163929 354.332)`,accent:`oklch(0.939552 0.024286 321.664)`,"accent-foreground":`oklch(0.396296 0.025134 285.196)`,destructive:`oklch(0.627117 0.248974 7.734)`,border:`oklch(0.923531 0.021247 328.096)`,input:`oklch(0.851713 0.055822 336.6)`,ring:`oklch(0.591646 0.217985 0.584)`,"chart-1":`oklch(0.591646 0.217985 0.584)`},dark:{background:`oklch(0.22813 0.020366 307.469)`,foreground:`oklch(0.980735 0.004092 301.426)`,card:`oklch(0.267101 0.02016 311.799)`,"card-foreground":`oklch(0.980735 0.004092 301.426)`,popover:`oklch(0.154761 0.01316 338.901)`,"popover-foreground":`oklch(0.980735 0.004092 301.426)`,primary:`oklch(0.460685 0.185347 4.099)`,"primary-foreground":`oklch(0.901233 0.057189 343.694)`,secondary:`oklch(0.313674 0.030572 310.061)`,"secondary-foreground":`oklch(0.848252 0.038248 307.961)`,muted:`oklch(0.360924 0.021469 316.83)`,"muted-foreground":`oklch(0.880303 0.03077 342.696)`,accent:`oklch(0.364912 0.050794 308.491)`,"accent-foreground":`oklch(0.964695 0.009139 341.803)`,destructive:`oklch(0.458704 0.169677 3.815)`,border:`oklch(0.266943 0.015262 302.425)`,input:`oklch(0.266817 0.02897 344.461)`,ring:`oklch(0.591646 0.217985 0.584)`,"chart-1":`oklch(0.460685 0.185347 4.099)`}},{id:`grove`,name:`Grove`,light:{background:`oklch(0.972369 0.005497 157.15)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.972369 0.005497 157.15)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.932695 0.003778 160.944)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.523295 0.112292 158.089)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.936464 0.014601 163.554)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.945455 0.012308 162.879)`,"muted-foreground":`oklch(0.527266 0.012309 320.683)`,accent:`oklch(0.909438 0.021521 164.612)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.864831 0.01312 167.255)`,input:`oklch(0.829746 0.016084 168.234)`,ring:`oklch(0.523295 0.112292 158.089)`,"chart-1":`oklch(0.523295 0.112292 158.089)`},dark:{background:`oklch(0.260865 0.02152 162.75)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.260865 0.02152 162.75)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.411828 0.014378 166.627)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.796228 0.133058 157.319)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.380487 0.048313 159.608)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.339728 0.039456 160.274)`,"muted-foreground":`oklch(0.715427 0.010896 171.428)`,accent:`oklch(0.437021 0.060312 158.962)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.457475 0.044046 160.971)`,input:`oklch(0.519849 0.049896 160.863)`,ring:`oklch(0.796228 0.133058 157.319)`,"chart-1":`oklch(0.796228 0.133058 157.319)`}},{id:`ocean`,name:`Ocean`,light:{background:`oklch(0.974199 0.002856 241.597)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.974199 0.002856 241.597)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.934442 0.003181 269.1)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.536684 0.120219 247.01)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.939254 0.01193 241.729)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.948004 0.009649 241.695)`,"muted-foreground":`oklch(0.528741 0.01828 313.823)`,accent:`oklch(0.91295 0.018827 241.836)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.867646 0.013482 252.362)`,input:`oklch(0.832939 0.017389 252.598)`,ring:`oklch(0.536684 0.120219 247.01)`,"chart-1":`oklch(0.536684 0.120219 247.01)`},dark:{background:`oklch(0.242641 0.024125 250.573)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.242641 0.024125 250.573)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.398517 0.018232 255.72)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.758933 0.105833 241.548)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.358725 0.043145 244.911)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.319287 0.036766 246.065)`,"muted-foreground":`oklch(0.691936 0.016294 261.588)`,accent:`oklch(0.413315 0.051874 243.855)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.438653 0.039496 245.44)`,input:`oklch(0.500905 0.043574 244.781)`,ring:`oklch(0.758933 0.105833 241.548)`,"chart-1":`oklch(0.758933 0.105833 241.548)`}},{id:`ember`,name:`Ember`,light:{background:`oklch(0.976527 0.002685 60.725)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.976527 0.002685 60.725)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.936659 0.002879 29.96)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.552831 0.129438 44.656)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.942267 0.01151 50.785)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950842 0.009273 51.528)`,"muted-foreground":`oklch(0.530413 0.018453 341.181)`,accent:`oklch(0.916502 0.01832 49.597)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.870631 0.013204 39.431)`,input:`oklch(0.836213 0.017153 38.661)`,ring:`oklch(0.552831 0.129438 44.656)`,"chart-1":`oklch(0.552831 0.129438 44.656)`},dark:{background:`oklch(0.245899 0.019144 42.044)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.245899 0.019144 42.044)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.401111 0.014308 34.896)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.762174 0.124117 52.082)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.361499 0.044052 49.515)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.322144 0.03574 48.309)`,"muted-foreground":`oklch(0.692479 0.015227 30.963)`,accent:`oklch(0.416048 0.055354 50.484)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.44099 0.040202 48.807)`,input:`oklch(0.503003 0.045721 49.44)`,ring:`oklch(0.762174 0.124117 52.082)`,"chart-1":`oklch(0.762174 0.124117 52.082)`}},{id:`iris`,name:`Iris`,light:{background:`oklch(0.976531 0.003855 303.226)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.976531 0.003855 303.226)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.936665 0.005041 310.132)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.525348 0.15373 294.176)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.941387 0.014687 300.474)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950194 0.011956 300.733)`,"muted-foreground":`oklch(0.529955 0.022319 321.556)`,accent:`oklch(0.914882 0.022965 299.986)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.869608 0.018226 303.859)`,input:`oklch(0.834773 0.023405 303.676)`,ring:`oklch(0.525348 0.15373 294.176)`,"chart-1":`oklch(0.525348 0.15373 294.176)`},dark:{background:`oklch(0.225975 0.031062 293.741)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.225975 0.031062 293.741)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.386739 0.024023 297.509)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.671712 0.169136 293.929)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.325405 0.063614 294.23)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.291515 0.05276 294.209)`,"muted-foreground":`oklch(0.663321 0.025932 301.862)`,accent:`oklch(0.372436 0.07841 294.204)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.40874 0.058536 295.893)`,input:`oklch(0.46756 0.065775 296.265)`,ring:`oklch(0.671712 0.169136 293.929)`,"chart-1":`oklch(0.671712 0.169136 293.929)`}},{id:`slate`,name:`Slate`,light:{background:`#f5f7fa`,foreground:`#202b3b`,card:`#ffffff`,"card-foreground":`#202b3b`,popover:`#ffffff`,"popover-foreground":`#202b3b`,primary:`#465b78`,"primary-foreground":`#ffffff`,secondary:`#e7ecf2`,"secondary-foreground":`#202b3b`,muted:`#edf1f6`,"muted-foreground":`#526177`,accent:`#e0e7ef`,"accent-foreground":`#202b3b`,destructive:`#a52a34`,border:`#cad3df`,input:`#b9c5d4`,ring:`#465b78`,"chart-1":`#465b78`},dark:{background:`#141b26`,foreground:`#e8edf5`,card:`#1c2533`,"card-foreground":`#e8edf5`,popover:`#202b3b`,"popover-foreground":`#e8edf5`,primary:`#adc0dc`,"primary-foreground":`#141b26`,secondary:`#2a3648`,"secondary-foreground":`#e8edf5`,muted:`#243043`,"muted-foreground":`#afbdd0`,accent:`#33445d`,"accent-foreground":`#e8edf5`,destructive:`#fb8990`,border:`#43536a`,input:`#53647d`,ring:`#adc0dc`,"chart-1":`#adc0dc`}},{id:`sand`,name:`Sand`,light:{background:`#faf7f1`,foreground:`#352b22`,card:`#fffdf8`,"card-foreground":`#352b22`,popover:`#fffdf8`,"popover-foreground":`#352b22`,primary:`#765536`,"primary-foreground":`#ffffff`,secondary:`#eee6da`,"secondary-foreground":`#352b22`,muted:`#f2ece2`,"muted-foreground":`#6c5b49`,accent:`#e9ddcb`,"accent-foreground":`#352b22`,destructive:`#a52a34`,border:`#d9cbb8`,input:`#c9b79e`,ring:`#765536`,"chart-1":`#765536`},dark:{background:`#211c17`,foreground:`#f4ece0`,card:`#2c251e`,"card-foreground":`#f4ece0`,popover:`#352c23`,"popover-foreground":`#f4ece0`,primary:`#dcbc92`,"primary-foreground":`#211c17`,secondary:`#3c3227`,"secondary-foreground":`#f4ece0`,muted:`#352d24`,"muted-foreground":`#c9b9a5`,accent:`#4a3b2b`,"accent-foreground":`#f4ece0`,destructive:`#fb8990`,border:`#64503e`,input:`#79614b`,ring:`#dcbc92`,"chart-1":`#dcbc92`}},{id:`rosewood`,name:`Rosewood`,light:{background:`#fbf6f5`,foreground:`#3b262c`,card:`#fffafa`,"card-foreground":`#3b262c`,popover:`#fffafa`,"popover-foreground":`#3b262c`,primary:`#854252`,"primary-foreground":`#ffffff`,secondary:`#f0e2e5`,"secondary-foreground":`#3b262c`,muted:`#f5eaec`,"muted-foreground":`#76525d`,accent:`#edd6dd`,"accent-foreground":`#3b262c`,destructive:`#a52a34`,border:`#dfc5cc`,input:`#d0afb9`,ring:`#854252`,"chart-1":`#854252`},dark:{background:`#241a20`,foreground:`#f6e8ed`,card:`#30222a`,"card-foreground":`#f6e8ed`,popover:`#3a2932`,"popover-foreground":`#f6e8ed`,primary:`#e3a5b7`,"primary-foreground":`#241a20`,secondary:`#442e38`,"secondary-foreground":`#f6e8ed`,muted:`#3a2932`,"muted-foreground":`#d2b4c0`,accent:`#553441`,"accent-foreground":`#f6e8ed`,destructive:`#fb8990`,border:`#70505d`,input:`#856170`,ring:`#e3a5b7`,"chart-1":`#e3a5b7`}},{id:`aurora`,name:`Aurora`,light:{background:`#f2faf8`,foreground:`#193a37`,card:`#fafffe`,"card-foreground":`#193a37`,popover:`#fafffe`,"popover-foreground":`#193a37`,primary:`#216c63`,"primary-foreground":`#ffffff`,secondary:`#def0eb`,"secondary-foreground":`#193a37`,muted:`#e6f2ef`,"muted-foreground":`#456c66`,accent:`#eee5f6`,"accent-foreground":`#193a37`,destructive:`#a52a34`,border:`#bbd7d1`,input:`#a7c8c0`,ring:`#216c63`,"chart-1":`#216c63`},dark:{background:`#142321`,foreground:`#e1f5ef`,card:`#1d302d`,"card-foreground":`#e1f5ef`,popover:`#253d38`,"popover-foreground":`#e1f5ef`,primary:`#87d5c1`,"primary-foreground":`#142321`,secondary:`#29443e`,"secondary-foreground":`#e1f5ef`,muted:`#243c36`,"muted-foreground":`#a9cfc3`,accent:`#3d3352`,"accent-foreground":`#e1f5ef`,destructive:`#fb8990`,border:`#466b60`,input:`#568172`,ring:`#87d5c1`,"chart-1":`#87d5c1`}},{id:`midnight`,name:`Midnight`,light:{background:`#f5f6fb`,foreground:`#282e48`,card:`#fcfcff`,"card-foreground":`#282e48`,popover:`#fcfcff`,"popover-foreground":`#282e48`,primary:`#4f5f96`,"primary-foreground":`#ffffff`,secondary:`#e5e8f4`,"secondary-foreground":`#282e48`,muted:`#eceef7`,"muted-foreground":`#565f7d`,accent:`#dfe4f6`,"accent-foreground":`#282e48`,destructive:`#a52a34`,border:`#c7cee5`,input:`#b4bfdc`,ring:`#4f5f96`,"chart-1":`#4f5f96`},dark:{background:`#151a2b`,foreground:`#e8ecfa`,card:`#1f263b`,"card-foreground":`#e8ecfa`,popover:`#29314a`,"popover-foreground":`#e8ecfa`,primary:`#acbbed`,"primary-foreground":`#151a2b`,secondary:`#303954`,"secondary-foreground":`#e8ecfa`,muted:`#28314b`,"muted-foreground":`#b1bedf`,accent:`#3a466a`,"accent-foreground":`#e8ecfa`,destructive:`#fb8990`,border:`#48577d`,input:`#596990`,ring:`#acbbed`,"chart-1":`#acbbed`}},{id:`graphite`,name:`Graphite`,light:{background:`oklch(0.985 0 260)`,foreground:`oklch(0.25 0 260)`,card:`oklch(0.997 0 260)`,"card-foreground":`oklch(0.25 0 260)`,popover:`oklch(0.997 0 260)`,"popover-foreground":`oklch(0.25 0 260)`,primary:`oklch(0.32 0 0)`,"primary-foreground":`oklch(0.99 0 0)`,secondary:`oklch(0.94 0 260)`,"secondary-foreground":`oklch(0.25 0 260)`,muted:`oklch(0.955 0 260)`,"muted-foreground":`oklch(0.48 0 260)`,accent:`oklch(0.93 0 260)`,"accent-foreground":`oklch(0.25 0 260)`,destructive:`oklch(0.56 0.2 25)`,border:`oklch(0.9 0 260)`,input:`oklch(0.85 0 260)`,ring:`oklch(0.32 0 0)`,"chart-1":`oklch(0.32 0 0)`},dark:{background:`oklch(0.18 0 260)`,foreground:`oklch(0.95 0 260)`,card:`oklch(0.215 0 260)`,"card-foreground":`oklch(0.95 0 260)`,popover:`oklch(0.245 0 260)`,"popover-foreground":`oklch(0.95 0 260)`,primary:`oklch(0.92 0 0)`,"primary-foreground":`oklch(0.18 0 260)`,secondary:`oklch(0.28 0 260)`,"secondary-foreground":`oklch(0.95 0 260)`,muted:`oklch(0.26 0 260)`,"muted-foreground":`oklch(0.74 0 260)`,accent:`oklch(0.32 0 260)`,"accent-foreground":`oklch(0.95 0 260)`,destructive:`oklch(0.7 0.17 22)`,border:`oklch(0.32 0 260)`,input:`oklch(0.38 0 260)`,ring:`oklch(0.92 0 0)`,"chart-1":`oklch(0.92 0 0)`}},{id:`lagoon`,name:`Lagoon`,light:{background:`oklch(0.985 0.0096 200)`,foreground:`oklch(0.25 0.03 200)`,card:`oklch(0.997 0.0048 200)`,"card-foreground":`oklch(0.25 0.03 200)`,popover:`oklch(0.997 0.0048 200)`,"popover-foreground":`oklch(0.25 0.03 200)`,primary:`oklch(0.55 0.12 200)`,"primary-foreground":`oklch(0.99 0 0)`,secondary:`oklch(0.94 0.03 200)`,"secondary-foreground":`oklch(0.25 0.03 200)`,muted:`oklch(0.955 0.018 200)`,"muted-foreground":`oklch(0.48 0.036 200)`,accent:`oklch(0.93 0.048 200)`,"accent-foreground":`oklch(0.25 0.03 200)`,destructive:`oklch(0.56 0.2 25)`,border:`oklch(0.9 0.024 200)`,input:`oklch(0.85 0.03 200)`,ring:`oklch(0.55 0.12 200)`,"chart-1":`oklch(0.55 0.12 200)`},dark:{background:`oklch(0.18 0.024 200)`,foreground:`oklch(0.95 0.0096 200)`,card:`oklch(0.215 0.0264 200)`,"card-foreground":`oklch(0.95 0.0096 200)`,popover:`oklch(0.245 0.0264 200)`,"popover-foreground":`oklch(0.95 0.0096 200)`,primary:`oklch(0.76 0.102 200)`,"primary-foreground":`oklch(0.18 0.024 200)`,secondary:`oklch(0.28 0.03 200)`,"secondary-foreground":`oklch(0.95 0.0096 200)`,muted:`oklch(0.26 0.024 200)`,"muted-foreground":`oklch(0.74 0.0216 200)`,accent:`oklch(0.32 0.048 200)`,"accent-foreground":`oklch(0.95 0.0096 200)`,destructive:`oklch(0.7 0.17 22)`,border:`oklch(0.32 0.03 200)`,input:`oklch(0.38 0.03 200)`,ring:`oklch(0.76 0.102 200)`,"chart-1":`oklch(0.76 0.102 200)`}},{id:`dune`,name:`Dune`,light:{background:`oklch(0.985 0.0096 70)`,foreground:`oklch(0.25 0.03 70)`,card:`oklch(0.997 0.0048 70)`,"card-foreground":`oklch(0.25 0.03 70)`,popover:`oklch(0.997 0.0048 70)`,"popover-foreground":`oklch(0.25 0.03 70)`,primary:`oklch(0.55 0.12 70)`,"primary-foreground":`oklch(0.99 0 0)`,secondary:`oklch(0.94 0.03 70)`,"secondary-foreground":`oklch(0.25 0.03 70)`,muted:`oklch(0.955 0.018 70)`,"muted-foreground":`oklch(0.48 0.036 70)`,accent:`oklch(0.93 0.048 70)`,"accent-foreground":`oklch(0.25 0.03 70)`,destructive:`oklch(0.56 0.2 25)`,border:`oklch(0.9 0.024 70)`,input:`oklch(0.85 0.03 70)`,ring:`oklch(0.55 0.12 70)`,"chart-1":`oklch(0.55 0.12 70)`},dark:{background:`oklch(0.18 0.024 70)`,foreground:`oklch(0.95 0.0096 70)`,card:`oklch(0.215 0.0264 70)`,"card-foreground":`oklch(0.95 0.0096 70)`,popover:`oklch(0.245 0.0264 70)`,"popover-foreground":`oklch(0.95 0.0096 70)`,primary:`oklch(0.76 0.102 70)`,"primary-foreground":`oklch(0.18 0.024 70)`,secondary:`oklch(0.28 0.03 70)`,"secondary-foreground":`oklch(0.95 0.0096 70)`,muted:`oklch(0.26 0.024 70)`,"muted-foreground":`oklch(0.74 0.0216 70)`,accent:`oklch(0.32 0.048 70)`,"accent-foreground":`oklch(0.95 0.0096 70)`,destructive:`oklch(0.7 0.17 22)`,border:`oklch(0.32 0.03 70)`,input:`oklch(0.38 0.03 70)`,ring:`oklch(0.76 0.102 70)`,"chart-1":`oklch(0.76 0.102 70)`}},{id:`plum`,name:`Plum`,light:{background:`oklch(0.985 0.0112 320)`,foreground:`oklch(0.25 0.035 320)`,card:`oklch(0.997 0.0056 320)`,"card-foreground":`oklch(0.25 0.035 320)`,popover:`oklch(0.997 0.0056 320)`,"popover-foreground":`oklch(0.25 0.035 320)`,primary:`oklch(0.55 0.14 320)`,"primary-foreground":`oklch(0.99 0 0)`,secondary:`oklch(0.94 0.035 320)`,"secondary-foreground":`oklch(0.25 0.035 320)`,muted:`oklch(0.955 0.021 320)`,"muted-foreground":`oklch(0.48 0.042 320)`,accent:`oklch(0.93 0.056 320)`,"accent-foreground":`oklch(0.25 0.035 320)`,destructive:`oklch(0.56 0.2 25)`,border:`oklch(0.9 0.028 320)`,input:`oklch(0.85 0.035 320)`,ring:`oklch(0.55 0.14 320)`,"chart-1":`oklch(0.55 0.14 320)`},dark:{background:`oklch(0.18 0.028 320)`,foreground:`oklch(0.95 0.0112 320)`,card:`oklch(0.215 0.0308 320)`,"card-foreground":`oklch(0.95 0.0112 320)`,popover:`oklch(0.245 0.0308 320)`,"popover-foreground":`oklch(0.95 0.0112 320)`,primary:`oklch(0.76 0.119 320)`,"primary-foreground":`oklch(0.18 0.028 320)`,secondary:`oklch(0.28 0.035 320)`,"secondary-foreground":`oklch(0.95 0.0112 320)`,muted:`oklch(0.26 0.028 320)`,"muted-foreground":`oklch(0.74 0.0252 320)`,accent:`oklch(0.32 0.056 320)`,"accent-foreground":`oklch(0.95 0.0112 320)`,destructive:`oklch(0.7 0.17 22)`,border:`oklch(0.32 0.035 320)`,input:`oklch(0.38 0.035 320)`,ring:`oklch(0.76 0.119 320)`,"chart-1":`oklch(0.76 0.119 320)`}},{id:`moss`,name:`Moss`,light:{background:`oklch(0.985 0.0088 135)`,foreground:`oklch(0.25 0.0275 135)`,card:`oklch(0.997 0.0044 135)`,"card-foreground":`oklch(0.25 0.0275 135)`,popover:`oklch(0.997 0.0044 135)`,"popover-foreground":`oklch(0.25 0.0275 135)`,primary:`oklch(0.55 0.11 135)`,"primary-foreground":`oklch(0.99 0 0)`,secondary:`oklch(0.94 0.0275 135)`,"secondary-foreground":`oklch(0.25 0.0275 135)`,muted:`oklch(0.955 0.0165 135)`,"muted-foreground":`oklch(0.48 0.033 135)`,accent:`oklch(0.93 0.044 135)`,"accent-foreground":`oklch(0.25 0.0275 135)`,destructive:`oklch(0.56 0.2 25)`,border:`oklch(0.9 0.022 135)`,input:`oklch(0.85 0.0275 135)`,ring:`oklch(0.55 0.11 135)`,"chart-1":`oklch(0.55 0.11 135)`},dark:{background:`oklch(0.18 0.022 135)`,foreground:`oklch(0.95 0.0088 135)`,card:`oklch(0.215 0.0242 135)`,"card-foreground":`oklch(0.95 0.0088 135)`,popover:`oklch(0.245 0.0242 135)`,"popover-foreground":`oklch(0.95 0.0088 135)`,primary:`oklch(0.76 0.0935 135)`,"primary-foreground":`oklch(0.18 0.022 135)`,secondary:`oklch(0.28 0.0275 135)`,"secondary-foreground":`oklch(0.95 0.0088 135)`,muted:`oklch(0.26 0.022 135)`,"muted-foreground":`oklch(0.74 0.0198 135)`,accent:`oklch(0.32 0.044 135)`,"accent-foreground":`oklch(0.95 0.0088 135)`,destructive:`oklch(0.7 0.17 22)`,border:`oklch(0.32 0.0275 135)`,input:`oklch(0.38 0.0275 135)`,ring:`oklch(0.76 0.0935 135)`,"chart-1":`oklch(0.76 0.0935 135)`}},{id:`crimson`,name:`Crimson`,light:{background:`oklch(0.985 0.0136 20)`,foreground:`oklch(0.25 0.0425 20)`,card:`oklch(0.997 0.0068 20)`,"card-foreground":`oklch(0.25 0.0425 20)`,popover:`oklch(0.997 0.0068 20)`,"popover-foreground":`oklch(0.25 0.0425 20)`,primary:`oklch(0.55 0.17 20)`,"primary-foreground":`oklch(0.99 0 0)`,secondary:`oklch(0.94 0.0425 20)`,"secondary-foreground":`oklch(0.25 0.0425 20)`,muted:`oklch(0.955 0.0255 20)`,"muted-foreground":`oklch(0.48 0.051 20)`,accent:`oklch(0.93 0.068 20)`,"accent-foreground":`oklch(0.25 0.0425 20)`,destructive:`oklch(0.56 0.2 25)`,border:`oklch(0.9 0.034 20)`,input:`oklch(0.85 0.0425 20)`,ring:`oklch(0.55 0.17 20)`,"chart-1":`oklch(0.55 0.17 20)`},dark:{background:`oklch(0.18 0.034 20)`,foreground:`oklch(0.95 0.0136 20)`,card:`oklch(0.215 0.0374 20)`,"card-foreground":`oklch(0.95 0.0136 20)`,popover:`oklch(0.245 0.0374 20)`,"popover-foreground":`oklch(0.95 0.0136 20)`,primary:`oklch(0.76 0.1445 20)`,"primary-foreground":`oklch(0.18 0.034 20)`,secondary:`oklch(0.28 0.0425 20)`,"secondary-foreground":`oklch(0.95 0.0136 20)`,muted:`oklch(0.26 0.034 20)`,"muted-foreground":`oklch(0.74 0.0306 20)`,accent:`oklch(0.32 0.068 20)`,"accent-foreground":`oklch(0.95 0.0136 20)`,destructive:`oklch(0.7 0.17 22)`,border:`oklch(0.32 0.0425 20)`,input:`oklch(0.38 0.0425 20)`,ring:`oklch(0.76 0.1445 20)`,"chart-1":`oklch(0.76 0.1445 20)`}}],ne={light:{background:`#fcfcfc`,card:`#ffffff`,primary:`#1b4ed8`,accent:`#f4f4f5`},dark:{background:`#0a0a0a`,card:`#111111`,primary:`#346bf1`,accent:`#141414`}};function re(e,t){let n=t?e.dark:e.light,r=ne[t?`dark`:`light`];return n?{background:n.background??r.background,card:n.card??r.card,primary:n.primary??r.primary,accent:n.primary?`color-mix(in oklab, ${n.primary} 18%, ${n.background??r.background})`:r.accent}:{...r}}var ie={activity:400,thoughts:40,chat:100};function ae(e,t,n){let r=e??[],i=new Set(r.map(e=>e.id)),a=t.filter(e=>typeof e?.id==`number`&&!i.has(e.id));return[...r,...a].slice(-n)}var oe=class{records=new Map;listeners=new Set;reads=new Map;used=new Set;reader;currentStatus={connection:`connecting`,signedOut:!1};get(e){let t=this.records.get(e);if(t)return t;let n={version:0,data:void 0,loading:!1,error:void 0,stale:!1};return this.records.set(e,n),n}status(){return{...this.currentStatus}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}markUsed(e,t){this.reader=t;let n=e.filter(e=>!this.used.has(e));this.used=new Set(e);for(let e of n)this.read(e)}onHello(e){for(let t of this.used){let n=e[t];n!==void 0&&(this.get(t).version=n),this.read(t)}}onChanged(e,t){let n=this.get(e);n.version=t,this.used.has(e)?this.read(e):n.stale=!0,this.notify()}onFeedDelta(e){let t=this.get(`lobby`).data;t&&(this.get(`lobby`).data={...t,activity:ae(t.activity,e.activity??[],ie.activity),thoughts:ae(t.thoughts,e.thoughts??[],ie.thoughts),chat:ae(t.chat,e.chat??[],ie.chat)},this.notify())}onReplyDelta(e){let t=this.get(`lobby`),n=t.data;n&&(t.data={...n,reply:e},this.notify())}onStatus(e){this.currentStatus={...this.currentStatus,...e},this.notify()}async read(e){let t=this.reader;if(!t)return;let n=(this.reads.get(e)??0)+1;this.reads.set(e,n);let r=this.get(e);r.loading=!0,r.error=void 0,this.notify();try{let i=await t(e);if(this.reads.get(e)!==n)return;this.apply(r,i)}catch(t){if(this.reads.get(e)!==n)return;r.loading=!1,r.error=t instanceof Error?t.message:String(t)}this.notify()}apply(e,t){e.data=t,e.loading=!1,e.stale=!1,e.error=void 0}notify(){for(let e of[...this.listeners])e()}};function se(){return new oe}var L=se(),ce=/^[a-f0-9]{32}$/;function le(){return globalThis.location}function ue(){let e=le()?.search??``,t=new URLSearchParams(e).getAll(`project`);if(t.length){if(t.length!==1||!ce.test(t[0]))throw Error(`Invalid project ID. Choose a running project below.`);return t[0]}}function R(e){if(!e.startsWith(`/api/`)&&!e.startsWith(`/files/preview/`))return e;let t=ue();return t?`/projects/${t}${e}`:e}function z(e,t){if(!ce.test(e))throw Error(`Invalid project ID.`);let n=le();if(!n)throw Error(`Project switching requires a browser.`);let r=new URL(n.origin);r.pathname=n.pathname,r.searchParams.set(`project`,e),r.hash=`/${t}`,n.assign(r.href)}var de=`bot-lobby.projectFolders`,fe=new Map;function pe(){try{return globalThis.sessionStorage}catch{return}}function me(){try{let e=JSON.parse(pe()?.getItem(de)??`{}`);for(let[t,n]of Object.entries(e))ce.test(t)&&typeof n==`string`&&fe.set(t,n)}catch{}}function he(e){me();for(let t of e)ce.test(t.id)&&fe.set(t.id,t.cwd);try{pe()?.setItem(de,JSON.stringify(Object.fromEntries([...fe].slice(-64))))}catch{}}function ge(e){return fe.has(e)||me(),fe.get(e)}async function _e(e){let t;try{t=ue()}catch{return!1}if(!t)return!1;let n=ge(t);if(!n)return!1;let{projects:r}=await e();if(he(r),r.some(e=>e.id===t))return!1;let i=r.find(e=>e.cwd===n),a=le(),o=globalThis.history;if(!i||!a||!o)return!1;let s=new URL(a.origin);return s.pathname=a.pathname,s.search=a.search,s.searchParams.set(`project`,i.id),s.hash=globalThis.location?.hash??``,o.replaceState(null,``,s.href),!0}var ve=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=t,this.status=n}},ye={"Content-Type":`application/json`};async function be(e,t={}){let n=await fetch(e===`auth.login`||e.startsWith(`projects.`)?`/api/${e}`:R(`/api/${e}`),{method:`POST`,headers:ye,body:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new ve(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw r.code===`unauthorized`&&L.onStatus({signedOut:!0}),new ve(r.error,r.code,n.status);return r.result}function xe(){return globalThis.location}async function Se(){let e=xe(),t=e?new URLSearchParams(e.hash.replace(/^#/,``)).get(`token`):null;if(!t||!(await fetch(`/api/auth.login`,{method:`POST`,headers:ye,body:JSON.stringify({token:t}),credentials:`same-origin`}).catch(()=>void 0))?.ok)return!1;let n=globalThis.history;return n&&n.replaceState(null,``,e.pathname+e.search),L.onStatus({signedOut:!1}),!0}var Ce=`bot-lobby.palette`,we=`bot-lobby-palette`,Te=`custom`,Ee=new Set,De=ke();function Oe(e){let t=e;if(!t||typeof t.id!=`string`||typeof t.name!=`string`)return;let n=A(t.light),r=A(t.dark);if(n||r)return{id:t.id,name:t.name.slice(0,40),...n?{light:n}:{},...r?{dark:r}:{}}}function ke(){try{let e=localStorage.getItem(Ce);if(!e)return{id:ee,saved:[]};let t=JSON.parse(e),n=(t.saved??[]).map(Oe).filter(e=>!!e),r=Oe(t.legacy??(t.custom?{...t.custom,id:Te}:void 0)),i=new Set([...te.map(e=>e.id),...n.map(e=>e.id),...r?[Te]:[]]);return{id:t.id&&i.has(t.id)?t.id:ee,saved:n,...r?{legacy:r}:{}}}catch{return{id:ee,saved:[]}}}function Ae(e){return[...te,...e.saved,...e.legacy?[e.legacy]:[]]}function je(e){return Ae(e).find(t=>t.id===e.id)??te[0]}function Me(){if(typeof document>`u`)return;let e=I(je(De)),t=document.getElementById(we);if(!e){t?.remove();return}t||(t=document.createElement(`style`),t.id=we,document.head.appendChild(t)),t.textContent=e}function Ne(e){De=e;try{localStorage.setItem(Ce,JSON.stringify(e))}catch{}Me();for(let e of[...Ee])e()}function Pe(e){let t=e.themes.map(e=>Oe(e)).filter(e=>!!e),{legacy:n}=De;Ne({id:e.active??(De.id===Te&&n?Te:`mist`),saved:t,...n?{legacy:n}:{}})}var Fe;function Ie(e=!1){return Fe&&!e||(Fe=(async()=>{let e=await be(`themes.get`,{}),t=De.legacy;if(t){let n=e.active??(De.id===Te?void 0:De.id);e=await be(`themes.save`,{name:t.name,...t.light?{light:t.light}:{},...t.dark?{dark:t.dark}:{}}),n&&(e=await be(`themes.choose`,{id:n}));let{legacy:r,...i}=De;De=i}Pe(e)})().catch(()=>{Fe=void 0})),Fe}typeof window<`u`&&(Me(),window.addEventListener(`storage`,e=>{if(e.key===Ce){De=ke(),Me();for(let e of[...Ee])e()}}),window.addEventListener(`focus`,()=>void Ie(!0)));function Le(e){return Ee.add(e),()=>{Ee.delete(e)}}function Re(){let e=(0,m.useSyncExternalStore)(Le,()=>De,()=>De),t=(0,m.useCallback)(e=>{Ne({...De,id:e}),e!==Te&&be(`themes.choose`,{id:e}).then(Pe,()=>{})},[]),n=(0,m.useCallback)(async(e,t)=>(Pe(await be(`themes.save`,{name:t,...e.light?{light:e.light}:{},...e.dark?{dark:e.dark}:{}})),je(De)),[]),r=(0,m.useCallback)(async(e,t)=>Pe(await be(`themes.rename`,{id:e,name:t})),[]),i=(0,m.useCallback)(async e=>Pe(await be(`themes.remove`,{id:e})),[]),a=e.legacy?[...e.saved,e.legacy]:e.saved;return{active:je(e),saved:a,all:Ae(e),isSaved:e=>a.some(t=>t.id===e),choose:t,adopt:n,rename:r,remove:i}}var ze=[{id:`theme`,label:`System`,help:`The system's own (or the colour theme's)`},{id:`inter`,label:`Inter`,help:`Neutral and very legible`},{id:`geist`,label:`Geist`,help:`Crisp and modern`},{id:`plex`,label:`IBM Plex Sans`,help:`Technical, with character`},{id:`manrope`,label:`Manrope`,help:`Round and friendly`},{id:`dm-sans`,label:`DM Sans`,help:`Geometric, low contrast`},{id:`jakarta`,label:`Plus Jakarta Sans`,help:`Polished product sans`},{id:`figtree`,label:`Figtree`,help:`Clean and approachable`},{id:`outfit`,label:`Outfit`,help:`Geometric display feel`},{id:`nunito`,label:`Nunito`,help:`Soft rounded terminals`},{id:`space-grotesk`,label:`Space Grotesk`,help:`Quirky, technical`},{id:`source-sans`,label:`Source Sans 3`,help:`Classic UI workhorse`}],Be=[{id:`theme`,label:`System mono`,help:`The system's own (or the colour theme's)`},{id:`jetbrains`,label:`JetBrains Mono`,help:`Tall, made for code`},{id:`geist-mono`,label:`Geist Mono`,help:`Pairs with Geist`},{id:`fira-code`,label:`Fira Code`,help:`Ligatures for operators`},{id:`roboto-mono`,label:`Roboto Mono`,help:`Even and compact`},{id:`source-code`,label:`Source Code Pro`,help:`Open and readable`}],Ve={font:`bot-lobby.typeface`,mono:`bot-lobby.typeface-code`},He={font:ze,mono:Be},Ue={font:`theme`,mono:`theme`},We=new Set;function Ge(e){let t=null;try{t=localStorage.getItem(Ve[e])}catch{t=Ue[e]}return He[e].some(e=>e.id===t)?t:`theme`}function Ke(e,t){let n=document.documentElement;t===`theme`?delete n.dataset[e]:n.dataset[e]=t}function qe(e,t){Ue[e]=t;try{localStorage.setItem(Ve[e],t)}catch{}Ke(e,t);for(let e of We)e()}function Je(e){return We.add(e),()=>We.delete(e)}function Ye(e){return(0,m.useSyncExternalStore)(Je,()=>Ge(e),()=>`theme`)}typeof document<`u`&&(Ke(`font`,Ge(`font`)),Ke(`mono`,Ge(`mono`)));var Xe={inter:`"Inter Variable", system-ui, sans-serif`,geist:`"Geist Variable", system-ui, sans-serif`,plex:`"IBM Plex Sans Variable", system-ui, sans-serif`,manrope:`"Manrope Variable", system-ui, sans-serif`,jetbrains:`"JetBrains Mono Variable", ui-monospace, monospace`,"geist-mono":`"Geist Mono Variable", ui-monospace, monospace`,"dm-sans":`"DM Sans Variable", system-ui, sans-serif`,jakarta:`"Plus Jakarta Sans Variable", system-ui, sans-serif`,figtree:`"Figtree Variable", system-ui, sans-serif`,outfit:`"Outfit Variable", system-ui, sans-serif`,nunito:`"Nunito Variable", system-ui, sans-serif`,"space-grotesk":`"Space Grotesk Variable", system-ui, sans-serif`,"source-sans":`"Source Sans 3 Variable", system-ui, sans-serif`,"fira-code":`"Fira Code Variable", ui-monospace, monospace`,"roboto-mono":`"Roboto Mono Variable", ui-monospace, monospace`,"source-code":`"Source Code Pro Variable", ui-monospace, monospace`},Ze=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Qe=o(((e,t)=>{t.exports=Ze()})),$e=(0,m.createContext)({});function et(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var tt=typeof window<`u`?m.useLayoutEffect:m.useEffect,nt=(0,m.createContext)(null);function rt(e,t){e.indexOf(t)===-1&&e.push(t)}function it(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var at=(e,t,n)=>n>t?t:n<e?e:n,ot={},st=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ct=e=>typeof e==`object`&&!!e,lt=e=>/^0[^.\s]+$/u.test(e);function ut(e){let t;return()=>(t===void 0&&(t=e()),t)}var dt=e=>e,ft=(...e)=>e.reduce((e,t)=>n=>t(e(n))),pt=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},mt=class{constructor(){this.subscriptions=[]}add(e){return rt(this.subscriptions,e),()=>this.remove(e)}remove(e){it(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ht=e=>e*1e3,gt=e=>e/1e3,_t=(e,t)=>t?1e3/t*e:0,vt=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},yt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bt=1e-7,xt=12;function St(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=yt(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>bt&&++s<xt);return o}function Ct(e,t,n,r){if(e===t&&n===r)return dt;let i=t=>St(t,0,1,e,n);return e=>e===0||e===1?e:yt(i(e),t,r)}var wt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Tt=e=>t=>1-e(1-t),Et=Ct(.33,1.53,.69,.99),Dt=Tt(Et),Ot=wt(Dt),kt=e=>e>=1?1:(e*=2)<1?.5*Dt(e):.5*(2-2**(-10*(e-1))),At=e=>1-Math.sin(Math.acos(e)),jt=Tt(At),Mt=wt(At),Nt=Ct(.42,0,1,1),Pt=Ct(0,0,.58,1),Ft=Ct(.42,0,.58,1),It=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Lt(e,t){return It(e)?e[vt(0,e.length,t)]:e}var Rt=e=>Array.isArray(e)&&typeof e[0]==`number`,zt={linear:dt,easeIn:Nt,easeInOut:Ft,easeOut:Pt,circIn:At,circInOut:Mt,circOut:jt,backIn:Dt,backInOut:Ot,backOut:Et,anticipate:kt},Bt=e=>typeof e==`string`,Vt=e=>{if(Rt(e)){e.length;let[t,n,r,i]=e;return Ct(t,n,r,i)}return Bt(e)?(zt[e],`${e}`,zt[e]):e},Ht={delta:0,timestamp:0,isProcessing:!1},Ut;function Wt(){Ut=void 0}var Gt={now:()=>(Ut===void 0&&Gt.set(Ht.isProcessing||ot.useManualTiming?Ht.timestamp:performance.now()),Ut),set:e=>{Ut=e,queueMicrotask(Wt)}},Kt=e=>Math.round(e*1e5)/1e5,qt=e=>t=>typeof t==`string`&&t.startsWith(e),Jt=qt(`--`),Yt=qt(`var(--`),Xt=e=>Yt(e)?Zt.test(e.split(`/*`)[0].trim()):!1,Zt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Qt(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var $t={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},en={...$t,transform:e=>at(0,1,e)},tn={...$t,default:1},nn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rn(e){return e==null}var an=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,on=(e,t)=>n=>!!(typeof n==`string`&&an.test(n)&&n.startsWith(e)||t&&!rn(n)&&Object.prototype.hasOwnProperty.call(n,t)),sn=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(nn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},cn=e=>at(0,255,e),ln={...$t,transform:e=>Math.round(cn(e))},un={test:on(`rgb`,`red`),parse:sn(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ln.transform(e)+`, `+ln.transform(t)+`, `+ln.transform(n)+`, `+Kt(en.transform(r))+`)`};function dn(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var fn={test:on(`#`),parse:dn,transform:un.transform},pn=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mn=pn(`deg`),hn=pn(`%`),B=pn(`px`),gn=pn(`vh`),_n=pn(`vw`),vn={...hn,parse:e=>hn.parse(e)/100,transform:e=>hn.transform(e*100)},yn={test:on(`hsl`,`hue`),parse:sn(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+hn.transform(Kt(t))+`, `+hn.transform(Kt(n))+`, `+Kt(en.transform(r))+`)`},bn={test:e=>un.test(e)||fn.test(e)||yn.test(e),parse:e=>un.test(e)?un.parse(e):yn.test(e)?yn.parse(e):fn.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?un.transform(e):yn.transform(e),getAnimatableNone:e=>{let t=bn.parse(e);return t.alpha=0,bn.transform(t)}},xn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Sn=new RegExp(nn.source),Cn=new RegExp(xn.source,`i`);function wn(e){return isNaN(e)&&typeof e==`string`&&(Sn.test(e)||Cn.test(e))}var Tn=`number`,En=`color`,Dn=`var`,On=`var(`,kn="${}",An=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jn(e){let t=e.toString();return Sn.test(t)||Cn.test(t)}function Mn(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(An,e=>(bn.test(e)?(r.color.push(a),i.push(En),n.push(bn.parse(e))):e.startsWith(On)?(r.var.push(a),i.push(Dn),n.push(e)):(r.number.push(a),i.push(Tn),n.push(parseFloat(e))),++a,kn)).split(kn),indexes:r,types:i}}function Nn(e){return Mn(e).values}function Pn({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Tn?Kt(r[a]):e===En?bn.transform(r[a]):r[a]}return i}}function Fn(e){return Pn(Mn(e))}var In=e=>typeof e==`number`?0:bn.test(e)?bn.getAnimatableNone(e):e,Ln=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:In(e);function Rn(e){let t=Mn(e);return Pn(t)(t.values.map((e,n)=>Ln(e,t.split[n])))}var zn={test:wn,parse:Nn,createTransformer:Fn,getAnimatableNone:Rn};function Bn(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Vn({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Bn(s,r,e+1/3),a=Bn(s,r,e),o=Bn(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Hn(e,t){return n=>n>0?t:e}var Un=(e,t,n)=>e+(t-e)*n,Wn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Gn=[fn,un,yn],Kn=e=>Gn.find(t=>t.test(e));function qn(e){let t=Kn(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===yn&&(n=Vn(n)),n}var Jn=(e,t)=>{let n=qn(e),r=qn(t);if(!n||!r)return Hn(e,t);let i={...n};return e=>(i.red=Wn(n.red,r.red,e),i.green=Wn(n.green,r.green,e),i.blue=Wn(n.blue,r.blue,e),i.alpha=Un(n.alpha,r.alpha,e),un.transform(i))},Yn=new Set([`none`,`hidden`]);function Xn(e,t){return Yn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zn(e,t){return n=>Un(e,t,n)}function Qn(e){return typeof e==`number`?Zn:typeof e==`string`?Xt(e)?Hn:bn.test(e)?Jn:nr:Array.isArray(e)?$n:typeof e==`object`?bn.test(e)?Jn:er:Hn}function $n(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Qn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function er(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qn(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function tr(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var nr=(e,t)=>{let n=zn.createTransformer(t),r=Mn(e),i=Mn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yn.has(e)&&!i.values.length||Yn.has(t)&&!r.values.length?Xn(e,t):ft($n(tr(r,i),i.values),n):(`${e}${t}`,Hn(e,t))},rr=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ir(e,t){let n=rr.exec(e);if(!n)return;let r=rr.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Kt(Un(a,o,e))+i}function ar(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Un(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=ir(e,t);if(n)return n}return Qn(e)(e,t)}var or=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function sr(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var cr=40;function lr(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=or.reduce((e,t)=>(e[t]=sr(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ot.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,cr),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:or.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<or.length;t++)o[or[t]].cancel(e)},state:n,steps:o}}var{schedule:ur,cancel:dr,steps:fr}=lr(typeof requestAnimationFrame<`u`?requestAnimationFrame:dt,!0,Ht),pr=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ur.update(t,e),stop:()=>dr(t),now:()=>Ht.isProcessing?Ht.timestamp:Gt.now()}},mr=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},hr=2e4;function gr(e,t=50,n=hr,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function _r(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(gr(r),hr);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:gt(i)}}var vr={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},yr=e=>e<0?1/Math.max(1+e,vr.minDamping):Math.max(1-e,vr.minDamping);function br(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Cr(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function xr(e,t){return e*Math.sqrt(1-t*t)}var Sr=12;function Cr(e,t,n){let r=n;for(let n=1;n<Sr;n++)r-=e(r)/t(r);return r}var wr=.001;function Tr({duration:e=vr.duration,bounce:t=vr.bounce}){let n,r;vr.maxDuration;let i=yr(t);e=at(vr.minDuration,vr.maxDuration,gt(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=xr(t,i),o=Math.exp(-r);return wr-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=xr(t*t,i);return(-n(t)+wr>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Cr(n,r,a),s=o*br(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:ht(e)}}var Er=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Dr(e,t){if(Er(e,t))return e}function Or(e){let t=Dr(e.stiffness),n=Dr(e.damping,!0),r=Dr(e.mass),i={...e,stiffness:t??vr.stiffness,damping:n??vr.damping,mass:r??vr.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=yr(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*br(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Tr(i)),i.isResolvedFromDuration=!0;(!Er(i.stiffness)||!Er(i.damping,!0))&&(i.stiffness=vr.stiffness,i.damping=vr.damping)}return i}function kr(e=vr.visualDuration,t=vr.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Or({...n}),f=e=>d?0:-gt(e),p=s/(2*Math.sqrt(o*c)),m=gt(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?vr.restSpeed.granular:vr.restSpeed.default),g.restDelta=n.restDelta||(e?vr.restDelta.granular:vr.restDelta.default)};_();let v,y,b;if(p<1){let e=xr(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>ht(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=ht(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(gr(S),hr),t=mr(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}kr.applyToOptions=e=>{let t=_r(e,100,kr);return e.ease=t.ease,e.duration=ht(t.duration),e.type=`keyframes`,e};function Ar({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=kr({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function jr(e,t,n){let r=[],i=n||ot.mix||ar,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ft(Array.isArray(t)?t[n]||dt:t,a)),r.push(a)}return r}function Mr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=jr(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=pt(e[r],e[r+1],n);return s[r](i)};return n?t=>l(at(e[0],e[a-1],t)):l}function Nr(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=pt(0,t,r);e.push(Un(n,1,i))}}function Pr(e){let t=[0];return Nr(t,e.length-1),t}function Fr(e,t){return e.map(e=>e*t)}function Ir(e,t){return e.map(()=>t||Ft).splice(0,e.length-1)}function Lr({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=It(r)?r.map(Vt):Vt(r)||Ft,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(ot.mix||ar)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?at(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Mr(Fr(n&&n.length===t.length?n:Pr(t),e),t,{ease:Array.isArray(i)?i:Ir(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Rr=5;function zr(e,t,n){let r=Math.max(t-Rr,0);return _t(n-e(r),t-r)}function Br(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):zr(t=>e.next(t).value,t,e.next(t).value)}var Vr=e=>e!==null;function Hr(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Vr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Ur={decay:Ar,inertia:Ar,tween:Lr,keyframes:Lr,spring:kr};function Wr(e){typeof e.type==`string`&&(e.type=Ur[e.type])}function Gr(e,t){return{kind:e,animation:t,timestamp:Gt.now(),frameTimestamp:Ht.timestamp,frameIsProcessing:Ht.isProcessing}}function Kr(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Gr(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function qr(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Gr(`layout-animation-start`,e),node:t})}catch{}}var Jr=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Yr=e=>e/100,Xr=class extends Jr{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Gt.now()&&this.tick(Gt.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Kr(this,this.options)}initAnimation(){let{options:e}=this;Wr(e);let{type:t=Lr,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Lr;s!==Lr&&typeof o[0]!=`number`&&(this.mixKeyframes=ft(Yr,ar(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=gr(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=at(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Ar&&(b.value=Hr(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return gt(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+gt(e)}get time(){return gt(this.currentTime)}set time(e){e=ht(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Br(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Gt.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=gt(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=pr,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Gt.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Zr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Qr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(nn)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Zr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var $r=/\b([a-z-]*)\(.*?\)/gu,ei={...zn,getAnimatableNone:e=>{let t=e.match($r);return t?t.map(Qr).join(` `):e}},ti={...zn,getAnimatableNone:e=>{let t=zn.parse(e);return zn.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},ni={...$t,transform:Math.round},ri={rotate:mn,pathRotation:mn,rotateX:mn,rotateY:mn,rotateZ:mn,scale:tn,scaleX:tn,scaleY:tn,scaleZ:tn,skew:mn,skewX:mn,skewY:mn,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:en,originX:vn,originY:vn,originZ:B},ii={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...ri,zIndex:ni,fillOpacity:en,strokeOpacity:en,numOctaves:ni},ai={...ii,color:bn,backgroundColor:bn,outlineColor:bn,fill:bn,stroke:bn,borderColor:bn,borderTopColor:bn,borderRightColor:bn,borderBottomColor:bn,borderLeftColor:bn,filter:ei,WebkitFilter:ei,mask:ti,WebkitMask:ti},oi=e=>ai[e],si=new Set([ei,ti]);function ci(e,t){let n=oi(e);return si.has(n)||(n=zn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function li(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ui=e=>e*180/Math.PI,di=e=>pi(ui(Math.atan2(e[1],e[0]))),fi={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:di,rotateZ:di,skewX:e=>ui(Math.atan(e[1])),skewY:e=>ui(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},pi=e=>(e%=360,e<0&&(e+=360),e),mi=di,hi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),gi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_i={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hi,scaleY:gi,scale:e=>(hi(e)+gi(e))/2,rotateX:e=>pi(ui(Math.atan2(e[6],e[5]))),rotateY:e=>pi(ui(Math.atan2(-e[2],e[0]))),rotateZ:mi,rotate:mi,skewX:e=>ui(Math.atan(e[4])),skewY:e=>ui(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function vi(e){return+!!e.includes(`scale`)}function yi(e,t){if(!e||e===`none`)return vi(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=_i,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=fi,i=t}if(!i)return vi(t);let a=r[t],o=i[1].split(`,`).map(xi);return typeof a==`function`?a(o):o[a]}var bi=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return yi(n,t)};function xi(e){return parseFloat(e.trim())}var Si=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Ci=new Set([...Si,`pathRotation`]),wi=e=>e===$t||e===B,Ti=new Set([`x`,`y`,`z`]),Ei=Si.filter(e=>!Ti.has(e));function Di(e){let t=[];return Ei.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Oi=new Set([`bottom`,`right`]);function ki(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Ai={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>ki(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>ki(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>yi(e,`x`),y:({transform:e})=>yi(e,`y`)};Ai.translateX=Ai.x,Ai.translateY=Ai.y;var ji=new Set,Mi=!1,Ni=!1,Pi=!1;function Fi(){if(Ni){let e=[],t=new Set,n=new Set;ji.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Oi.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Di(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Ni=!1,Mi=!1,ji.forEach(e=>e.complete(Pi)),ji.clear()}function Ii(){ji.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ni=!0)})}function Li(){Pi=!0,Ii(),Fi(),Pi=!1}function Ri(e,t,n){if(typeof e==`string`){if(st(e)||lt(e))return parseFloat(e);if(!zn.test(e)&&zn.test(n))return ci(t,n)}return e??void 0}var zi=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(ji.add(this),Mi||(Mi=!0,ur.read(Ii),ur.resolveKeyframes(Fi))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Ri(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}li(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ji.delete(this)}cancel(){this.state===`scheduled`&&(ji.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Bi=e=>e.startsWith(`--`);function Vi(e,t,n){Bi(t)?e.style.setProperty(t,n):e.style[t]=n}var Hi={};function Ui(e,t){let n=ut(e);return()=>Hi[t]??n()}var Wi=Ui(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Gi=Ui(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qi={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ki([0,.65,.55,1]),circOut:Ki([.55,0,1,.45]),backIn:Ki([.31,.01,.66,-.59]),backOut:Ki([.33,1.53,.69,.99])};function Ji(e,t){if(e)return typeof e==`function`?Gi()?mr(e,t):`ease-out`:Rt(e)?Ki(e):Array.isArray(e)?e.map(e=>Ji(e,t)||qi.easeOut):qi[e]}function Yi(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Ji(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Xi(e){return typeof e==`function`&&`applyToOptions`in e}function Zi({type:e,...t}){return Xi(e)&&Gi()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Qi=class extends Jr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Zi(e);this.animation=Yi(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Hr(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Vi(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Kr(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return gt(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+gt(e)}get time(){return gt(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ht(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Wi()?(this.animation.timeline=e,t?.(this.animation),dt):n(this)}},$i={anticipate:kt,backInOut:Ot,circInOut:Mt};function ea(e){return e in $i}function ta(e){typeof e.ease==`string`&&ea(e.ease)&&(e.ease=$i[e.ease])}var V=10,na=class extends Qi{constructor(e){ta(e),Wr(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Xr({...a,autoplay:!1}),s=Math.max(V,Gt.now()-this.startTime),c=at(0,V,s-V),l=o.sample(s).value,{name:u}=this.options;i&&u&&Vi(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},ra=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(zn.test(e)||e===`0`)&&!e.startsWith(`url(`));function ia(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function aa(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ra(i,t),s=ra(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):ia(e)||(n===`spring`||Xi(n))&&r}function oa(e){e.duration=0,e.type=`keyframes`}var sa=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),ca=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function la(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&ca.test(e[t]))return!0;return!1}var ua=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),da=ut(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function fa(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(sa.has(n)||ua.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return da()&&(sa.has(n)||ua.has(n)&&la(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var pa=40,ma=class extends Jr{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Gt.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||zi;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Gt.now();let u=!0;aa(e,i,a,o)||(u=!1,(ot.instantAnimations||!s)&&l?.(Hr(e,n,t)),e[0]=e[e.length-1],oa(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>pa?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&fa(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new na(n)}catch{m=new Xr(n)}}else m=new Xr(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Li()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},ha=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return ga(this.animations,`duration`)}get iterationDuration(){return ga(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function ga(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var _a=class extends ha{then(e,t){return this.finished.finally(e).then(()=>{})}};function va(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var ya=30,ba=e=>!isNaN(parseFloat(e)),xa={current:void 0},Sa=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Gt.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Gt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ba(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new mt)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new mt,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){ur.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return xa.current&&xa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ya)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ya);return _t(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ca(e,t){return new Sa(e,t)}function wa(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Ta(e,t){let n=e?.[t]??e?.default??e;return n===e?n:wa(n,e)}var Ea={type:`spring`,stiffness:500,damping:25,restSpeed:10},Da=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Oa={type:`keyframes`,duration:.8},ka={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Aa=(e,{keyframes:t})=>t.length>2?Oa:Ci.has(e)?e.startsWith(`scale`)?Da(t[1]):Ea:ka,ja=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Ma(e){for(let t in e)if(!ja.has(t))return!0;return!1}var Na=(e,t,n,r={},i,a)=>o=>{let s=Ta(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ht(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ma(s)||Object.assign(u,Aa(e,u)),u.duration&&=ht(u.duration),u.repeatDelay&&=ht(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(oa(u),u.delay===0&&(d=!0)),(ot.instantAnimations||ot.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,oa(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Hr(u.keyframes,s);if(e!==void 0){ur.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Xr(u):new ma(u)},Pa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fa(e){let t=Pa.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ia(e,t,n=1){`${e}`;let[r,i]=Fa(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return st(e)?parseFloat(e):e}return Xt(i)?Ia(i,t,n+1):i}function La(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ra(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...La(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function za(e,t,n){return Ra(e.getProps(),t,n,e)}var Ba=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Va=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Si]),Ha=e=>Array.isArray(e);function Ua(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ca(n))}function Wa(e){return Ha(e)?e[e.length-1]||0:e}function Ga(e,t){let{transitionEnd:n={},transition:r={},...i}=za(e,t)||{};i={...i,...n};for(let t in i)Ua(e,t,Wa(i[t]))}var Ka=e=>!!(e&&e.getVelocity);function qa(e){return!!(Ka(e)&&e.add)}function Ja(e,t){let n=e.getValue(`willChange`);if(qa(n))return n.add(t);if(!n&&ot.WillChange){let n=new ot.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ya(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Xa=`data-`+Ya(`framerAppearId`);function Za(e){return e.props[Xa]}var Qa=typeof window<`u`;function $a({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function eo(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?wa(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&$a(f,t))continue;let o={delay:n,...Ta(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ur.update(()=>r.set(i));continue}let p=!1;if(Qa&&window.MotionHandoffAnimation){let n=Za(e);if(n){let e=window.MotionHandoffAnimation(n,t,ur);e!==null&&(o.startTime=e,p=!0)}}Ja(e,t);let m=l??e.shouldReduceMotion;r.start(Na(t,r,i,m&&Va.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>ur.update(()=>{o&&Ga(e,o)});d.length?Promise.all(d).then(t):t()}return d}function to(e,t,n={}){let r=za(e,t,Ba(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?eo(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(to(e,t,{...n,delay:r+(typeof o==`function`?0:o)+va(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function no(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>to(e,t,n))):typeof t==`string`?to(e,t,n):Promise.all(eo(e,za(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var ro={test:e=>e===`auto`,parse:e=>e},io=e=>t=>t.test(e),ao=[$t,B,hn,mn,_n,gn,ro],oo=e=>ao.find(io(e));function so(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||lt(e)}var co=new Set([`auto`,`none`,`0`]);function lo(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!co.has(t)&&jn(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=ci(n,i))}var uo=class extends zi{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Xt(r))){let i=Ia(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Va.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=oo(r),o=oo(i);if(Qt(r)!==Qt(i)&&Ai[n]){this.needsMeasurement=!0;return}if(a!==o){if(wi(a)&&wi(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Ai[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||so(e[t]))&&n.push(t);n.length&&lo(e,n,t)}measure(){let{element:e,name:t}=this;return Ai[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},fo=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],po=[];function mo(e){typeof e.test==`function`&&e.read,ho(e),po.unshift(e)}function ho(e){it(po,e)}function go(e){return po.find(t=>t.test(e))}function _o(e,t,n={},r){let i=[],{velocity:a}=n,o=n.reduceMotion??r?.shouldReduceMotion;for(let s in t){if(s===`transition`||s===`transitionEnd`)continue;let c=t[s];if(c===void 0)continue;let l=e(s),u=l.get();if(u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a){ur.update(()=>l.set(c));continue}l.start(Na(s,l,c,o&&Va.has(s)?{type:!1}:n,r)),l.animation&&i.push(l.animation)}let{transitionEnd:s}=t;if(s){let t=()=>ur.update(()=>{for(let t in s)e(t).set(s[t])});i.length?Promise.all(i).then(t):t()}return i}function vo(e,t,n,r,i){return _o(r=>{let a=e.get(t,r);if(!a){let o;if(!i){let i=n[r];o=yo(i)??e.read(t,r,i),`${r}`}a=Ca(o,{owner:i}),e(t,{[r]:a})}return a},n,r,i)}function yo(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function bo(e){return ct(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function xo(e){return ct(e)&&`ownerSVGElement`in e}var So=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Co(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var wo=class{constructor(e=ur.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function To(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new wo(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}var Eo={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Do={};function Oo(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].get();a!==void 0&&(typeof a==`number`?a:parseFloat(a))!==+!!i.startsWith(`scale`)&&(t+=(t&&` `)+(Do[i]||(Do[i]=(Eo[i]||i)+`(`))+So(a,ri[i])+`)`)}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+`rotate(`+So(i,ri.pathRotation)+`)`),t||`none`}var ko=new Set([`originX`,`originY`,`originZ`]),Ao=(e,t)=>So(e.get(t)?.get(),ii[t]),jo=(e,t,n,r)=>{let i,a;if(Ci.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>Si.indexOf(e)-Si.indexOf(t)))}t.get(`transform`)||(!bo(e)&&!t.get(`transformBox`)&&jo(e,t,`transformBox`,new Sa(`fill-box`)),t.set(`transform`,new Sa(`none`),()=>{e.style.transform=Oo(t)})),a=t.get(`transform`)}else ko.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new Sa(``),()=>{let n=Ao(t,`originX`)??`50%`,r=Ao(t,`originY`)??`50%`,i=Ao(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=Bi(n)?()=>{e.style.setProperty(n,r.get())}:()=>{e.style[n]=So(r.get(),ii[n])};return t.set(n,r,i,a)},Mo=e=>bo(e)||xo(e),No=(e,t)=>{if(Ci.has(t))return bi(e,t);let n=getComputedStyle(e),r=Bi(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},Po=To(jo,{test:Mo,read:No}),Fo={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Io=Si.length;function Lo(e,t,n){let r=``,i=!0;for(let a=0;a<Io;a++){let o=Si[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=So(s,ii[o]);if(!c){i=!1;let t=Fo[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${So(a,ii.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ro(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Ci.has(e)){o=!0;continue}if(Jt(e)){i[e]=n;continue}{let t=So(n,ii[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Lo(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var zo={offset:`stroke-dashoffset`,array:`stroke-dasharray`},H={offset:`strokeDashoffset`,array:`strokeDasharray`};function Bo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?zo:H;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Vo=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ho(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ro(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Vo)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Bo(d,i,a,o,!1)}function Uo(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var Wo=(e,t,n,r,i=n)=>{let a=Uo(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=Ya(i));let o=ii[n]||ii[i],s=a?()=>{e[i]=So(r.get(),ii[n])}:()=>{let t=So(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Go(e,t,n,r){return ur.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new Sa(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var Ko=To((e,t,n,r)=>n.startsWith(`path`)?Go(e,t,n,r):n.startsWith(`attr`)?Wo(e,t,n,r,qo(n)):(Ci.has(n)||ko.has(n)||Bi(n)||n in e.style?jo:Wo)(e,t,n,r),{test:xo,read:(e,t)=>Ci.has(t)?ii[t]?.default||0:Bi(t)||Vo.includes(t)?No(e,t)||e.getAttribute(Ya(t))||0:(t=qo(t),e.getAttribute(Ya(t))??e.getAttribute(t)??void 0)});function qo(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function Jo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xo(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zo(e){return e===void 0||e===1}function Qo({scale:e,scaleX:t,scaleY:n}){return!Zo(e)||!Zo(t)||!Zo(n)}function $o(e){return Qo(e)||es(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function es(e){return ts(e.x)||ts(e.y)}function ts(e){return e&&e!==`0%`}function ns(e,t,n){return n+t*(e-n)}function rs(e,t,n,r,i){return i!==void 0&&(e=ns(e,i,r)),ns(e,n,r)+t}function is(e,t=0,n=1,r,i){e.min=rs(e.min,t,n,r,i),e.max=rs(e.max,t,n,r,i)}function as(e,{x:t,y:n}){is(e.x,t.translate,t.scale,t.originPoint),is(e.y,n.translate,n.scale,n.originPoint)}var os=.999999999999,ss=1.0000000000001;function cs(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ls(e.x,-a.scroll.offset.x),ls(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,as(e,o)),r&&$o(a.latestValues)&&fs(e,a.latestValues,a.layout?.layoutBox))}t.x<ss&&t.x>os&&(t.x=1),t.y<ss&&t.y>os&&(t.y=1)}function ls(e,t){e.min+=t,e.max+=t}function us(e,t,n,r,i=.5){is(e,t,n,Un(e.min,e.max,i),r)}function ds(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function fs(e,t,n){let r=n??e;us(e.x,ds(t.x,r.x),t.scaleX,t.scale,t.originX),us(e.y,ds(t.y,r.y),t.scaleY,t.scale,t.originY)}function ps(e,t){return Jo(Xo(e.getBoundingClientRect(),t))}function ms(e,t,n){let r=ps(e,n),{scroll:i}=t;return i&&(ls(r.x,i.offset.x),ls(r.y,i.offset.y)),r}var hs={},gs=e=>xo(e)?Ko:Po,_s=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=uo}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return ps(this.current)}getProps(){return hs}};function vs(e,t,n,r){if(r)return _o(e=>r.getValue(e,null),t,n,r);let i=gs(e);return vo(i,e,t,n,new _s(i,e))}var ys=To((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>ct(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:bs,cancel:xs}=lr(queueMicrotask,!1),Ss={x:!1,y:!1};function Cs(){return Ss.x||Ss.y}function ws(e){return e===`x`||e===`y`?Ss[e]?null:(Ss[e]=!0,()=>{Ss[e]=!1}):Ss.x||Ss.y?null:(Ss.x=Ss.y=!0,()=>{Ss.x=Ss.y=!1})}function Ts(e,t){let n=Co(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Es(e){return!(e.pointerType===`touch`||Cs())}function Ds(e,t,n={}){let[r,i,a]=Ts(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Es(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Os=(e,t)=>t?e===t||Os(e,t.parentElement):!1,ks=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,As=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function js(e){return As.has(e.tagName)||e.isContentEditable===!0}var Ms=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ns(e){return Ms.has(e.tagName)||e.isContentEditable===!0}var Ps=new WeakSet;function Fs(e){return t=>{t.key===`Enter`&&e(t)}}function Is(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ls=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Fs(()=>{if(Ps.has(n))return;Is(n,`down`);let e=Fs(()=>{Is(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Is(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Rs(e){return ks(e)&&!Cs()}var zs=new WeakSet;function Bs(e,t,n={}){let[r,i,a]=Ts(e,n),o=e=>{let r=e.currentTarget;if(!Rs(e)||zs.has(e))return;Ps.add(r),n.stopPropagation&&zs.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Ps.has(r)&&Ps.delete(r),Rs(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Os(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),bo(e)&&(e.addEventListener(`focus`,e=>Ls(e,i)),!js(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var Vs=new WeakMap,Hs,Us=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:xo(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ws=Us(`inline`,`width`,`offsetWidth`),Gs=Us(`block`,`height`,`offsetHeight`);function Ks({target:e,borderBoxSize:t}){Vs.get(e)?.forEach(n=>{n(e,{get width(){return Ws(e,t)},get height(){return Gs(e,t)}})})}function qs(e){e.forEach(Ks)}function Js(){typeof ResizeObserver<`u`&&(Hs=new ResizeObserver(qs))}function Ys(e,t){Hs||Js();let n=Co(e);return n.forEach(e=>{let n=Vs.get(e);n||(n=new Set,Vs.set(e,n)),n.add(t),Hs?.observe(e)}),()=>{n.forEach(e=>{let n=Vs.get(e);n?.delete(t),n?.size||Hs?.unobserve(e)})}}var Xs=new Set,Zs;function Qs(){Zs=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xs.forEach(t=>t(e))},window.addEventListener(`resize`,Zs)}function $s(e){return Xs.add(e),Zs||Qs(),()=>{Xs.delete(e),!Xs.size&&typeof Zs==`function`&&(window.removeEventListener(`resize`,Zs),Zs=void 0)}}function ec(e,t){return typeof e==`function`?$s(e):Ys(e,t)}var tc={value:null,addProjectionMetrics:null};function nc(e){return xo(e)&&e.tagName===`svg`}var rc=e=>typeof e==`number`?e:parseFloat(e),ic=()=>({translate:0,scale:1,origin:0,originPoint:0}),ac=()=>({x:ic(),y:ic()}),oc=()=>({min:0,max:0}),sc=()=>({x:oc(),y:oc()}),cc=new WeakMap;function lc(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function uc(e){return typeof e==`string`||Array.isArray(e)}var dc=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],fc=[`initial`,...dc];function pc(e){if(lc(e.animate))return!0;for(let t=0;t<fc.length;t++)if(uc(e[fc[t]]))return!0;return!1}function mc(e){return!!(pc(e)||e.variants)}function hc(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Ka(i))e.addValue(r,i);else if(Ka(a))e.addValue(r,Ca(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ca(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var gc={current:null},_c={current:!1},vc=typeof window<`u`;function yc(){if(_c.current=!0,vc){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>gc.current=e.matches;e.addEventListener(`change`,t),t()}else gc.current=!1}}var bc=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],xc={};function Sc(e){xc=e}function Cc(){return xc}var wc=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Gt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ur.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=pc(t),this.isVariantNode=mc(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Ka(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,cc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(_c.current||yc(),this.shouldReduceMotion=gc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),dr(this.notifyUpdate),dr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&sa.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Qi({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ht(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Ci.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ur.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in xc){let t=xc[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sc()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<bc.length;t++){let n=bc[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=hc(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ca(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(st(n)||lt(n))?n=parseFloat(n):typeof n!=`number`&&!zn.test(n)&&zn.test(t)&&(n=ci(e,t)),this.setBaseTarget(e,Ka(n)?n.get():n)),Ka(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new mt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){bs.render(this.render)}},Tc=class extends wc{constructor(){super(...arguments),this.KeyframeResolver=uo}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Ka(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Ec=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Dc(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}var Oc={};function kc(e,{layout:t,layoutId:n}){return Ci.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Oc[e]||e===`opacity`)}function Ac(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Ka(r[t])||i&&Ka(i[t])||kc(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function jc(e){return window.getComputedStyle(e)}var Mc=class extends Tc{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Dc}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Ci.has(t))return this.projection?.isProjecting?vi(t):bi(e,t);{let n=jc(e),r=(Jt(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ps(e,t)}build(e,t,n){Ro(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ac(e,t,n)}},Nc=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Pc=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Fc(e,t,n,r){Dc(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Nc.has(n)?n:Ya(n),t.attrs[n])}function Ic(e,t,n){let r=Ac(e,t,n);for(let n in e)if(Ka(e[n])||Ka(t[n])){let t=Si.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Lc=class extends Tc{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=sc}getBaseTargetFromProps(e,t){return Ci.has(t)?super.getBaseTargetFromProps(e,t)??vi(t):e[t]}getDefaultValue(e){return Ci.has(e)?this.latestValues[e]??vi(e):void 0}readValueFromInstance(e,t){if(Ci.has(t)){let e=oi(t);return e&&e.default||0}if(Vo.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Nc.has(t)?t:Ya(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ic(e,t,n)}build(e,t,n){Ho(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Fc(e,t,n,r)}mount(e){this.isSVGTag=Pc(e.tagName),super.mount(e)}};function Rc(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var zc=[...dc].reverse();function Bc(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>no(e,t,n))),n=Hc(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(zc.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?uc(g)||g===!1?g:void 0:h,v=uc(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||lc(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=Vc(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=za(e,n,Ba(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!Rc(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=za(s,n)?.transition?.delayChildren;r.delay=va(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&za(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!Ka(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Hc(),i=!0}}}function Vc(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Rc(t,e):!1}function Hc(){let e={};for(let t of dc)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Uc(e,t){e.min=t.min,e.max=t.max}function Wc(e,t){Uc(e.x,t.x),Uc(e.y,t.y)}function Gc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Kc=.9999,qc=1.0001,Jc=-.01,Yc=.01;function Xc(e){return e.max-e.min}function Zc(e,t,n){return Math.abs(e-t)<=n}function Qc(e,t,n,r=.5){e.origin=r,e.originPoint=Un(t.min,t.max,e.origin),e.scale=Xc(n)/Xc(t),e.translate=Un(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Kc&&e.scale<=qc||isNaN(e.scale))&&(e.scale=1),(e.translate>=Jc&&e.translate<=Yc||isNaN(e.translate))&&(e.translate=0)}function $c(e,t,n,r){Qc(e.x,t.x,n.x,r?r.originX:void 0),Qc(e.y,t.y,n.y,r?r.originY:void 0)}function el(e,t,n,r=0){e.min=(r?Un(n.min,n.max,r):n.min)+t.min,e.max=e.min+Xc(t)}function tl(e,t,n,r){el(e.x,t.x,n.x,r?.x),el(e.y,t.y,n.y,r?.y)}function nl(e,t,n,r=0){let i=r?Un(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Xc(t)}function rl(e,t,n,r){nl(e.x,t.x,n.x,r?.x),nl(e.y,t.y,n.y,r?.y)}function il(e,t,n,r,i){return e-=t,e=ns(e,1/n,r),i!==void 0&&(e=ns(e,1/i,r)),e}function al(e,t=0,n=1,r=.5,i,a=e,o=e){if(hn.test(t)&&(t=parseFloat(t),t=Un(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Un(a.min,a.max,r);e===a&&(s-=t),e.min=il(e.min,t,n,s,i),e.max=il(e.max,t,n,s,i)}function ol(e,t,[n,r,i],a,o){al(e,t[n],t[r],t[i],t.scale,a,o)}var sl=[`x`,`scaleX`,`originX`],cl=[`y`,`scaleY`,`originY`];function ll(e,t,n,r){ol(e.x,t,sl,n?n.x:void 0,r?r.x:void 0),ol(e.y,t,cl,n?n.y:void 0,r?r.y:void 0)}function ul(e){return e.translate===0&&e.scale===1}function dl(e){return ul(e.x)&&ul(e.y)}function fl(e,t){return e.min===t.min&&e.max===t.max}function pl(e,t){return fl(e.x,t.x)&&fl(e.y,t.y)}function ml(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hl(e,t){return ml(e.x,t.x)&&ml(e.y,t.y)}function gl(e){return Xc(e.x)/Xc(e.y)}function _l(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function vl(e){return[e(`x`),e(`y`)]}function yl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var bl={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(B.test(e))e=parseFloat(e);else return e}return`${yl(e,t.target.x)}% ${yl(e,t.target.y)}%`}},xl={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=zn.parse(e);if(i.length>5)return r;let a=zn.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Un(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function Sl(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Cl=fo.length,wl=e=>typeof e==`number`||B.test(e);function Tl(e,t,n,r,i,a){i?(e.opacity=Un(0,n.opacity??1,Dl(r)),e.opacityExit=Un(t.opacity??1,0,Ol(r))):a&&(e.opacity=Un(t.opacity??1,n.opacity??1,r));for(let i=0;i<Cl;i++){let a=fo[i],o=El(t,a),s=El(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||wl(o)===wl(s)?(e[a]=Math.max(Un(rc(o),rc(s),r),0),(hn.test(s)||hn.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Un(t.rotate||0,n.rotate||0,r))}function El(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Dl=kl(0,.5,jt),Ol=kl(.5,.95,dt);function kl(e,t,n){return r=>r<e?0:r>t?1:n(pt(e,t,r))}function Al(e,t,n){let r=Ka(e)?e:Ca(e);return r.start(Na(``,r,t,n)),r.animation}function jl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Ml=(e,t)=>e.depth-t.depth,Nl=class{constructor(){this.children=[],this.isDirty=!1}add(e){rt(this.children,e),this.isDirty=!0}remove(e){it(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ml),this.isDirty=!1,this.children.forEach(e)}};function Pl(e,t){let n=Gt.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(dr(r),e(a-t))};return ur.setup(r,!0),()=>dr(r)}function Fl(e){return Ka(e)?e.get():e}var Il=class{constructor(){this.members=[]}add(e){rt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(it(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(it(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Ll={borderRadius:{...bl,applyTo:[...fo]},borderTopLeftRadius:bl,borderTopRightRadius:bl,borderBottomLeftRadius:bl,borderBottomRightRadius:bl,boxShadow:xl},Rl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Oc,{...Ll,...Oc});var zl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Bl=[``,`X`,`Y`,`Z`],Vl=1e3,Hl=0;function Ul(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Wl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Za(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ur,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Wl(r)}function Gl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Hl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tc.value&&(zl.nodes=zl.calculatedTargetDeltas=zl.calculatedProjections=0),this.nodes.forEach(Jl),this.nodes.forEach(iu),this.nodes.forEach(au),this.nodes.forEach(Yl),tc.addProjectionMetrics&&tc.addProjectionMetrics(zl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Nl)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new mt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=xo(t)&&!nc(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ur.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Pl(i,250),Rl.hasAnimatedSinceResize&&(Rl.hasAnimatedSinceResize=!1,this.nodes.forEach(ru)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||fu,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!hl(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Ta(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||ru(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ou),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Ql),this.nodes.forEach(Zl);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach($l);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(eu),this.nodes.forEach(tu),this.nodes.forEach(nu),this.nodes.forEach(Kl),this.nodes.forEach(ql)):this.nodes.forEach($l),this.clearAllSnapshots();let e=Gt.now();Ht.delta=at(0,1e3/60,e-Ht.timestamp),Ht.timestamp=e,Ht.isProcessing=!0,fr.update.process(Ht),fr.preRender.process(Ht),fr.render.process(Ht),Ht.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xl),this.sharedNodes.forEach(su)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ur.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ur.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Xc(this.snapshot.measuredBox.x)&&!Xc(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=sc(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!dl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||$o(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),gu(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return sc();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vu))){let{scroll:e}=this.root;e&&(ls(t.x,e.offset.x),ls(t.y,e.offset.y))}return t}removeElementScroll(e){let t=sc();if(Wc(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Wc(t,e),ls(t.x,i.offset.x),ls(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||sc();Wc(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(ls(r.x,-n.scroll.offset.x),ls(r.y,-n.scroll.offset.y)),$o(n.latestValues)&&fs(r,n.latestValues,n.layout?.layoutBox)}return $o(this.latestValues)&&fs(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=sc();Wc(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!$o(n.latestValues))continue;let r;n.instance&&(Qo(n.latestValues)&&n.updateSnapshot(),r=sc(),Wc(r,n.measurePageBox())),ll(t,n.latestValues,n.snapshot?.layoutBox,r)}return $o(this.latestValues)&&ll(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ht.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Ht.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=sc(),this.targetWithTransforms=sc()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Wc(this.target,this.layout.layoutBox),as(this.target,this.targetDelta)):Wc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),tc.value&&zl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Qo(this.parent.latestValues)||es(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sc(),this.relativeTargetOrigin=sc(),rl(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Wc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ht.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Wc(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;cs(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=sc());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gc(this.prevProjectionDelta.x,this.projectionDelta.x),Gc(this.prevProjectionDelta.y,this.projectionDelta.y)),$c(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!_l(this.projectionDelta.x,this.prevProjectionDelta.x)||!_l(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),tc.value&&zl.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ac(),this.projectionDelta=ac(),this.projectionDeltaWithTransform=ac()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=ac();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=sc(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(du));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=Un(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=Un(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(cu(o.x,e.x,n),cu(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rl(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),uu(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&pl(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=sc(),Wc(f,this.relativeTarget)),c&&(this.animationValues=a,Tl(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(dr(this.pendingAnimation),void 0),this.pendingAnimation=ur.update(()=>{Rl.hasAnimatedSinceResize=!0,this.motionValue||=Ca(0),this.motionValue.jump(0,!1),this.currentAnimation=Al(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),qr(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&_u(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||sc();let t=Xc(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Xc(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}Wc(t,i),fs(t,r),$c(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Il),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Ul(`z`,e,r,this.animationValues);for(let t=0;t<Bl.length;t++)Ul(`rotate${Bl[t]}`,e,r,this.animationValues),Ul(`skew${Bl[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Fl(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Fl(t?.pointerEvents)||``),this.hasProjected&&!$o(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Sl(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Oc){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Oc[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Fl(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Zl),this.root.sharedNodes.clear()}}}function Kl(e){e.updateLayout()}function ql(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)vl(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Xc(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Uc(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else _u(i,t.layoutBox,n)&&vl(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Xc(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ac();$c(o,n,t.layoutBox);let s=ac();a?$c(s,e.applyTransform(r,!0),t.measuredBox):$c(s,n,t.layoutBox);let c=!dl(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=sc();rl(s,t.layoutBox,i.layoutBox,o);let c=sc();rl(c,n,a.layoutBox,o),hl(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Jl(e){tc.value&&zl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Yl(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Xl(e){e.clearSnapshot()}function Zl(e){e.clearMeasurements()}function Ql(e){e.isLayoutDirty=!0,e.updateLayout()}function $l(e){e.isLayoutDirty=!1}function eu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function tu(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function nu(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ru(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iu(e){e.resolveTargetDelta()}function au(e){e.calcProjection()}function ou(e){e.resetSkewAndRotation()}function su(e){e.removeLeadSnapshot()}function cu(e,t,n){e.translate=Un(t.translate,0,n),e.scale=Un(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lu(e,t,n,r){e.min=Un(t.min,n.min,r),e.max=Un(t.max,n.max,r)}function uu(e,t,n,r){lu(e.x,t.x,n.x,r),lu(e.y,t.y,n.y,r)}function du(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var fu={duration:.45,ease:[.4,0,.1,1]},pu=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mu=pu(`applewebkit/`)&&!pu(`chrome/`)?Math.round:dt;function hu(e){e.min=mu(e.min),e.max=mu(e.max)}function gu(e){hu(e.x),hu(e.y)}function _u(e,t,n){return e===`position`||e===`preserve-aspect`&&!Zc(gl(t),gl(n),.2)}function vu(e){return e!==e.root&&e.scroll?.wasRoot}var yu=Gl({attachResizeListener:(e,t)=>jl(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),bu={current:void 0},xu=Gl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bu.current){let e=new yu({});e.mount(window),e.setOptions({layoutScroll:!0}),bu.current=e}return bu.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Su=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Cu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wu(...e){return t=>{let n=!1,r=e.map(e=>{let r=Cu(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Cu(e[t],null)}}}}function Tu(...e){return m.useCallback(wu(...e),e)}var U=Qe(),Eu=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(bo(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=bo(e)&&e.offsetWidth||0,r=bo(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Du({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,m.useId)(),s=(0,m.useRef)(null),c=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,m.useContext)(Su),u=Tu(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,m.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
2
|
+
`)}var ee=`mist`,te=[{id:ee,name:`Default`},{id:`blossom`,name:`Blossom`,light:{background:`oklch(0.982446 0.010114 325.653)`,foreground:`oklch(0.325698 0.116116 325.037)`,card:`oklch(0.971835 0.012884 321.894)`,"card-foreground":`oklch(0.325698 0.116116 325.037)`,popover:`oklch(1 0 0)`,"popover-foreground":`oklch(0.325698 0.116116 325.037)`,primary:`oklch(0.591646 0.217985 0.584)`,"primary-foreground":`oklch(1 0 0)`,secondary:`oklch(0.869588 0.06751 334.899)`,"secondary-foreground":`oklch(0.444777 0.134061 324.799)`,muted:`oklch(0.802407 0.090963 345.892)`,"muted-foreground":`oklch(0.428932 0.163929 354.332)`,accent:`oklch(0.939552 0.024286 321.664)`,"accent-foreground":`oklch(0.396296 0.025134 285.196)`,destructive:`oklch(0.627117 0.248974 7.734)`,border:`oklch(0.923531 0.021247 328.096)`,input:`oklch(0.851713 0.055822 336.6)`,ring:`oklch(0.591646 0.217985 0.584)`,"chart-1":`oklch(0.591646 0.217985 0.584)`},dark:{background:`oklch(0.22813 0.020366 307.469)`,foreground:`oklch(0.980735 0.004092 301.426)`,card:`oklch(0.267101 0.02016 311.799)`,"card-foreground":`oklch(0.980735 0.004092 301.426)`,popover:`oklch(0.154761 0.01316 338.901)`,"popover-foreground":`oklch(0.980735 0.004092 301.426)`,primary:`oklch(0.460685 0.185347 4.099)`,"primary-foreground":`oklch(0.901233 0.057189 343.694)`,secondary:`oklch(0.313674 0.030572 310.061)`,"secondary-foreground":`oklch(0.848252 0.038248 307.961)`,muted:`oklch(0.360924 0.021469 316.83)`,"muted-foreground":`oklch(0.880303 0.03077 342.696)`,accent:`oklch(0.364912 0.050794 308.491)`,"accent-foreground":`oklch(0.964695 0.009139 341.803)`,destructive:`oklch(0.458704 0.169677 3.815)`,border:`oklch(0.266943 0.015262 302.425)`,input:`oklch(0.266817 0.02897 344.461)`,ring:`oklch(0.591646 0.217985 0.584)`,"chart-1":`oklch(0.460685 0.185347 4.099)`}},{id:`grove`,name:`Grove`,light:{background:`oklch(0.972369 0.005497 157.15)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.972369 0.005497 157.15)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.932695 0.003778 160.944)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.523295 0.112292 158.089)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.936464 0.014601 163.554)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.945455 0.012308 162.879)`,"muted-foreground":`oklch(0.527266 0.012309 320.683)`,accent:`oklch(0.909438 0.021521 164.612)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.864831 0.01312 167.255)`,input:`oklch(0.829746 0.016084 168.234)`,ring:`oklch(0.523295 0.112292 158.089)`,"chart-1":`oklch(0.523295 0.112292 158.089)`},dark:{background:`oklch(0.260865 0.02152 162.75)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.260865 0.02152 162.75)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.411828 0.014378 166.627)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.796228 0.133058 157.319)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.380487 0.048313 159.608)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.339728 0.039456 160.274)`,"muted-foreground":`oklch(0.715427 0.010896 171.428)`,accent:`oklch(0.437021 0.060312 158.962)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.457475 0.044046 160.971)`,input:`oklch(0.519849 0.049896 160.863)`,ring:`oklch(0.796228 0.133058 157.319)`,"chart-1":`oklch(0.796228 0.133058 157.319)`}},{id:`ocean`,name:`Ocean`,light:{background:`oklch(0.974199 0.002856 241.597)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.974199 0.002856 241.597)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.934442 0.003181 269.1)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.536684 0.120219 247.01)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.939254 0.01193 241.729)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.948004 0.009649 241.695)`,"muted-foreground":`oklch(0.528741 0.01828 313.823)`,accent:`oklch(0.91295 0.018827 241.836)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.867646 0.013482 252.362)`,input:`oklch(0.832939 0.017389 252.598)`,ring:`oklch(0.536684 0.120219 247.01)`,"chart-1":`oklch(0.536684 0.120219 247.01)`},dark:{background:`oklch(0.242641 0.024125 250.573)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.242641 0.024125 250.573)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.398517 0.018232 255.72)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.758933 0.105833 241.548)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.358725 0.043145 244.911)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.319287 0.036766 246.065)`,"muted-foreground":`oklch(0.691936 0.016294 261.588)`,accent:`oklch(0.413315 0.051874 243.855)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.438653 0.039496 245.44)`,input:`oklch(0.500905 0.043574 244.781)`,ring:`oklch(0.758933 0.105833 241.548)`,"chart-1":`oklch(0.758933 0.105833 241.548)`}},{id:`ember`,name:`Ember`,light:{background:`oklch(0.976527 0.002685 60.725)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.976527 0.002685 60.725)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.936659 0.002879 29.96)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.552831 0.129438 44.656)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.942267 0.01151 50.785)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950842 0.009273 51.528)`,"muted-foreground":`oklch(0.530413 0.018453 341.181)`,accent:`oklch(0.916502 0.01832 49.597)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.870631 0.013204 39.431)`,input:`oklch(0.836213 0.017153 38.661)`,ring:`oklch(0.552831 0.129438 44.656)`,"chart-1":`oklch(0.552831 0.129438 44.656)`},dark:{background:`oklch(0.245899 0.019144 42.044)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.245899 0.019144 42.044)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.401111 0.014308 34.896)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.762174 0.124117 52.082)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.361499 0.044052 49.515)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.322144 0.03574 48.309)`,"muted-foreground":`oklch(0.692479 0.015227 30.963)`,accent:`oklch(0.416048 0.055354 50.484)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.44099 0.040202 48.807)`,input:`oklch(0.503003 0.045721 49.44)`,ring:`oklch(0.762174 0.124117 52.082)`,"chart-1":`oklch(0.762174 0.124117 52.082)`}},{id:`iris`,name:`Iris`,light:{background:`oklch(0.976531 0.003855 303.226)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.976531 0.003855 303.226)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.936665 0.005041 310.132)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.525348 0.15373 294.176)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.941387 0.014687 300.474)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950194 0.011956 300.733)`,"muted-foreground":`oklch(0.529955 0.022319 321.556)`,accent:`oklch(0.914882 0.022965 299.986)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.869608 0.018226 303.859)`,input:`oklch(0.834773 0.023405 303.676)`,ring:`oklch(0.525348 0.15373 294.176)`,"chart-1":`oklch(0.525348 0.15373 294.176)`},dark:{background:`oklch(0.225975 0.031062 293.741)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.225975 0.031062 293.741)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.386739 0.024023 297.509)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.671712 0.169136 293.929)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.325405 0.063614 294.23)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.291515 0.05276 294.209)`,"muted-foreground":`oklch(0.663321 0.025932 301.862)`,accent:`oklch(0.372436 0.07841 294.204)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.40874 0.058536 295.893)`,input:`oklch(0.46756 0.065775 296.265)`,ring:`oklch(0.671712 0.169136 293.929)`,"chart-1":`oklch(0.671712 0.169136 293.929)`}},{id:`slate`,name:`Slate`,light:{background:`#f5f7fa`,foreground:`#202b3b`,card:`#ffffff`,"card-foreground":`#202b3b`,popover:`#ffffff`,"popover-foreground":`#202b3b`,primary:`#465b78`,"primary-foreground":`#ffffff`,secondary:`#e7ecf2`,"secondary-foreground":`#202b3b`,muted:`#edf1f6`,"muted-foreground":`#526177`,accent:`#e0e7ef`,"accent-foreground":`#202b3b`,destructive:`#a52a34`,border:`#cad3df`,input:`#b9c5d4`,ring:`#465b78`,"chart-1":`#465b78`},dark:{background:`#141b26`,foreground:`#e8edf5`,card:`#1c2533`,"card-foreground":`#e8edf5`,popover:`#202b3b`,"popover-foreground":`#e8edf5`,primary:`#adc0dc`,"primary-foreground":`#141b26`,secondary:`#2a3648`,"secondary-foreground":`#e8edf5`,muted:`#243043`,"muted-foreground":`#afbdd0`,accent:`#33445d`,"accent-foreground":`#e8edf5`,destructive:`#fb8990`,border:`#43536a`,input:`#53647d`,ring:`#adc0dc`,"chart-1":`#adc0dc`}},{id:`sand`,name:`Sand`,light:{background:`#faf7f1`,foreground:`#352b22`,card:`#fffdf8`,"card-foreground":`#352b22`,popover:`#fffdf8`,"popover-foreground":`#352b22`,primary:`#765536`,"primary-foreground":`#ffffff`,secondary:`#eee6da`,"secondary-foreground":`#352b22`,muted:`#f2ece2`,"muted-foreground":`#6c5b49`,accent:`#e9ddcb`,"accent-foreground":`#352b22`,destructive:`#a52a34`,border:`#d9cbb8`,input:`#c9b79e`,ring:`#765536`,"chart-1":`#765536`},dark:{background:`#211c17`,foreground:`#f4ece0`,card:`#2c251e`,"card-foreground":`#f4ece0`,popover:`#352c23`,"popover-foreground":`#f4ece0`,primary:`#dcbc92`,"primary-foreground":`#211c17`,secondary:`#3c3227`,"secondary-foreground":`#f4ece0`,muted:`#352d24`,"muted-foreground":`#c9b9a5`,accent:`#4a3b2b`,"accent-foreground":`#f4ece0`,destructive:`#fb8990`,border:`#64503e`,input:`#79614b`,ring:`#dcbc92`,"chart-1":`#dcbc92`}},{id:`rosewood`,name:`Rosewood`,light:{background:`#fbf6f5`,foreground:`#3b262c`,card:`#fffafa`,"card-foreground":`#3b262c`,popover:`#fffafa`,"popover-foreground":`#3b262c`,primary:`#854252`,"primary-foreground":`#ffffff`,secondary:`#f0e2e5`,"secondary-foreground":`#3b262c`,muted:`#f5eaec`,"muted-foreground":`#76525d`,accent:`#edd6dd`,"accent-foreground":`#3b262c`,destructive:`#a52a34`,border:`#dfc5cc`,input:`#d0afb9`,ring:`#854252`,"chart-1":`#854252`},dark:{background:`#241a20`,foreground:`#f6e8ed`,card:`#30222a`,"card-foreground":`#f6e8ed`,popover:`#3a2932`,"popover-foreground":`#f6e8ed`,primary:`#e3a5b7`,"primary-foreground":`#241a20`,secondary:`#442e38`,"secondary-foreground":`#f6e8ed`,muted:`#3a2932`,"muted-foreground":`#d2b4c0`,accent:`#553441`,"accent-foreground":`#f6e8ed`,destructive:`#fb8990`,border:`#70505d`,input:`#856170`,ring:`#e3a5b7`,"chart-1":`#e3a5b7`}},{id:`aurora`,name:`Aurora`,light:{background:`#f2faf8`,foreground:`#193a37`,card:`#fafffe`,"card-foreground":`#193a37`,popover:`#fafffe`,"popover-foreground":`#193a37`,primary:`#216c63`,"primary-foreground":`#ffffff`,secondary:`#def0eb`,"secondary-foreground":`#193a37`,muted:`#e6f2ef`,"muted-foreground":`#456c66`,accent:`#eee5f6`,"accent-foreground":`#193a37`,destructive:`#a52a34`,border:`#bbd7d1`,input:`#a7c8c0`,ring:`#216c63`,"chart-1":`#216c63`},dark:{background:`#142321`,foreground:`#e1f5ef`,card:`#1d302d`,"card-foreground":`#e1f5ef`,popover:`#253d38`,"popover-foreground":`#e1f5ef`,primary:`#87d5c1`,"primary-foreground":`#142321`,secondary:`#29443e`,"secondary-foreground":`#e1f5ef`,muted:`#243c36`,"muted-foreground":`#a9cfc3`,accent:`#3d3352`,"accent-foreground":`#e1f5ef`,destructive:`#fb8990`,border:`#466b60`,input:`#568172`,ring:`#87d5c1`,"chart-1":`#87d5c1`}},{id:`midnight`,name:`Midnight`,light:{background:`#f5f6fb`,foreground:`#282e48`,card:`#fcfcff`,"card-foreground":`#282e48`,popover:`#fcfcff`,"popover-foreground":`#282e48`,primary:`#4f5f96`,"primary-foreground":`#ffffff`,secondary:`#e5e8f4`,"secondary-foreground":`#282e48`,muted:`#eceef7`,"muted-foreground":`#565f7d`,accent:`#dfe4f6`,"accent-foreground":`#282e48`,destructive:`#a52a34`,border:`#c7cee5`,input:`#b4bfdc`,ring:`#4f5f96`,"chart-1":`#4f5f96`},dark:{background:`#151a2b`,foreground:`#e8ecfa`,card:`#1f263b`,"card-foreground":`#e8ecfa`,popover:`#29314a`,"popover-foreground":`#e8ecfa`,primary:`#acbbed`,"primary-foreground":`#151a2b`,secondary:`#303954`,"secondary-foreground":`#e8ecfa`,muted:`#28314b`,"muted-foreground":`#b1bedf`,accent:`#3a466a`,"accent-foreground":`#e8ecfa`,destructive:`#fb8990`,border:`#48577d`,input:`#596990`,ring:`#acbbed`,"chart-1":`#acbbed`}},{id:`graphite`,name:`Graphite`,light:{background:`#fafafa`,foreground:`#222222`,card:`#fefefe`,"card-foreground":`#222222`,popover:`#fefefe`,"popover-foreground":`#222222`,primary:`#333333`,"primary-foreground":`#fcfcfc`,secondary:`#ebebeb`,"secondary-foreground":`#222222`,muted:`#f0f0f0`,"muted-foreground":`#5d5d5d`,accent:`#e8e8e8`,"accent-foreground":`#222222`,destructive:`#d02b31`,border:`#dedede`,input:`#cecece`,ring:`#333333`,"chart-1":`#333333`},dark:{background:`#121212`,foreground:`#eeeeee`,card:`#191919`,"card-foreground":`#eeeeee`,popover:`#202020`,"popover-foreground":`#eeeeee`,primary:`#e4e4e4`,"primary-foreground":`#121212`,secondary:`#292929`,"secondary-foreground":`#eeeeee`,muted:`#242424`,"muted-foreground":`#ababab`,accent:`#333333`,"accent-foreground":`#eeeeee`,destructive:`#f66c6d`,border:`#333333`,input:`#424242`,ring:`#e4e4e4`,"chart-1":`#e4e4e4`}},{id:`lagoon`,name:`Lagoon`,light:{background:`#f3fcfd`,foreground:`#0e2627`,card:`#fbffff`,"card-foreground":`#0e2627`,popover:`#fbffff`,"popover-foreground":`#0e2627`,primary:`#007780`,"primary-foreground":`#fcfcfc`,secondary:`#d5f2f3`,"secondary-foreground":`#0e2627`,muted:`#e3f4f5`,"muted-foreground":`#456466`,accent:`#c3f2f4`,"accent-foreground":`#0e2627`,destructive:`#d02b31`,border:`#cde3e4`,input:`#b8d4d5`,ring:`#007780`,"chart-1":`#007780`},dark:{background:`#041516`,foreground:`#e8f1f1`,card:`#091d1e`,"card-foreground":`#e8f1f1`,popover:`#102425`,"popover-foreground":`#e8f1f1`,primary:`#53c5cb`,"primary-foreground":`#041516`,secondary:`#162d2f`,"secondary-foreground":`#e8f1f1`,muted:`#152829`,"muted-foreground":`#9cafb0`,accent:`#0c3a3c`,"accent-foreground":`#e8f1f1`,destructive:`#f66c6d`,border:`#203839`,input:`#2f4749`,ring:`#53c5cb`,"chart-1":`#53c5cb`}},{id:`dune`,name:`Dune`,light:{background:`#fef9f3`,foreground:`#2b1f11`,card:`#fffefb`,"card-foreground":`#2b1f11`,popover:`#fffefb`,"popover-foreground":`#2b1f11`,primary:`#9d6300`,"primary-foreground":`#fcfcfc`,secondary:`#f9e8d6`,"secondary-foreground":`#2b1f11`,muted:`#f8eee4`,"muted-foreground":`#6b5a48`,accent:`#fde3c6`,"accent-foreground":`#2b1f11`,destructive:`#d02b31`,border:`#e9dccd`,input:`#dbcbb9`,ring:`#9d6300`,"chart-1":`#9d6300`},dark:{background:`#181006`,foreground:`#f3ede8`,card:`#21170c`,"card-foreground":`#f3ede8`,popover:`#291e12`,"popover-foreground":`#f3ede8`,primary:`#dba666`,"primary-foreground":`#181006`,secondary:`#322618`,"secondary-foreground":`#f3ede8`,muted:`#2c2217`,"muted-foreground":`#b4a99d`,accent:`#422e16`,"accent-foreground":`#f3ede8`,destructive:`#f66c6d`,border:`#3d3022`,input:`#4d4031`,ring:`#dba666`,"chart-1":`#dba666`}},{id:`plum`,name:`Plum`,light:{background:`#fef8ff`,foreground:`#291c2c`,card:`#fffdff`,"card-foreground":`#291c2c`,popover:`#fffdff`,"popover-foreground":`#291c2c`,primary:`#9553a4`,"primary-foreground":`#fcfcfc`,secondary:`#f6e4fa`,"secondary-foreground":`#291c2c`,muted:`#f7ecf9`,"muted-foreground":`#68566d`,accent:`#f9dcff`,"accent-foreground":`#291c2c`,destructive:`#d02b31`,border:`#e7d8ea`,input:`#d8c7dc`,ring:`#9553a4`,"chart-1":`#9553a4`},dark:{background:`#170d19`,foreground:`#f2ecf3`,card:`#201522`,"card-foreground":`#f2ecf3`,popover:`#271c2a`,"popover-foreground":`#f2ecf3`,primary:`#d398e0`,"primary-foreground":`#170d19`,secondary:`#312334`,"secondary-foreground":`#f2ecf3`,muted:`#2a202d`,"muted-foreground":`#b2a6b5`,accent:`#3f2945`,"accent-foreground":`#f2ecf3`,destructive:`#f66c6d`,border:`#3b2d3e`,input:`#4b3c4e`,ring:`#d398e0`,"chart-1":`#d398e0`}},{id:`moss`,name:`Moss`,light:{background:`#f8fcf6`,foreground:`#1c2517`,card:`#fdfffc`,"card-foreground":`#1c2517`,popover:`#fdfffc`,"popover-foreground":`#1c2517`,primary:`#4a7333`,"primary-foreground":`#fcfcfc`,secondary:`#e3f0dd`,"secondary-foreground":`#1c2517`,muted:`#ebf3e8`,"muted-foreground":`#56624f`,accent:`#dcefd2`,"accent-foreground":`#1c2517`,destructive:`#d02b31`,border:`#d8e2d3`,input:`#c6d2c0`,ring:`#4a7333`,"chart-1":`#4a7333`},dark:{background:`#0d140a`,foreground:`#ecf0ea`,card:`#151c11`,"card-foreground":`#ecf0ea`,popover:`#1b2317`,"popover-foreground":`#ecf0ea`,primary:`#97bf82`,"primary-foreground":`#0d140a`,secondary:`#232c1e`,"secondary-foreground":`#ecf0ea`,muted:`#1f271c`,"muted-foreground":`#a6aea1`,accent:`#293821`,"accent-foreground":`#ecf0ea`,destructive:`#f66c6d`,border:`#2d3628`,input:`#3c4637`,ring:`#97bf82`,"chart-1":`#97bf82`}},{id:`crimson`,name:`Crimson`,light:{background:`#fff7f6`,foreground:`#331919`,card:`#fffcfc`,"card-foreground":`#331919`,popover:`#fffcfc`,"popover-foreground":`#331919`,primary:`#c13a46`,"primary-foreground":`#fcfcfc`,secondary:`#ffe1df`,"secondary-foreground":`#331919`,muted:`#ffeae9`,"muted-foreground":`#785252`,accent:`#ffd7d5`,"accent-foreground":`#331919`,destructive:`#d02b31`,border:`#f4d6d5`,input:`#e9c3c2`,ring:`#c13a46`,"chart-1":`#c13a46`},dark:{background:`#1e0b0b`,foreground:`#f8ebeb`,card:`#281212`,"card-foreground":`#f8ebeb`,popover:`#301919`,"popover-foreground":`#f8ebeb`,primary:`#ff898b`,"primary-foreground":`#1e0b0b`,secondary:`#3b2020`,"secondary-foreground":`#f8ebeb`,muted:`#331d1d`,"muted-foreground":`#bea4a3`,accent:`#502324`,"accent-foreground":`#f8ebeb`,destructive:`#f66c6d`,border:`#462a2a`,input:`#573939`,ring:`#ff898b`,"chart-1":`#ff898b`}}],ne={light:{background:`#fcfcfc`,card:`#ffffff`,primary:`#1b4ed8`,accent:`#f4f4f5`},dark:{background:`#0a0a0a`,card:`#111111`,primary:`#346bf1`,accent:`#141414`}};function re(e,t){let n=t?e.dark:e.light,r=ne[t?`dark`:`light`];return n?{background:n.background??r.background,card:n.card??r.card,primary:n.primary??r.primary,accent:n.primary?`color-mix(in oklab, ${n.primary} 18%, ${n.background??r.background})`:r.accent}:{...r}}var ie={activity:400,thoughts:40,chat:100};function ae(e,t,n){let r=e??[],i=new Set(r.map(e=>e.id)),a=t.filter(e=>typeof e?.id==`number`&&!i.has(e.id));return[...r,...a].slice(-n)}var oe=class{records=new Map;listeners=new Set;reads=new Map;used=new Set;reader;currentStatus={connection:`connecting`,signedOut:!1};get(e){let t=this.records.get(e);if(t)return t;let n={version:0,data:void 0,loading:!1,error:void 0,stale:!1};return this.records.set(e,n),n}status(){return{...this.currentStatus}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}markUsed(e,t){this.reader=t;let n=e.filter(e=>!this.used.has(e));this.used=new Set(e);for(let e of n)this.read(e)}onHello(e){for(let t of this.used){let n=e[t];n!==void 0&&(this.get(t).version=n),this.read(t)}}onChanged(e,t){let n=this.get(e);n.version=t,this.used.has(e)?this.read(e):n.stale=!0,this.notify()}onFeedDelta(e){let t=this.get(`lobby`).data;t&&(this.get(`lobby`).data={...t,activity:ae(t.activity,e.activity??[],ie.activity),thoughts:ae(t.thoughts,e.thoughts??[],ie.thoughts),chat:ae(t.chat,e.chat??[],ie.chat)},this.notify())}onReplyDelta(e){let t=this.get(`lobby`),n=t.data;n&&(t.data={...n,reply:e},this.notify())}onStatus(e){this.currentStatus={...this.currentStatus,...e},this.notify()}async read(e){let t=this.reader;if(!t)return;let n=(this.reads.get(e)??0)+1;this.reads.set(e,n);let r=this.get(e);r.loading=!0,r.error=void 0,this.notify();try{let i=await t(e);if(this.reads.get(e)!==n)return;this.apply(r,i)}catch(t){if(this.reads.get(e)!==n)return;r.loading=!1,r.error=t instanceof Error?t.message:String(t)}this.notify()}apply(e,t){e.data=t,e.loading=!1,e.stale=!1,e.error=void 0}notify(){for(let e of[...this.listeners])e()}};function se(){return new oe}var L=se(),ce=/^[a-f0-9]{32}$/;function le(){return globalThis.location}function ue(){let e=le()?.search??``,t=new URLSearchParams(e).getAll(`project`);if(t.length){if(t.length!==1||!ce.test(t[0]))throw Error(`Invalid project ID. Choose a running project below.`);return t[0]}}function R(e){if(!e.startsWith(`/api/`)&&!e.startsWith(`/files/preview/`))return e;let t=ue();return t?`/projects/${t}${e}`:e}function z(e,t){if(!ce.test(e))throw Error(`Invalid project ID.`);let n=le();if(!n)throw Error(`Project switching requires a browser.`);let r=new URL(n.origin);r.pathname=n.pathname,r.searchParams.set(`project`,e),r.hash=`/${t}`,n.assign(r.href)}var de=`bot-lobby.projectFolders`,fe=new Map;function pe(){try{return globalThis.sessionStorage}catch{return}}function me(){try{let e=JSON.parse(pe()?.getItem(de)??`{}`);for(let[t,n]of Object.entries(e))ce.test(t)&&typeof n==`string`&&fe.set(t,n)}catch{}}function he(e){me();for(let t of e)ce.test(t.id)&&fe.set(t.id,t.cwd);try{pe()?.setItem(de,JSON.stringify(Object.fromEntries([...fe].slice(-64))))}catch{}}function ge(e){return fe.has(e)||me(),fe.get(e)}async function _e(e){let t;try{t=ue()}catch{return!1}if(!t)return!1;let n=ge(t);if(!n)return!1;let{projects:r}=await e();if(he(r),r.some(e=>e.id===t))return!1;let i=r.find(e=>e.cwd===n),a=le(),o=globalThis.history;if(!i||!a||!o)return!1;let s=new URL(a.origin);return s.pathname=a.pathname,s.search=a.search,s.searchParams.set(`project`,i.id),s.hash=globalThis.location?.hash??``,o.replaceState(null,``,s.href),!0}var ve=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=t,this.status=n}},ye={"Content-Type":`application/json`};async function be(e,t={}){let n=await fetch(e===`auth.login`||e.startsWith(`projects.`)?`/api/${e}`:R(`/api/${e}`),{method:`POST`,headers:ye,body:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new ve(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw r.code===`unauthorized`&&L.onStatus({signedOut:!0}),new ve(r.error,r.code,n.status);return r.result}function xe(){return globalThis.location}async function Se(){let e=xe(),t=e?new URLSearchParams(e.hash.replace(/^#/,``)).get(`token`):null;if(!t||!(await fetch(`/api/auth.login`,{method:`POST`,headers:ye,body:JSON.stringify({token:t}),credentials:`same-origin`}).catch(()=>void 0))?.ok)return!1;let n=globalThis.history;return n&&n.replaceState(null,``,e.pathname+e.search),L.onStatus({signedOut:!1}),!0}var Ce=`bot-lobby.palette`,we=`bot-lobby-palette`,Te=`custom`,Ee=new Set,De=ke();function Oe(e){let t=e;if(!t||typeof t.id!=`string`||typeof t.name!=`string`)return;let n=A(t.light),r=A(t.dark);if(n||r)return{id:t.id,name:t.name.slice(0,40),...n?{light:n}:{},...r?{dark:r}:{}}}function ke(){try{let e=localStorage.getItem(Ce);if(!e)return{id:ee,saved:[]};let t=JSON.parse(e),n=(t.saved??[]).map(Oe).filter(e=>!!e),r=Oe(t.legacy??(t.custom?{...t.custom,id:Te}:void 0)),i=new Set([...te.map(e=>e.id),...n.map(e=>e.id),...r?[Te]:[]]);return{id:t.id&&i.has(t.id)?t.id:ee,saved:n,...r?{legacy:r}:{}}}catch{return{id:ee,saved:[]}}}function Ae(e){return[...te,...e.saved,...e.legacy?[e.legacy]:[]]}function je(e){return Ae(e).find(t=>t.id===e.id)??te[0]}function Me(){if(typeof document>`u`)return;let e=I(je(De)),t=document.getElementById(we);if(!e){t?.remove();return}t||(t=document.createElement(`style`),t.id=we,document.head.appendChild(t)),t.textContent=e}function Ne(e){De=e;try{localStorage.setItem(Ce,JSON.stringify(e))}catch{}Me();for(let e of[...Ee])e()}function Pe(e){let t=e.themes.map(e=>Oe(e)).filter(e=>!!e),{legacy:n}=De;Ne({id:e.active??(De.id===Te&&n?Te:`mist`),saved:t,...n?{legacy:n}:{}})}var Fe;function Ie(e=!1){return Fe&&!e||(Fe=(async()=>{let e=await be(`themes.get`,{}),t=De.legacy;if(t){let n=e.active??(De.id===Te?void 0:De.id);e=await be(`themes.save`,{name:t.name,...t.light?{light:t.light}:{},...t.dark?{dark:t.dark}:{}}),n&&(e=await be(`themes.choose`,{id:n}));let{legacy:r,...i}=De;De=i}Pe(e)})().catch(()=>{Fe=void 0})),Fe}typeof window<`u`&&(Me(),window.addEventListener(`storage`,e=>{if(e.key===Ce){De=ke(),Me();for(let e of[...Ee])e()}}),window.addEventListener(`focus`,()=>void Ie(!0)));function Le(e){return Ee.add(e),()=>{Ee.delete(e)}}function Re(){let e=(0,m.useSyncExternalStore)(Le,()=>De,()=>De),t=(0,m.useCallback)(e=>{Ne({...De,id:e}),e!==Te&&be(`themes.choose`,{id:e}).then(Pe,()=>{})},[]),n=(0,m.useCallback)(async(e,t)=>(Pe(await be(`themes.save`,{name:t,...e.light?{light:e.light}:{},...e.dark?{dark:e.dark}:{}})),je(De)),[]),r=(0,m.useCallback)(async(e,t)=>Pe(await be(`themes.rename`,{id:e,name:t})),[]),i=(0,m.useCallback)(async e=>Pe(await be(`themes.remove`,{id:e})),[]),a=e.legacy?[...e.saved,e.legacy]:e.saved;return{active:je(e),saved:a,all:Ae(e),isSaved:e=>a.some(t=>t.id===e),choose:t,adopt:n,rename:r,remove:i}}var ze=[{id:`theme`,label:`System`,help:`The system's own (or the colour theme's)`},{id:`inter`,label:`Inter`,help:`Neutral and very legible`},{id:`geist`,label:`Geist`,help:`Crisp and modern`},{id:`plex`,label:`IBM Plex Sans`,help:`Technical, with character`},{id:`manrope`,label:`Manrope`,help:`Round and friendly`},{id:`dm-sans`,label:`DM Sans`,help:`Geometric, low contrast`},{id:`jakarta`,label:`Plus Jakarta Sans`,help:`Polished product sans`},{id:`figtree`,label:`Figtree`,help:`Clean and approachable`},{id:`outfit`,label:`Outfit`,help:`Geometric display feel`},{id:`nunito`,label:`Nunito`,help:`Soft rounded terminals`},{id:`space-grotesk`,label:`Space Grotesk`,help:`Quirky, technical`},{id:`source-sans`,label:`Source Sans 3`,help:`Classic UI workhorse`}],Be=[{id:`theme`,label:`System mono`,help:`The system's own (or the colour theme's)`},{id:`jetbrains`,label:`JetBrains Mono`,help:`Tall, made for code`},{id:`geist-mono`,label:`Geist Mono`,help:`Pairs with Geist`},{id:`fira-code`,label:`Fira Code`,help:`Ligatures for operators`},{id:`roboto-mono`,label:`Roboto Mono`,help:`Even and compact`},{id:`source-code`,label:`Source Code Pro`,help:`Open and readable`}],Ve={font:`bot-lobby.typeface`,mono:`bot-lobby.typeface-code`},He={font:ze,mono:Be},Ue={font:`theme`,mono:`theme`},We=new Set;function Ge(e){let t=null;try{t=localStorage.getItem(Ve[e])}catch{t=Ue[e]}return He[e].some(e=>e.id===t)?t:`theme`}function Ke(e,t){let n=document.documentElement;t===`theme`?delete n.dataset[e]:n.dataset[e]=t}function qe(e,t){Ue[e]=t;try{localStorage.setItem(Ve[e],t)}catch{}Ke(e,t);for(let e of We)e()}function Je(e){return We.add(e),()=>We.delete(e)}function Ye(e){return(0,m.useSyncExternalStore)(Je,()=>Ge(e),()=>`theme`)}typeof document<`u`&&(Ke(`font`,Ge(`font`)),Ke(`mono`,Ge(`mono`)));var Xe={inter:`"Inter Variable", system-ui, sans-serif`,geist:`"Geist Variable", system-ui, sans-serif`,plex:`"IBM Plex Sans Variable", system-ui, sans-serif`,manrope:`"Manrope Variable", system-ui, sans-serif`,jetbrains:`"JetBrains Mono Variable", ui-monospace, monospace`,"geist-mono":`"Geist Mono Variable", ui-monospace, monospace`,"dm-sans":`"DM Sans Variable", system-ui, sans-serif`,jakarta:`"Plus Jakarta Sans Variable", system-ui, sans-serif`,figtree:`"Figtree Variable", system-ui, sans-serif`,outfit:`"Outfit Variable", system-ui, sans-serif`,nunito:`"Nunito Variable", system-ui, sans-serif`,"space-grotesk":`"Space Grotesk Variable", system-ui, sans-serif`,"source-sans":`"Source Sans 3 Variable", system-ui, sans-serif`,"fira-code":`"Fira Code Variable", ui-monospace, monospace`,"roboto-mono":`"Roboto Mono Variable", ui-monospace, monospace`,"source-code":`"Source Code Pro Variable", ui-monospace, monospace`},Ze=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Qe=o(((e,t)=>{t.exports=Ze()})),$e=(0,m.createContext)({});function et(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var tt=typeof window<`u`?m.useLayoutEffect:m.useEffect,nt=(0,m.createContext)(null);function rt(e,t){e.indexOf(t)===-1&&e.push(t)}function it(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var at=(e,t,n)=>n>t?t:n<e?e:n,ot={},st=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ct=e=>typeof e==`object`&&!!e,lt=e=>/^0[^.\s]+$/u.test(e);function ut(e){let t;return()=>(t===void 0&&(t=e()),t)}var dt=e=>e,ft=(...e)=>e.reduce((e,t)=>n=>t(e(n))),pt=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},mt=class{constructor(){this.subscriptions=[]}add(e){return rt(this.subscriptions,e),()=>this.remove(e)}remove(e){it(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ht=e=>e*1e3,gt=e=>e/1e3,_t=(e,t)=>t?1e3/t*e:0,vt=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},yt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bt=1e-7,xt=12;function St(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=yt(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>bt&&++s<xt);return o}function Ct(e,t,n,r){if(e===t&&n===r)return dt;let i=t=>St(t,0,1,e,n);return e=>e===0||e===1?e:yt(i(e),t,r)}var wt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Tt=e=>t=>1-e(1-t),Et=Ct(.33,1.53,.69,.99),Dt=Tt(Et),Ot=wt(Dt),kt=e=>e>=1?1:(e*=2)<1?.5*Dt(e):.5*(2-2**(-10*(e-1))),At=e=>1-Math.sin(Math.acos(e)),jt=Tt(At),Mt=wt(At),Nt=Ct(.42,0,1,1),Pt=Ct(0,0,.58,1),Ft=Ct(.42,0,.58,1),It=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Lt(e,t){return It(e)?e[vt(0,e.length,t)]:e}var Rt=e=>Array.isArray(e)&&typeof e[0]==`number`,zt={linear:dt,easeIn:Nt,easeInOut:Ft,easeOut:Pt,circIn:At,circInOut:Mt,circOut:jt,backIn:Dt,backInOut:Ot,backOut:Et,anticipate:kt},Bt=e=>typeof e==`string`,Vt=e=>{if(Rt(e)){e.length;let[t,n,r,i]=e;return Ct(t,n,r,i)}return Bt(e)?(zt[e],`${e}`,zt[e]):e},Ht={delta:0,timestamp:0,isProcessing:!1},Ut;function Wt(){Ut=void 0}var Gt={now:()=>(Ut===void 0&&Gt.set(Ht.isProcessing||ot.useManualTiming?Ht.timestamp:performance.now()),Ut),set:e=>{Ut=e,queueMicrotask(Wt)}},Kt=e=>Math.round(e*1e5)/1e5,qt=e=>t=>typeof t==`string`&&t.startsWith(e),Jt=qt(`--`),Yt=qt(`var(--`),Xt=e=>Yt(e)?Zt.test(e.split(`/*`)[0].trim()):!1,Zt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Qt(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var $t={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},en={...$t,transform:e=>at(0,1,e)},tn={...$t,default:1},nn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rn(e){return e==null}var an=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,on=(e,t)=>n=>!!(typeof n==`string`&&an.test(n)&&n.startsWith(e)||t&&!rn(n)&&Object.prototype.hasOwnProperty.call(n,t)),sn=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(nn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},cn=e=>at(0,255,e),ln={...$t,transform:e=>Math.round(cn(e))},un={test:on(`rgb`,`red`),parse:sn(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ln.transform(e)+`, `+ln.transform(t)+`, `+ln.transform(n)+`, `+Kt(en.transform(r))+`)`};function dn(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var fn={test:on(`#`),parse:dn,transform:un.transform},pn=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mn=pn(`deg`),hn=pn(`%`),B=pn(`px`),gn=pn(`vh`),_n=pn(`vw`),vn={...hn,parse:e=>hn.parse(e)/100,transform:e=>hn.transform(e*100)},yn={test:on(`hsl`,`hue`),parse:sn(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+hn.transform(Kt(t))+`, `+hn.transform(Kt(n))+`, `+Kt(en.transform(r))+`)`},bn={test:e=>un.test(e)||fn.test(e)||yn.test(e),parse:e=>un.test(e)?un.parse(e):yn.test(e)?yn.parse(e):fn.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?un.transform(e):yn.transform(e),getAnimatableNone:e=>{let t=bn.parse(e);return t.alpha=0,bn.transform(t)}},xn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Sn=new RegExp(nn.source),Cn=new RegExp(xn.source,`i`);function wn(e){return isNaN(e)&&typeof e==`string`&&(Sn.test(e)||Cn.test(e))}var Tn=`number`,En=`color`,Dn=`var`,On=`var(`,kn="${}",An=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jn(e){let t=e.toString();return Sn.test(t)||Cn.test(t)}function Mn(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(An,e=>(bn.test(e)?(r.color.push(a),i.push(En),n.push(bn.parse(e))):e.startsWith(On)?(r.var.push(a),i.push(Dn),n.push(e)):(r.number.push(a),i.push(Tn),n.push(parseFloat(e))),++a,kn)).split(kn),indexes:r,types:i}}function Nn(e){return Mn(e).values}function Pn({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Tn?Kt(r[a]):e===En?bn.transform(r[a]):r[a]}return i}}function Fn(e){return Pn(Mn(e))}var In=e=>typeof e==`number`?0:bn.test(e)?bn.getAnimatableNone(e):e,Ln=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:In(e);function Rn(e){let t=Mn(e);return Pn(t)(t.values.map((e,n)=>Ln(e,t.split[n])))}var zn={test:wn,parse:Nn,createTransformer:Fn,getAnimatableNone:Rn};function Bn(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Vn({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Bn(s,r,e+1/3),a=Bn(s,r,e),o=Bn(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Hn(e,t){return n=>n>0?t:e}var Un=(e,t,n)=>e+(t-e)*n,Wn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Gn=[fn,un,yn],Kn=e=>Gn.find(t=>t.test(e));function qn(e){let t=Kn(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===yn&&(n=Vn(n)),n}var Jn=(e,t)=>{let n=qn(e),r=qn(t);if(!n||!r)return Hn(e,t);let i={...n};return e=>(i.red=Wn(n.red,r.red,e),i.green=Wn(n.green,r.green,e),i.blue=Wn(n.blue,r.blue,e),i.alpha=Un(n.alpha,r.alpha,e),un.transform(i))},Yn=new Set([`none`,`hidden`]);function Xn(e,t){return Yn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zn(e,t){return n=>Un(e,t,n)}function Qn(e){return typeof e==`number`?Zn:typeof e==`string`?Xt(e)?Hn:bn.test(e)?Jn:nr:Array.isArray(e)?$n:typeof e==`object`?bn.test(e)?Jn:er:Hn}function $n(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Qn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function er(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qn(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function tr(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var nr=(e,t)=>{let n=zn.createTransformer(t),r=Mn(e),i=Mn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yn.has(e)&&!i.values.length||Yn.has(t)&&!r.values.length?Xn(e,t):ft($n(tr(r,i),i.values),n):(`${e}${t}`,Hn(e,t))},rr=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ir(e,t){let n=rr.exec(e);if(!n)return;let r=rr.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Kt(Un(a,o,e))+i}function ar(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Un(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=ir(e,t);if(n)return n}return Qn(e)(e,t)}var or=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function sr(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var cr=40;function lr(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=or.reduce((e,t)=>(e[t]=sr(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ot.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,cr),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:or.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<or.length;t++)o[or[t]].cancel(e)},state:n,steps:o}}var{schedule:ur,cancel:dr,steps:fr}=lr(typeof requestAnimationFrame<`u`?requestAnimationFrame:dt,!0,Ht),pr=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ur.update(t,e),stop:()=>dr(t),now:()=>Ht.isProcessing?Ht.timestamp:Gt.now()}},mr=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},hr=2e4;function gr(e,t=50,n=hr,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function _r(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(gr(r),hr);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:gt(i)}}var vr={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},yr=e=>e<0?1/Math.max(1+e,vr.minDamping):Math.max(1-e,vr.minDamping);function br(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Cr(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function xr(e,t){return e*Math.sqrt(1-t*t)}var Sr=12;function Cr(e,t,n){let r=n;for(let n=1;n<Sr;n++)r-=e(r)/t(r);return r}var wr=.001;function Tr({duration:e=vr.duration,bounce:t=vr.bounce}){let n,r;vr.maxDuration;let i=yr(t);e=at(vr.minDuration,vr.maxDuration,gt(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=xr(t,i),o=Math.exp(-r);return wr-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=xr(t*t,i);return(-n(t)+wr>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Cr(n,r,a),s=o*br(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:ht(e)}}var Er=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Dr(e,t){if(Er(e,t))return e}function Or(e){let t=Dr(e.stiffness),n=Dr(e.damping,!0),r=Dr(e.mass),i={...e,stiffness:t??vr.stiffness,damping:n??vr.damping,mass:r??vr.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=yr(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*br(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Tr(i)),i.isResolvedFromDuration=!0;(!Er(i.stiffness)||!Er(i.damping,!0))&&(i.stiffness=vr.stiffness,i.damping=vr.damping)}return i}function kr(e=vr.visualDuration,t=vr.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Or({...n}),f=e=>d?0:-gt(e),p=s/(2*Math.sqrt(o*c)),m=gt(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?vr.restSpeed.granular:vr.restSpeed.default),g.restDelta=n.restDelta||(e?vr.restDelta.granular:vr.restDelta.default)};_();let v,y,b;if(p<1){let e=xr(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>ht(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=ht(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(gr(S),hr),t=mr(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}kr.applyToOptions=e=>{let t=_r(e,100,kr);return e.ease=t.ease,e.duration=ht(t.duration),e.type=`keyframes`,e};function Ar({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=kr({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function jr(e,t,n){let r=[],i=n||ot.mix||ar,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ft(Array.isArray(t)?t[n]||dt:t,a)),r.push(a)}return r}function Mr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=jr(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=pt(e[r],e[r+1],n);return s[r](i)};return n?t=>l(at(e[0],e[a-1],t)):l}function Nr(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=pt(0,t,r);e.push(Un(n,1,i))}}function Pr(e){let t=[0];return Nr(t,e.length-1),t}function Fr(e,t){return e.map(e=>e*t)}function Ir(e,t){return e.map(()=>t||Ft).splice(0,e.length-1)}function Lr({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=It(r)?r.map(Vt):Vt(r)||Ft,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(ot.mix||ar)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?at(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Mr(Fr(n&&n.length===t.length?n:Pr(t),e),t,{ease:Array.isArray(i)?i:Ir(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Rr=5;function zr(e,t,n){let r=Math.max(t-Rr,0);return _t(n-e(r),t-r)}function Br(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):zr(t=>e.next(t).value,t,e.next(t).value)}var Vr=e=>e!==null;function Hr(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Vr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Ur={decay:Ar,inertia:Ar,tween:Lr,keyframes:Lr,spring:kr};function Wr(e){typeof e.type==`string`&&(e.type=Ur[e.type])}function Gr(e,t){return{kind:e,animation:t,timestamp:Gt.now(),frameTimestamp:Ht.timestamp,frameIsProcessing:Ht.isProcessing}}function Kr(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Gr(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function qr(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Gr(`layout-animation-start`,e),node:t})}catch{}}var Jr=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Yr=e=>e/100,Xr=class extends Jr{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Gt.now()&&this.tick(Gt.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Kr(this,this.options)}initAnimation(){let{options:e}=this;Wr(e);let{type:t=Lr,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Lr;s!==Lr&&typeof o[0]!=`number`&&(this.mixKeyframes=ft(Yr,ar(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=gr(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=at(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Ar&&(b.value=Hr(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return gt(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+gt(e)}get time(){return gt(this.currentTime)}set time(e){e=ht(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Br(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Gt.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=gt(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=pr,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Gt.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Zr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Qr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(nn)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Zr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var $r=/\b([a-z-]*)\(.*?\)/gu,ei={...zn,getAnimatableNone:e=>{let t=e.match($r);return t?t.map(Qr).join(` `):e}},ti={...zn,getAnimatableNone:e=>{let t=zn.parse(e);return zn.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},ni={...$t,transform:Math.round},ri={rotate:mn,pathRotation:mn,rotateX:mn,rotateY:mn,rotateZ:mn,scale:tn,scaleX:tn,scaleY:tn,scaleZ:tn,skew:mn,skewX:mn,skewY:mn,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:en,originX:vn,originY:vn,originZ:B},ii={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...ri,zIndex:ni,fillOpacity:en,strokeOpacity:en,numOctaves:ni},ai={...ii,color:bn,backgroundColor:bn,outlineColor:bn,fill:bn,stroke:bn,borderColor:bn,borderTopColor:bn,borderRightColor:bn,borderBottomColor:bn,borderLeftColor:bn,filter:ei,WebkitFilter:ei,mask:ti,WebkitMask:ti},oi=e=>ai[e],si=new Set([ei,ti]);function ci(e,t){let n=oi(e);return si.has(n)||(n=zn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function li(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ui=e=>e*180/Math.PI,di=e=>pi(ui(Math.atan2(e[1],e[0]))),fi={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:di,rotateZ:di,skewX:e=>ui(Math.atan(e[1])),skewY:e=>ui(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},pi=e=>(e%=360,e<0&&(e+=360),e),mi=di,hi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),gi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_i={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hi,scaleY:gi,scale:e=>(hi(e)+gi(e))/2,rotateX:e=>pi(ui(Math.atan2(e[6],e[5]))),rotateY:e=>pi(ui(Math.atan2(-e[2],e[0]))),rotateZ:mi,rotate:mi,skewX:e=>ui(Math.atan(e[4])),skewY:e=>ui(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function vi(e){return+!!e.includes(`scale`)}function yi(e,t){if(!e||e===`none`)return vi(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=_i,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=fi,i=t}if(!i)return vi(t);let a=r[t],o=i[1].split(`,`).map(xi);return typeof a==`function`?a(o):o[a]}var bi=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return yi(n,t)};function xi(e){return parseFloat(e.trim())}var Si=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Ci=new Set([...Si,`pathRotation`]),wi=e=>e===$t||e===B,Ti=new Set([`x`,`y`,`z`]),Ei=Si.filter(e=>!Ti.has(e));function Di(e){let t=[];return Ei.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Oi=new Set([`bottom`,`right`]);function ki(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Ai={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>ki(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>ki(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>yi(e,`x`),y:({transform:e})=>yi(e,`y`)};Ai.translateX=Ai.x,Ai.translateY=Ai.y;var ji=new Set,Mi=!1,Ni=!1,Pi=!1;function Fi(){if(Ni){let e=[],t=new Set,n=new Set;ji.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Oi.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Di(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Ni=!1,Mi=!1,ji.forEach(e=>e.complete(Pi)),ji.clear()}function Ii(){ji.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ni=!0)})}function Li(){Pi=!0,Ii(),Fi(),Pi=!1}function Ri(e,t,n){if(typeof e==`string`){if(st(e)||lt(e))return parseFloat(e);if(!zn.test(e)&&zn.test(n))return ci(t,n)}return e??void 0}var zi=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(ji.add(this),Mi||(Mi=!0,ur.read(Ii),ur.resolveKeyframes(Fi))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Ri(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}li(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ji.delete(this)}cancel(){this.state===`scheduled`&&(ji.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Bi=e=>e.startsWith(`--`);function Vi(e,t,n){Bi(t)?e.style.setProperty(t,n):e.style[t]=n}var Hi={};function Ui(e,t){let n=ut(e);return()=>Hi[t]??n()}var Wi=Ui(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Gi=Ui(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qi={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ki([0,.65,.55,1]),circOut:Ki([.55,0,1,.45]),backIn:Ki([.31,.01,.66,-.59]),backOut:Ki([.33,1.53,.69,.99])};function Ji(e,t){if(e)return typeof e==`function`?Gi()?mr(e,t):`ease-out`:Rt(e)?Ki(e):Array.isArray(e)?e.map(e=>Ji(e,t)||qi.easeOut):qi[e]}function Yi(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Ji(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Xi(e){return typeof e==`function`&&`applyToOptions`in e}function Zi({type:e,...t}){return Xi(e)&&Gi()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Qi=class extends Jr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Zi(e);this.animation=Yi(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Hr(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Vi(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Kr(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return gt(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+gt(e)}get time(){return gt(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ht(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Wi()?(this.animation.timeline=e,t?.(this.animation),dt):n(this)}},$i={anticipate:kt,backInOut:Ot,circInOut:Mt};function ea(e){return e in $i}function ta(e){typeof e.ease==`string`&&ea(e.ease)&&(e.ease=$i[e.ease])}var V=10,na=class extends Qi{constructor(e){ta(e),Wr(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Xr({...a,autoplay:!1}),s=Math.max(V,Gt.now()-this.startTime),c=at(0,V,s-V),l=o.sample(s).value,{name:u}=this.options;i&&u&&Vi(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},ra=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(zn.test(e)||e===`0`)&&!e.startsWith(`url(`));function ia(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function aa(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ra(i,t),s=ra(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):ia(e)||(n===`spring`||Xi(n))&&r}function oa(e){e.duration=0,e.type=`keyframes`}var sa=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),ca=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function la(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&ca.test(e[t]))return!0;return!1}var ua=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),da=ut(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function fa(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(sa.has(n)||ua.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return da()&&(sa.has(n)||ua.has(n)&&la(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var pa=40,ma=class extends Jr{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Gt.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||zi;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Gt.now();let u=!0;aa(e,i,a,o)||(u=!1,(ot.instantAnimations||!s)&&l?.(Hr(e,n,t)),e[0]=e[e.length-1],oa(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>pa?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&fa(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new na(n)}catch{m=new Xr(n)}}else m=new Xr(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Li()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},ha=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return ga(this.animations,`duration`)}get iterationDuration(){return ga(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function ga(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var _a=class extends ha{then(e,t){return this.finished.finally(e).then(()=>{})}};function va(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var ya=30,ba=e=>!isNaN(parseFloat(e)),xa={current:void 0},Sa=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Gt.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Gt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ba(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new mt)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new mt,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){ur.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return xa.current&&xa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ya)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ya);return _t(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ca(e,t){return new Sa(e,t)}function wa(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Ta(e,t){let n=e?.[t]??e?.default??e;return n===e?n:wa(n,e)}var Ea={type:`spring`,stiffness:500,damping:25,restSpeed:10},Da=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Oa={type:`keyframes`,duration:.8},ka={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Aa=(e,{keyframes:t})=>t.length>2?Oa:Ci.has(e)?e.startsWith(`scale`)?Da(t[1]):Ea:ka,ja=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Ma(e){for(let t in e)if(!ja.has(t))return!0;return!1}var Na=(e,t,n,r={},i,a)=>o=>{let s=Ta(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ht(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ma(s)||Object.assign(u,Aa(e,u)),u.duration&&=ht(u.duration),u.repeatDelay&&=ht(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(oa(u),u.delay===0&&(d=!0)),(ot.instantAnimations||ot.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,oa(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Hr(u.keyframes,s);if(e!==void 0){ur.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Xr(u):new ma(u)},Pa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fa(e){let t=Pa.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ia(e,t,n=1){`${e}`;let[r,i]=Fa(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return st(e)?parseFloat(e):e}return Xt(i)?Ia(i,t,n+1):i}function La(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ra(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...La(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function za(e,t,n){return Ra(e.getProps(),t,n,e)}var Ba=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Va=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Si]),Ha=e=>Array.isArray(e);function Ua(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ca(n))}function Wa(e){return Ha(e)?e[e.length-1]||0:e}function Ga(e,t){let{transitionEnd:n={},transition:r={},...i}=za(e,t)||{};i={...i,...n};for(let t in i)Ua(e,t,Wa(i[t]))}var Ka=e=>!!(e&&e.getVelocity);function qa(e){return!!(Ka(e)&&e.add)}function Ja(e,t){let n=e.getValue(`willChange`);if(qa(n))return n.add(t);if(!n&&ot.WillChange){let n=new ot.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ya(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Xa=`data-`+Ya(`framerAppearId`);function Za(e){return e.props[Xa]}var Qa=typeof window<`u`;function $a({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function eo(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?wa(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&$a(f,t))continue;let o={delay:n,...Ta(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ur.update(()=>r.set(i));continue}let p=!1;if(Qa&&window.MotionHandoffAnimation){let n=Za(e);if(n){let e=window.MotionHandoffAnimation(n,t,ur);e!==null&&(o.startTime=e,p=!0)}}Ja(e,t);let m=l??e.shouldReduceMotion;r.start(Na(t,r,i,m&&Va.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>ur.update(()=>{o&&Ga(e,o)});d.length?Promise.all(d).then(t):t()}return d}function to(e,t,n={}){let r=za(e,t,Ba(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?eo(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(to(e,t,{...n,delay:r+(typeof o==`function`?0:o)+va(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function no(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>to(e,t,n))):typeof t==`string`?to(e,t,n):Promise.all(eo(e,za(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var ro={test:e=>e===`auto`,parse:e=>e},io=e=>t=>t.test(e),ao=[$t,B,hn,mn,_n,gn,ro],oo=e=>ao.find(io(e));function so(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||lt(e)}var co=new Set([`auto`,`none`,`0`]);function lo(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!co.has(t)&&jn(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=ci(n,i))}var uo=class extends zi{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Xt(r))){let i=Ia(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Va.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=oo(r),o=oo(i);if(Qt(r)!==Qt(i)&&Ai[n]){this.needsMeasurement=!0;return}if(a!==o){if(wi(a)&&wi(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Ai[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||so(e[t]))&&n.push(t);n.length&&lo(e,n,t)}measure(){let{element:e,name:t}=this;return Ai[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},fo=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],po=[];function mo(e){typeof e.test==`function`&&e.read,ho(e),po.unshift(e)}function ho(e){it(po,e)}function go(e){return po.find(t=>t.test(e))}function _o(e,t,n={},r){let i=[],{velocity:a}=n,o=n.reduceMotion??r?.shouldReduceMotion;for(let s in t){if(s===`transition`||s===`transitionEnd`)continue;let c=t[s];if(c===void 0)continue;let l=e(s),u=l.get();if(u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a){ur.update(()=>l.set(c));continue}l.start(Na(s,l,c,o&&Va.has(s)?{type:!1}:n,r)),l.animation&&i.push(l.animation)}let{transitionEnd:s}=t;if(s){let t=()=>ur.update(()=>{for(let t in s)e(t).set(s[t])});i.length?Promise.all(i).then(t):t()}return i}function vo(e,t,n,r,i){return _o(r=>{let a=e.get(t,r);if(!a){let o;if(!i){let i=n[r];o=yo(i)??e.read(t,r,i),`${r}`}a=Ca(o,{owner:i}),e(t,{[r]:a})}return a},n,r,i)}function yo(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function bo(e){return ct(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function xo(e){return ct(e)&&`ownerSVGElement`in e}var So=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Co(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var wo=class{constructor(e=ur.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function To(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new wo(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}var Eo={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Do={};function Oo(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].get();a!==void 0&&(typeof a==`number`?a:parseFloat(a))!==+!!i.startsWith(`scale`)&&(t+=(t&&` `)+(Do[i]||(Do[i]=(Eo[i]||i)+`(`))+So(a,ri[i])+`)`)}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+`rotate(`+So(i,ri.pathRotation)+`)`),t||`none`}var ko=new Set([`originX`,`originY`,`originZ`]),Ao=(e,t)=>So(e.get(t)?.get(),ii[t]),jo=(e,t,n,r)=>{let i,a;if(Ci.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>Si.indexOf(e)-Si.indexOf(t)))}t.get(`transform`)||(!bo(e)&&!t.get(`transformBox`)&&jo(e,t,`transformBox`,new Sa(`fill-box`)),t.set(`transform`,new Sa(`none`),()=>{e.style.transform=Oo(t)})),a=t.get(`transform`)}else ko.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new Sa(``),()=>{let n=Ao(t,`originX`)??`50%`,r=Ao(t,`originY`)??`50%`,i=Ao(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=Bi(n)?()=>{e.style.setProperty(n,r.get())}:()=>{e.style[n]=So(r.get(),ii[n])};return t.set(n,r,i,a)},Mo=e=>bo(e)||xo(e),No=(e,t)=>{if(Ci.has(t))return bi(e,t);let n=getComputedStyle(e),r=Bi(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},Po=To(jo,{test:Mo,read:No}),Fo={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Io=Si.length;function Lo(e,t,n){let r=``,i=!0;for(let a=0;a<Io;a++){let o=Si[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=So(s,ii[o]);if(!c){i=!1;let t=Fo[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${So(a,ii.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ro(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Ci.has(e)){o=!0;continue}if(Jt(e)){i[e]=n;continue}{let t=So(n,ii[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Lo(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var zo={offset:`stroke-dashoffset`,array:`stroke-dasharray`},H={offset:`strokeDashoffset`,array:`strokeDasharray`};function Bo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?zo:H;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Vo=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ho(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ro(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Vo)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Bo(d,i,a,o,!1)}function Uo(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var Wo=(e,t,n,r,i=n)=>{let a=Uo(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=Ya(i));let o=ii[n]||ii[i],s=a?()=>{e[i]=So(r.get(),ii[n])}:()=>{let t=So(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Go(e,t,n,r){return ur.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new Sa(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var Ko=To((e,t,n,r)=>n.startsWith(`path`)?Go(e,t,n,r):n.startsWith(`attr`)?Wo(e,t,n,r,qo(n)):(Ci.has(n)||ko.has(n)||Bi(n)||n in e.style?jo:Wo)(e,t,n,r),{test:xo,read:(e,t)=>Ci.has(t)?ii[t]?.default||0:Bi(t)||Vo.includes(t)?No(e,t)||e.getAttribute(Ya(t))||0:(t=qo(t),e.getAttribute(Ya(t))??e.getAttribute(t)??void 0)});function qo(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function Jo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xo(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zo(e){return e===void 0||e===1}function Qo({scale:e,scaleX:t,scaleY:n}){return!Zo(e)||!Zo(t)||!Zo(n)}function $o(e){return Qo(e)||es(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function es(e){return ts(e.x)||ts(e.y)}function ts(e){return e&&e!==`0%`}function ns(e,t,n){return n+t*(e-n)}function rs(e,t,n,r,i){return i!==void 0&&(e=ns(e,i,r)),ns(e,n,r)+t}function is(e,t=0,n=1,r,i){e.min=rs(e.min,t,n,r,i),e.max=rs(e.max,t,n,r,i)}function as(e,{x:t,y:n}){is(e.x,t.translate,t.scale,t.originPoint),is(e.y,n.translate,n.scale,n.originPoint)}var os=.999999999999,ss=1.0000000000001;function cs(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ls(e.x,-a.scroll.offset.x),ls(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,as(e,o)),r&&$o(a.latestValues)&&fs(e,a.latestValues,a.layout?.layoutBox))}t.x<ss&&t.x>os&&(t.x=1),t.y<ss&&t.y>os&&(t.y=1)}function ls(e,t){e.min+=t,e.max+=t}function us(e,t,n,r,i=.5){is(e,t,n,Un(e.min,e.max,i),r)}function ds(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function fs(e,t,n){let r=n??e;us(e.x,ds(t.x,r.x),t.scaleX,t.scale,t.originX),us(e.y,ds(t.y,r.y),t.scaleY,t.scale,t.originY)}function ps(e,t){return Jo(Xo(e.getBoundingClientRect(),t))}function ms(e,t,n){let r=ps(e,n),{scroll:i}=t;return i&&(ls(r.x,i.offset.x),ls(r.y,i.offset.y)),r}var hs={},gs=e=>xo(e)?Ko:Po,_s=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=uo}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return ps(this.current)}getProps(){return hs}};function vs(e,t,n,r){if(r)return _o(e=>r.getValue(e,null),t,n,r);let i=gs(e);return vo(i,e,t,n,new _s(i,e))}var ys=To((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>ct(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:bs,cancel:xs}=lr(queueMicrotask,!1),Ss={x:!1,y:!1};function Cs(){return Ss.x||Ss.y}function ws(e){return e===`x`||e===`y`?Ss[e]?null:(Ss[e]=!0,()=>{Ss[e]=!1}):Ss.x||Ss.y?null:(Ss.x=Ss.y=!0,()=>{Ss.x=Ss.y=!1})}function Ts(e,t){let n=Co(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Es(e){return!(e.pointerType===`touch`||Cs())}function Ds(e,t,n={}){let[r,i,a]=Ts(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Es(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Os=(e,t)=>t?e===t||Os(e,t.parentElement):!1,ks=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,As=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function js(e){return As.has(e.tagName)||e.isContentEditable===!0}var Ms=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ns(e){return Ms.has(e.tagName)||e.isContentEditable===!0}var Ps=new WeakSet;function Fs(e){return t=>{t.key===`Enter`&&e(t)}}function Is(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ls=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Fs(()=>{if(Ps.has(n))return;Is(n,`down`);let e=Fs(()=>{Is(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Is(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Rs(e){return ks(e)&&!Cs()}var zs=new WeakSet;function Bs(e,t,n={}){let[r,i,a]=Ts(e,n),o=e=>{let r=e.currentTarget;if(!Rs(e)||zs.has(e))return;Ps.add(r),n.stopPropagation&&zs.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Ps.has(r)&&Ps.delete(r),Rs(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Os(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),bo(e)&&(e.addEventListener(`focus`,e=>Ls(e,i)),!js(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var Vs=new WeakMap,Hs,Us=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:xo(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ws=Us(`inline`,`width`,`offsetWidth`),Gs=Us(`block`,`height`,`offsetHeight`);function Ks({target:e,borderBoxSize:t}){Vs.get(e)?.forEach(n=>{n(e,{get width(){return Ws(e,t)},get height(){return Gs(e,t)}})})}function qs(e){e.forEach(Ks)}function Js(){typeof ResizeObserver<`u`&&(Hs=new ResizeObserver(qs))}function Ys(e,t){Hs||Js();let n=Co(e);return n.forEach(e=>{let n=Vs.get(e);n||(n=new Set,Vs.set(e,n)),n.add(t),Hs?.observe(e)}),()=>{n.forEach(e=>{let n=Vs.get(e);n?.delete(t),n?.size||Hs?.unobserve(e)})}}var Xs=new Set,Zs;function Qs(){Zs=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xs.forEach(t=>t(e))},window.addEventListener(`resize`,Zs)}function $s(e){return Xs.add(e),Zs||Qs(),()=>{Xs.delete(e),!Xs.size&&typeof Zs==`function`&&(window.removeEventListener(`resize`,Zs),Zs=void 0)}}function ec(e,t){return typeof e==`function`?$s(e):Ys(e,t)}var tc={value:null,addProjectionMetrics:null};function nc(e){return xo(e)&&e.tagName===`svg`}var rc=e=>typeof e==`number`?e:parseFloat(e),ic=()=>({translate:0,scale:1,origin:0,originPoint:0}),ac=()=>({x:ic(),y:ic()}),oc=()=>({min:0,max:0}),sc=()=>({x:oc(),y:oc()}),cc=new WeakMap;function lc(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function uc(e){return typeof e==`string`||Array.isArray(e)}var dc=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],fc=[`initial`,...dc];function pc(e){if(lc(e.animate))return!0;for(let t=0;t<fc.length;t++)if(uc(e[fc[t]]))return!0;return!1}function mc(e){return!!(pc(e)||e.variants)}function hc(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Ka(i))e.addValue(r,i);else if(Ka(a))e.addValue(r,Ca(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ca(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var gc={current:null},_c={current:!1},vc=typeof window<`u`;function yc(){if(_c.current=!0,vc){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>gc.current=e.matches;e.addEventListener(`change`,t),t()}else gc.current=!1}}var bc=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],xc={};function Sc(e){xc=e}function Cc(){return xc}var wc=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Gt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ur.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=pc(t),this.isVariantNode=mc(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Ka(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,cc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(_c.current||yc(),this.shouldReduceMotion=gc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),dr(this.notifyUpdate),dr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&sa.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Qi({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ht(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Ci.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ur.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in xc){let t=xc[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sc()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<bc.length;t++){let n=bc[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=hc(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ca(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(st(n)||lt(n))?n=parseFloat(n):typeof n!=`number`&&!zn.test(n)&&zn.test(t)&&(n=ci(e,t)),this.setBaseTarget(e,Ka(n)?n.get():n)),Ka(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new mt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){bs.render(this.render)}},Tc=class extends wc{constructor(){super(...arguments),this.KeyframeResolver=uo}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Ka(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Ec=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Dc(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}var Oc={};function kc(e,{layout:t,layoutId:n}){return Ci.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Oc[e]||e===`opacity`)}function Ac(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Ka(r[t])||i&&Ka(i[t])||kc(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function jc(e){return window.getComputedStyle(e)}var Mc=class extends Tc{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Dc}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Ci.has(t))return this.projection?.isProjecting?vi(t):bi(e,t);{let n=jc(e),r=(Jt(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ps(e,t)}build(e,t,n){Ro(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ac(e,t,n)}},Nc=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Pc=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Fc(e,t,n,r){Dc(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Nc.has(n)?n:Ya(n),t.attrs[n])}function Ic(e,t,n){let r=Ac(e,t,n);for(let n in e)if(Ka(e[n])||Ka(t[n])){let t=Si.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Lc=class extends Tc{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=sc}getBaseTargetFromProps(e,t){return Ci.has(t)?super.getBaseTargetFromProps(e,t)??vi(t):e[t]}getDefaultValue(e){return Ci.has(e)?this.latestValues[e]??vi(e):void 0}readValueFromInstance(e,t){if(Ci.has(t)){let e=oi(t);return e&&e.default||0}if(Vo.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Nc.has(t)?t:Ya(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ic(e,t,n)}build(e,t,n){Ho(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Fc(e,t,n,r)}mount(e){this.isSVGTag=Pc(e.tagName),super.mount(e)}};function Rc(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var zc=[...dc].reverse();function Bc(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>no(e,t,n))),n=Hc(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(zc.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?uc(g)||g===!1?g:void 0:h,v=uc(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||lc(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=Vc(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=za(e,n,Ba(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!Rc(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=za(s,n)?.transition?.delayChildren;r.delay=va(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&za(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!Ka(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Hc(),i=!0}}}function Vc(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Rc(t,e):!1}function Hc(){let e={};for(let t of dc)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Uc(e,t){e.min=t.min,e.max=t.max}function Wc(e,t){Uc(e.x,t.x),Uc(e.y,t.y)}function Gc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Kc=.9999,qc=1.0001,Jc=-.01,Yc=.01;function Xc(e){return e.max-e.min}function Zc(e,t,n){return Math.abs(e-t)<=n}function Qc(e,t,n,r=.5){e.origin=r,e.originPoint=Un(t.min,t.max,e.origin),e.scale=Xc(n)/Xc(t),e.translate=Un(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Kc&&e.scale<=qc||isNaN(e.scale))&&(e.scale=1),(e.translate>=Jc&&e.translate<=Yc||isNaN(e.translate))&&(e.translate=0)}function $c(e,t,n,r){Qc(e.x,t.x,n.x,r?r.originX:void 0),Qc(e.y,t.y,n.y,r?r.originY:void 0)}function el(e,t,n,r=0){e.min=(r?Un(n.min,n.max,r):n.min)+t.min,e.max=e.min+Xc(t)}function tl(e,t,n,r){el(e.x,t.x,n.x,r?.x),el(e.y,t.y,n.y,r?.y)}function nl(e,t,n,r=0){let i=r?Un(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Xc(t)}function rl(e,t,n,r){nl(e.x,t.x,n.x,r?.x),nl(e.y,t.y,n.y,r?.y)}function il(e,t,n,r,i){return e-=t,e=ns(e,1/n,r),i!==void 0&&(e=ns(e,1/i,r)),e}function al(e,t=0,n=1,r=.5,i,a=e,o=e){if(hn.test(t)&&(t=parseFloat(t),t=Un(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Un(a.min,a.max,r);e===a&&(s-=t),e.min=il(e.min,t,n,s,i),e.max=il(e.max,t,n,s,i)}function ol(e,t,[n,r,i],a,o){al(e,t[n],t[r],t[i],t.scale,a,o)}var sl=[`x`,`scaleX`,`originX`],cl=[`y`,`scaleY`,`originY`];function ll(e,t,n,r){ol(e.x,t,sl,n?n.x:void 0,r?r.x:void 0),ol(e.y,t,cl,n?n.y:void 0,r?r.y:void 0)}function ul(e){return e.translate===0&&e.scale===1}function dl(e){return ul(e.x)&&ul(e.y)}function fl(e,t){return e.min===t.min&&e.max===t.max}function pl(e,t){return fl(e.x,t.x)&&fl(e.y,t.y)}function ml(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hl(e,t){return ml(e.x,t.x)&&ml(e.y,t.y)}function gl(e){return Xc(e.x)/Xc(e.y)}function _l(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function vl(e){return[e(`x`),e(`y`)]}function yl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var bl={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(B.test(e))e=parseFloat(e);else return e}return`${yl(e,t.target.x)}% ${yl(e,t.target.y)}%`}},xl={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=zn.parse(e);if(i.length>5)return r;let a=zn.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Un(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function Sl(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Cl=fo.length,wl=e=>typeof e==`number`||B.test(e);function Tl(e,t,n,r,i,a){i?(e.opacity=Un(0,n.opacity??1,Dl(r)),e.opacityExit=Un(t.opacity??1,0,Ol(r))):a&&(e.opacity=Un(t.opacity??1,n.opacity??1,r));for(let i=0;i<Cl;i++){let a=fo[i],o=El(t,a),s=El(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||wl(o)===wl(s)?(e[a]=Math.max(Un(rc(o),rc(s),r),0),(hn.test(s)||hn.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Un(t.rotate||0,n.rotate||0,r))}function El(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Dl=kl(0,.5,jt),Ol=kl(.5,.95,dt);function kl(e,t,n){return r=>r<e?0:r>t?1:n(pt(e,t,r))}function Al(e,t,n){let r=Ka(e)?e:Ca(e);return r.start(Na(``,r,t,n)),r.animation}function jl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Ml=(e,t)=>e.depth-t.depth,Nl=class{constructor(){this.children=[],this.isDirty=!1}add(e){rt(this.children,e),this.isDirty=!0}remove(e){it(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ml),this.isDirty=!1,this.children.forEach(e)}};function Pl(e,t){let n=Gt.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(dr(r),e(a-t))};return ur.setup(r,!0),()=>dr(r)}function Fl(e){return Ka(e)?e.get():e}var Il=class{constructor(){this.members=[]}add(e){rt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(it(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(it(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Ll={borderRadius:{...bl,applyTo:[...fo]},borderTopLeftRadius:bl,borderTopRightRadius:bl,borderBottomLeftRadius:bl,borderBottomRightRadius:bl,boxShadow:xl},Rl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Oc,{...Ll,...Oc});var zl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Bl=[``,`X`,`Y`,`Z`],Vl=1e3,Hl=0;function Ul(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Wl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Za(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ur,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Wl(r)}function Gl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Hl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tc.value&&(zl.nodes=zl.calculatedTargetDeltas=zl.calculatedProjections=0),this.nodes.forEach(Jl),this.nodes.forEach(iu),this.nodes.forEach(au),this.nodes.forEach(Yl),tc.addProjectionMetrics&&tc.addProjectionMetrics(zl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Nl)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new mt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=xo(t)&&!nc(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ur.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Pl(i,250),Rl.hasAnimatedSinceResize&&(Rl.hasAnimatedSinceResize=!1,this.nodes.forEach(ru)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||fu,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!hl(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Ta(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||ru(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ou),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Ql),this.nodes.forEach(Zl);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach($l);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(eu),this.nodes.forEach(tu),this.nodes.forEach(nu),this.nodes.forEach(Kl),this.nodes.forEach(ql)):this.nodes.forEach($l),this.clearAllSnapshots();let e=Gt.now();Ht.delta=at(0,1e3/60,e-Ht.timestamp),Ht.timestamp=e,Ht.isProcessing=!0,fr.update.process(Ht),fr.preRender.process(Ht),fr.render.process(Ht),Ht.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xl),this.sharedNodes.forEach(su)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ur.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ur.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Xc(this.snapshot.measuredBox.x)&&!Xc(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=sc(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!dl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||$o(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),gu(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return sc();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vu))){let{scroll:e}=this.root;e&&(ls(t.x,e.offset.x),ls(t.y,e.offset.y))}return t}removeElementScroll(e){let t=sc();if(Wc(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Wc(t,e),ls(t.x,i.offset.x),ls(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||sc();Wc(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(ls(r.x,-n.scroll.offset.x),ls(r.y,-n.scroll.offset.y)),$o(n.latestValues)&&fs(r,n.latestValues,n.layout?.layoutBox)}return $o(this.latestValues)&&fs(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=sc();Wc(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!$o(n.latestValues))continue;let r;n.instance&&(Qo(n.latestValues)&&n.updateSnapshot(),r=sc(),Wc(r,n.measurePageBox())),ll(t,n.latestValues,n.snapshot?.layoutBox,r)}return $o(this.latestValues)&&ll(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ht.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Ht.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=sc(),this.targetWithTransforms=sc()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Wc(this.target,this.layout.layoutBox),as(this.target,this.targetDelta)):Wc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),tc.value&&zl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Qo(this.parent.latestValues)||es(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sc(),this.relativeTargetOrigin=sc(),rl(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Wc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ht.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Wc(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;cs(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=sc());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gc(this.prevProjectionDelta.x,this.projectionDelta.x),Gc(this.prevProjectionDelta.y,this.projectionDelta.y)),$c(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!_l(this.projectionDelta.x,this.prevProjectionDelta.x)||!_l(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),tc.value&&zl.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ac(),this.projectionDelta=ac(),this.projectionDeltaWithTransform=ac()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=ac();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=sc(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(du));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=Un(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=Un(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(cu(o.x,e.x,n),cu(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rl(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),uu(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&pl(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=sc(),Wc(f,this.relativeTarget)),c&&(this.animationValues=a,Tl(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(dr(this.pendingAnimation),void 0),this.pendingAnimation=ur.update(()=>{Rl.hasAnimatedSinceResize=!0,this.motionValue||=Ca(0),this.motionValue.jump(0,!1),this.currentAnimation=Al(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),qr(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&_u(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||sc();let t=Xc(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Xc(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}Wc(t,i),fs(t,r),$c(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Il),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Ul(`z`,e,r,this.animationValues);for(let t=0;t<Bl.length;t++)Ul(`rotate${Bl[t]}`,e,r,this.animationValues),Ul(`skew${Bl[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Fl(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Fl(t?.pointerEvents)||``),this.hasProjected&&!$o(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Sl(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Oc){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Oc[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Fl(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Zl),this.root.sharedNodes.clear()}}}function Kl(e){e.updateLayout()}function ql(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)vl(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Xc(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Uc(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else _u(i,t.layoutBox,n)&&vl(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Xc(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ac();$c(o,n,t.layoutBox);let s=ac();a?$c(s,e.applyTransform(r,!0),t.measuredBox):$c(s,n,t.layoutBox);let c=!dl(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=sc();rl(s,t.layoutBox,i.layoutBox,o);let c=sc();rl(c,n,a.layoutBox,o),hl(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Jl(e){tc.value&&zl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Yl(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Xl(e){e.clearSnapshot()}function Zl(e){e.clearMeasurements()}function Ql(e){e.isLayoutDirty=!0,e.updateLayout()}function $l(e){e.isLayoutDirty=!1}function eu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function tu(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function nu(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ru(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iu(e){e.resolveTargetDelta()}function au(e){e.calcProjection()}function ou(e){e.resetSkewAndRotation()}function su(e){e.removeLeadSnapshot()}function cu(e,t,n){e.translate=Un(t.translate,0,n),e.scale=Un(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lu(e,t,n,r){e.min=Un(t.min,n.min,r),e.max=Un(t.max,n.max,r)}function uu(e,t,n,r){lu(e.x,t.x,n.x,r),lu(e.y,t.y,n.y,r)}function du(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var fu={duration:.45,ease:[.4,0,.1,1]},pu=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mu=pu(`applewebkit/`)&&!pu(`chrome/`)?Math.round:dt;function hu(e){e.min=mu(e.min),e.max=mu(e.max)}function gu(e){hu(e.x),hu(e.y)}function _u(e,t,n){return e===`position`||e===`preserve-aspect`&&!Zc(gl(t),gl(n),.2)}function vu(e){return e!==e.root&&e.scroll?.wasRoot}var yu=Gl({attachResizeListener:(e,t)=>jl(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),bu={current:void 0},xu=Gl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bu.current){let e=new yu({});e.mount(window),e.setOptions({layoutScroll:!0}),bu.current=e}return bu.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Su=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Cu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wu(...e){return t=>{let n=!1,r=e.map(e=>{let r=Cu(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Cu(e[t],null)}}}}function Tu(...e){return m.useCallback(wu(...e),e)}var U=Qe(),Eu=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(bo(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=bo(e)&&e.offsetWidth||0,r=bo(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Du({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,m.useId)(),s=(0,m.useRef)(null),c=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,m.useContext)(Su),u=Tu(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,m.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
3
3
|
[data-motion-pop-id="${o}"] {
|
|
4
4
|
position: absolute !important;
|
|
5
5
|
width: ${e}px !important;
|
|
@@ -15,7 +15,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
15
15
|
`+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{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);case 30:return De(`ViewTransition`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
16
16
|
Error generating stack: `+e.message+`
|
|
17
17
|
`+e.stack}}var Me=Object.prototype.hasOwnProperty,Ne=t.unstable_scheduleCallback,Pe=t.unstable_cancelCallback,Fe=t.unstable_shouldYield,Ie=t.unstable_requestPaint,Le=t.unstable_now,Re=t.unstable_getCurrentPriorityLevel,ze=t.unstable_ImmediatePriority,Be=t.unstable_UserBlockingPriority,Ve=t.unstable_NormalPriority,He=t.unstable_LowPriority,Ue=t.unstable_IdlePriority,We=t.log,Ge=t.unstable_setDisableYieldValue,Ke=null,qe=null;function Je(e){if(typeof We==`function`&&Ge(e),qe&&typeof qe.setStrictMode==`function`)try{qe.setStrictMode(Ke,e)}catch{}}var Ye=Math.clz32?Math.clz32:Qe,Xe=Math.log,Ze=Math.LN2;function Qe(e){return e>>>=0,e===0?32:31-(Xe(e)/Ze|0)|0}var $e=256,et=262144,tt=4194304;function nt(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&-e;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 rt(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=nt(n))):i=nt(o):i=nt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=nt(n))):i=nt(o)):i=nt(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 it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function at(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ye(n),i=1<<r;t|=e[r],n&=~i}return t}function ot(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 st(){var e=tt;return tt<<=1,!(tt&62914560)&&(tt=4194304),e}function ct(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ut(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-Ye(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&&dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ft(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function pt(e,t){var n=t&-t;return n=n&42?1:mt(n),(n&(e.suspendedLanes|t))===0?n:0}function mt(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 ht(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=z.p;return e===0?(e=window.event,e===void 0?32:jh(e.type)):e}function _t(e,t){var n=z.p;try{return z.p=e,t()}finally{z.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt,Dt=`__reactLoad$`+vt;function Ot(e){delete e[yt],delete e[bt],delete e[Ct],delete e[wt]}function kt(e){var t;if(t=e[yt])return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bm(e);e!==null;){if(n=e[yt])return n;e=bm(e)}return t}e=n,n=e.parentNode}return null}function At(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Mt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Nt(e){e[Et]=!0}function Pt(e){e[Dt]=void 0}var Ft=new Set,It={};function Lt(e,t){Rt(e,t),Rt(e+`Capture`,t)}function Rt(e,t){for(It[e]=t,e=0;e<t.length;e++)Ft.add(t[e])}var zt=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]*$`),Bt={},Vt={};function Ht(e){return Me.call(Vt,e)?!0:Me.call(Bt,e)?!1:zt.test(e)?Vt[e]=!0:(Bt[e]=!0,!1)}var Ut=!1;function Wt(){var e=Ut;return Ut=!1,e}function Gt(e,t,n){if(Ht(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 Kt(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 qt(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 Jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(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=``+Jt(t)):e.value!==``+Jt(t)&&(e.value=``+Jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Jt(n)):o===`number`&&e.value==t?rn(e,Jt(e.value)):rn(e,Jt(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=``+Jt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Zt(e);return}n=n==null?``:``+Jt(n),t=t==null?n:``+Jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Zt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(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=``+Jt(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 on(e,t,n){if(t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Jt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ue(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Zt(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=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 un(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||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(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]=``,Ut=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),Ut=!0)}else for(var o in t)t.hasOwnProperty(o)&&un(e,o,t[o])}function fn(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 pn=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`],[`maskType`,`mask-type`],[`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`]]),mn=/^[\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 hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function B(){}var gn=null;function _n(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vn=null,yn=null;function bn(e){var t=At(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(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="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));tn(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&&Qt(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}}}var xn=!1;function Sn(e,t,n){if(xn)return e(t,n);xn=!0;try{return e(t)}finally{if(xn=!1,(vn!==null||yn!==null)&&(Wd(),vn&&(t=vn,e=yn,yn=vn=null,bn(t),e)))for(t=0;t<e.length;t++)bn(e[t])}}function Cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||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 wn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Tn=!1;if(wn)try{var En={};Object.defineProperty(En,"passive",{get:function(){Tn=!0}}),window.addEventListener(`test`,En,En),window.removeEventListener(`test`,En,En)}catch{Tn=!1}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.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 kn=i.slice(e,1<r?1-r:void 0)}function jn(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 Mn(){return!0}function Nn(){return!1}function Pn(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)?Mn:Nn,this.isPropagationStopped=Nn,this}return T(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=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=T({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=T({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,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!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(T({},Hn,{dataTransfer:0})),Gn=Pn(T({},Ln,{relatedTarget:0})),Kn=Pn(T({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Pn(T({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Pn(T({},Fn,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={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`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function $n(){return Qn}var er=Pn(T({},Ln,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Pn(T({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Pn(T({},Fn,{submitter:0})),rr=Pn(T({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),ir=Pn(T({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ar=Pn(T({},Hn,{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})),or=Pn(T({},Fn,{newState:0,oldState:0,source:0})),sr=[9,13,27,32],cr=wn&&`CompositionEvent`in window,lr=null;wn&&`documentMode`in document&&(lr=document.documentMode);var ur=wn&&`TextEvent`in window&&!lr,dr=wn&&(!cr||lr&&8<lr&&11>=lr),fr=` `,pr=!1;function mr(e,t){switch(e){case`keyup`:return sr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function hr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var gr=!1;function _r(e,t){switch(e){case`compositionend`:return hr(t);case`keypress`:return t.which===32?(pr=!0,fr):null;case`textInput`:return e=t.data,e===fr&&pr?null:e;default:return null}}function vr(e,t){if(gr)return e===`compositionend`||!cr&&mr(e,t)?(e=An(),kn=On=Dn=null,gr=!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 dr&&t.locale!==`ko`?null:t.data;default:return null}}var yr={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 br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!yr[e.type]:t===`textarea`}function xr(e,t,n,r){vn?yn?yn.push(r):yn=[r]:vn=r,t=rp(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Sr=null,Cr=null;function wr(e){qf(e,0)}function Tr(e){if(Qt(jt(e)))return e}function Er(e,t){if(e===`change`)return t}var Dr=!1;if(wn){var Or;if(wn){var kr=`oninput`in document;if(!kr){var Ar=document.createElement(`div`);Ar.setAttribute(`oninput`,`return;`),kr=typeof Ar.oninput==`function`}Or=kr}else Or=!1;Dr=Or&&(!document.documentMode||9<document.documentMode)}function jr(){Sr&&(Sr.detachEvent(`onpropertychange`,Mr),Cr=Sr=null)}function Mr(e){if(e.propertyName===`value`&&Tr(Cr)){var t=[];xr(t,Cr,e,_n(e)),Sn(wr,t)}}function Nr(e,t,n){e===`focusin`?(jr(),Sr=t,Cr=n,Sr.attachEvent(`onpropertychange`,Mr)):e===`focusout`&&jr()}function Pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Tr(Cr)}function Fr(e,t){if(e===`click`)return Tr(t)}function Ir(e,t){if(e===`input`||e===`change`)return Tr(t)}function Lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Rr=typeof Object.is==`function`?Object.is:Lr;function zr(e,t){if(Rr(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(!Me.call(t,i)||!Rr(e[i],t[i]))return!1}return!0}function Br(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hr(e,t){var n=Vr(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=Vr(n)}}function Ur(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ur(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Br(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=Br(e.document)}return t}function Gr(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 Kr=wn&&`documentMode`in document&&11>=document.documentMode,qr=null,Jr=null,Yr=null,Xr=!1;function Zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xr||qr==null||qr!==Br(r)||(r=qr,`selectionStart`in r&&Gr(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}),Yr&&zr(Yr,r)||(Yr=r,r=rp(Jr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=qr)))}function Qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var $r={animationend:Qr(`Animation`,`AnimationEnd`),animationiteration:Qr(`Animation`,`AnimationIteration`),animationstart:Qr(`Animation`,`AnimationStart`),transitionrun:Qr(`Transition`,`TransitionRun`),transitionstart:Qr(`Transition`,`TransitionStart`),transitioncancel:Qr(`Transition`,`TransitionCancel`),transitionend:Qr(`Transition`,`TransitionEnd`)},ei={},ti={};wn&&(ti=document.createElement(`div`).style,`AnimationEvent`in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),`TransitionEvent`in window||delete $r.transitionend.transition);function ni(e){if(ei[e])return ei[e];if(!$r[e])return e;var t=$r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ti)return ei[e]=t[n];return e}var ri=ni(`animationend`),ii=ni(`animationiteration`),ai=ni(`animationstart`),oi=ni(`transitionrun`),si=ni(`transitionstart`),ci=ni(`transitioncancel`),li=ni(`transitionend`),ui=new Map,di=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);di.push(`scrollEnd`);function fi(e,t){ui.set(e,t),Lt(t,[e])}var pi=0;function mi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Td.identifierPrefix;var n=pi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function hi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Nd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function gi(e,t){return e=hi(e),t=hi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=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)},vi=[],yi=0,bi=0;function xi(){for(var e=yi,t=bi=yi=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[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&&Ti(n,i,a)}}function Si(e,t,n,r){vi[yi++]=e,vi[yi++]=t,vi[yi++]=n,vi[yi++]=r,bi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ci(e,t,n,r){return Si(e,t,n,r),Ei(e)}function wi(e,t){return Si(e,null,null,t),Ei(e)}function Ti(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-Ye(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ei(e){if(50<Pd)throw Pd=0,Fd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Di={};function Oi(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 ki(e,t,n,r){return new Oi(e,t,n,r)}function Ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ji(e,t){var n=e.alternate;return n===null?(n=ki(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&1206910976,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 Mi(e,t){e.flags&=1206910978;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 Ni(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ai(r)&&(s=1);else if(typeof r==`string`)s=th(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ne:return e=ki(31,n,t,a),e.elementType=ne,e.lanes=o,e;case k:return Pi(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=ki(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case F:return e=ki(13,n,t,a),e.elementType=F,e.lanes=o,e;case I:return e=ki(19,n,t,a),e.elementType=I,e.lanes=o,e;case re:case ae:return e=a|32,e=ki(30,n,t,e),e.elementType=ae,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case P:s=11;break a;case ee:s=14;break a;case te:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ki(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Pi(e,t,n,r){return e=ki(7,e,r,t),e.lanes=n,e}function Fi(e,t,n){return e=ki(6,e,null,t),e.lanes=n,e}function Ii(e){var t=ki(18,null,null,0);return t.stateNode=e,t}function Li(e,t,n){return t=ki(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ri=new WeakMap;function zi(e,t){if(typeof e==`object`&&e){var n=Ri.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Ri.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Bi=[],Vi=0,Hi=null,Ui=0,Wi=[],Gi=0,Ki=null,qi=1,Ji=``;function Yi(e,t){Bi[Vi++]=Ui,Bi[Vi++]=Hi,Hi=e,Ui=t}function Xi(e,t,n){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,Ki=e;var r=qi;e=Ji;var i=32-Ye(r)-1;r&=~(1<<i),n+=1;var a=32-Ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qi=1<<32-Ye(t)+i|n<<i|r,Ji=a+e}else qi=1<<a|n<<i|r,Ji=e}function Zi(e){e.return!==null&&(Yi(e,1),Xi(e,1,0))}function Qi(e){for(;e===Hi;)Hi=Bi[--Vi],Bi[Vi]=null,Ui=Bi[--Vi],Bi[Vi]=null;for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,Ji=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null}function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,qi=t.id,Ji=t.overflow,Ki=e}var ea=null,ta=null,V=!1,na=null,ra=!1,ia=Error(i(519));function aa(e){throw da(zi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ia}function oa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:Jf(`cancel`,t),Jf(`close`,t);break;case`iframe`:case`object`:case`embed`:Jf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Gf.length;n++)Jf(Gf[n],t);break;case`source`:Jf(`error`,t);break;case`img`:case`image`:case`link`:Jf(`error`,t),Jf(`load`,t);break;case`details`:Jf(`toggle`,t);break;case`input`:Jf(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Jf(`invalid`,t);break;case`textarea`:Jf(`invalid`,t),sn(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||lp(t.textContent,n)?(r.popover!=null&&(Jf(`beforetoggle`,t),Jf(`toggle`,t)),r.onScroll!=null&&Jf(`scroll`,t),r.onScrollEnd!=null&&Jf(`scrollend`,t),r.onClick!=null&&(t.onclick=B),t=!0):t=!1,t||aa(e,!0)}function sa(e){for(ea=e.return;ea;)switch(ea.tag){case 5:case 31:case 13:ra=!1;return;case 27:case 3:ra=!0;return;default:ea=ea.return}}function ca(e){if(e!==ea)return!1;if(!V)return sa(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Sp(e.type,e.memoizedProps)),n=!n),n&&ta&&aa(e),sa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=ym(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=ym(e)}else t===27?(t=ta,Ap(e.type)?(e=vm,vm=null,ta=e):ta=t):ta=ea?_m(e.stateNode.nextSibling):null;return!0}function la(){ta=ea=null,V=!1}function ua(){var e=na;return e!==null&&(_d===null?_d=e:_d.push.apply(_d,e),na=null),e}function da(e){na===null?na=[e]:na.push(e)}var fa=me(null),pa=null,ma=null;function ha(e,t,n){ge(fa,t._currentValue),t._currentValue=n}function ga(e){e._currentValue=fa.current,he(fa)}function _a(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 va(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),_a(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),_a(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),_a(a.return,n,e),s=a.child,s=s===null?null:s.sibling):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 ya(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;Rr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===be.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[hh]:e.push(hh))}a=a.return}return e!==null&&va(t,e,n,r),t.flags|=262144,e!==null}function ba(e){for(e=e.firstContext;e!==null;){if(!Rr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){pa=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Sa(e){return wa(pa,e)}function Ca(e,t){return pa===null&&xa(e),wa(e,t)}function wa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ma===null){if(e===null)throw Error(i(308));ma=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ma=ma.next=t;return n}var Ta=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()})}},Ea=t.unstable_scheduleCallback,Da=t.unstable_NormalPriority,Oa={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ka(){return{controller:new Ta,data:new Map,refCount:0}}function Aa(e){e.refCount--,e.refCount===0&&Ea(Da,function(){e.controller.abort()})}function ja(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ma=null;function Na(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Pa=null,Fa=0,Ia=0,La=null;function Ra(e,t){if(Pa===null){var n=Pa=[];Fa=0,Ia=Bf(),La={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Fa++,t.then(za,za),t}function za(){if(--Fa===0&&(Ma=null,Pa!==null)){La!==null&&(La.status=`fulfilled`);var e=Pa;Pa=null,Ia=0,La=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ba(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 Va=R.S;R.S=function(e,t){if(bd=Le(),typeof t==`object`&&t&&typeof t.then==`function`&&Ra(e,t),Ma!==null)for(var n=Ef;n!==null;)ja(n,Ma),n=n.next;if(n=e.types,n!==null){for(var r=Ef;r!==null;)ja(r,n),r=r.next;if(Ia!==0){r=Ma,r===null&&(r=Ma=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Va!==null&&Va(e,t)};var Ha=me(null);function Ua(){var e=Ha.current;return e===null?td.pooledCache:e}function Wa(e,t){t===null?ge(Ha,Ha.current):ge(Ha,t.pool)}function Ga(){var e=Ua();return e===null?null:{parent:Oa._currentValue,pool:e}}var Ka=Error(i(460)),qa=Error(i(474)),Ja=Error(i(542)),Ya={then:function(){}};function Xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Za(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(B,B),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,to(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(B,B);else{if(e=td,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,to(e),e}throw $a=t,Ka}}function Qa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?($a=e,Ka):e}}var $a=null;function eo(){if($a===null)throw Error(i(459));var e=$a;return $a=null,e}function to(e){if(e===Ka||e===Ja)throw Error(i(483))}var no=null,ro=0;function io(e){var t=ro;return ro+=1,no===null&&(no=[]),Za(no,e,t)}function ao(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function oo(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function so(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=ji(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),ao(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===te&&Qa(i)===t.type)?(t=a(t,n.props),ao(t,n),t.return=e,t):(t=Ni(n.type,n.key,n.props,null,e.mode,r),ao(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=Li(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=Pi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ni(t.type,t.key,t.props,null,e.mode,n),ao(n,t),n.return=e,n;case O:return t=Li(t,e.mode,n),t.return=e,t;case te:return t=Qa(t),f(e,t,n)}if(ue(t)||L(t))return t=Pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,io(t),n);if(t.$$typeof===N)return f(e,Ca(e,t),n);oo(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 D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case te:return n=Qa(n),p(e,t,n,r)}if(ue(n)||L(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,io(n),r);if(n.$$typeof===N)return p(e,t,Ca(e,n),r);oo(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 D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case te:return r=Qa(r),m(e,t,n,r,i)}if(ue(r)||L(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,io(r),i);if(r.$$typeof===N)return m(e,t,n,Ca(t,r),i);oo(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),V&&Yi(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 V&&Yi(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(_.key===null?h:_.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)}),V&&Yi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),V&&Yi(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 V&&Yi(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(_.key===null?g:_.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)}),V&&Yi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ao(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===te&&Qa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ao(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Pi(o.props.children,e.mode,c,o.key),ao(c,o),c.return=e,e=c):(c=Ni(o.type,o.key,o.props,null,e.mode,c),ao(c,o),c.return=e,e=c)}return s(e);case O: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}n(e,r);break}t(e,r),r=r.sibling}c=Li(o,e.mode,c),c.return=e,e=c}return s(e);case te:return o=Qa(o),_(e,r,o,c)}if(ue(o))return h(e,r,o,c);if(L(o)){if(l=L(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,io(o),c);if(o.$$typeof===N)return _(e,r,Ca(e,o),c);oo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ro=0;var i=_(e,t,n,r);return no=null,i}catch(t){if(t===Ka||t===Ja)throw t;var a=ki(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var co=so(!0),lo=so(!1),uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function po(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 mo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ed&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ei(e),Ti(e,null,n),t}return Si(e,r,t,n),Ei(e)}function go(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,ft(e,n)}}function _o(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 vo=!1;function yo(){if(vo){var e=La;if(e!==null)throw e}}function bo(e,t,n,r){vo=!1;var i=e.updateQueue;uo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(rd&f)===f:(r&f)===f){f!==0&&f===Ia&&(vo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:uo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),dd|=o,e.lanes=o,e.memoizedState=d}}function xo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function So(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)xo(n[e],t)}var Co=me(null),wo=me(0);function To(e,t){e=ld,ge(wo,e),ge(Co,t),ld=e|t.baseLanes}function Eo(){ge(wo,ld),ge(Co,Co.current)}function Do(){ld=wo.current,he(Co),he(wo)}var Oo=me(null),ko=null;function Ao(e){var t=e.alternate;ge(Fo,Fo.current&1),ge(Oo,e),ko===null&&(t===null||Co.current!==null||t.memoizedState!==null)&&(ko=e)}function jo(e){ge(Fo,Fo.current),ge(Oo,e),ko===null&&(ko=e)}function Mo(e){e.tag===22?(ge(Fo,Fo.current),ge(Oo,e),ko===null&&(ko=e)):No()}function No(){ge(Fo,Fo.current),ge(Oo,Oo.current)}function Po(e){he(Oo),ko===e&&(ko=null),he(Fo)}var Fo=me(0);function Io(e,t){ge(Oo,Oo.current),ge(Fo,t)}function Lo(e){he(Fo),he(Oo),ko===e&&(ko=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mm(n)||hm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 zo=0,H=null,Bo=null,Vo=null,Ho=!1,Uo=!1,Wo=!1,Go=0,Ko=0,qo=null,Jo=0;function Yo(){throw Error(i(321))}function Xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rr(e[n],t[n]))return!1;return!0}function Zo(e,t,n,r,i,a){return zo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=e===null||e.memoizedState===null?mc:hc,Wo=!1,a=n(r,i),Wo=!1,Uo&&(a=$o(t,n,r,i)),Qo(e),a}function Qo(e){R.H=pc;var t=Bo!==null&&Bo.next!==null;if(zo=0,Vo=Bo=H=null,Ho=!1,Ko=0,qo=null,t)throw Error(i(300));e===null||Mc||(e=e.dependencies,e!==null&&ba(e)&&(Mc=!0))}function $o(e,t,n,r){H=e;var a=0;do{if(Uo&&(qo=null),Ko=0,Uo=!1,25<=a)throw Error(i(301));if(a+=1,Vo=Bo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}R.H=gc,o=t(n,r)}while(Uo);return o}function es(){var e=R.H,t=e.useState()[0];return t=typeof t.then==`function`?ss(t):t,e=e.useState()[0],(Bo===null?null:Bo.memoizedState)!==e&&(H.flags|=1024),t}function ts(){var e=Go!==0;return Go=0,e}function ns(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function rs(e){if(Ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ho=!1}zo=0,Vo=Bo=H=null,Uo=!1,Ko=Go=0,qo=null}function is(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vo===null?H.memoizedState=Vo=e:Vo=Vo.next=e,Vo}function as(){if(Bo===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=Bo.next;var t=Vo===null?H.memoizedState:Vo.next;if(t!==null)Vo=t,Bo=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));Bo=e,e={memoizedState:Bo.memoizedState,baseState:Bo.baseState,baseQueue:Bo.baseQueue,queue:Bo.queue,next:null},Vo===null?H.memoizedState=Vo=e:Vo=Vo.next=e}return Vo}function os(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(e){var t=Ko;return Ko+=1,qo===null&&(qo=[]),e=Za(qo,e,t),t=H,(Vo===null?t.memoizedState:Vo.next)===null&&(t=t.alternate,R.H=t===null||t.memoizedState===null?mc:hc),e}function cs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ss(e);if(e.$$typeof===oe)return;if(e.$$typeof===N)return Sa(e)}throw Error(i(438,String(e)))}function ls(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.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=os(),H.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]=ie;return t.index++,n}function us(e,t){return typeof t==`function`?t(e):t}function ds(e){return fs(as(),Bo,e)}function fs(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?(zo&f)===f:(rd&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===Ia&&(d=!0);else if((zo&p)===p){u=u.next,p===Ia&&(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,H.lanes|=p,dd|=p;f=u.action,Wo&&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,H.lanes|=f,dd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Rr(o,e.memoizedState)&&(Mc=!0,d&&(n=La,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ps(e){var t=as(),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);Rr(o,t.memoizedState)||(Mc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ms(e,t,n){var r=H,a=as(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Rr((Bo||a).memoizedState,n);if(s&&(a.memoizedState=n,Mc=!0),a=a.queue,zs(_s.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Vo!==null&&!!(Vo.memoizedState.tag&1),Ps(e?9:8,{destroy:void 0},gs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,td===null)throw Error(i(349));o||zo&127||hs(r,t,n)}return n}function hs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=os(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function gs(e,t,n,r){t.value=n,t.getSnapshot=r,vs(t)&&ys(e)}function _s(e,t,n){return n(function(){vs(t)&&ys(e)})}function vs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rr(e,n)}catch{return!0}}function ys(e){var t=wi(e,2);t!==null&&zd(t,e,2)}function bs(e){var t=is();if(typeof e==`function`){var n=e;if(e=n(),Wo){Je(!0);try{n()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:e},t}function xs(e,t,n,r){return e.baseState=n,fs(e,Bo,typeof r==`function`?r:us)}function Ss(e,t,n,r,a){if(uc(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)}};R.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Cs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Cs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=R.T,o={};o.types=a===null?null:a.types,R.T=o;try{var s=n(i,r),c=R.S;c!==null&&c(o,s),ws(e,t,s)}catch(n){Es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),R.T=a}}else try{a=n(i,r),ws(e,t,a)}catch(n){Es(e,t,n)}}function ws(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ts(e,t,n)},function(n){return Es(e,t,n)}):Ts(e,t,n)}function Ts(e,t,n){t.status=`fulfilled`,t.value=n,Ds(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Cs(e,n)))}function Es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ds(t),t=t.next;while(t!==r)}e.action=null}function Ds(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Os(e,t){return t}function ks(e,t){if(V){var n=td.formState;if(n!==null){a:{var r=H;if(V){if(ta){b:{for(var i=ta,a=ra;i.nodeType!==8;){if(!a){i=null;break b}if(i=_m(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ta=_m(i.nextSibling),r=i.data===`F!`;break a}}aa(r)}r=!1}r&&(t=n[0])}}return n=is(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Os,lastRenderedState:t},n.queue=r,n=sc.bind(null,H,r),r.dispatch=n,r=bs(!1),a=lc.bind(null,H,!1,r.queue),r=is(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ss.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function As(e){return js(as(),Bo,e)}function js(e,t,n){if(t=fs(e,t,Os)[0],e=ds(us)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ss(t)}catch(e){throw e===Ka?Ja:e}else r=t;t=as();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Ps(9,{destroy:void 0},Ms.bind(null,i,n),null)),[r,a,e]}function Ms(e,t){e.action=t}function Ns(e){var t=as(),n=Bo;if(n!==null)return js(t,n,e);as(),t=t.memoizedState,n=as();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ps(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=os(),H.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 Fs(){return as().memoizedState}function Is(e,t,n,r){var i=is();H.flags|=e,i.memoizedState=Ps(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ls(e,t,n,r){var i=as();r=r===void 0?null:r;var a=i.memoizedState.inst;Bo!==null&&r!==null&&Xo(r,Bo.memoizedState.deps)?i.memoizedState=Ps(t,a,n,r):(H.flags|=e,i.memoizedState=Ps(1|t,a,n,r))}function Rs(e,t){Is(8390656,8,e,t)}function zs(e,t){Ls(2048,8,e,t)}function Bs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=os(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Vs(e){var t=as().memoizedState;return Bs({ref:t,nextImpl:e}),function(){if(ed&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Hs(e,t){return Ls(4,2,e,t)}function Us(e,t){return Ls(4,4,e,t)}function Ws(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 Gs(e,t,n){n=n==null?null:n.concat([e]),Ls(4,4,Ws.bind(null,t,e),n)}function Ks(){}function qs(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Js(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Xo(t,r[1]))return r[0];if(r=e(),Wo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r}function Ys(e,t,n){return n===void 0||zo&1073741824&&!(rd&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ld(),H.lanes|=e,dd|=e,n)}function Xs(e,t,n,r){return Rr(n,t)?n:Co.current===null?!(zo&106)||zo&1073741824&&!(rd&261930)?(Mc=!0,e.memoizedState=n):(e=Ld(),H.lanes|=e,dd|=e,t):(e=Ys(e,n,r),Rr(e,t)||(Mc=!0),e)}function Zs(e,t,n,r,i){var a=z.p;z.p=a!==0&&8>a?a:8;var o=R.T,s={};s.types=o===null?null:o.types,R.T=s,lc(e,!1,t,n);try{var c=i(),l=R.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?cc(e,t,Ba(c,r),Id(e)):cc(e,t,r,Id(e))}catch(n){cc(e,t,{then:function(){},status:`rejected`,reason:n},Id())}finally{z.p=a,o!==null&&s.types!==null&&(o.types=s.types),R.T=o}}function Qs(){}function $s(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ec(e).queue;Zs(e,a,t,de,n===null?Qs:function(){return tc(e),n(r)})}function ec(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:de},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tc(e){var t=ec(e);t.next===null&&(t=e.alternate.memoizedState),cc(e,t.next.queue,{},Id())}function nc(){return Sa(hh)}function rc(){return as().memoizedState}function ic(){return as().memoizedState}function ac(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Id();e=mo(n);var r=ho(t,e,n);r!==null&&(zd(r,t,n),go(r,t,n)),t={cache:ka()},e.payload=t;return}t=t.return}}function oc(e,t,n){var r=Id();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},uc(e)?dc(t,n):(n=Ci(e,t,n,r),n!==null&&(zd(n,e,r),fc(n,t,r)))}function sc(e,t,n){cc(e,t,n,Id())}function cc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(uc(e))dc(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,Rr(s,o))return Si(e,t,i,0),td===null&&xi(),!1}catch{}if(n=Ci(e,t,i,r),n!==null)return zd(n,e,r),fc(n,t,r),!0}return!1}function lc(e,t,n,r){if(r={lane:2,revertLane:Bf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},uc(e)){if(t)throw Error(i(479))}else t=Ci(e,n,r,2),t!==null&&zd(t,e,2)}function uc(e){var t=e.alternate;return e===H||t!==null&&t===H}function dc(e,t){Uo=Ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ft(e,n)}}var pc={readContext:Sa,use:cs,useCallback:Yo,useContext:Yo,useEffect:Yo,useImperativeHandle:Yo,useLayoutEffect:Yo,useInsertionEffect:Yo,useMemo:Yo,useReducer:Yo,useRef:Yo,useState:Yo,useDebugValue:Yo,useDeferredValue:Yo,useTransition:Yo,useSyncExternalStore:Yo,useId:Yo,useHostTransitionStatus:Yo,useFormState:Yo,useActionState:Yo,useOptimistic:Yo,useMemoCache:Yo,useCacheRefresh:Yo,useEffectEvent:Yo},mc={readContext:Sa,use:cs,useCallback:function(e,t){return is().memoizedState=[e,t===void 0?null:t],e},useContext:Sa,useEffect:Rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Is(4194308,4,Ws.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){Is(4,2,e,t)},useMemo:function(e,t){var n=is();t=t===void 0?null:t;var r=e();if(Wo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=is();if(n!==void 0){var i=n(t);if(Wo){Je(!0);try{n(t)}finally{Je(!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=oc.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=is();return e={current:e},t.memoizedState=e},useState:function(e){e=bs(e);var t=e.queue,n=sc.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ks,useDeferredValue:function(e,t){return Ys(is(),e,t)},useTransition:function(){var e=bs(!1);return e=Zs.bind(null,H,e.queue,!0,!1),is().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=is();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),td===null)throw Error(i(349));rd&127||hs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Rs(_s.bind(null,r,o,e),[e]),r.flags|=2048,Ps(9,{destroy:void 0},gs.bind(null,r,o,n,t),null),n},useId:function(){var e=is(),t=td.identifierPrefix;if(V){var n=Ji,r=qi;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Jo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:nc,useFormState:ks,useActionState:ks,useOptimistic:function(e){var t=is();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=lc.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:ls,useCacheRefresh:function(){return is().memoizedState=ac.bind(null,H)},useEffectEvent:function(e){var t=is(),n={impl:e};return t.memoizedState=n,function(){if(ed&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},hc={readContext:Sa,use:cs,useCallback:qs,useContext:Sa,useEffect:zs,useImperativeHandle:Gs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Js,useReducer:ds,useRef:Fs,useState:function(){return ds(us)},useDebugValue:Ks,useDeferredValue:function(e,t){return Xs(as(),Bo.memoizedState,e,t)},useTransition:function(){var e=ds(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ms,useId:rc,useHostTransitionStatus:nc,useFormState:As,useActionState:As,useOptimistic:function(e,t){return xs(as(),Bo,e,t)},useMemoCache:ls,useCacheRefresh:ic,useEffectEvent:Vs},gc={readContext:Sa,use:cs,useCallback:qs,useContext:Sa,useEffect:zs,useImperativeHandle:Gs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Js,useReducer:ps,useRef:Fs,useState:function(){return ps(us)},useDebugValue:Ks,useDeferredValue:function(e,t){var n=as();return Bo===null?Ys(n,e,t):Xs(n,Bo.memoizedState,e,t)},useTransition:function(){var e=ps(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ms,useId:rc,useHostTransitionStatus:nc,useFormState:Ns,useActionState:Ns,useOptimistic:function(e,t){var n=as();return Bo===null?(n.baseState=e,[e,n.queue.dispatch]):xs(n,Bo,e,t)},useMemoCache:ls,useCacheRefresh:ic,useEffectEvent:Vs};function _c(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Id(),i=mo(r);i.payload=t,n!=null&&(i.callback=n),t=ho(e,i,r),t!==null&&(zd(t,e,r),go(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Id(),i=mo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ho(e,i,r),t!==null&&(zd(t,e,r),go(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Id(),r=mo(n);r.tag=2,t!=null&&(r.callback=t),t=ho(e,r,n),t!==null&&(zd(t,e,n),go(t,e,n))}};function yc(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?!zr(n,r)||!zr(i,a):!0}function bc(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&&vc.enqueueReplaceState(t,t.state,null)}function xc(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=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Sc(e){_i(e)}function Cc(e){console.error(e)}function wc(e){_i(e)}function Tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ec(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 Dc(e,t,n){return n=mo(n),n.tag=3,n.payload={element:null},n.callback=function(){Tc(e,t)},n}function Oc(e){return e=mo(e),e.tag=3,e}function kc(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(){Ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ec(t,n,r),typeof i!=`function`&&(Cd===null?Cd=new Set([this]):Cd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ya(t,n,a,!0),n=Oo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return ko===null?Zd():n.alternate===null&&ud===0&&(ud=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ya?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),bf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ya?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)),bf(e,r,a)),!1}throw Error(i(435,n.tag))}return bf(e,r,a),Zd(),!1}if(V)return t=Oo.current,t===null?(r!==ia&&(t=Error(i(423),{cause:r}),da(zi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=zi(r,n),a=Dc(e.stateNode,r,a),_o(e,a),ud!==4&&(ud=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ia&&(e=Error(i(422),{cause:r}),da(zi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=zi(o,n),gd===null?gd=[o]:gd.push(o),ud!==4&&(ud=2),t===null)return!0;r=zi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Dc(n.stateNode,r,e),_o(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`&&(Cd===null||!Cd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Oc(a),kc(a,e,n,r),_o(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var jc=Error(i(461)),Mc=!1;function Nc(e,t,n,r){t.child=e===null?lo(t,null,n,r):co(t,e.child,n,r)}function Pc(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 xa(t),r=Zo(e,t,n,o,a,i),s=ts(),e!==null&&!Mc?(ns(e,t,i),cl(e,t,i)):(V&&s&&Zi(t),t.flags|=1,Nc(e,t,r,i),t.child)}function Fc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Ic(e,t,a,r,i)):(e=Ni(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ll(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?zr:n,n(o,r)&&e.ref===t.ref)return cl(e,t,i)}return t.flags|=1,e=ji(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(zr(a,r)&&e.ref===t.ref){if(Mc=!1,t.pendingProps=r=a,ll(e,i))e.flags&131072&&(Mc=!0);else return t.lanes=e.lanes,cl(e,t,i)}}return Wc(e,t,n,r,i)}function Lc(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 zc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wa(t,a===null?null:a.cachePool),a===null?Eo():To(t,a),Mo(t);else return r=t.lanes=536870912,zc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Wa(t,null),Eo(),No()):(Wa(t,a.cachePool),To(t,a),No(),t.memoizedState=null);return Nc(e,t,i,n),t.child}function Rc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zc(e,t,n,r,i){var a=Ua();return a=a===null?null:{parent:Oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Wa(t,null),Eo(),Mo(t),e!==null&&ya(e,t,r,!0),t.childLanes=i,null}function Bc(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 Vc(e,t,n){return co(t,e.child,null,n),e=Bc(t,t.pendingProps),e.flags|=2,Po(t),t.memoizedState=null,e}function Hc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=Bc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Rc(null,e);if(jo(t),(e=ta)?(e=pm(e,ra),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw aa(t);return t.lanes=536870912,null}return Bc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(jo(t),a){if(t.flags&256)t.flags&=-257,t=Vc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Mc||ya(e,t,n,!1),a=(n&e.childLanes)!==0,Mc||a){if(Co.current===null){if(r=td,r!==null&&(s=pt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,wi(e,s),zd(r,e,s),jc;Zd()}t=Vc(e,t,n)}else e=o.treeContext,ta=_m(s.nextSibling),ea=t,V=!0,na=null,ra=!1,e!==null&&$i(t,e),t=Bc(t,r),t.flags|=134221824;return t}return e=ji(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Uc(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 Wc(e,t,n,r,i){return xa(t),n=Zo(e,t,n,r,void 0,i),r=ts(),e!==null&&!Mc?(ns(e,t,i),cl(e,t,i)):(V&&r&&Zi(t),t.flags|=1,Nc(e,t,n,i),t.child)}function Gc(e,t,n,r,i,a){return xa(t),t.updateQueue=null,n=$o(t,r,n,i),Qo(e),r=ts(),e!==null&&!Mc?(ns(e,t,a),cl(e,t,a)):(V&&r&&Zi(t),t.flags|=1,Nc(e,t,n,a),t.child)}function Kc(e,t,n,r,i){if(xa(t),t.stateNode===null){var a=Di,o=n.contextType;typeof o==`object`&&o&&(a=Sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=vc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},fo(t),o=n.contextType,a.context=typeof o==`object`&&o?Sa(o):Di,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(_c(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&&vc.enqueueReplaceState(a,a.state,null),bo(t,r,a,i),yo(),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=xc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Di,typeof u==`object`&&u&&(o=Sa(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)&&bc(t,a,r,o),uo=!1;var f=t.memoizedState;a.state=f,bo(t,r,a,i),yo(),l=t.memoizedState,s||f!==l||uo?(typeof d==`function`&&(_c(t,n,d,r),l=t.memoizedState),(c=uo||yc(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,po(e,t),o=t.memoizedProps,u=xc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Di,typeof l==`object`&&l&&(c=Sa(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)&&bc(t,a,r,c),uo=!1,f=t.memoizedState,a.state=f,bo(t,r,a,i),yo();var p=t.memoizedState;o!==d||f!==p||uo||e!==null&&e.dependencies!==null&&ba(e.dependencies)?(typeof s==`function`&&(_c(t,n,s,r),p=t.memoizedState),(u=uo||yc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ba(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,Uc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=co(t,e.child,null,i),t.child=co(t,null,n,i)):Nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=cl(e,t,i),e}function qc(e,t,n,r){return la(),t.flags|=256,Nc(e,t,n,r),t.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yc(e){return{baseLanes:e,cachePool:Ga()}}function Xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=md),e}function Zc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Fo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(V){if(i?Ao(t):No(),(e=ta)?(e=pm(e,ra),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw aa(t);return t.lanes=hm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(No(),i=t.mode,a=$c({mode:`hidden`,children:a},i),r=Pi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Yc(n),r.childLanes=Xc(e,o,n),t.memoizedState=Jc,Rc(null,r)):(Ao(t),Qc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return tl(e,t,a,o,r,c,s,n)}return i?(No(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ji(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Pi(i,a,n,null),i.flags|=2):i=ji(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Rc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Yc(n):(a=i.cachePool,a===null?a=Ga():(s=Oa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Xc(e,o,n),t.memoizedState=Jc,Rc(e.child,r)):(Ao(t),n=e.child,e=n.sibling,n=ji(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Qc(e,t){return t=$c({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function $c(e,t){return e=ki(22,e,null,t),e.lanes=0,e}function el(e,t,n){return co(t,e.child,null,n),e=Qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Ao(t),t.flags&=-257,el(e,t,c)):t.memoizedState===null?(No(),o=a.fallback,s=t.mode,a=$c({mode:`visible`,children:a.children},s),o=Pi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,co(t,e.child,null,c),a=t.child,a.memoizedState=Yc(c),a.childLanes=Xc(e,r,c),t.memoizedState=Jc,Rc(null,a)):(No(),t.child=e.child,t.flags|=128,null);if(Ao(t),hm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,da({value:a,source:null,stack:null})),el(e,t,c)}if(Mc||ya(e,t,c,!1),r=(c&e.childLanes)!==0,Mc||r){if(Co.current!==null)return el(e,t,c);if(r=td,r!==null&&(a=pt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,wi(e,a),zd(r,e,a),jc;return mm(o)||Zd(),el(e,t,c)}return mm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ta=_m(o.nextSibling),ea=t,V=!0,na=null,ra=!1,e!==null&&$i(t,e),t=Qc(t,a.children),t.flags|=134221824,t)}function nl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_a(e.return,t,n)}function rl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ro(n)===null&&(t=e),e=e.sibling}return t}function il(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 al(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ol(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Fo.current;if(t.flags&128)return Io(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Io(t,o),i===`backwards`&&e!==null?(al(e),Nc(e,t,r,n),al(e)):Nc(e,t,r,n),r=V?Ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nl(e,n,t);else if(e.tag===19)nl(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`backwards`:n=rl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,al(t)),il(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}il(t,!0,n,null,a,r);break;case`together`:il(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=rl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),il(t,!1,i,n,a,r)}return t.child}function sl(e,t,n){var r=t.pendingProps;return ha(t,t.type,r.value),Nc(e,t,r.children,n),t.child}function cl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ya(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=ji(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ji(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ll(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ba(e)))}function ul(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),ha(t,Oa,e.memoizedState.cache),la();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:ha(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,jo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Ao(t),t.flags|=128,null;r=ya(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Zc(e,t,n):(Ao(t),e=cl(e,t,n),e===null?null:e.sibling)}Ao(t);break;case 19:if(t.flags&128)return ol(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ya(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ol(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Io(t,Fo.current),r)break;return null;case 22:return t.lanes=0,Lc(e,t,n,t.pendingProps);case 24:ha(t,Oa,e.memoizedState.cache)}return cl(e,t,n)}function dl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Mc=!0;else{if(!ll(e,n)&&!(t.flags&128))return Mc=!1,ul(e,t,n);Mc=!!(e.flags&131072)}}else Mc=!1,V&&t.flags&1048576&&Xi(t,Ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Qa(t.elementType),t.type=e,typeof e==`function`)Ai(e)?(r=xc(e,r),t.tag=1,t=Kc(null,t,e,r,n)):(t.tag=0,t=Wc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===P){t.tag=11,t=Pc(null,t,e,r,n);break a}if(a===ee){t.tag=14,t=Fc(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=sl(null,t,n);break a}}throw t=le(e)||e,Error(i(306,t,``))}}return t;case 0:return Wc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=xc(r,t.pendingProps),Kc(e,t,r,a,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,po(e,t),bo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ha(t,Oa,r),r!==o.cache&&va(t,[Oa],n,!0),yo(),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=qc(e,t,r,n);break a}if(r!==a){a=zi(Error(i(424)),t),da(a),t=qc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ta=_m(e.firstChild),ea=t,V=!0,na=null,ra=!0,n=lo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(la(),r===a){t=cl(e,t,n);break a}Nc(e,t,r,n)}t=t.child}return t;case 26:return Uc(e,t),e===null?(n=Vm(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(t.stateNode=xp(t.type,t.pendingProps,ye.current,t)):t.memoizedState=Vm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&V&&(r=t.stateNode=Cm(t.type,t.pendingProps,ye.current),ea=t,ra=!0,a=ta,Ap(t.type)?(vm=a,ta=_m(r.firstChild)):ta=a),Nc(e,t,t.pendingProps.children,n),Uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=ta)&&(r=dm(r,t.type,t.pendingProps,ra),r===null?a=!1:(t.stateNode=r,ea=t,ta=_m(r.firstChild),ra=!1,a=!0)),a||aa(t)),Ce(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Sp(a,o)?r=null:s!==null&&Sp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Zo(e,t,es,null,null,n),hh._currentValue=a),Uc(e,t),Nc(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=ta)&&(n=fm(n,t.pendingProps,ra),n===null?e=!1:(t.stateNode=n,ea=t,ta=null,e=!0)),e||aa(t)),null;case 13:return Zc(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):Nc(e,t,r,n),t.child;case 11:return Pc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Uc(e,t),Nc(e,t,r,n),t.child;case 8:return Nc(e,t,t.pendingProps.children,n),t.child;case 12:return Nc(e,t,t.pendingProps.children,n),t.child;case 10:return sl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,xa(t),a=Sa(a),r=r(a),t.flags|=1,Nc(e,t,r,n),t.child;case 14:return Fc(e,t,t.type,t.pendingProps,n);case 15:return Ic(e,t,t.type,t.pendingProps,n);case 19:return ol(e,t,n);case 31:return Hc(e,t,n);case 22:return Lc(e,t,n,t.pendingProps);case 24:return xa(t),r=Sa(Oa),e===null?(a=Ua(),a===null&&(a=td,o=ka(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},fo(t),ha(t,Oa,a)):((e.lanes&n)!==0&&(po(e,t),bo(t,null,null,n),yo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ha(t,Oa,r),r!==a.cache&&va(t,[Oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ha(t,Oa,r))),Nc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:V&&Zi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Uc(e,t),Nc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function fl(e){e.flags|=4}function pl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?nh(t,r):nh(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Jd())e.flags|=8192;else throw $a=Ya,qa}}else e.flags&=-16777217}function ml(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rh(t)){if(Jd())e.flags|=8192;else throw $a=Ya,qa}}function hl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:st(),e.lanes|=t,hd|=t)}function gl(e,t){if(!V)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function _l(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&1206910976,r|=i.flags&1206910976,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 vl(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _l(t),null;case 1:return _l(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ga(Oa),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ca(t)?fl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ua())),_l(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(fl(t),o===null?(_l(t),pl(t,a,null,r,n)):(_l(t),ml(t,o))):o?o===e.memoizedState?(_l(t),t.flags&=-16777217):(fl(t),_l(t),ml(t,o)):(e=e.memoizedProps,e!==r&&fl(t),_l(t),pl(t,a,e,r,n)),null;case 27:if(we(t),n=ye.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return _l(t),t.subtreeFlags&=-33554433,null}e=_e.current,ca(t)?oa(t,e):(e=Cm(a,r,n),t.stateNode=e,fl(t))}return _l(t),t.subtreeFlags&=-33554433,null;case 5:if(we(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return _l(t),t.subtreeFlags&=-33554433,null}if(o=_e.current,ca(t))oa(t,o);else{var s=vp(ye.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[yt]=t,o[bt]=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(fp(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&&fl(t)}}return _l(t),t.subtreeFlags&=-33554433,pl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&fl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ye.current,ca(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ea,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||lp(e.nodeValue,n)),e||aa(t,!0)}else e=vp(e).createTextNode(r),e[yt]=t,t.stateNode=e}return _l(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ca(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[yt]=t}else la(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_l(t),e=!1}else n=ua(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Po(t),t):(Po(t),null);if(t.flags&128)throw Error(i(558))}return _l(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ca(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[yt]=t}else la(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_l(t),a=!1}else a=ua(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Po(t),t):(Po(t),null)}return Po(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),hl(t,t.updateQueue),_l(t),null);case 4:return Se(),e===null&&Zf(t.stateNode.containerInfo),t.flags|=67108864,_l(t),null;case 10:return ga(t.type),_l(t),null;case 19:if(Lo(t),r=t.memoizedState,r===null)return _l(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)gl(r,!1);else{if(ud!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ro(e),o!==null){for(t.flags|=128,gl(r,!1),e=o.updateQueue,t.updateQueue=e,hl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Mi(n,e),n=n.sibling;return Io(t,Fo.current&1|2),V&&Yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Le()>xd&&(t.flags|=128,a=!0,gl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,hl(t,e),gl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!V)return _l(t),null}else 2*Le()-r.renderingStartTime>xd&&n!==536870912&&(t.flags|=128,a=!0,gl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Le(),e.sibling=null,o=Fo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||V?Io(t,o):(n=o,ge(Oo,t),ge(Fo,n),ko===null&&(ko=t)),V&&Yi(t,r.treeForkCount),e}return _l(t),null;case 22:case 23:return Po(t),Do(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(_l(t),t.subtreeFlags&6&&(t.flags|=8192)):_l(t),n=t.updateQueue,n!==null&&hl(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&&he(Ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ga(Oa),_l(t),null;case 25:return null;case 30:return t.flags|=33554432,_l(t),null}throw Error(i(156,t.tag))}function yl(e,t){switch(Qi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(Oa),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(Po(t),t.alternate===null)throw Error(i(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Se(),null;case 10:return ga(t.type),null;case 22:case 23:return Po(t),Do(),e!==null&&he(Ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(Oa),null;case 25:return null;default:return null}}function bl(e,t){switch(Qi(t),t.tag){case 3:ga(Oa),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&Po(t);break;case 13:Po(t);break;case 19:Lo(t);break;case 10:ga(t.type);break;case 22:case 23:Po(t),Do(),e!==null&&he(Ha);break;case 24:ga(Oa)}}function xl(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){yf(t,t.return,e)}}function Sl(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){yf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){yf(t,t.return,e)}}function Cl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{So(t,n)}catch(t){yf(e,e.return,t)}}}function wl(e,t,n){n.props=xc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){yf(e,t,n)}}function Tl(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:var i=e.stateNode,a=mi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Hp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Up(e);f(e.child,!1,om,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){yf(e,t,n)}}function El(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){yf(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){yf(e,t,n)}else n.current=null}}function Dl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)cm(e.stateNode,t[n])}function Ol(e){for(var t=e.return;t!==null&&(jl(t)&&cm(e.stateNode,t.stateNode),!Al(t));)t=t.return}function kl(e){for(var t=e.return;t!==null&&(jl(t)&&lm(e.stateNode,t.stateNode),!Al(t));)t=t.return}function Al(e){return e.tag===5||e.tag===3||e.tag===27}function jl(e){return e&&e.tag===7&&e.stateNode!==null}function Ml(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){yf(e,e.return,t)}}function Nl(e,t,n){try{var r=e.stateNode;mp(r,e.type,n,t),r[bt]=t}catch(t){yf(e,e.return,t)}}function Pl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ap(e.type)||e.tag===4}function Fl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Pl(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&&Ap(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 Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=B)),Dl(e,r),Ut=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Ap(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Dl(e,r),Ut=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Ap(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);fp(t,r,n),t[yt]=e,t[bt]=n}catch(t){yf(e,e.return,t)}}var zl=!1,Bl=null;function Vl(e){(e.tag===30||e.subtreeFlags&33554432)&&(zl=!0)}var Hl=null;function Ul(){var e=Hl;return Hl=null,e}var Wl=0;function Gl(e,t,n,r,i){return Wl=0,Kl(e.child,t,n,r,i)}function Kl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ip(o);r.push(s),s.view&&(a=!0)}else a||Ip(o).view&&(a=!0);zl=!0,Np(o,Wl===0?t:t+`_`+Wl,n),Wl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Kl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function ql(e,t){for(;e!==null;)e.tag===5?Pp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ql(e.child,t)),e=e.sibling}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Jl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=gi(t.default,t.share),t!==`none`&&(Gl(e,n,t,null,!1)||ql(e.child,!1))}e=e.sibling}}function Yl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=mi(r,n),a=gi(r.default,n.paired?r.share:r.enter);a===`none`?Jl(e):Gl(e,i,a,null,!1)?(Jl(e),n.paired||t||Rd(e,r.onEnter)):ql(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e,t),e=e.sibling;else Jl(e)}function Xl(e){if(Bl!==null&&Bl.size!==0){var t=Bl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=gi(n.default,n.share);if(a!==`none`&&(Gl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Rd(e,n.onShare)):ql(e.child,!1)),t.delete(r),t.size===0)break}}}Xl(e)}e=e.sibling}}}function Zl(e){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode),r=Bl===null?void 0:Bl.get(n),i=gi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Gl(e,n,i,null,!1)?r===void 0?Rd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Bl.delete(n),Rd(e,t.onShare)):ql(e.child,!1)),Bl!==null&&Xl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Bl!==null&&Xl(e)}function Ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode);t=gi(t.default,t.update),e.flags&=-5,t!==`none`&&Gl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Ql(e);e=e.sibling}}function $l(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,ql(e.child,!1))}$l(e)}e=e.sibling}}function eu(e){if(e.tag===30)e.stateNode.paired=null,ql(e.child,!1),$l(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else $l(e)}function tu(e){for(e=e.child;e!==null;)e.tag===30?ql(e.child,!1):e.subtreeFlags&33554432&&tu(e),e=e.sibling}function nu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Wl<a.length){var l=a[Wl],u=Ip(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Np(c,Wl===0?n:n+`_`+Wl,i),s&&e.flags&4||(Hl===null&&(Hl=[]),Hl.push(c,Wl===0?r:r+`_`+Wl,t.memoizedProps)),Wl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:nu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ru(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=mi(n,r),a=gi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Lp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Wl=0,i=nu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Rd(e,n.onUpdate))}else e.subtreeFlags&33554432&&ru(e,t);e=e.sibling}}var iu=!1,au=!1,ou=!1,su=!1,cu=typeof WeakSet==`function`?WeakSet:Set,lu=null,uu=!1,du=!1,fu=!1,pu=!1;function mu(e,t,n){if(e=e.containerInfo,W=wh,e=Wr(e),Gr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(_p={focusedElem:e,selectionRange:r},wh=!1,n=(n&335544064)===n,lu=t,t=n?9270:1024;lu!==null;){if(e=lu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Zl(r[a]);if(e.alternate===null&&e.flags&2)n&&Vl(e),hu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Zl(r),hu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Vl(e),hu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,lu=r):(n&&Ql(e),hu(n))}}Bl=null}function hu(e){for(;lu!==null;){var t=lu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=xc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){yf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)um(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:um(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=mi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=gi(a.default,a.update),a!==`none`&&Gl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,lu=r;break}lu=t.return}}function gu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&xl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){yf(n,n.return,e)}else{var i=xc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){yf(n,n.return,e)}}}r&64&&Cl(n),r&512&&Tl(n,n.return);break;case 3:if(Fu(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{So(e,t)}catch(e){yf(n,n.return,e)}}break;case 27:t===null&&r&4&&Rl(n);case 26:case 5:Fu(e,n),t===null&&r&4&&Ml(n),r&512&&Tl(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&Tu(e,n);break;case 13:Fu(e,n),r&4&&U(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Cf.bind(null,n),gm(e,n))));break;case 22:if(r=n.memoizedState!==null||iu,!r){var a=t!==null&&t.memoizedState!==null||au;t=iu,i=au,iu=r,(au=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),iu=t,au=i}break;case 30:Fu(e,n),r&512&&Tl(n,n.return);break;case 7:r&512&&Tl(n,n.return);default:Fu(e,n)}}function _u(e,t){for(e=e.child;e!==null;)vu(e,t),e=e.sibling}function vu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){yf(e,e.return,t)}yu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Ut=!0}catch(t){yf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Mp(s,!0):Mp(e.stateNode,!1)}catch(t){yf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&_u(e,t);break;default:_u(e,t)}}function yu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:vu(n,r);break a;case 22:n.memoizedState===null&&yu(n,r);break a;default:yu(n,r)}}e=e.sibling}}function bu(e){var t=e.alternate;t!==null&&(e.alternate=null,bu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ot(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 xu=null,Su=!1;function Cu(e,t,n){for(n=n.child;n!==null;)wu(e,t,n),n=n.sibling}function wu(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount==`function`)try{qe.onCommitFiberUnmount(Ke,n)}catch{}switch(n.tag){case 26:au||El(n,t),Cu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!au&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:au||El(n,t),kl(n);var r=xu,i=Su;Ap(n.type)&&(xu=n.stateNode,Su=!1),Cu(e,t,n),wm(n.stateNode,n.type,n.memoizedProps),xu=r,Su=i;break;case 5:au||El(n,t),kl(n);case 6:if(n.tag===6&&kl(n),r=xu,i=Su,xu=null,Cu(e,t,n),xu=r,Su=i,xu!==null){if(Su)try{(xu.nodeType===9?xu.body:xu.nodeName===`HTML`?xu.ownerDocument.body:xu).removeChild(n.stateNode),Ut=!0}catch(e){yf(n,t,e)}else try{xu.removeChild(n.stateNode),Ut=!0}catch(e){yf(n,t,e)}}break;case 18:xu!==null&&(Su?(e=xu,jp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Xh(e)):jp(xu,n.stateNode));break;case 4:r=xu,i=Su,xu=n.stateNode.containerInfo,Su=!0,Cu(e,t,n),xu=r,Su=i;break;case 0:case 11:case 14:case 15:Sl(2,n,t),au||Sl(4,n,t),Cu(e,t,n);break;case 1:au||(El(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&wl(n,t,r)),Cu(e,t,n);break;case 21:Cu(e,t,n);break;case 22:au=(r=au)||n.memoizedState!==null,Cu(e,t,n),au=r;break;case 30:El(n,t),Cu(e,t,n);break;case 7:au||El(n,t),Cu(e,t,n);break;default:Cu(e,t,n)}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xh(e)}catch(e){yf(t,t.return,e)}}}function U(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xh(e)}catch(e){yf(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cu),t;default:throw Error(i(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=wf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Ap(l.type)){xu=l.stateNode,Su=!1;break a}break;case 5:xu=l.stateNode,Su=!1;break a;case 3:case 4:xu=l.stateNode.containerInfo,Su=!0;break a}l=l.return}if(xu===null)throw Error(i(160));wu(s,c,o),xu=null,Su=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),a&4&&(Sl(3,e,e.return),xl(3,e),Sl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),a&512&&(au||r===null||El(r,r.return)),a&64&&iu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ku,Ou(t,e,n),ju(e),a&512&&(au||r===null||El(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(iu)e.stateNode=xp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Et]||r[yt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),fp(r,t,n),r[yt]=e,Nt(r),t=r;break a;case`link`:if(o=$m(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=$m(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[yt]=e,Nt(r),t=r}e.stateNode=t}}else iu||eh(o,e.type,e.stateNode)}else e.stateNode=Jm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Nl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||au||t.parentNode.removeChild(t)):a.count--,n===null?iu||eh(o,e.type,e.stateNode):Jm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),a&512&&(au||r===null||El(r,r.return)),r!==null&&a&4&&Nl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ou,ou=!1,Ou(t,e,n),ou=o,ju(e),a&512&&(au||r===null||El(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),Ut=!0}catch(t){yf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Nl(e,t,r===null?t:r.memoizedProps)),a&1024&&(su=!0);break;case 6:if(Ou(t,e,n),ju(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ut=!0}catch(t){yf(e,e.return,t)}}break;case 3:if(Ut=!1,Qm=null,o=ku,ku=Om(t.containerInfo),Ou(t,e,n),ku=o,ju(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Xh(t.containerInfo)}catch(t){yf(e,e.return,t)}su&&(su=!1,Mu(e)),Ut=!1;break;case 4:a=ou,ou=iu,r=Wt(),o=ku,ku=Om(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,Ut&&du&&(fu=!0),Ut=r,ou=a;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yd=Le()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=iu,l=au,u=ou;iu=c||o,ou=u||o,au=l||s,Ou(t,e,n),au=l,ou=u,iu=c,ju(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||iu||au||(t=s||au,n=iu,r=au,iu=o||iu,au=t,Iu(e,2),iu=n,au=r),!o&&ou||_u(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:a&512&&(au||r===null||El(r,r.return)),a=Wt(),o=du,s=(n&335544064)===n,c=e.memoizedProps,du=s&&gi(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&Ut&&(e.flags|=4),du=o,Ut=a;break;case 21:break;case 7:a&512&&(au||r===null||El(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Pl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(jl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Al(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Ll(e,Fl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Ll(e,Fl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Il(e,Fl(e),u,s);break;default:throw Error(i(161))}}catch(t){yf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,wh=!0,t.reset(),wh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else ru(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Yl(e,!1);else switch(e.tag){case 3:if(pu=uu=!1,Ul(),Nu(t,e),!uu&&!fu){if(e=Hl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Pp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),pu=!0}Hl=null;break;case 5:Nu(t,e);break;case 4:r=uu,uu=!1,Nu(t,e),uu&&(fu=!0),uu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Yl(e,!1));break;case 30:r=uu,i=Ul(),uu=!1,Nu(t,e),uu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=mi(a,o),o=mi(n.memoizedProps,o);var s=gi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Wl=0,t=nu(e,n,t,o,s,a,!0),Wl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Rd(e,e.memoizedProps.onUpdate),Hl=i):i!==null&&(i.push.apply(i,Hl),Hl=i),uu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Sl(4,n,n.return),Iu(n,r);break;case 1:El(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&wl(n,n.return,i),Iu(n,r);break;case 27:r&2&&wm(n.stateNode,n.type,n.memoizedProps);case 5:El(n,n.return),n.tag!==5&&n.tag!==27||kl(n),Iu(n,r);break;case 6:kl(n);break;case 26:El(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||au||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:El(n,n.return),Iu(n,r);break;case 7:El(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Lu(i,a,n),xl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){yf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)xo(l[i],c)}catch(e){yf(r,r.return,e)}}s&&o&64&&Cl(a),Tl(a,a.return);break;case 27:n&2&&Rl(a);case 5:a.tag!==5&&a.tag!==27||Ol(a),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 6:Ol(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||iu||eh(Om(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&U(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),Tl(a,a.return);break;case 30:Lu(i,a,n),Tl(a,a.return);break;case 7:Tl(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Aa(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Aa(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&tu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&eu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&xl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&pu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Aa(a)));break;case 12:if(a&2048){Bu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){yf(t,t.return,e)}}else Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&eu(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&eu(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ql(a.child,!0),ql(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:Hu(a,o,s,c,i),xl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(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:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&ah(n,e)):oh(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&ah(n,e));break;case 3:case 4:var r=ku;ku=Om(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Bl===null&&(Bl=new Map),Bl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(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 Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&Sl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;lu!==null;){var n=lu;switch(n.tag){case 0:case 11:case 15:Sl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,lu=r;else a:for(n=e;lu!==null;){r=lu;var i=r.sibling,a=r.return;if(bu(r),r===n){lu=null;break a}if(i!==null){i.return=a,lu=i;break a}lu=a}}}var Qu={getCacheForType:function(e){var t=Sa(Oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Sa(Oa).controller.signal}},$u=typeof WeakMap==`function`?WeakMap:Map,ed=0,td=null,nd=null,rd=0,id=0,ad=null,od=!1,sd=!1,cd=!1,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=0,gd=null,_d=null,vd=!1,yd=0,bd=0,xd=1/0,Sd=null,Cd=null,wd=0,Td=null,Ed=null,Dd=0,Od=0,kd=null,Ad=null,jd=null,Md=null,Nd=null,Pd=0,Fd=null;function Id(){return ed&2&&rd!==0?rd&-rd:R.T===null?gt():Bf()}function Ld(){if(md===0){if(!(rd&536870912)||V){var e=et;et<<=1,!(et&3932160)&&(et=262144),md=e}else md=536870912}return e=Oo.current,e!==null&&(e.flags|=32),md}function Rd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Hp(mi(e.memoizedProps,n))),Md===null&&(Md=[]),Md.push(t.bind(null,r))}}function zd(e,t,n){(e===td&&(id===2||id===9)||e.cancelPendingCommit!==null)&&(Kd(e,0),Ud(e,rd,md,!1)),lt(e,n),(!(ed&2)||e!==td)&&(e===td&&(!(ed&2)&&(fd|=n),ud===4&&Ud(e,rd,md,!1)),Mf(e))}function Bd(e,t,n){if(ed&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||it(e,t),a=r?ef(e,t):Qd(e,t,!0),o=r;do{if(a===0){sd&&!r&&Ud(e,t,0,!1);break}if(n=e.current.alternate,o&&!Hd(n)){a=Qd(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=gd;var l=c.current.memoizedState.isDehydrated;if(l&&(Kd(c,s).flags|=256),s=Qd(c,s,!1),s!==2&&s!==6){if(cd&&!l){c.errorRecoveryDisabledLanes|=o,fd|=o,a=4;break a}o=_d,_d=a,o!==null&&(_d===null?_d=o:_d.push.apply(_d,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Kd(e,0),Ud(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&&(t&62914560)!==t)break;case 6:Ud(r,t,md,!od);break a;case 2:_d=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=yd+300-Le(),10<a)){if(Ud(r,t,md,!od),rt(r,0,!0)!==0)break a;Dd=t,r.timeoutHandle=Tp(Vd.bind(null,r,n,_d,Sd,vd,t,md,fd,hd,od,o,`Throttled`,-0,0),a);break a}Vd(r,n,_d,Sd,vd,t,md,fd,hd,od,o,null,-0,0)}break}while(1);Mf(e)}function Vd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:B},Bl=null,Ku(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=uh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?yd-Le():(a&4194048)===a?bd-Le():0,m=ch(d,m),m!==null)){Dd=a,e.cancelPendingCommit=m(cf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ud(e,a,o,!l);return}cf(e,t,a,n,r,i,o,s,c,l,u,d)}function Hd(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(!Rr(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 Ud(e,t,n,r){t=at(e,t),t&=~pd,t&=~fd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ye(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&dt(e,n,t)}function Wd(){return ed&6?!0:(Nf(0,!1),!1)}function Gd(){if(nd!==null){if(id===0)var e=nd.return;else e=nd,ma=pa=null,rs(e),no=null,ro=0,e=nd;for(;e!==null;)bl(e.alternate,e),e=e.return;nd=null}}function Kd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Ep(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Dd=0,Gd(),td=e,nd=n=ji(e.current,null),rd=t,id=0,ad=null,od=!1,sd=it(e,t),cd=!1,hd=md=pd=fd=dd=ud=0,_d=gd=null,vd=!1,ld=at(e,t),xi(),n}function qd(e,t){H=null,R.H=pc,t===Ka||t===Ja?(t=eo(),id=3):t===qa?(t=eo(),id=4):id=t===jc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ad=t,nd===null&&(ud=1,Tc(e,zi(t,e.current)))}function Jd(){var e=Oo.current;return e===null?!0:(rd&4194048)===rd?ko===null:(rd&62914560)===rd||rd&536870912?e===ko:!1}function Yd(){var e=R.H;return R.H=pc,e===null?pc:e}function Xd(){var e=R.A;return R.A=Qu,e}function Zd(){ud=4,od||(rd&4194048)!==rd&&Oo.current!==null||(sd=!0),!(dd&134217727)&&!(fd&134217727)||td===null||Ud(td,rd,md,!1)}function Qd(e,t,n){var r=ed;ed|=2;var i=Yd(),a=Xd();(td!==e||rd!==t)&&(Sd=null,Kd(e,t)),t=!1;var o=ud;a:do try{if(id!==0&&nd!==null){var s=nd,c=ad;switch(id){case 8:Gd(),o=6;break a;case 3:case 2:case 9:case 6:Oo.current===null&&(t=!0);var l=id;if(id=0,ad=null,af(e,s,c,l),n&&sd){o=0;break a}break;default:l=id,id=0,ad=null,af(e,s,c,l)}}$d(),o=ud;break}catch(t){qd(e,t)}while(1);return t&&e.shellSuspendCounter++,ma=pa=null,ed=r,R.H=i,R.A=a,nd===null&&(td=null,rd=0,xi()),o}function $d(){for(;nd!==null;)nf(nd)}function ef(e,t){var n=ed;ed|=2;var r=Yd(),a=Xd();td!==e||rd!==t?(Sd=null,xd=Le()+500,Kd(e,t)):sd=it(e,t);a:do try{if(id!==0&&nd!==null){t=nd;var o=ad;b:switch(id){case 1:id=0,ad=null,af(e,t,o,1);break;case 2:case 9:if(Xa(o)){id=0,ad=null,rf(t);break}t=function(){id!==2&&id!==9||td!==e||(id=7),Mf(e)},o.then(t,t);break a;case 3:id=7;break a;case 4:id=5;break a;case 7:Xa(o)?(id=0,ad=null,rf(t)):(id=0,ad=null,af(e,t,o,7));break;case 5:var s=null;switch(nd.tag){case 26:s=nd.memoizedState;case 5:case 27:var c=nd;if(s?rh(s):c.stateNode.complete){id=0,ad=null;var l=c.sibling;if(l!==null)nd=l;else{var u=c.return;u===null?nd=null:(nd=u,of(u))}break b}}id=0,ad=null,af(e,t,o,5);break;case 6:id=0,ad=null,af(e,t,o,6);break;case 8:Gd(),ud=6;break a;default:throw Error(i(462))}}tf();break}catch(t){qd(e,t)}while(1);return ma=pa=null,R.H=r,R.A=a,ed=n,nd===null?(td=null,rd=0,xi(),ud):0}function tf(){for(;nd!==null&&!Fe();)nf(nd)}function nf(e){var t=dl(e.alternate,e,ld);e.memoizedProps=e.pendingProps,t===null?of(e):nd=t}function rf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Gc(n,t,t.pendingProps,t.type,void 0,rd);break;case 11:t=Gc(n,t,t.pendingProps,t.type.render,t.ref,rd);break;case 5:rs(t);var r=t;r===ea&&(V?(sa(r),r.tag===5&&r.stateNode!=null&&(ta=r.stateNode)):(sa(r),V=!0));default:bl(n,t),t=nd=Mi(t,ld),t=dl(n,t,ld)}e.memoizedProps=e.pendingProps,t===null?of(e):nd=t}function af(e,t,n,r){ma=pa=null,rs(t),no=null,ro=0;var i=t.return;try{if(Ac(e,i,t,n,rd)){ud=1,Tc(e,zi(n,e.current)),nd=null;return}}catch(t){if(i!==null)throw nd=i,t;ud=1,Tc(e,zi(n,e.current)),nd=null;return}t.flags&32768?(V||r===1?e=!0:sd||rd&536870912?e=!1:(od=e=!0,(r===2||r===9||r===3||r===6)&&(r=Oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),sf(t,e)):of(t)}function of(e){var t=e;do{if(t.flags&32768){sf(t,od);return}e=t.return;var n=vl(t.alternate,t,ld);if(n!==null){nd=n;return}if(t=t.sibling,t!==null){nd=t;return}nd=t=e}while(t!==null);ud===0&&(ud=5)}function sf(e,t){do{var n=yl(e.alternate,e);if(n!==null){n.flags&=32767,nd=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){nd=e;return}nd=e=n}while(e!==null);ud=6,nd=null}function cf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do gf();while(wd!==0);if(ed&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===td&&(nd=td=null,rd=0),Ed=t,Td=e,Dd=n,kd=a,Ad=r,lf(e,t,n,s,c,l,f)}}function lf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Od=s,s|=bi,ut(e,n,s,r,i,a),Md=null,(n&335544064)===n?(Nd=Na(e),r=10262):(Nd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Tf(Ve,function(){return _f(),null})):(e.callbackNode=null,e.callbackPriority=0),zl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=R.T,R.T=null,i=z.p,z.p=2,a=ed,ed|=4;try{mu(e,t,n)}finally{ed=a,z.p=i,R.T=r}}wd=1,zl?jd=Bp(o,e.containerInfo,Nd,ff,pf,df,mf,_f,uf,null,null):(ff(),pf(),mf())}function uf(e){if(wd!==0){var t=Td.onRecoverableError;t(e,{componentStack:null})}}function df(){wd===3&&(wd=0,Pu(Ed,Td),wd=4)}function ff(){if(wd===1){wd=0;var e=Td,t=Ed,n=Dd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=R.T,R.T=null;var i=z.p;z.p=2;var a=ed;ed|=4;try{du=fu=!1,Au(t,e,n),n=_p;var o=Wr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ur(s.ownerDocument.documentElement,s)){if(c!==null&&Gr(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 _=Hr(s,h),v=Hr(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}}wh=!!W,_p=W=null}finally{ed=a,z.p=i,R.T=r}}e.current=t,wd=2}}function pf(){if(wd===2){wd=0;var e=Td,t=Ed,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=R.T,R.T=null;var r=z.p;z.p=2;var i=ed;ed|=4;try{gu(e,t.alternate,t)}finally{ed=i,z.p=r,R.T=n}}wd=3}}function mf(){if(wd===4||wd===3){wd=0;var e=jd;jd=null,Ie();var t=Td,n=Ed,r=Dd,i=Ad,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?wd=5:(wd=0,Ed=Td=null,hf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Cd=null),ht(r),n=n.stateNode,qe&&typeof qe.onCommitFiberRoot==`function`)try{qe.onCommitFiberRoot(Ke,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=R.T,a=z.p,z.p=2,R.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{R.T=n,z.p=a}}if(i=Md,o=Nd,Nd=null,i!==null&&(Md=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Dd&3&&gf(),Mf(t),a=t.pendingLanes,r&261930&&a&42?t===Fd?Pd++:(Pd=0,Fd=t):(Pd=0,Fd=null),Nf(0,!1)}}function hf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Aa(t)))}function gf(){return jd!==null&&(jd.skipTransition(),jd=null),ff(),pf(),mf(),_f()}function _f(){if(wd!==5)return!1;var e=Td,t=Od;Od=0;var n=ht(Dd),r=R.T,a=z.p;try{z.p=32>n?32:n,R.T=null,n=kd,kd=null;var o=Td,s=Dd;if(wd=0,Ed=Td=null,Dd=0,ed&6)throw Error(i(331));var c=ed;if(ed|=4,Yu(o.current),Vu(o,o.current,s,n),ed=c,Nf(0,!1),qe&&typeof qe.onPostCommitFiberRoot==`function`)try{qe.onPostCommitFiberRoot(Ke,o)}catch{}return!0}finally{z.p=a,R.T=r,hf(e,t)}}function vf(e,t,n){t=zi(n,t),t=Dc(e.stateNode,t,2),e=ho(e,t,2),e!==null&&(lt(e,2),Mf(e))}function yf(e,t,n){if(e.tag===3)vf(e,e,n);else for(;t!==null;){if(t.tag===3){vf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Cd===null||!Cd.has(r))){e=zi(n,e),n=Oc(2),r=ho(t,n,2),r!==null&&(kc(n,r,t,e),lt(r,2),Mf(r));break}}t=t.return}}function bf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;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)||(cd=!0,i.add(n),e=xf.bind(null,e,t,n),t.then(e,e))}function xf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,td===e&&(rd&n)===n&&(ud===4||ud===3&&(rd&62914560)===rd&&300>Le()-yd?ed&2?pd|=n:Kd(e,0):pd|=n,hd===rd&&(hd=0)),Mf(e)}function Sf(e,t){t===0&&(t=st()),e=wi(e,t),e!==null&&(lt(e,t),Mf(e))}function Cf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sf(e,n)}function wf(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),Sf(e,n)}function Tf(e,t){return Ne(e,t)}var Ef=null,Df=null,Of=!1,kf=!1,Af=!1,jf=0;function Mf(e){e!==Df&&e.next===null&&(Df===null?Ef=Df=e:Df=Df.next=e),kf=!0,Of||(Of=!0,zf())}function Nf(e,t){if(!Af&&kf){Af=!0;do for(var n=!1,r=Ef;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-Ye(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Rf(r,a))}else a=rd,a=rt(r,r===td?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||it(r,a)||(n=!0,Rf(r,a))}r=r.next}while(n);Af=!1}}function Pf(){Ff()}function Ff(){kf=Of=!1;var e=0;jf!==0&&wp()&&(e=jf);for(var t=Le(),n=null,r=Ef;r!==null;){var i=r.next,a=If(r,t);a===0?(r.next=null,n===null?Ef=i:n.next=i,i===null&&(Df=n)):(n=r,(e!==0||a&3)&&(kf=!0)),r=i}wd!==0&&wd!==5||Nf(e,!1),jf!==0&&(jf=0)}function If(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ye(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ot(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=td,n=rd,n=rt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(id===2||id===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||it(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Pe(r),ht(n)){case 2:case 8:n=Be;break;case 32:n=Ve;break;case 268435456:n=Ue;break;default:n=Ve}return r=Lf.bind(null,e),n=Ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Pe(r),e.callbackPriority=2,e.callbackNode=null,2}function Lf(e,t){if(wd!==0&&wd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(gf()&&e.callbackNode!==n)return null;var r=rd;return r=rt(e,e===td?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Bd(e,r,t),If(e,Le()),e.callbackNode!=null&&e.callbackNode===n?Lf.bind(null,e):null)}function Rf(e,t){if(gf())return null;Bd(e,t,!0)}function zf(){kp(function(){ed&6?Ne(ze,Pf):Ff()})}function Bf(){if(jf===0){var e=Ia;e===0&&(e=$e,$e<<=1,!($e&261888)&&($e=256)),jf=e}return jf}function Vf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function Hf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Vf((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?Vf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new In(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(jf!==0){var e=new FormData(i,o);$s(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),$s(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Uf=0;Uf<di.length;Uf++){var Wf=di[Uf];fi(Wf.toLowerCase(),`on`+(Wf[0].toUpperCase()+Wf.slice(1)))}fi(ri,`onAnimationEnd`),fi(ii,`onAnimationIteration`),fi(ai,`onAnimationStart`),fi(`dblclick`,`onDoubleClick`),fi(`focusin`,`onFocus`),fi(`focusout`,`onBlur`),fi(oi,`onTransitionRun`),fi(si,`onTransitionStart`),fi(ci,`onTransitionCancel`),fi(li,`onTransitionEnd`),Rt(`onMouseEnter`,[`mouseout`,`mouseover`]),Rt(`onMouseLeave`,[`mouseout`,`mouseover`]),Rt(`onPointerEnter`,[`pointerout`,`pointerover`]),Rt(`onPointerLeave`,[`pointerout`,`pointerover`]),Lt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Lt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Lt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Lt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Gf=`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(` `),Kf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Gf));function qf(e,t){t=!!(t&4);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){_i(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){_i(e)}i.currentTarget=null,a=c}}}}function Jf(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Qf(t,e,2,!1),n.add(r))}function Yf(e,t,n){var r=0;t&&(r|=4),Qf(n,e,r,t)}var Xf=`_reactListening`+Math.random().toString(36).slice(2);function Zf(e){if(!e[Xf]){e[Xf]=!0,Ft.forEach(function(t){t!==`selectionchange`&&(Kf.has(t)||Yf(t,!1,e),Yf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xf]||(t[Xf]=!0,Yf(`selectionchange`,!1,t))}}function Qf(e,t,n,r){switch(jh(t)){case 2:var i=Th;break;case 8:i=Eh;break;default:i=Dh}n=i.bind(null,t,n,e),i=void 0,!Tn||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 $f(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=kt(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}Sn(function(){var r=a,i=_n(n),s=[];a:{var c=ui.get(e);if(c!==void 0){var l=In,u=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:l=er;break;case`focusin`:u=`focus`,l=Gn;break;case`focusout`:u=`blur`,l=Gn;break;case`beforeblur`:case`afterblur`:l=Gn;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=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=rr;break;case ri:case ii:case ai:l=Kn;break;case li:l=ir;break;case`scroll`:case`scrollend`:l=Rn;break;case`wheel`:l=ar;break;case`copy`:case`cut`:case`paste`:l=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=tr;break;case`submit`:l=nr;break;case`toggle`:case`beforetoggle`:l=or}var d=!!(t&4),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=Cn(m,p),g!=null&&d.push(tp(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(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==gn&&(u=n.relatedTarget||n.fromElement)&&(kt(u)||u[xt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?kt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Un,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=tr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:jt(c),h=l==null?u:jt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,kt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,ip):null,c!==null&&ap(s,u,c,d,!1),l!==null&&f!==null&&ap(s,f,l,d,!0)))}a:{if(c=r?jt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Er;else if(br(c)){if(Dr)_=Ir;else{_=Pr;var v=Nr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Er):_=Fr;if(_&&=_(e,r)){xr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?jt(r):window,e){case`focusin`:(br(v)||v.contentEditable===`true`)&&(qr=v,Jr=r,Yr=null);break;case`focusout`:Yr=Jr=qr=null;break;case`mousedown`:Xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Xr=!1,Zr(s,n,i);break;case`selectionchange`:if(Kr)break;case`keydown`:case`keyup`:Zr(s,n,i)}var y;if(cr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else gr?mr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(dr&&n.locale!==`ko`&&(gr||b!==`onCompositionStart`?b===`onCompositionEnd`&&gr&&(y=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,gr=!0)),v=rp(r,b),0<v.length&&(b=new Jn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=hr(n),y!==null&&(b.data=y)))),(y=ur?_r(e,n):vr(e,n))&&(b=rp(r,`onBeforeInput`),0<b.length&&(v=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Hf(s,e,r,n,i)}qf(s,t)})}function tp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rp(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=Cn(e,n),i!=null&&r.unshift(tp(e,i,a)),i=Cn(e,t),i!=null&&r.push(tp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ip(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(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=Cn(n,a),l!=null&&o.unshift(tp(n,l,c))):i||(l=Cn(n,a),l!=null&&o.push(tp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var op=/\r\n?/g,sp=/\u0000|\uFFFD/g;function cp(e){return(typeof e==`string`?e:``+e).replace(op,`
|
|
18
|
-
`).replace(sp,``)}function lp(e,t){return t=cp(t),cp(e)===t}function up(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:Kt(e,`class`,r);break;case`tabIndex`:Kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Kt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){Kt(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=hn(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&up(e,t,`name`,a.name,a,null),up(e,t,`formEncType`,a.formEncType,a,null),up(e,t,`formMethod`,a.formMethod,a,null),up(e,t,`formTarget`,a.formTarget,a,null)):(up(e,t,`encType`,a.encType,a,null),up(e,t,`method`,a.method,a,null),up(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=B);return;case`onScroll`:r!=null&&Jf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Jf(`scrollend`,e);return;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));o?.__html!==n&&(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=hn(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`credentialless`: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`:Jf(`beforetoggle`,e),Jf(`toggle`,e),Gt(e,`popover`,r);break;case`xlinkActuate`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Gt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Gt(e,n,r);else return}Ut=!0}function dp(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&Jf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Jf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=B);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!It.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[bt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Ut=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Gt(e,n,r)}return}Ut=!0}function fp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Jf(`error`,e),Jf(`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:up(e,t,o,s,n,null)}}a&&up(e,t,`srcSet`,n.srcSet,n,null),r&&up(e,t,`src`,n.src,n,null);return;case`input`:Jf(`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:up(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Jf(`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:up(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in Jf(`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:up(e,t,s,c,n,null)}sn(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:up(e,t,l,r,n,null)}return;case`dialog`:Jf(`beforetoggle`,e),Jf(`toggle`,e),Jf(`cancel`,e),Jf(`close`,e);break;case`iframe`:case`object`:Jf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Gf.length;r++)Jf(Gf[r],e);break;case`image`:Jf(`error`,e),Jf(`load`,e);break;case`details`:Jf(`toggle`,e);break;case`embed`:case`source`:case`link`:Jf(`error`,e),Jf(`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:up(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&dp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&up(e,t,c,r,n,null))}var pp={};function mp(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)||up(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`:m!==f&&(Ut=!0),o=m;break;case`name`:m!==f&&(Ut=!0),a=m;break;case`checked`:m!==f&&(Ut=!0),u=m;break;case`defaultChecked`:m!==f&&(Ut=!0),d=m;break;case`value`:m!==f&&(Ut=!0),s=m;break;case`defaultValue`:m!==f&&(Ut=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&up(e,t,p,m,r,f)}}tn(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)||up(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`:o!==l&&(Ut=!0),p=o;break;case`defaultValue`:o!==l&&(Ut=!0),c=o;break;case`multiple`:o!==l&&(Ut=!0),s=o;default:o!==l&&up(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(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:up(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`:a!==o&&(Ut=!0),p=a;break;case`defaultValue`:a!==o&&(Ut=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&up(e,t,s,a,r,o)}on(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:up(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`:p!==m&&(Ut=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:up(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)&&up(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:up(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&dp(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||dp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&up(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||up(e,t,f,p,r,m)}function hp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function gp(){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&&hp(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&&hp(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 W=null,_p=null;function vp(e){return e.nodeType===9?e:e.ownerDocument}function yp(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 bp(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 xp(e,t,n,r){return n=vp(n).createElement(e),n[yt]=r,n[bt]=t,fp(n,e,t),Nt(n),n}function Sp(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 Cp=null;function wp(){var e=window.event;return e&&e.type===`popstate`?e!==Cp&&(Cp=e,!0):(Cp=null,!1)}var Tp=typeof setTimeout==`function`?setTimeout:void 0,Ep=typeof clearTimeout==`function`?clearTimeout:void 0,Dp=typeof Promise==`function`?Promise:void 0,Op=typeof requestAnimationFrame==`function`?requestAnimationFrame:Tp,kp=typeof queueMicrotask==`function`?queueMicrotask:Dp===void 0?Tp:function(e){return Dp.resolve(null).then(e).catch(G)};function G(e){setTimeout(function(){throw e})}function Ap(e){return e===`head`}function jp(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),Xh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tm(e.ownerDocument.body)}n=i}while(n);Xh(t)}function Mp(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 Np(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Pp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Fp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ip(e){return Fp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Lp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Fp(t,n,e)}function Rp(e){return e.documentElement.clientHeight}function zp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Bp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Rp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=ih(f),u>sh){s.length=o;break}f=new Promise(zp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Vp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Vp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Vp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Vp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Hp(e){return{name:e,group:new Vp(`group`,e),imagePair:new Vp(`image-pair`,e),old:new Vp(`old`,e),new:new Vp(`new`,e)}}function Up(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Up.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Jp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Kp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Wp,e,s,r)}this._eventListeners=a}};function Wp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Up.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Jp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Kp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Gp,e,n,i),r.splice(t,1),a!==null&&a()}};function Gp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Kp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function qp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Jp(e,t,n,r){if(e.length===0)return-1;r=qp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&qp(a.optionsOrUseCapture)===r)return i}return-1}Up.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Kp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Kp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Up.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Yp,e,void 0,void 0)};function Yp(e,t){return e.tag!==6&&(e=v(e),xm(e,t))}Up.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Xp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Yp(t[n],e);n--);};function Xp(e,t){return t.push(e),!1}Up.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=vp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Zp,e,void 0,void 0))};function Zp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Up.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Qp,e,void 0,void 0)};function Qp(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}Up.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,$p,e,void 0,void 0);for(var n=t=0;n<em.length;n++){var r=em[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):em[t++]=r}em.length=t}};function $p(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var em=[],tm=!1;function nm(e,t,n){em.push({fragmentInstance:e,observer:t,instance:n}),tm||(tm=!0,Sm(function(){tm=!1;var e=em;em=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Up.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,rm,e,void 0,void 0),e};function rm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Up.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Up.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Xp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||im(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function im(e,t,n,r,i){var a=kt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(f(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(f(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function am(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Up.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Xp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),am(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),am(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function om(e,t){return e=v(e),sm(e,t),!1}function sm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function cm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Kp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<em.length;i++){var a=em[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(em[r++]=a)}em.length=r,n.observe(e)}),sm(e,t))}function lm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Kp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?nm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function um(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`:um(n),Ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function dm(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[Et])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=_m(e.nextSibling),e===null)break}return null}function fm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_m(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_m(e.nextSibling),e===null))return null;return e}function mm(e){return e.data===`$?`||e.data===`$~`}function hm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gm(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 _m(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 vm=null;function ym(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _m(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bm(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 xm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Sm(e){Op(function(){Op(function(t){return e(t)})})}function Cm(e,t,n){switch(t=vp(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 wm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&up(e,t,r,null,pp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===B&&(e.onclick=null),Ot(e)}function Tm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ot(e)}var Em=new Map,Dm=new Set;function Om(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var km=z.d;z.d={f:Am,r:jm,D:Pm,C:Fm,L:Im,m:Lm,X:zm,S:Rm,M:Bm};function Am(){var e=km.f(),t=Wd();return e||t}function jm(e){var t=At(e);t!==null&&t.tag===5&&t.type===`form`?tc(t):km.r(e)}var Mm=typeof document>`u`?null:document;function Nm(e,t,n){var r=Mm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Dm.has(i)||(Dm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),fp(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function Pm(e){km.D(e),Nm(`dns-prefetch`,e,null)}function Fm(e,t){km.C(e,t),Nm(`preconnect`,e,t)}function Im(e,t,n){km.L(e,t,n);var r=Mm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Hm(e);break;case`script`:a=Km(e)}if(!(Em.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Em.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Um(a))||t===`script`&&r.querySelector(qm(a))))){var o=r.createElement(`link`);fp(o,`link`,e),t===`style`&&(o[Dt]=!0,o.onload=o.onerror=function(){Pt(o)}),Nt(o),r.head.appendChild(o)}}}function Lm(e,t){km.m(e,t);var n=Mm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Km(e)}if(!Em.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Em.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(qm(a)))return}r=n.createElement(`link`),fp(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function Rm(e,t,n){km.S(e,t,n);var r=Mm;if(r&&e){var i=Mt(r).hoistableStyles,a=Hm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Um(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Em.get(a))&&Xm(e,n);var c=o=r.createElement(`link`);Nt(c),fp(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,Ym(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zm(e,t){km.X(e,t);var n=Mm;if(n&&e){var r=Mt(n).hoistableScripts,i=Km(e),a=r.get(i);a||(a=n.querySelector(qm(i)),a||(e=T({src:e,async:!0},t),(t=Em.get(i))&&Zm(e,t),a=n.createElement(`script`),Nt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bm(e,t){km.M(e,t);var n=Mm;if(n&&e){var r=Mt(n).hoistableScripts,i=Km(e),a=r.get(i);a||(a=n.querySelector(qm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Em.get(i))&&Zm(e,t),a=n.createElement(`script`),Nt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vm(e,t,n,r){var a=(a=ye.current)?Om(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`?(n=Hm(n.href),t=Mt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Hm(n.href);var o=Mt(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(Um(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Em.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Em.set(e,o)),Gm(a,e,o,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`?(n=Km(n),t=Mt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hm(e){return`href="`+en(e)+`"`}function Um(e){return`link[rel="stylesheet"][`+e+`]`}function Wm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Gm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Dt]){r.loading=1;return}}else t=e.createElement(`link`),t[Dt]=!0,t.onload=t.onerror=Pt.bind(null,t),fp(t,`link`,n),Nt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Km(e){return`[src="`+en(e)+`"]`}function qm(e){return`script[async]`+e}function Jm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),fp(r,`style`,a),Ym(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Hm(n.href);var o=e.querySelector(Um(a));if(o)return t.state.loading|=4,t.instance=o,Nt(o),o;r=Wm(n),(a=Em.get(a))&&Xm(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),fp(o,`link`,r),t.state.loading|=4,Ym(o,n.precedence,e),t.instance=o;case`script`:return o=Km(n.src),(a=e.querySelector(qm(o)))?(t.instance=a,Nt(a),a):(r=n,(a=Em.get(o))&&(r=T({},n),Zm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),fp(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,Ym(r,n.precedence,e));return t.instance}function Ym(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 Xm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Zm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Qm=null;function $m(e,t,n){if(Qm===null){var r=new Map,i=Qm=new Map;i.set(n,r)}else i=Qm,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[Et]||a[yt]||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 eh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function th(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 nh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function rh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ih(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function ah(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=ih(t),e.suspenseyImages.push(t)),e=dh.bind(e),t.decode().then(e,e))}function oh(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=Hm(r.href),a=t.querySelector(Um(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=uh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=Wm(r),(i=Em.get(i))&&Xm(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),fp(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=uh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var sh=0;function ch(e,t){return e.stylesheets&&e.count===0&&ph(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ph(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&sh===0&&(sh=62500*gp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ph(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>sh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function lh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ph(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function uh(){this.count--,lh(this)}function dh(){this.imgCount--,lh(this)}var fh=null;function ph(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fh=new Map,t.forEach(mh,e),fh=null,uh.call(e))}function mh(e,t){if(!(t.state.loading&4)){var n=fh.get(e);if(n)var r=n.get(null);else{n=new Map,fh.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=uh.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 hh={$$typeof:N,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function gh(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=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function _h(e,t,n,r,i,a,o,s,c,l,u,d){return e=new gh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ki(3,null,null,t),e.current=a,a.stateNode=e,t=ka(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},fo(a),e}function vh(e){return e?(e=Di,e):Di}function yh(e,t,n,r,i,a){i=vh(i),r.context===null?r.context=i:r.pendingContext=i,r=mo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=ho(e,r,t),n!==null&&(zd(n,e,t),go(n,e,t))}function bh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xh(e,t){bh(e,t),(e=e.alternate)&&bh(e,t)}function Sh(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&zd(t,e,67108864),xh(e,67108864)}}function Ch(e){if(e.tag===13||e.tag===31){var t=Id();t=mt(t);var n=wi(e,t);n!==null&&zd(n,e,t),xh(e,t)}}var wh=!0;function Th(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=2,Dh(e,t,n,r)}finally{z.p=a,R.T=i}}function Eh(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=8,Dh(e,t,n,r)}finally{z.p=a,R.T=i}}function Dh(e,t,n,r){if(wh){var i=Oh(r);if(i===null)$f(e,t,r,kh,n),Bh(e,r);else if(Hh(i,e,t,n,r))r.stopPropagation();else if(Bh(e,r),t&4&&-1<zh.indexOf(e)){for(;i!==null;){var a=At(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}Mf(a),!(ed&6)&&(xd=Le()+500,Nf(0,!1))}}break;case 31:case 13:s=wi(a,2),s!==null&&zd(s,a,2),Wd(),xh(a,2)}if(a=Oh(r),a===null&&$f(e,t,r,kh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else $f(e,t,r,null,n)}}function Oh(e){return e=_n(e),Ah(e)}var kh=null;function Ah(e){if(kh=null,e=kt(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 kh=e,null}function jh(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var Mh=!1,Nh=null,Ph=null,Fh=null,Ih=new Map,Lh=new Map,Rh=[],zh=`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 Bh(e,t){switch(e){case`focusin`:case`focusout`:Nh=null;break;case`dragenter`:case`dragleave`:Ph=null;break;case`mouseover`:case`mouseout`:Fh=null;break;case`pointerover`:case`pointerout`:Ih.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Lh.delete(t.pointerId)}}function Vh(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=At(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Hh(e,t,n,r,i){switch(t){case`focusin`:return Nh=Vh(Nh,e,t,n,r,i),!0;case`dragenter`:return Ph=Vh(Ph,e,t,n,r,i),!0;case`mouseover`:return Fh=Vh(Fh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ih.set(a,Vh(Ih.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Lh.set(a,Vh(Lh.get(a)||null,e,t,n,r,i)),!0}return!1}function Uh(e){var t=kt(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,_t(e.priority,function(){Ch(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){Ch(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 Wh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Oh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);gn=r,n.target.dispatchEvent(r),gn=null}else return t=At(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function Gh(e,t,n){Wh(e)&&n.delete(t)}function Kh(){Mh=!1,Nh!==null&&Wh(Nh)&&(Nh=null),Ph!==null&&Wh(Ph)&&(Ph=null),Fh!==null&&Wh(Fh)&&(Fh=null),Ih.forEach(Gh),Lh.forEach(Gh)}function qh(e,n){e.blockedOn===n&&(e.blockedOn=null,Mh||(Mh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Kh)))}var Jh=null;function Yh(e){Jh!==e&&(Jh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Jh===e&&(Jh=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(Ah(r||n)===null)continue;break}var a=At(n);a!==null&&(e.splice(t,3),t-=3,$s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Xh(e){function t(t){return qh(t,e)}Nh!==null&&qh(Nh,e),Ph!==null&&qh(Ph,e),Fh!==null&&qh(Fh,e),Ih.forEach(t),Lh.forEach(t);for(var n=0;n<Rh.length;n++){var r=Rh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Rh.length&&(n=Rh[0],n.blockedOn===null);)Uh(n),n.blockedOn===null&&Rh.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[bt]||null;if(typeof a==`function`)o||Yh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Ah(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Yh(n)}}}function Zh(){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 Qh(e){this._internalRoot=e}$h.prototype.render=Qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;yh(n,Id(),e,t,null,null)},$h.prototype.unmount=Qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yh(e.current,2,null,e,null,null),Wd(),t[xt]=null}};function $h(e){this._internalRoot=e}$h.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rh.length&&t!==0&&t<Rh[n].priority;n++);Rh.splice(n,0,e),n===0&&Uh(e)}};var eg=n.version;if(eg!==`19.3.0`)throw Error(i(527,eg,`19.3.0`));z.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 tg={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:R,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ng=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ng.isDisabled&&ng.supportsFiber)try{Ke=ng.inject(tg),qe=ng}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Sc,s=Cc,c=wc;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=_h(e,1,!1,null,null,n,r,null,o,s,c,Zh),e[xt]=t.current,Zf(e),new Qh(t)}})),ip=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=rp()}))(),ap={info:3600,success:3e3,warning:5e3,error:6e3},op,sp=[],cp=0,lp=new Set;function up(){for(let e of[...lp])e()}function dp(e,t,n){let r=t.trim();if(!r)return;let i=op?.message===r?op:sp.find(e=>e.message===r);if(i){if(n?.action&&!i.action){let e={...i,action:n.action};i===op?op=e:sp=sp.map(t=>t===i?e:t),up()}return}let a={id:++cp,kind:e,message:r,duration:n?.duration??ap[e],...n?.action?{action:n.action}:{}};op?sp=[...sp,a].slice(-3):op=a,up()}function fp(e){op?.id===e&&(op=sp[0],sp=sp.slice(1),up())}var pp=Object.assign((e,t)=>dp(`info`,e,t),{success:(e,t)=>dp(`success`,e,t),error:(e,t)=>dp(`error`,e,t),warning:(e,t)=>dp(`warning`,e,t),info:(e,t)=>dp(`info`,e,t)});function mp(e){return lp.add(e),()=>{lp.delete(e)}}function hp(){return{item:(0,m.useSyncExternalStore)(mp,()=>op,()=>void 0),waiting:(0,m.useSyncExternalStore)(mp,()=>sp.length,()=>0)}}function gp(e){return e instanceof Error?e.message:`That did not work. Try again.`}async function W(e,t,n={}){try{let r=await be(e,t),i=r.notice;return i&&pp(i,n.undo?{action:{label:`Undo`,onClick:n.undo}}:void 0),r}catch(e){pp.error(gp(e));return}}var _p=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function vp(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:_p(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var yp=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},bp=e=>{let t=yp(e);return t.charAt(0).toUpperCase()+t.slice(1)},xp=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Sp={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Cp(e){return e!=null}function wp(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Sp.width,a=e.size??e.height??Sp.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?xp(...c):xp(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Sp[`stroke-width`])*Number(e.size??e.width??Sp.width)/Number(t.size??t.width??Sp.width):t.strokeWidth??Sp[`stroke-width`];return[`svg`,{...Object.entries(Sp).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Cp(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Cp(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Cp(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Tp(e,t={}){return wp(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Ep=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Dp=(0,m.createContext)({}),Op=()=>(0,m.useContext)(Dp),kp=(0,m.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Op()??{},b=!!c||Ep(d),[x,S,C=[]]=Tp(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:xp(y,s),hasA11yProp:b,attributes:d});return(0,m.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,m.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function G(e,t=[],n=[]){let r=typeof e==`string`?vp(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(kp,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=bp(r.name)),i}var Ap={name:`archive-restore`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]};Ap.node;var jp=G(Ap),Mp={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};Mp.node;var Np=G(Mp),Pp={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Pp.node;var Fp=G(Pp),Ip={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Ip.node;var Lp=G(Ip),Rp={name:`arrow-right-to-line`,size:24,node:[[`path`,{d:`M17 12H3`,key:`8awo09`}],[`path`,{d:`m11 18 6-6-6-6`,key:`8c2y43`}],[`path`,{d:`M21 5v14`,key:`nzette`}]]};Rp.node;var zp=G(Rp),Bp={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Bp.node;var Vp=G(Bp),Hp={name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]};Hp.node;var Up=G(Hp),Wp={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};Wp.node;var Gp=G(Wp),Kp={name:`bold`,size:24,node:[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]};Kp.node;var qp=G(Kp),Jp={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Jp.node;var Yp=G(Jp),Xp={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Xp.node;var Zp=G(Xp),Qp={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};Qp.node;var $p=G(Qp),em={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};em.node;var tm=G(em),nm={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};nm.node;var rm=G(nm),im={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};im.node;var am=G(im),om={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};om.node;var sm=G(om),cm={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};cm.node;var lm=G(cm),um={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};um.node;var dm=G(um),fm={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};fm.node;var pm=G(fm),mm={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};mm.node;var hm=G(mm),gm={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};gm.node;var _m=G(gm),vm={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};vm.node;var ym=G(vm),bm={name:`circle-slash`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]};bm.node;var xm=G(bm),Sm={name:`circle-stop`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]],aliases:[`stop-circle`]};Sm.node;var Cm=G(Sm),wm={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};wm.node;var Tm=G(wm),Em={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Em.node;var Dm=G(Em),Om={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Om.node;var km=G(Om),Am={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};Am.node;var jm=G(Am),Mm={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};Mm.node;var Nm=G(Mm),Pm={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};Pm.node;var Fm=G(Pm),Im={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Im.node;var Lm=G(Im),Rm={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Rm.node;var zm=G(Rm),Bm={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Bm.node;var Vm=G(Bm),Hm={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Hm.node;var Um=G(Hm),Wm={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};Wm.node;var Gm=G(Wm),Km={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};Km.node;var qm=G(Km),Jm={name:`file-plus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};Jm.node;var Ym=G(Jm),Xm={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Xm.node;var Zm=G(Xm),Qm={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};Qm.node;var $m=G(Qm),eh={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};eh.node;var th=G(eh),nh={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};nh.node;var rh=G(nh),ih={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};ih.node;var ah=G(ih),oh={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};oh.node;var sh=G(oh),ch={name:`italic`,size:24,node:[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]};ch.node;var lh=G(ch),uh={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};uh.node;var dh=G(uh),fh={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};fh.node;var ph=G(fh),mh={name:`library`,size:24,node:[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]};mh.node;var hh=G(mh),gh={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};gh.node;var _h=G(gh),vh={name:`list-plus`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]};vh.node;var yh=G(vh),bh={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};bh.node;var xh=G(bh),Sh={name:`list`,size:24,node:[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]};Sh.node;var Ch=G(Sh),wh={name:`loader`,size:24,node:[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]};wh.node;var Th=G(wh),Eh={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};Eh.node;var Dh=G(Eh),Oh={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};Oh.node;var kh=G(Oh),Ah={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};Ah.node;var jh=G(Ah),Mh={name:`message-circle-question-mark`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`message-circle-question`]};Mh.node;var Nh=G(Mh),Ph={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};Ph.node;var Fh=G(Ph),Ih={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};Ih.node;var Lh=G(Ih),Rh={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};Rh.node;var zh=G(Rh),Bh={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};Bh.node;var Vh=G(Bh),Hh={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};Hh.node;var Uh=G(Hh),Wh={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};Wh.node;var Gh=G(Wh),Kh={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Kh.node;var qh=G(Kh),Jh={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};Jh.node;var Yh=G(Jh),Xh={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};Xh.node;var Zh=G(Xh),Qh={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Qh.node;var $h=G(Qh),eg={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};eg.node;var tg=G(eg),ng={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]};ng.node;var rg=G(ng),ig={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};ig.node;var ag=G(ig),og={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};og.node;var sg=G(og),cg={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};cg.node;var lg=G(cg),ug={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};ug.node;var dg=G(ug),fg={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};fg.node;var pg=G(fg),mg={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};mg.node;var hg=G(mg),gg={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};gg.node;var _g=G(gg),vg={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};vg.node;var yg=G(vg),bg={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};bg.node;var xg=G(bg),Sg={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Sg.node;var Cg=G(Sg),wg={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};wg.node;var Tg=G(wg),Eg={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Eg.node;var Dg=G(Eg),Og={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Og.node;var kg=G(Og),Ag={name:`square-arrow-out-up-right`,size:24,node:[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]],aliases:[`arrow-up-right-from-square`]};Ag.node;var jg=G(Ag),Mg={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Mg.node;var Ng=G(Mg),Pg={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Pg.node;var Fg=G(Pg),Ig={name:`tags`,size:24,node:[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]};Ig.node;var Lg=G(Ig),Rg={name:`telescope`,size:24,node:[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]};Rg.node;var zg=G(Rg),Bg={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Bg.node;var Vg=G(Bg),Hg={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Hg.node;var Ug=G(Hg),Wg={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};Wg.node;var Gg=G(Wg),Kg={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};Kg.node;var qg=G(Kg),Jg={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};Jg.node;var Yg=G(Jg),Xg={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};Xg.node;var Zg=G(Xg),Qg={name:`wifi-off`,size:24,node:[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Qg.node;var $g=G(Qg),e_={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};e_.node;var t_=G(e_),n_={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};n_.node;var r_=G(n_),i_={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};i_.node;var a_=G(i_);function o_(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=o_(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function s_(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=o_(e))&&(r&&(r+=` `),r+=t);return r}var c_=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},l_=(e,t)=>({classGroupId:e,validator:t}),u_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),d_=`-`,f_=[],p_=`arbitrary..`,m_=e=>{let t=__(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return g_(e);let n=e.split(d_);return h_(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?c_(i,t):t:i||f_}return n[e]||f_}}},h_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=h_(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(d_):e.slice(t).join(d_),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},g_=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?p_+r:void 0})(),__=e=>{let{theme:t,classGroups:n}=e;return v_(n,t)},v_=(e,t)=>{let n=u_();for(let r in e){let i=e[r];y_(i,n,r,t)}return n},y_=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];b_(i,t,n,r)}},b_=(e,t,n,r)=>{if(typeof e==`string`){x_(e,t,n);return}if(typeof e==`function`){S_(e,t,n,r);return}C_(e,t,n,r)},x_=(e,t,n)=>{let r=e===``?t:w_(t,e);r.classGroupId=n},S_=(e,t,n,r)=>{if(T_(e)){y_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(l_(n,e))},C_=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];y_(o,w_(t,a),n,r)}},w_=(e,t)=>{let n=e,r=t.split(d_),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=u_(),n.nextPart.set(t,i)),n=i}return n},T_=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,E_=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},D_=`!`,O_=`:`,k_=[],A_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),j_=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===O_){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(D_)?(c=s.slice(0,-1),l=!0):s.startsWith(D_)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return A_(t,l,c,u)};if(t){let e=t+O_,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):A_(k_,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},M_=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},N_=e=>({cache:E_(e.cacheSize),parseClassName:j_(e),sortModifiers:M_(e),postfixLookupClassGroupIds:P_(e),...m_(e)}),P_=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},F_=/\s+/,I_=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(F_),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+D_:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},L_=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=R_(n))&&(i&&(i+=` `),i+=r);return i},R_=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=R_(e[r]))&&(n&&(n+=` `),n+=t);return n},z_=(e,...t)=>{let n,r,i,a,o=o=>(n=N_(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=I_(e,n);return i(e,a),a};return a=o,(...e)=>a(L_(...e))},B_=[],V_=e=>{let t=t=>t[e]||B_;return t.isThemeGetter=!0,t.themeKey=e,t},H_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,G_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,K_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,q_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,J_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X_=e=>W_.test(e),Z_=e=>!!e&&!Number.isNaN(Number(e)),Q_=e=>!!e&&Number.isInteger(Number(e)),$_=e=>e.endsWith(`%`)&&Z_(e.slice(0,-1)),ev=e=>G_.test(e),tv=()=>!0,nv=e=>K_.test(e)&&!q_.test(e),rv=()=>!1,iv=e=>J_.test(e),av=e=>Y_.test(e),ov=e=>!K(e)&&!q(e),sv=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),cv=e=>Cv(e,Dv,rv),K=e=>H_.test(e),lv=e=>Cv(e,Ov,nv),uv=e=>Cv(e,kv,Z_),dv=e=>Cv(e,jv,tv),fv=e=>Cv(e,Av,rv),pv=e=>Cv(e,Tv,rv),mv=e=>Cv(e,Ev,av),hv=e=>Cv(e,Mv,iv),q=e=>U_.test(e),gv=e=>wv(e,Ov),_v=e=>wv(e,Av),vv=e=>wv(e,Tv),yv=e=>wv(e,Dv),bv=e=>wv(e,Ev),xv=e=>wv(e,Mv,!0),Sv=e=>wv(e,jv,!0),Cv=(e,t,n)=>{let r=H_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wv=(e,t,n=!1)=>{let r=U_.exec(e);return r?r[1]?t(r[1]):n:!1},Tv=e=>e===`position`||e===`percentage`,Ev=e=>e===`image`||e===`url`,Dv=e=>e===`length`||e===`size`||e===`bg-size`,Ov=e=>e===`length`,kv=e=>e===`number`,Av=e=>e===`family-name`,jv=e=>e===`number`||e===`weight`,Mv=e=>e===`shadow`,Nv=z_(()=>{let e=V_(`color`),t=V_(`font`),n=V_(`text`),r=V_(`font-weight`),i=V_(`tracking`),a=V_(`leading`),o=V_(`breakpoint`),s=V_(`container`),c=V_(`spacing`),l=V_(`radius`),u=V_(`shadow`),d=V_(`inset-shadow`),f=V_(`text-shadow`),p=V_(`drop-shadow`),m=V_(`blur`),h=V_(`perspective`),g=V_(`aspect`),_=V_(`ease`),v=V_(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),q,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[q,K,c],T=()=>[X_,`full`,`auto`,...w()],E=()=>[Q_,`none`,`subgrid`,q,K],D=()=>[`auto`,{span:[`full`,Q_,q,K]},Q_,q,K],O=()=>[Q_,`auto`,q,K],k=()=>[`auto`,`min`,`max`,`fr`,q,K],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[X_,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,X_,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[X_,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,q,K],ee=()=>[...b(),vv,pv,{position:[q,K]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,yv,cv,{size:[q,K]}],re=()=>[$_,gv,lv],ie=()=>[``,`none`,`full`,l,q,K],ae=()=>[``,Z_,gv,lv],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],L=()=>[Z_,$_,vv,pv],ce=()=>[``,`none`,m,q,K],le=()=>[`none`,Z_,q,K],ue=()=>[`none`,Z_,q,K],R=()=>[Z_,q,K],z=()=>[X_,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ev],breakpoint:[ev],color:[tv],container:[ev],"drop-shadow":[ev],ease:[`in`,`out`,`in-out`],font:[ov],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ev],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ev],shadow:[ev],spacing:[`px`,Z_],text:[ev],"text-shadow":[ev],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,X_,K,q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,q,K]}],"container-named":[sv],columns:[{columns:[Z_,`auto`,K,q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Q_,`auto`,q,K]}],basis:[{basis:[X_,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z_,X_,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,Z_,q,K]}],shrink:[{shrink:[``,Z_,q,K]}],order:[{order:[Q_,`first`,`last`,`none`,q,K]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,gv,lv]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Sv,dv]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,$_,K]}],"font-family":[{font:[_v,fv,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,q,K]}],"line-clamp":[{"line-clamp":[Z_,`none`,q,uv]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,q,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,q,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z_,`from-font`,`auto`,q,lv]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Z_,`auto`,q,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Q_,q,K]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,q,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,q,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Q_,q,K],radial:[``,q,K],conic:[``,Q_,q,K]},bv,mv]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z_,q,K]}],"outline-w":[{outline:[``,Z_,gv,lv]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,xv,hv]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,xv,hv]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ae()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Z_,lv]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,xv,hv]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Z_,q,K]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z_]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[q,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z_]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,q,K]}],filter:[{filter:[``,`none`,q,K]}],blur:[{blur:ce()}],brightness:[{brightness:[Z_,q,K]}],contrast:[{contrast:[Z_,q,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,xv,hv]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,Z_,q,K]}],"hue-rotate":[{"hue-rotate":[Z_,q,K]}],invert:[{invert:[``,Z_,q,K]}],saturate:[{saturate:[Z_,q,K]}],sepia:[{sepia:[``,Z_,q,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,q,K]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Z_,q,K]}],"backdrop-contrast":[{"backdrop-contrast":[Z_,q,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z_,q,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z_,q,K]}],"backdrop-invert":[{"backdrop-invert":[``,Z_,q,K]}],"backdrop-opacity":[{"backdrop-opacity":[Z_,q,K]}],"backdrop-saturate":[{"backdrop-saturate":[Z_,q,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z_,q,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,q,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z_,`initial`,q,K]}],ease:[{ease:[`linear`,`initial`,_,q,K]}],delay:[{delay:[Z_,q,K]}],animate:[{animate:[`none`,v,q,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,q,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:R()}],"skew-x":[{"skew-x":R()}],"skew-y":[{"skew-y":R()}],transform:[{transform:[q,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":[`translate-none`],zoom:[{zoom:[Q_,q,K]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,q,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,q,K]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[Z_,gv,lv,uv]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function J(...e){return Nv(s_(e))}var Pv=4,Fv=320,Iv=.9;function Lv(e,t){let n=e.scrollTop>Pv,r=e.scrollTop+e.clientHeight<e.scrollHeight-Pv;if(!t)return{up:n,down:r,top:0,right:0};let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return{up:n,down:r,top:i.top-a.top+i.height/2,right:a.right-i.right+8}}function Rv(e,t){return e.up===t.up&&e.down===t.down&&Math.abs(e.top-t.top)<.5&&Math.abs(e.right-t.right)<.5}function zv({target:e,up:t=!0,down:n=!0,className:r}){let i=(0,m.useRef)(null),[a,o]=(0,m.useState)({up:!1,down:!1,top:0,right:0}),s=(0,m.useRef)(null);(0,m.useEffect)(()=>{let t=e.current;if(!t)return;t.setAttribute(`data-scroll-hints`,``);let n=0,r=()=>{n=0;let e=Lv(t,i.current?.offsetParent);o(t=>Rv(t,e)?t:e)},a=()=>{n||=requestAnimationFrame(r)};r(),t.addEventListener(`scroll`,a,{passive:!0}),window.addEventListener(`resize`,a);let s=new ResizeObserver(a);s.observe(t);for(let e of t.children)s.observe(e);let c=new MutationObserver(()=>{for(let e of t.children)s.observe(e);a()});return c.observe(t,{childList:!0,subtree:!0}),()=>{cancelAnimationFrame(n),t.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a),s.disconnect(),c.disconnect(),t.removeAttribute(`data-scroll-hints`)}},[e]),(0,m.useEffect)(()=>()=>c(),[]);function c(){s.current&&=(clearTimeout(s.current.timer),cancelAnimationFrame(s.current.frame),null)}function l(){return window.matchMedia(`(prefers-reduced-motion: no-preference)`).matches?`smooth`:`auto`}function u(t){let n=e.current;n&&n.scrollBy({top:t*Math.max(80,n.clientHeight*.8),behavior:l()})}function d(t){c();let n={timer:0,frame:0,held:!1};n.timer=window.setTimeout(()=>{n.held=!0;let r=performance.now(),i=a=>{e.current?.scrollBy({top:t*(a-r)*Iv}),r=a,n.frame=requestAnimationFrame(i)};n.frame=requestAnimationFrame(i)},Fv),s.current=n}function f(e,t){return(0,U.jsx)(`button`,{type:`button`,tabIndex:-1,"data-shown":t||void 0,"data-direction":e===1?`down`:`up`,title:e===1?`Scroll down · hold to keep going`:`Scroll up · hold to keep going`,onPointerDown:t=>{t.button===0&&(t.preventDefault(),d(e))},onPointerUp:()=>{let t=s.current?.held;c(),t===!1&&u(e)},onPointerLeave:c,onPointerCancel:c,className:`scroll-hint grid size-7 place-items-center rounded-md border bg-card/85 text-muted-foreground shadow-card backdrop-blur-sm hover:text-foreground`,children:(0,U.jsx)(e===1?rm:lm,{"aria-hidden":`true`,className:`size-4`})})}let p=t&&a.up,h=n&&a.down;return(0,U.jsxs)(`div`,{ref:i,"aria-hidden":`true`,"data-slot":`scroll-hints`,"data-active":p||h||void 0,style:{top:a.top,right:a.right},className:J(`scroll-hints pointer-events-none absolute z-20 flex -translate-y-1/2 flex-col gap-1.5`,r),children:[t?f(-1,p):null,n?f(1,h):null]})}var Bv=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Vv=s_,Hv=(e,t)=>n=>{if(t?.variants==null)return Vv(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Bv(t)||Bv(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Vv(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Uv=Object.defineProperty,Wv=(e,t)=>Uv(e,`name`,{value:t,configurable:!0});function Gv(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Wv(Gv,`setRef`);function Kv(...e){return t=>{let n=!1,r=e.map(e=>{let r=Gv(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Gv(e[t],null)}}}}Wv(Kv,`composeRefs`);function qv(...e){return m.useCallback(Kv(...e),e)}Wv(qv,`useComposedRefs`);var Jv=Object.defineProperty,Yv=(e,t)=>Jv(e,`name`,{value:t,configurable:!0});function Xv(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];ay(r)&&typeof ly==`function`&&(r=ly(r._payload)),m.Children.forEach(r,e=>{if(ry(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ay(n)&&typeof ly==`function`&&(n=ly(n._payload)),a=ey(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=m.cloneElement(a,void 0,s):!o&&m.Children.count(r)===1&&m.isValidElement(r)&&(a=r);let c=a?ny(a):void 0,l=qv(n,c);if(!a){if(r||r===0)throw Error(o?cy(e):sy(e));return r}let u=ty(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Yv(Xv,`createSlot`);var Zv=Xv(`Slot`),Qv=Symbol.for(`radix.slottable`);function $v(e){let t=Yv(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Qv,t}Yv($v,`createSlottable`);var ey=Yv((e,t)=>{if(`child`in e.props){let t=e.props.child;return m.isValidElement(t)?m.cloneElement(t,void 0,e.props.children(t.props.children)):null}return m.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function ty(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Yv(ty,`mergeProps`);function ny(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Yv(ny,`getElementRef`);function ry(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Qv}Yv(ry,`isSlottable`);var iy=Symbol.for(`react.lazy`);function ay(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===iy&&`_payload`in e&&oy(e._payload)}Yv(ay,`isLazyComponent`);function oy(e){return typeof e==`object`&&!!e&&`then`in e}Yv(oy,`isPromiseLike`);var sy=Yv(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),cy=Yv(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ly=m.use,uy=l(np(),1),dy=Object.defineProperty,fy=(e,t)=>dy(e,`name`,{value:t,configurable:!0}),py=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Xv(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,U.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function my(e,t){e&&uy.flushSync(()=>e.dispatchEvent(t))}fy(my,`dispatchDiscreteCustomEvent`);var hy=Object.defineProperty,gy=(e,t)=>hy(e,`name`,{value:t,configurable:!0}),_y=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),vy=m.forwardRef(gy(function(e,t){return(0,U.jsx)(py.span,{...e,ref:t,style:{..._y,...e.style}})},`VisuallyHidden`)),yy=Object.defineProperty,by=(e,t)=>yy(e,`name`,{value:t,configurable:!0});function xy(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=by(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,U.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=m.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return by(i,`useContext`),[r,i]}by(xy,`createContext`);function Sy(e,t=[]){let n=[];function r(t,r){let i=m.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=by(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=m.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return by(s,`useContext`),[o,s]}by(r,`createContext`);let i=by(()=>{let t=n.map(e=>m.createContext(e));return by(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Cy(i,...t)]}by(Sy,`createContextScope`);function Cy(...e){let t=e[0];if(e.length===1)return t;let n=by(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return by(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}by(Cy,`composeContextScopes`);var wy=Object.defineProperty,Ty=(e,t)=>wy(e,`name`,{value:t,configurable:!0});function Ey(e){let t=e+`CollectionProvider`,[n,r]=Sy(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Ty(e=>{let{scope:t,children:n}=e,r=m.useRef(null),a=m.useRef(new Map).current;return(0,U.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Xv(s),l=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=qv(t,a(s,n).collectionRef);return(0,U.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Xv(u),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),s=qv(t,o),c=a(u,n);return m.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,U.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function h(t){let n=a(e+`CollectionConsumer`,t);return m.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Ty(h,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},h,r]}Ty(Ey,`createCollection`);var Dy=new WeakMap,Oy=class e extends Map{static{Ty(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Dy.set(this,!0)}set(e,t){return Dy.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=jy(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=ky(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=ky(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return ky(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function ky(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Ay(e,t);return n===-1?void 0:e[n]}Ty(ky,`at`);function Ay(e,t){let n=e.length,r=jy(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Ty(Ay,`toSafeIndex`);function jy(e){return e!==e||e===0?0:Math.trunc(e)}Ty(jy,`toSafeInteger`);function My(e){let t=e+`CollectionProvider`,[n,r]=Sy(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Oy,setItemMap:Ty(()=>void 0,`setItemMap`)}),o=Ty(({state:e,...t})=>e?(0,U.jsx)(c,{...t,state:e}):(0,U.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Ty(e=>{let t=g();return(0,U.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Ty(e=>{let{scope:t,children:n,state:r}=e,a=m.useRef(null),[o,s]=m.useState(null),c=qv(a,s),[l,u]=r;return m.useEffect(()=>{if(!o)return;let e=Iy(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,U.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Xv(l),d=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=qv(t,a(l,n).collectionRef);return(0,U.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Xv(f),h=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),[s,c]=m.useState(null),l=qv(t,o,c),{setItemMap:u}=a(f,n),d=m.useRef(i);Ny(d.current,i)||(d.current=i);let h=d.current;return m.useEffect(()=>{let e=h;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Fy):(t.set(s,{...e,element:s}),t.toSorted(Fy)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Oy(e)))}},[s,h,u]),(0,U.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});h.displayName=f;function g(){return m.useState(new Oy)}Ty(g,`useInitCollection`);function _(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Ty(_,`useCollection`),[{Provider:o,Slot:d,ItemSlot:h},{createCollectionScope:r,useCollection:_,useInitCollection:g}]}Ty(My,`createCollection`);function Ny(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Ty(Ny,`shallowEqual`);function Py(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ty(Py,`isElementPreceding`);function Fy(e,t){return!e[1].element||!t[1].element?0:Py(e[1].element,t[1].element)?-1:1}Ty(Fy,`sortByDocumentPosition`);function Iy(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Ty(Iy,`getChildListObserver`);var Ly=Object.defineProperty,Ry=(e,t)=>Ly(e,`name`,{value:t,configurable:!0}),zy=!!(typeof window<`u`&&window.document&&window.document.createElement);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return Ry(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ry(Y,`composeEventHandlers`);function By(e){if(!zy)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ry(By,`getOwnerWindow`);function Vy(e){if(!zy)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ry(Vy,`getOwnerDocument`);function Hy(e,t=!1){let{activeElement:n}=Vy(e);if(!n?.nodeName)return null;if(Uy(n)&&n.contentDocument)return Hy(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Vy(n).getElementById(e);if(t)return t}}return n}Ry(Hy,`getActiveElement`);function Uy(e){return e.tagName===`IFRAME`}Ry(Uy,`isFrame`);var Wy=globalThis?.document?m.useLayoutEffect:()=>{},Gy=Object.defineProperty,Ky=(e,t)=>Gy(e,`name`,{value:t,configurable:!0}),qy=m.useEffectEvent,Jy=m.useInsertionEffect;function Yy(e){if(typeof qy==`function`)return qy(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Jy==`function`?Jy(()=>{t.current=e}):Wy(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ky(Yy,`useEffectEvent`);var Xy=Object.defineProperty,Zy=(e,t)=>Xy(e,`name`,{value:t,configurable:!0}),Qy=m.useInsertionEffect||Wy;function $y({prop:e,defaultProp:t,onChange:n=Zy(()=>{},`onChange`),caller:r}){let[i,a,o]=eb({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=tb(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Zy($y,`useControllableState`);function eb({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return Qy(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Zy(eb,`useUncontrolledState`);function tb(e){return typeof e==`function`}Zy(tb,`isFunction`);var nb=Symbol(`RADIX:SYNC_STATE`);function rb(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Yy(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===nb)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,h=m.useRef(p);m.useEffect(()=>{h.current!==p&&(h.current=p,c||l(p))},[p,h,c]);let g=m.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return m.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:nb,state:i})},[i,d.state,c]),[g,f]}Zy(rb,`useControllableStateReducer`);var ib=Object.defineProperty,ab=(e,t)=>ib(e,`name`,{value:t,configurable:!0});function ob(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}ab(ob,`useStateMachine`);var sb=ab(e=>{let{present:t,children:n}=e,r=cb(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=ub(r.ref,fb(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function cb(e){let[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),a=m.useRef(`none`),o=m.useRef(void 0),[s,c]=ob(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return m.useEffect(()=>{s===`mounted`?(a.current=o.current??db(r.current),o.current=void 0):a.current=`none`},[s]),Wy(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=db(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Wy(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=ab(a=>{let o=db(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=ab(e=>{e.target===t&&(a.current=db(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:m.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=db(t)}else r.current=null;n(e)},[])}}ab(cb,`usePresence`);function lb(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ab(lb,`setRef`);function ub(...e){let t=m.useRef(e);return t.current=e,m.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=lb(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():lb(n[e],null)}}},[])}ab(ub,`useStableComposedRefs`);function db(e){return e?.animationName||`none`}ab(db,`getAnimationName`);function fb(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ab(fb,`getElementRef`);var pb=Object.defineProperty,mb=(e,t)=>pb(e,`name`,{value:t,configurable:!0}),hb=m.useId||(()=>void 0),gb=0;function _b(e){let[t,n]=m.useState(hb());return Wy(()=>{e||n(e=>e??String(gb++))},[e]),e||(t?`radix-${t}`:``)}mb(_b,`useId`);var vb=Object.defineProperty,yb=(e,t)=>vb(e,`name`,{value:t,configurable:!0}),bb=m.createContext(void 0);function xb(e){let t=m.useContext(bb);return e||t||`ltr`}yb(xb,`useDirection`);var Sb=Object.defineProperty,Cb=(e,t)=>Sb(e,`name`,{value:t,configurable:!0});function wb(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}Cb(wb,`useCallbackRef`);var Tb=Object.defineProperty,Eb=(e,t)=>Tb(e,`name`,{value:t,configurable:!0}),Db=`dismissableLayer.update`,Ob=`dismissableLayer.pointerDownOutside`,kb=`dismissableLayer.focusOutside`,Ab,jb=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Mb=m.forwardRef(Eb(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=m.useContext(jb),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=m.useState({}),g=qv(t,f),_=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=d?_.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=m.useRef(!1),w=Fb(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=Ib(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===_.length-1:!1,D=wb(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return m.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ab=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Lb(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Ab))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Lb())},[d,u]),m.useEffect(()=>{let e=Eb(()=>h({}),`handleUpdate`);return document.addEventListener(Db,e),()=>document.removeEventListener(Db,e)},[]),(0,U.jsx)(py.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Nb(){let e=m.useContext(jb),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Eb(Nb,`useDismissableLayerSurface`);var Pb=Eb(()=>!0,`IS_TRUE`);function Fb(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Pb}=t,s=wb(e),c=m.useRef(!1),l=m.useRef(!1),u=m.useRef(new Map),d=m.useRef(()=>{});return m.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Eb(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Eb(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Eb(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Eb(p,`handleInteractionBubble`);let m=Eb(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Rb(Ob,s,p,{discrete:!0})};if(Eb(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Eb(()=>c.current=!0,`onPointerDownCapture`)}}Eb(Fb,`usePointerDownOutside`);function Ib(e,t=globalThis?.document){let n=wb(e),r=m.useRef(!1);return m.useEffect(()=>{let e=Eb(e=>{e.target&&!r.current&&Rb(kb,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Eb(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Eb(()=>r.current=!1,`onBlurCapture`)}}Eb(Ib,`useFocusOutside`);function Lb(){let e=new CustomEvent(Db);document.dispatchEvent(e)}Eb(Lb,`dispatchUpdate`);function Rb(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?my(i,a):i.dispatchEvent(a)}Eb(Rb,`handleAndDispatchCustomEvent`);var zb=Object.defineProperty,Bb=(e,t)=>zb(e,`name`,{value:t,configurable:!0}),Vb=`focusScope.autoFocusOnMount`,Hb=`focusScope.autoFocusOnUnmount`,Ub={bubbles:!1,cancelable:!0},Wb=m.forwardRef(Bb(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=wb(i),u=wb(a),d=m.useRef(null),f=qv(t,c),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Zb(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Zb(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Zb(s)};Bb(e,`handleFocusIn`),Bb(t,`handleFocusOut`),Bb(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),m.useEffect(()=>{if(s){Qb.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Vb,Ub);s.addEventListener(Vb,l),s.dispatchEvent(t),t.defaultPrevented||(Gb(tx(qb(s)),{select:!0}),document.activeElement===e&&Zb(s))}return()=>{s.removeEventListener(Vb,l),setTimeout(()=>{let t=new CustomEvent(Hb,Ub);s.addEventListener(Hb,u),s.dispatchEvent(t),t.defaultPrevented||Zb(e??document.body,{select:!0}),s.removeEventListener(Hb,u),Qb.remove(p)},0)}}},[s,l,u,p]);let h=m.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Kb(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Zb(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Zb(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,U.jsx)(py.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})},`FocusScope`));function Gb(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Zb(r,{select:t}),document.activeElement!==n)return}Bb(Gb,`focusFirst`);function Kb(e){let t=qb(e);return[Jb(t,e),Jb(t.reverse(),e)]}Bb(Kb,`getTabbableEdges`);function qb(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Bb(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Bb(qb,`getTabbableCandidates`);function Jb(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Yb(r,{upTo:t})))return r}Bb(Jb,`findVisible`);function Yb(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Bb(Yb,`isHidden`);function Xb(e){return e instanceof HTMLInputElement&&`select`in e}Bb(Xb,`isSelectableInput`);function Zb(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xb(e)&&t&&e.select()}}Bb(Zb,`focus`);var Qb=$b();function $b(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ex(e,t),e.unshift(t)},remove(t){e=ex(e,t),e[0]?.resume()}}}Bb($b,`createFocusScopesStack`);function ex(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Bb(ex,`arrayRemove`);function tx(e){return e.filter(e=>e.tagName!==`A`)}Bb(tx,`removeLinks`);var nx=Object.defineProperty,rx=m.forwardRef(((e,t)=>nx(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);Wy(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?uy.createPortal((0,U.jsx)(py.div,{...r,ref:t}),o):null},`Portal`)),ix=Object.defineProperty,ax=(e,t)=>ix(e,`name`,{value:t,configurable:!0}),ox=0,sx=null;function cx(e){return lx(),e.children}ax(cx,`FocusGuards`);function lx(){m.useEffect(()=>{sx||={start:ux(),end:ux()};let{start:e,end:t}=sx;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),ox++,()=>{ox===1&&(sx?.start.remove(),sx?.end.remove(),sx=null),ox=Math.max(0,ox-1)}},[])}ax(lx,`useFocusGuards`);function ux(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}ax(ux,`createFocusGuard`);var dx=function(){return dx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dx.apply(this,arguments)};function fx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function px(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var mx=`right-scroll-bar-position`,hx=`width-before-scroll-bar`,gx=`with-scroll-bars-hidden`,_x=`--removed-body-scroll-bar-size`;function vx(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function yx(e,t){var n=(0,m.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var bx=typeof window<`u`?m.useLayoutEffect:m.useEffect,xx=new WeakMap;function Sx(e,t){var n=yx(t||null,function(t){return e.forEach(function(e){return vx(e,t)})});return bx(function(){var t=xx.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||vx(e,null)}),i.forEach(function(e){r.has(e)||vx(e,a)})}xx.set(n,e)},[e]),n}function Cx(e){return e}function wx(e,t){t===void 0&&(t=Cx);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Tx(e){e===void 0&&(e={});var t=wx(null);return t.options=dx({async:!0,ssr:!1},e),t}var Ex=function(e){var t=e.sideCar,n=fx(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return m.createElement(r,dx({},n))};Ex.isSideCarExport=!0;function Dx(e,t){return e.useMedium(t),Ex}var Ox=Tx(),kx=function(){},Ax=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:kx,onWheelCapture:kx,onTouchMoveCapture:kx}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=fx(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Sx([n,t]),w=dx(dx({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:Ox,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),dx(dx({},w),{ref:C})):m.createElement(y,dx({},w,{className:c,ref:C}),s))});Ax.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ax.classNames={fullWidth:hx,zeroRight:mx};var jx=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Mx(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=jx();return t&&e.setAttribute(`nonce`,t),e}function Nx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Px(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Fx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mx())&&(Nx(t,n),Px(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ix=function(){var e=Fx();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Lx=function(){var e=Ix();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Rx={left:0,top:0,right:0,gap:0},zx=function(e){return parseInt(e||``,10)||0},Bx=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[zx(n),zx(r),zx(i)]},Vx=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Rx;var t=Bx(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hx=Lx(),Ux=`data-scroll-locked`,Wx=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
18
|
+
`).replace(sp,``)}function lp(e,t){return t=cp(t),cp(e)===t}function up(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:Kt(e,`class`,r);break;case`tabIndex`:Kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Kt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){Kt(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=hn(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&up(e,t,`name`,a.name,a,null),up(e,t,`formEncType`,a.formEncType,a,null),up(e,t,`formMethod`,a.formMethod,a,null),up(e,t,`formTarget`,a.formTarget,a,null)):(up(e,t,`encType`,a.encType,a,null),up(e,t,`method`,a.method,a,null),up(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=B);return;case`onScroll`:r!=null&&Jf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Jf(`scrollend`,e);return;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));o?.__html!==n&&(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=hn(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`credentialless`: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`:Jf(`beforetoggle`,e),Jf(`toggle`,e),Gt(e,`popover`,r);break;case`xlinkActuate`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Gt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Gt(e,n,r);else return}Ut=!0}function dp(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&Jf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Jf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=B);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!It.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[bt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Ut=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Gt(e,n,r)}return}Ut=!0}function fp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Jf(`error`,e),Jf(`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:up(e,t,o,s,n,null)}}a&&up(e,t,`srcSet`,n.srcSet,n,null),r&&up(e,t,`src`,n.src,n,null);return;case`input`:Jf(`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:up(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Jf(`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:up(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in Jf(`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:up(e,t,s,c,n,null)}sn(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:up(e,t,l,r,n,null)}return;case`dialog`:Jf(`beforetoggle`,e),Jf(`toggle`,e),Jf(`cancel`,e),Jf(`close`,e);break;case`iframe`:case`object`:Jf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Gf.length;r++)Jf(Gf[r],e);break;case`image`:Jf(`error`,e),Jf(`load`,e);break;case`details`:Jf(`toggle`,e);break;case`embed`:case`source`:case`link`:Jf(`error`,e),Jf(`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:up(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&dp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&up(e,t,c,r,n,null))}var pp={};function mp(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)||up(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`:m!==f&&(Ut=!0),o=m;break;case`name`:m!==f&&(Ut=!0),a=m;break;case`checked`:m!==f&&(Ut=!0),u=m;break;case`defaultChecked`:m!==f&&(Ut=!0),d=m;break;case`value`:m!==f&&(Ut=!0),s=m;break;case`defaultValue`:m!==f&&(Ut=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&up(e,t,p,m,r,f)}}tn(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)||up(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`:o!==l&&(Ut=!0),p=o;break;case`defaultValue`:o!==l&&(Ut=!0),c=o;break;case`multiple`:o!==l&&(Ut=!0),s=o;default:o!==l&&up(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(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:up(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`:a!==o&&(Ut=!0),p=a;break;case`defaultValue`:a!==o&&(Ut=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&up(e,t,s,a,r,o)}on(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:up(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`:p!==m&&(Ut=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:up(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)&&up(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:up(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&dp(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||dp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&up(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||up(e,t,f,p,r,m)}function hp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function gp(){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&&hp(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&&hp(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 W=null,_p=null;function vp(e){return e.nodeType===9?e:e.ownerDocument}function yp(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 bp(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 xp(e,t,n,r){return n=vp(n).createElement(e),n[yt]=r,n[bt]=t,fp(n,e,t),Nt(n),n}function Sp(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 Cp=null;function wp(){var e=window.event;return e&&e.type===`popstate`?e!==Cp&&(Cp=e,!0):(Cp=null,!1)}var Tp=typeof setTimeout==`function`?setTimeout:void 0,Ep=typeof clearTimeout==`function`?clearTimeout:void 0,Dp=typeof Promise==`function`?Promise:void 0,Op=typeof requestAnimationFrame==`function`?requestAnimationFrame:Tp,kp=typeof queueMicrotask==`function`?queueMicrotask:Dp===void 0?Tp:function(e){return Dp.resolve(null).then(e).catch(G)};function G(e){setTimeout(function(){throw e})}function Ap(e){return e===`head`}function jp(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),Xh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tm(e.ownerDocument.body)}n=i}while(n);Xh(t)}function Mp(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 Np(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Pp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Fp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ip(e){return Fp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Lp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Fp(t,n,e)}function Rp(e){return e.documentElement.clientHeight}function zp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Bp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Rp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=ih(f),u>sh){s.length=o;break}f=new Promise(zp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Vp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Vp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Vp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Vp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Hp(e){return{name:e,group:new Vp(`group`,e),imagePair:new Vp(`image-pair`,e),old:new Vp(`old`,e),new:new Vp(`new`,e)}}function Up(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Up.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Jp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Kp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Wp,e,s,r)}this._eventListeners=a}};function Wp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Up.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Jp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Kp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Gp,e,n,i),r.splice(t,1),a!==null&&a()}};function Gp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Kp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function qp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Jp(e,t,n,r){if(e.length===0)return-1;r=qp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&qp(a.optionsOrUseCapture)===r)return i}return-1}Up.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Kp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Kp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Up.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Yp,e,void 0,void 0)};function Yp(e,t){return e.tag!==6&&(e=v(e),xm(e,t))}Up.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Xp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Yp(t[n],e);n--);};function Xp(e,t){return t.push(e),!1}Up.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=vp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Zp,e,void 0,void 0))};function Zp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Up.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Qp,e,void 0,void 0)};function Qp(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}Up.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,$p,e,void 0,void 0);for(var n=t=0;n<em.length;n++){var r=em[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):em[t++]=r}em.length=t}};function $p(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var em=[],tm=!1;function nm(e,t,n){em.push({fragmentInstance:e,observer:t,instance:n}),tm||(tm=!0,Sm(function(){tm=!1;var e=em;em=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Up.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,rm,e,void 0,void 0),e};function rm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Up.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Up.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Xp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||im(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function im(e,t,n,r,i){var a=kt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(f(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(f(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function am(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Up.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Xp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),am(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),am(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function om(e,t){return e=v(e),sm(e,t),!1}function sm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function cm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Kp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<em.length;i++){var a=em[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(em[r++]=a)}em.length=r,n.observe(e)}),sm(e,t))}function lm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Kp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?nm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function um(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`:um(n),Ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function dm(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[Et])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=_m(e.nextSibling),e===null)break}return null}function fm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_m(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_m(e.nextSibling),e===null))return null;return e}function mm(e){return e.data===`$?`||e.data===`$~`}function hm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gm(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 _m(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 vm=null;function ym(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _m(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bm(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 xm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Sm(e){Op(function(){Op(function(t){return e(t)})})}function Cm(e,t,n){switch(t=vp(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 wm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&up(e,t,r,null,pp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===B&&(e.onclick=null),Ot(e)}function Tm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ot(e)}var Em=new Map,Dm=new Set;function Om(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var km=z.d;z.d={f:Am,r:jm,D:Pm,C:Fm,L:Im,m:Lm,X:zm,S:Rm,M:Bm};function Am(){var e=km.f(),t=Wd();return e||t}function jm(e){var t=At(e);t!==null&&t.tag===5&&t.type===`form`?tc(t):km.r(e)}var Mm=typeof document>`u`?null:document;function Nm(e,t,n){var r=Mm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Dm.has(i)||(Dm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),fp(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function Pm(e){km.D(e),Nm(`dns-prefetch`,e,null)}function Fm(e,t){km.C(e,t),Nm(`preconnect`,e,t)}function Im(e,t,n){km.L(e,t,n);var r=Mm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Hm(e);break;case`script`:a=Km(e)}if(!(Em.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Em.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Um(a))||t===`script`&&r.querySelector(qm(a))))){var o=r.createElement(`link`);fp(o,`link`,e),t===`style`&&(o[Dt]=!0,o.onload=o.onerror=function(){Pt(o)}),Nt(o),r.head.appendChild(o)}}}function Lm(e,t){km.m(e,t);var n=Mm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Km(e)}if(!Em.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Em.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(qm(a)))return}r=n.createElement(`link`),fp(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function Rm(e,t,n){km.S(e,t,n);var r=Mm;if(r&&e){var i=Mt(r).hoistableStyles,a=Hm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Um(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Em.get(a))&&Xm(e,n);var c=o=r.createElement(`link`);Nt(c),fp(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,Ym(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zm(e,t){km.X(e,t);var n=Mm;if(n&&e){var r=Mt(n).hoistableScripts,i=Km(e),a=r.get(i);a||(a=n.querySelector(qm(i)),a||(e=T({src:e,async:!0},t),(t=Em.get(i))&&Zm(e,t),a=n.createElement(`script`),Nt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bm(e,t){km.M(e,t);var n=Mm;if(n&&e){var r=Mt(n).hoistableScripts,i=Km(e),a=r.get(i);a||(a=n.querySelector(qm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Em.get(i))&&Zm(e,t),a=n.createElement(`script`),Nt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vm(e,t,n,r){var a=(a=ye.current)?Om(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`?(n=Hm(n.href),t=Mt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Hm(n.href);var o=Mt(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(Um(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Em.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Em.set(e,o)),Gm(a,e,o,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`?(n=Km(n),t=Mt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hm(e){return`href="`+en(e)+`"`}function Um(e){return`link[rel="stylesheet"][`+e+`]`}function Wm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Gm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Dt]){r.loading=1;return}}else t=e.createElement(`link`),t[Dt]=!0,t.onload=t.onerror=Pt.bind(null,t),fp(t,`link`,n),Nt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Km(e){return`[src="`+en(e)+`"]`}function qm(e){return`script[async]`+e}function Jm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),fp(r,`style`,a),Ym(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Hm(n.href);var o=e.querySelector(Um(a));if(o)return t.state.loading|=4,t.instance=o,Nt(o),o;r=Wm(n),(a=Em.get(a))&&Xm(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),fp(o,`link`,r),t.state.loading|=4,Ym(o,n.precedence,e),t.instance=o;case`script`:return o=Km(n.src),(a=e.querySelector(qm(o)))?(t.instance=a,Nt(a),a):(r=n,(a=Em.get(o))&&(r=T({},n),Zm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),fp(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,Ym(r,n.precedence,e));return t.instance}function Ym(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 Xm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Zm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Qm=null;function $m(e,t,n){if(Qm===null){var r=new Map,i=Qm=new Map;i.set(n,r)}else i=Qm,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[Et]||a[yt]||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 eh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function th(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 nh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function rh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ih(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function ah(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=ih(t),e.suspenseyImages.push(t)),e=dh.bind(e),t.decode().then(e,e))}function oh(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=Hm(r.href),a=t.querySelector(Um(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=uh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=Wm(r),(i=Em.get(i))&&Xm(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),fp(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=uh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var sh=0;function ch(e,t){return e.stylesheets&&e.count===0&&ph(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ph(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&sh===0&&(sh=62500*gp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ph(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>sh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function lh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ph(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function uh(){this.count--,lh(this)}function dh(){this.imgCount--,lh(this)}var fh=null;function ph(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fh=new Map,t.forEach(mh,e),fh=null,uh.call(e))}function mh(e,t){if(!(t.state.loading&4)){var n=fh.get(e);if(n)var r=n.get(null);else{n=new Map,fh.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=uh.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 hh={$$typeof:N,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function gh(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=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function _h(e,t,n,r,i,a,o,s,c,l,u,d){return e=new gh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ki(3,null,null,t),e.current=a,a.stateNode=e,t=ka(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},fo(a),e}function vh(e){return e?(e=Di,e):Di}function yh(e,t,n,r,i,a){i=vh(i),r.context===null?r.context=i:r.pendingContext=i,r=mo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=ho(e,r,t),n!==null&&(zd(n,e,t),go(n,e,t))}function bh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xh(e,t){bh(e,t),(e=e.alternate)&&bh(e,t)}function Sh(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&zd(t,e,67108864),xh(e,67108864)}}function Ch(e){if(e.tag===13||e.tag===31){var t=Id();t=mt(t);var n=wi(e,t);n!==null&&zd(n,e,t),xh(e,t)}}var wh=!0;function Th(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=2,Dh(e,t,n,r)}finally{z.p=a,R.T=i}}function Eh(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=8,Dh(e,t,n,r)}finally{z.p=a,R.T=i}}function Dh(e,t,n,r){if(wh){var i=Oh(r);if(i===null)$f(e,t,r,kh,n),Bh(e,r);else if(Hh(i,e,t,n,r))r.stopPropagation();else if(Bh(e,r),t&4&&-1<zh.indexOf(e)){for(;i!==null;){var a=At(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}Mf(a),!(ed&6)&&(xd=Le()+500,Nf(0,!1))}}break;case 31:case 13:s=wi(a,2),s!==null&&zd(s,a,2),Wd(),xh(a,2)}if(a=Oh(r),a===null&&$f(e,t,r,kh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else $f(e,t,r,null,n)}}function Oh(e){return e=_n(e),Ah(e)}var kh=null;function Ah(e){if(kh=null,e=kt(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 kh=e,null}function jh(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var Mh=!1,Nh=null,Ph=null,Fh=null,Ih=new Map,Lh=new Map,Rh=[],zh=`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 Bh(e,t){switch(e){case`focusin`:case`focusout`:Nh=null;break;case`dragenter`:case`dragleave`:Ph=null;break;case`mouseover`:case`mouseout`:Fh=null;break;case`pointerover`:case`pointerout`:Ih.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Lh.delete(t.pointerId)}}function Vh(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=At(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Hh(e,t,n,r,i){switch(t){case`focusin`:return Nh=Vh(Nh,e,t,n,r,i),!0;case`dragenter`:return Ph=Vh(Ph,e,t,n,r,i),!0;case`mouseover`:return Fh=Vh(Fh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ih.set(a,Vh(Ih.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Lh.set(a,Vh(Lh.get(a)||null,e,t,n,r,i)),!0}return!1}function Uh(e){var t=kt(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,_t(e.priority,function(){Ch(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){Ch(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 Wh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Oh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);gn=r,n.target.dispatchEvent(r),gn=null}else return t=At(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function Gh(e,t,n){Wh(e)&&n.delete(t)}function Kh(){Mh=!1,Nh!==null&&Wh(Nh)&&(Nh=null),Ph!==null&&Wh(Ph)&&(Ph=null),Fh!==null&&Wh(Fh)&&(Fh=null),Ih.forEach(Gh),Lh.forEach(Gh)}function qh(e,n){e.blockedOn===n&&(e.blockedOn=null,Mh||(Mh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Kh)))}var Jh=null;function Yh(e){Jh!==e&&(Jh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Jh===e&&(Jh=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(Ah(r||n)===null)continue;break}var a=At(n);a!==null&&(e.splice(t,3),t-=3,$s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Xh(e){function t(t){return qh(t,e)}Nh!==null&&qh(Nh,e),Ph!==null&&qh(Ph,e),Fh!==null&&qh(Fh,e),Ih.forEach(t),Lh.forEach(t);for(var n=0;n<Rh.length;n++){var r=Rh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Rh.length&&(n=Rh[0],n.blockedOn===null);)Uh(n),n.blockedOn===null&&Rh.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[bt]||null;if(typeof a==`function`)o||Yh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Ah(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Yh(n)}}}function Zh(){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 Qh(e){this._internalRoot=e}$h.prototype.render=Qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;yh(n,Id(),e,t,null,null)},$h.prototype.unmount=Qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yh(e.current,2,null,e,null,null),Wd(),t[xt]=null}};function $h(e){this._internalRoot=e}$h.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rh.length&&t!==0&&t<Rh[n].priority;n++);Rh.splice(n,0,e),n===0&&Uh(e)}};var eg=n.version;if(eg!==`19.3.0`)throw Error(i(527,eg,`19.3.0`));z.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 tg={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:R,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ng=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ng.isDisabled&&ng.supportsFiber)try{Ke=ng.inject(tg),qe=ng}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Sc,s=Cc,c=wc;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=_h(e,1,!1,null,null,n,r,null,o,s,c,Zh),e[xt]=t.current,Zf(e),new Qh(t)}})),ip=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=rp()}))(),ap={info:3600,success:3e3,warning:5e3,error:6e3},op,sp=[],cp=0,lp=new Set;function up(){for(let e of[...lp])e()}function dp(e,t,n){let r=t.trim();if(!r)return;let i=op?.message===r?op:sp.find(e=>e.message===r);if(i){if(n?.action&&!i.action){let e={...i,action:n.action};i===op?op=e:sp=sp.map(t=>t===i?e:t),up()}return}let a={id:++cp,kind:e,message:r,duration:n?.duration??ap[e],...n?.action?{action:n.action}:{}};op?sp=[...sp,a].slice(-3):op=a,up()}function fp(e){op?.id===e&&(op=sp[0],sp=sp.slice(1),up())}var pp=Object.assign((e,t)=>dp(`info`,e,t),{success:(e,t)=>dp(`success`,e,t),error:(e,t)=>dp(`error`,e,t),warning:(e,t)=>dp(`warning`,e,t),info:(e,t)=>dp(`info`,e,t)});function mp(e){return lp.add(e),()=>{lp.delete(e)}}function hp(){return{item:(0,m.useSyncExternalStore)(mp,()=>op,()=>void 0),waiting:(0,m.useSyncExternalStore)(mp,()=>sp.length,()=>0)}}function gp(e){return e instanceof Error?e.message:`That did not work. Try again.`}async function W(e,t,n={}){try{let r=await be(e,t),i=r.notice;return i&&pp(i,n.undo?{action:{label:`Undo`,onClick:n.undo}}:void 0),r}catch(e){pp.error(gp(e));return}}var _p=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function vp(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:_p(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var yp=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},bp=e=>{let t=yp(e);return t.charAt(0).toUpperCase()+t.slice(1)},xp=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Sp={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Cp(e){return e!=null}function wp(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Sp.width,a=e.size??e.height??Sp.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?xp(...c):xp(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Sp[`stroke-width`])*Number(e.size??e.width??Sp.width)/Number(t.size??t.width??Sp.width):t.strokeWidth??Sp[`stroke-width`];return[`svg`,{...Object.entries(Sp).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Cp(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Cp(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Cp(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Tp(e,t={}){return wp(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Ep=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Dp=(0,m.createContext)({}),Op=()=>(0,m.useContext)(Dp),kp=(0,m.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Op()??{},b=!!c||Ep(d),[x,S,C=[]]=Tp(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:xp(y,s),hasA11yProp:b,attributes:d});return(0,m.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,m.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function G(e,t=[],n=[]){let r=typeof e==`string`?vp(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(kp,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=bp(r.name)),i}var Ap={name:`archive-restore`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]};Ap.node;var jp=G(Ap),Mp={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};Mp.node;var Np=G(Mp),Pp={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Pp.node;var Fp=G(Pp),Ip={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Ip.node;var Lp=G(Ip),Rp={name:`arrow-right-to-line`,size:24,node:[[`path`,{d:`M17 12H3`,key:`8awo09`}],[`path`,{d:`m11 18 6-6-6-6`,key:`8c2y43`}],[`path`,{d:`M21 5v14`,key:`nzette`}]]};Rp.node;var zp=G(Rp),Bp={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Bp.node;var Vp=G(Bp),Hp={name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]};Hp.node;var Up=G(Hp),Wp={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};Wp.node;var Gp=G(Wp),Kp={name:`bold`,size:24,node:[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]};Kp.node;var qp=G(Kp),Jp={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Jp.node;var Yp=G(Jp),Xp={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Xp.node;var Zp=G(Xp),Qp={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};Qp.node;var $p=G(Qp),em={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};em.node;var tm=G(em),nm={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};nm.node;var rm=G(nm),im={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};im.node;var am=G(im),om={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};om.node;var sm=G(om),cm={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};cm.node;var lm=G(cm),um={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};um.node;var dm=G(um),fm={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};fm.node;var pm=G(fm),mm={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};mm.node;var hm=G(mm),gm={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};gm.node;var _m=G(gm),vm={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};vm.node;var ym=G(vm),bm={name:`circle-slash`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]};bm.node;var xm=G(bm),Sm={name:`circle-stop`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]],aliases:[`stop-circle`]};Sm.node;var Cm=G(Sm),wm={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};wm.node;var Tm=G(wm),Em={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Em.node;var Dm=G(Em),Om={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Om.node;var km=G(Om),Am={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};Am.node;var jm=G(Am),Mm={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};Mm.node;var Nm=G(Mm),Pm={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};Pm.node;var Fm=G(Pm),Im={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Im.node;var Lm=G(Im),Rm={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Rm.node;var zm=G(Rm),Bm={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Bm.node;var Vm=G(Bm),Hm={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Hm.node;var Um=G(Hm),Wm={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};Wm.node;var Gm=G(Wm),Km={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};Km.node;var qm=G(Km),Jm={name:`file-plus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};Jm.node;var Ym=G(Jm),Xm={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Xm.node;var Zm=G(Xm),Qm={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};Qm.node;var $m=G(Qm),eh={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};eh.node;var th=G(eh),nh={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};nh.node;var rh=G(nh),ih={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};ih.node;var ah=G(ih),oh={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};oh.node;var sh=G(oh),ch={name:`italic`,size:24,node:[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]};ch.node;var lh=G(ch),uh={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};uh.node;var dh=G(uh),fh={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};fh.node;var ph=G(fh),mh={name:`library`,size:24,node:[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]};mh.node;var hh=G(mh),gh={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};gh.node;var _h=G(gh),vh={name:`list-plus`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]};vh.node;var yh=G(vh),bh={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};bh.node;var xh=G(bh),Sh={name:`list`,size:24,node:[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]};Sh.node;var Ch=G(Sh),wh={name:`loader`,size:24,node:[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]};wh.node;var Th=G(wh),Eh={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};Eh.node;var Dh=G(Eh),Oh={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};Oh.node;var kh=G(Oh),Ah={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};Ah.node;var jh=G(Ah),Mh={name:`message-circle-question-mark`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`message-circle-question`]};Mh.node;var Nh=G(Mh),Ph={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};Ph.node;var Fh=G(Ph),Ih={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};Ih.node;var Lh=G(Ih),Rh={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};Rh.node;var zh=G(Rh),Bh={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};Bh.node;var Vh=G(Bh),Hh={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};Hh.node;var Uh=G(Hh),Wh={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};Wh.node;var Gh=G(Wh),Kh={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Kh.node;var qh=G(Kh),Jh={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};Jh.node;var Yh=G(Jh),Xh={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};Xh.node;var Zh=G(Xh),Qh={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Qh.node;var $h=G(Qh),eg={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};eg.node;var tg=G(eg),ng={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]};ng.node;var rg=G(ng),ig={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};ig.node;var ag=G(ig),og={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};og.node;var sg=G(og),cg={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};cg.node;var lg=G(cg),ug={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};ug.node;var dg=G(ug),fg={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};fg.node;var pg=G(fg),mg={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};mg.node;var hg=G(mg),gg={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};gg.node;var _g=G(gg),vg={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};vg.node;var yg=G(vg),bg={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};bg.node;var xg=G(bg),Sg={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Sg.node;var Cg=G(Sg),wg={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};wg.node;var Tg=G(wg),Eg={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Eg.node;var Dg=G(Eg),Og={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Og.node;var kg=G(Og),Ag={name:`square-arrow-out-up-right`,size:24,node:[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]],aliases:[`arrow-up-right-from-square`]};Ag.node;var jg=G(Ag),Mg={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Mg.node;var Ng=G(Mg),Pg={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Pg.node;var Fg=G(Pg),Ig={name:`tags`,size:24,node:[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]};Ig.node;var Lg=G(Ig),Rg={name:`telescope`,size:24,node:[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]};Rg.node;var zg=G(Rg),Bg={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Bg.node;var Vg=G(Bg),Hg={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Hg.node;var Ug=G(Hg),Wg={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};Wg.node;var Gg=G(Wg),Kg={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};Kg.node;var qg=G(Kg),Jg={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};Jg.node;var Yg=G(Jg),Xg={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};Xg.node;var Zg=G(Xg),Qg={name:`wifi-off`,size:24,node:[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Qg.node;var $g=G(Qg),e_={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};e_.node;var t_=G(e_),n_={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};n_.node;var r_=G(n_),i_={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};i_.node;var a_=G(i_);function o_(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=o_(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function s_(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=o_(e))&&(r&&(r+=` `),r+=t);return r}var c_=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},l_=(e,t)=>({classGroupId:e,validator:t}),u_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),d_=`-`,f_=[],p_=`arbitrary..`,m_=e=>{let t=__(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return g_(e);let n=e.split(d_);return h_(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?c_(i,t):t:i||f_}return n[e]||f_}}},h_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=h_(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(d_):e.slice(t).join(d_),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},g_=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?p_+r:void 0})(),__=e=>{let{theme:t,classGroups:n}=e;return v_(n,t)},v_=(e,t)=>{let n=u_();for(let r in e){let i=e[r];y_(i,n,r,t)}return n},y_=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];b_(i,t,n,r)}},b_=(e,t,n,r)=>{if(typeof e==`string`){x_(e,t,n);return}if(typeof e==`function`){S_(e,t,n,r);return}C_(e,t,n,r)},x_=(e,t,n)=>{let r=e===``?t:w_(t,e);r.classGroupId=n},S_=(e,t,n,r)=>{if(T_(e)){y_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(l_(n,e))},C_=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];y_(o,w_(t,a),n,r)}},w_=(e,t)=>{let n=e,r=t.split(d_),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=u_(),n.nextPart.set(t,i)),n=i}return n},T_=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,E_=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},D_=`!`,O_=`:`,k_=[],A_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),j_=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===O_){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(D_)?(c=s.slice(0,-1),l=!0):s.startsWith(D_)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return A_(t,l,c,u)};if(t){let e=t+O_,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):A_(k_,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},M_=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},N_=e=>({cache:E_(e.cacheSize),parseClassName:j_(e),sortModifiers:M_(e),postfixLookupClassGroupIds:P_(e),...m_(e)}),P_=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},F_=/\s+/,I_=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(F_),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+D_:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},L_=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=R_(n))&&(i&&(i+=` `),i+=r);return i},R_=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=R_(e[r]))&&(n&&(n+=` `),n+=t);return n},z_=(e,...t)=>{let n,r,i,a,o=o=>(n=N_(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=I_(e,n);return i(e,a),a};return a=o,(...e)=>a(L_(...e))},B_=[],V_=e=>{let t=t=>t[e]||B_;return t.isThemeGetter=!0,t.themeKey=e,t},H_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,G_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,K_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,q_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,J_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X_=e=>W_.test(e),Z_=e=>!!e&&!Number.isNaN(Number(e)),Q_=e=>!!e&&Number.isInteger(Number(e)),$_=e=>e.endsWith(`%`)&&Z_(e.slice(0,-1)),ev=e=>G_.test(e),tv=()=>!0,nv=e=>K_.test(e)&&!q_.test(e),rv=()=>!1,iv=e=>J_.test(e),av=e=>Y_.test(e),ov=e=>!K(e)&&!q(e),sv=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),cv=e=>Cv(e,Dv,rv),K=e=>H_.test(e),lv=e=>Cv(e,Ov,nv),uv=e=>Cv(e,kv,Z_),dv=e=>Cv(e,jv,tv),fv=e=>Cv(e,Av,rv),pv=e=>Cv(e,Tv,rv),mv=e=>Cv(e,Ev,av),hv=e=>Cv(e,Mv,iv),q=e=>U_.test(e),gv=e=>wv(e,Ov),_v=e=>wv(e,Av),vv=e=>wv(e,Tv),yv=e=>wv(e,Dv),bv=e=>wv(e,Ev),xv=e=>wv(e,Mv,!0),Sv=e=>wv(e,jv,!0),Cv=(e,t,n)=>{let r=H_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wv=(e,t,n=!1)=>{let r=U_.exec(e);return r?r[1]?t(r[1]):n:!1},Tv=e=>e===`position`||e===`percentage`,Ev=e=>e===`image`||e===`url`,Dv=e=>e===`length`||e===`size`||e===`bg-size`,Ov=e=>e===`length`,kv=e=>e===`number`,Av=e=>e===`family-name`,jv=e=>e===`number`||e===`weight`,Mv=e=>e===`shadow`,Nv=z_(()=>{let e=V_(`color`),t=V_(`font`),n=V_(`text`),r=V_(`font-weight`),i=V_(`tracking`),a=V_(`leading`),o=V_(`breakpoint`),s=V_(`container`),c=V_(`spacing`),l=V_(`radius`),u=V_(`shadow`),d=V_(`inset-shadow`),f=V_(`text-shadow`),p=V_(`drop-shadow`),m=V_(`blur`),h=V_(`perspective`),g=V_(`aspect`),_=V_(`ease`),v=V_(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),q,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[q,K,c],T=()=>[X_,`full`,`auto`,...w()],E=()=>[Q_,`none`,`subgrid`,q,K],D=()=>[`auto`,{span:[`full`,Q_,q,K]},Q_,q,K],O=()=>[Q_,`auto`,q,K],k=()=>[`auto`,`min`,`max`,`fr`,q,K],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[X_,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,X_,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[X_,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,q,K],ee=()=>[...b(),vv,pv,{position:[q,K]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,yv,cv,{size:[q,K]}],re=()=>[$_,gv,lv],ie=()=>[``,`none`,`full`,l,q,K],ae=()=>[``,Z_,gv,lv],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],L=()=>[Z_,$_,vv,pv],ce=()=>[``,`none`,m,q,K],le=()=>[`none`,Z_,q,K],ue=()=>[`none`,Z_,q,K],R=()=>[Z_,q,K],z=()=>[X_,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ev],breakpoint:[ev],color:[tv],container:[ev],"drop-shadow":[ev],ease:[`in`,`out`,`in-out`],font:[ov],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ev],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ev],shadow:[ev],spacing:[`px`,Z_],text:[ev],"text-shadow":[ev],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,X_,K,q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,q,K]}],"container-named":[sv],columns:[{columns:[Z_,`auto`,K,q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Q_,`auto`,q,K]}],basis:[{basis:[X_,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z_,X_,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,Z_,q,K]}],shrink:[{shrink:[``,Z_,q,K]}],order:[{order:[Q_,`first`,`last`,`none`,q,K]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,gv,lv]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Sv,dv]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,$_,K]}],"font-family":[{font:[_v,fv,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,q,K]}],"line-clamp":[{"line-clamp":[Z_,`none`,q,uv]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,q,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,q,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z_,`from-font`,`auto`,q,lv]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Z_,`auto`,q,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Q_,q,K]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,q,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,q,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Q_,q,K],radial:[``,q,K],conic:[``,Q_,q,K]},bv,mv]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z_,q,K]}],"outline-w":[{outline:[``,Z_,gv,lv]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,xv,hv]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,xv,hv]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ae()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Z_,lv]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,xv,hv]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Z_,q,K]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z_]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[q,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z_]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,q,K]}],filter:[{filter:[``,`none`,q,K]}],blur:[{blur:ce()}],brightness:[{brightness:[Z_,q,K]}],contrast:[{contrast:[Z_,q,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,xv,hv]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,Z_,q,K]}],"hue-rotate":[{"hue-rotate":[Z_,q,K]}],invert:[{invert:[``,Z_,q,K]}],saturate:[{saturate:[Z_,q,K]}],sepia:[{sepia:[``,Z_,q,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,q,K]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Z_,q,K]}],"backdrop-contrast":[{"backdrop-contrast":[Z_,q,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z_,q,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z_,q,K]}],"backdrop-invert":[{"backdrop-invert":[``,Z_,q,K]}],"backdrop-opacity":[{"backdrop-opacity":[Z_,q,K]}],"backdrop-saturate":[{"backdrop-saturate":[Z_,q,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z_,q,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,q,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z_,`initial`,q,K]}],ease:[{ease:[`linear`,`initial`,_,q,K]}],delay:[{delay:[Z_,q,K]}],animate:[{animate:[`none`,v,q,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,q,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:R()}],"skew-x":[{"skew-x":R()}],"skew-y":[{"skew-y":R()}],transform:[{transform:[q,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":[`translate-none`],zoom:[{zoom:[Q_,q,K]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,q,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,q,K]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[Z_,gv,lv,uv]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function J(...e){return Nv(s_(e))}var Pv=4,Fv=320,Iv=.9;function Lv(e,t){let n=e.scrollTop>Pv,r=e.scrollTop+e.clientHeight<e.scrollHeight-Pv;if(!t)return{up:n,down:r,top:0,right:0};let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return{up:n,down:r,top:i.top-a.top+i.height/2,right:a.right-i.right+8}}function Rv(e,t){return e.up===t.up&&e.down===t.down&&Math.abs(e.top-t.top)<.5&&Math.abs(e.right-t.right)<.5}function zv({target:e,up:t=!0,down:n=!0,className:r}){let i=(0,m.useRef)(null),[a,o]=(0,m.useState)({up:!1,down:!1,top:0,right:0}),s=(0,m.useRef)(null);(0,m.useEffect)(()=>{let t=e.current;if(!t)return;t.setAttribute(`data-scroll-hints`,``);let n=0,r=()=>{n=0;let e=Lv(t,i.current?.offsetParent);o(t=>Rv(t,e)?t:e)},a=()=>{n||=requestAnimationFrame(r)};r(),t.addEventListener(`scroll`,a,{passive:!0}),window.addEventListener(`resize`,a);let s=new ResizeObserver(a);s.observe(t);for(let e of t.children)s.observe(e);let c=new MutationObserver(()=>{for(let e of t.children)s.observe(e);a()});return c.observe(t,{childList:!0,subtree:!0}),()=>{cancelAnimationFrame(n),t.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a),s.disconnect(),c.disconnect(),t.removeAttribute(`data-scroll-hints`)}},[e]),(0,m.useEffect)(()=>()=>c(),[]);function c(){s.current&&=(clearTimeout(s.current.timer),cancelAnimationFrame(s.current.frame),null)}function l(){return window.matchMedia(`(prefers-reduced-motion: no-preference)`).matches?`smooth`:`auto`}function u(t){let n=e.current;n&&n.scrollBy({top:t*Math.max(80,n.clientHeight*.8),behavior:l()})}function d(t){c();let n={timer:0,frame:0,held:!1};n.timer=window.setTimeout(()=>{n.held=!0;let r=performance.now(),i=a=>{e.current?.scrollBy({top:t*(a-r)*Iv}),r=a,n.frame=requestAnimationFrame(i)};n.frame=requestAnimationFrame(i)},Fv),s.current=n}function f(e,t){return(0,U.jsx)(`button`,{type:`button`,tabIndex:-1,"data-shown":t||void 0,"data-direction":e===1?`down`:`up`,title:e===1?`Scroll down · hold to keep going`:`Scroll up · hold to keep going`,onPointerDown:t=>{t.button===0&&(t.preventDefault(),d(e))},onPointerUp:()=>{let t=s.current?.held;c(),t===!1&&u(e)},onPointerLeave:c,onPointerCancel:c,className:`scroll-hint grid size-7 place-items-center rounded-md border bg-card/85 text-muted-foreground shadow-card hover:text-foreground`,children:(0,U.jsx)(e===1?rm:lm,{"aria-hidden":`true`,className:`size-4`})})}let p=t&&a.up,h=n&&a.down;return(0,U.jsxs)(`div`,{ref:i,"aria-hidden":`true`,"data-slot":`scroll-hints`,"data-active":p||h||void 0,style:{top:a.top,right:a.right},className:J(`scroll-hints pointer-events-none absolute z-20 flex -translate-y-1/2 flex-col gap-1.5`,r),children:[t?f(-1,p):null,n?f(1,h):null]})}var Bv=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Vv=s_,Hv=(e,t)=>n=>{if(t?.variants==null)return Vv(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Bv(t)||Bv(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Vv(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Uv=Object.defineProperty,Wv=(e,t)=>Uv(e,`name`,{value:t,configurable:!0});function Gv(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Wv(Gv,`setRef`);function Kv(...e){return t=>{let n=!1,r=e.map(e=>{let r=Gv(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Gv(e[t],null)}}}}Wv(Kv,`composeRefs`);function qv(...e){return m.useCallback(Kv(...e),e)}Wv(qv,`useComposedRefs`);var Jv=Object.defineProperty,Yv=(e,t)=>Jv(e,`name`,{value:t,configurable:!0});function Xv(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];ay(r)&&typeof ly==`function`&&(r=ly(r._payload)),m.Children.forEach(r,e=>{if(ry(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ay(n)&&typeof ly==`function`&&(n=ly(n._payload)),a=ey(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=m.cloneElement(a,void 0,s):!o&&m.Children.count(r)===1&&m.isValidElement(r)&&(a=r);let c=a?ny(a):void 0,l=qv(n,c);if(!a){if(r||r===0)throw Error(o?cy(e):sy(e));return r}let u=ty(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Yv(Xv,`createSlot`);var Zv=Xv(`Slot`),Qv=Symbol.for(`radix.slottable`);function $v(e){let t=Yv(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Qv,t}Yv($v,`createSlottable`);var ey=Yv((e,t)=>{if(`child`in e.props){let t=e.props.child;return m.isValidElement(t)?m.cloneElement(t,void 0,e.props.children(t.props.children)):null}return m.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function ty(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Yv(ty,`mergeProps`);function ny(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Yv(ny,`getElementRef`);function ry(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Qv}Yv(ry,`isSlottable`);var iy=Symbol.for(`react.lazy`);function ay(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===iy&&`_payload`in e&&oy(e._payload)}Yv(ay,`isLazyComponent`);function oy(e){return typeof e==`object`&&!!e&&`then`in e}Yv(oy,`isPromiseLike`);var sy=Yv(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),cy=Yv(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ly=m.use,uy=l(np(),1),dy=Object.defineProperty,fy=(e,t)=>dy(e,`name`,{value:t,configurable:!0}),py=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Xv(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,U.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function my(e,t){e&&uy.flushSync(()=>e.dispatchEvent(t))}fy(my,`dispatchDiscreteCustomEvent`);var hy=Object.defineProperty,gy=(e,t)=>hy(e,`name`,{value:t,configurable:!0}),_y=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),vy=m.forwardRef(gy(function(e,t){return(0,U.jsx)(py.span,{...e,ref:t,style:{..._y,...e.style}})},`VisuallyHidden`)),yy=Object.defineProperty,by=(e,t)=>yy(e,`name`,{value:t,configurable:!0});function xy(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=by(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,U.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=m.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return by(i,`useContext`),[r,i]}by(xy,`createContext`);function Sy(e,t=[]){let n=[];function r(t,r){let i=m.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=by(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=m.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return by(s,`useContext`),[o,s]}by(r,`createContext`);let i=by(()=>{let t=n.map(e=>m.createContext(e));return by(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Cy(i,...t)]}by(Sy,`createContextScope`);function Cy(...e){let t=e[0];if(e.length===1)return t;let n=by(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return by(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}by(Cy,`composeContextScopes`);var wy=Object.defineProperty,Ty=(e,t)=>wy(e,`name`,{value:t,configurable:!0});function Ey(e){let t=e+`CollectionProvider`,[n,r]=Sy(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Ty(e=>{let{scope:t,children:n}=e,r=m.useRef(null),a=m.useRef(new Map).current;return(0,U.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Xv(s),l=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=qv(t,a(s,n).collectionRef);return(0,U.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Xv(u),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),s=qv(t,o),c=a(u,n);return m.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,U.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function h(t){let n=a(e+`CollectionConsumer`,t);return m.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Ty(h,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},h,r]}Ty(Ey,`createCollection`);var Dy=new WeakMap,Oy=class e extends Map{static{Ty(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Dy.set(this,!0)}set(e,t){return Dy.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=jy(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=ky(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=ky(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return ky(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function ky(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Ay(e,t);return n===-1?void 0:e[n]}Ty(ky,`at`);function Ay(e,t){let n=e.length,r=jy(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Ty(Ay,`toSafeIndex`);function jy(e){return e!==e||e===0?0:Math.trunc(e)}Ty(jy,`toSafeInteger`);function My(e){let t=e+`CollectionProvider`,[n,r]=Sy(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Oy,setItemMap:Ty(()=>void 0,`setItemMap`)}),o=Ty(({state:e,...t})=>e?(0,U.jsx)(c,{...t,state:e}):(0,U.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Ty(e=>{let t=g();return(0,U.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Ty(e=>{let{scope:t,children:n,state:r}=e,a=m.useRef(null),[o,s]=m.useState(null),c=qv(a,s),[l,u]=r;return m.useEffect(()=>{if(!o)return;let e=Iy(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,U.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Xv(l),d=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=qv(t,a(l,n).collectionRef);return(0,U.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Xv(f),h=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),[s,c]=m.useState(null),l=qv(t,o,c),{setItemMap:u}=a(f,n),d=m.useRef(i);Ny(d.current,i)||(d.current=i);let h=d.current;return m.useEffect(()=>{let e=h;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Fy):(t.set(s,{...e,element:s}),t.toSorted(Fy)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Oy(e)))}},[s,h,u]),(0,U.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});h.displayName=f;function g(){return m.useState(new Oy)}Ty(g,`useInitCollection`);function _(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Ty(_,`useCollection`),[{Provider:o,Slot:d,ItemSlot:h},{createCollectionScope:r,useCollection:_,useInitCollection:g}]}Ty(My,`createCollection`);function Ny(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Ty(Ny,`shallowEqual`);function Py(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ty(Py,`isElementPreceding`);function Fy(e,t){return!e[1].element||!t[1].element?0:Py(e[1].element,t[1].element)?-1:1}Ty(Fy,`sortByDocumentPosition`);function Iy(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Ty(Iy,`getChildListObserver`);var Ly=Object.defineProperty,Ry=(e,t)=>Ly(e,`name`,{value:t,configurable:!0}),zy=!!(typeof window<`u`&&window.document&&window.document.createElement);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return Ry(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ry(Y,`composeEventHandlers`);function By(e){if(!zy)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ry(By,`getOwnerWindow`);function Vy(e){if(!zy)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ry(Vy,`getOwnerDocument`);function Hy(e,t=!1){let{activeElement:n}=Vy(e);if(!n?.nodeName)return null;if(Uy(n)&&n.contentDocument)return Hy(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Vy(n).getElementById(e);if(t)return t}}return n}Ry(Hy,`getActiveElement`);function Uy(e){return e.tagName===`IFRAME`}Ry(Uy,`isFrame`);var Wy=globalThis?.document?m.useLayoutEffect:()=>{},Gy=Object.defineProperty,Ky=(e,t)=>Gy(e,`name`,{value:t,configurable:!0}),qy=m.useEffectEvent,Jy=m.useInsertionEffect;function Yy(e){if(typeof qy==`function`)return qy(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Jy==`function`?Jy(()=>{t.current=e}):Wy(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ky(Yy,`useEffectEvent`);var Xy=Object.defineProperty,Zy=(e,t)=>Xy(e,`name`,{value:t,configurable:!0}),Qy=m.useInsertionEffect||Wy;function $y({prop:e,defaultProp:t,onChange:n=Zy(()=>{},`onChange`),caller:r}){let[i,a,o]=eb({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=tb(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Zy($y,`useControllableState`);function eb({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return Qy(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Zy(eb,`useUncontrolledState`);function tb(e){return typeof e==`function`}Zy(tb,`isFunction`);var nb=Symbol(`RADIX:SYNC_STATE`);function rb(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Yy(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===nb)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,h=m.useRef(p);m.useEffect(()=>{h.current!==p&&(h.current=p,c||l(p))},[p,h,c]);let g=m.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return m.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:nb,state:i})},[i,d.state,c]),[g,f]}Zy(rb,`useControllableStateReducer`);var ib=Object.defineProperty,ab=(e,t)=>ib(e,`name`,{value:t,configurable:!0});function ob(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}ab(ob,`useStateMachine`);var sb=ab(e=>{let{present:t,children:n}=e,r=cb(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=ub(r.ref,fb(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function cb(e){let[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),a=m.useRef(`none`),o=m.useRef(void 0),[s,c]=ob(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return m.useEffect(()=>{s===`mounted`?(a.current=o.current??db(r.current),o.current=void 0):a.current=`none`},[s]),Wy(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=db(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Wy(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=ab(a=>{let o=db(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=ab(e=>{e.target===t&&(a.current=db(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:m.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=db(t)}else r.current=null;n(e)},[])}}ab(cb,`usePresence`);function lb(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ab(lb,`setRef`);function ub(...e){let t=m.useRef(e);return t.current=e,m.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=lb(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():lb(n[e],null)}}},[])}ab(ub,`useStableComposedRefs`);function db(e){return e?.animationName||`none`}ab(db,`getAnimationName`);function fb(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ab(fb,`getElementRef`);var pb=Object.defineProperty,mb=(e,t)=>pb(e,`name`,{value:t,configurable:!0}),hb=m.useId||(()=>void 0),gb=0;function _b(e){let[t,n]=m.useState(hb());return Wy(()=>{e||n(e=>e??String(gb++))},[e]),e||(t?`radix-${t}`:``)}mb(_b,`useId`);var vb=Object.defineProperty,yb=(e,t)=>vb(e,`name`,{value:t,configurable:!0}),bb=m.createContext(void 0);function xb(e){let t=m.useContext(bb);return e||t||`ltr`}yb(xb,`useDirection`);var Sb=Object.defineProperty,Cb=(e,t)=>Sb(e,`name`,{value:t,configurable:!0});function wb(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}Cb(wb,`useCallbackRef`);var Tb=Object.defineProperty,Eb=(e,t)=>Tb(e,`name`,{value:t,configurable:!0}),Db=`dismissableLayer.update`,Ob=`dismissableLayer.pointerDownOutside`,kb=`dismissableLayer.focusOutside`,Ab,jb=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Mb=m.forwardRef(Eb(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=m.useContext(jb),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=m.useState({}),g=qv(t,f),_=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=d?_.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=m.useRef(!1),w=Fb(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=Ib(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===_.length-1:!1,D=wb(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return m.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ab=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Lb(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Ab))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Lb())},[d,u]),m.useEffect(()=>{let e=Eb(()=>h({}),`handleUpdate`);return document.addEventListener(Db,e),()=>document.removeEventListener(Db,e)},[]),(0,U.jsx)(py.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Nb(){let e=m.useContext(jb),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Eb(Nb,`useDismissableLayerSurface`);var Pb=Eb(()=>!0,`IS_TRUE`);function Fb(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Pb}=t,s=wb(e),c=m.useRef(!1),l=m.useRef(!1),u=m.useRef(new Map),d=m.useRef(()=>{});return m.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Eb(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Eb(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Eb(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Eb(p,`handleInteractionBubble`);let m=Eb(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Rb(Ob,s,p,{discrete:!0})};if(Eb(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Eb(()=>c.current=!0,`onPointerDownCapture`)}}Eb(Fb,`usePointerDownOutside`);function Ib(e,t=globalThis?.document){let n=wb(e),r=m.useRef(!1);return m.useEffect(()=>{let e=Eb(e=>{e.target&&!r.current&&Rb(kb,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Eb(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Eb(()=>r.current=!1,`onBlurCapture`)}}Eb(Ib,`useFocusOutside`);function Lb(){let e=new CustomEvent(Db);document.dispatchEvent(e)}Eb(Lb,`dispatchUpdate`);function Rb(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?my(i,a):i.dispatchEvent(a)}Eb(Rb,`handleAndDispatchCustomEvent`);var zb=Object.defineProperty,Bb=(e,t)=>zb(e,`name`,{value:t,configurable:!0}),Vb=`focusScope.autoFocusOnMount`,Hb=`focusScope.autoFocusOnUnmount`,Ub={bubbles:!1,cancelable:!0},Wb=m.forwardRef(Bb(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=wb(i),u=wb(a),d=m.useRef(null),f=qv(t,c),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Zb(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Zb(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Zb(s)};Bb(e,`handleFocusIn`),Bb(t,`handleFocusOut`),Bb(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),m.useEffect(()=>{if(s){Qb.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Vb,Ub);s.addEventListener(Vb,l),s.dispatchEvent(t),t.defaultPrevented||(Gb(tx(qb(s)),{select:!0}),document.activeElement===e&&Zb(s))}return()=>{s.removeEventListener(Vb,l),setTimeout(()=>{let t=new CustomEvent(Hb,Ub);s.addEventListener(Hb,u),s.dispatchEvent(t),t.defaultPrevented||Zb(e??document.body,{select:!0}),s.removeEventListener(Hb,u),Qb.remove(p)},0)}}},[s,l,u,p]);let h=m.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Kb(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Zb(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Zb(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,U.jsx)(py.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})},`FocusScope`));function Gb(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Zb(r,{select:t}),document.activeElement!==n)return}Bb(Gb,`focusFirst`);function Kb(e){let t=qb(e);return[Jb(t,e),Jb(t.reverse(),e)]}Bb(Kb,`getTabbableEdges`);function qb(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Bb(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Bb(qb,`getTabbableCandidates`);function Jb(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Yb(r,{upTo:t})))return r}Bb(Jb,`findVisible`);function Yb(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Bb(Yb,`isHidden`);function Xb(e){return e instanceof HTMLInputElement&&`select`in e}Bb(Xb,`isSelectableInput`);function Zb(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xb(e)&&t&&e.select()}}Bb(Zb,`focus`);var Qb=$b();function $b(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ex(e,t),e.unshift(t)},remove(t){e=ex(e,t),e[0]?.resume()}}}Bb($b,`createFocusScopesStack`);function ex(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Bb(ex,`arrayRemove`);function tx(e){return e.filter(e=>e.tagName!==`A`)}Bb(tx,`removeLinks`);var nx=Object.defineProperty,rx=m.forwardRef(((e,t)=>nx(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);Wy(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?uy.createPortal((0,U.jsx)(py.div,{...r,ref:t}),o):null},`Portal`)),ix=Object.defineProperty,ax=(e,t)=>ix(e,`name`,{value:t,configurable:!0}),ox=0,sx=null;function cx(e){return lx(),e.children}ax(cx,`FocusGuards`);function lx(){m.useEffect(()=>{sx||={start:ux(),end:ux()};let{start:e,end:t}=sx;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),ox++,()=>{ox===1&&(sx?.start.remove(),sx?.end.remove(),sx=null),ox=Math.max(0,ox-1)}},[])}ax(lx,`useFocusGuards`);function ux(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}ax(ux,`createFocusGuard`);var dx=function(){return dx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dx.apply(this,arguments)};function fx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function px(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var mx=`right-scroll-bar-position`,hx=`width-before-scroll-bar`,gx=`with-scroll-bars-hidden`,_x=`--removed-body-scroll-bar-size`;function vx(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function yx(e,t){var n=(0,m.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var bx=typeof window<`u`?m.useLayoutEffect:m.useEffect,xx=new WeakMap;function Sx(e,t){var n=yx(t||null,function(t){return e.forEach(function(e){return vx(e,t)})});return bx(function(){var t=xx.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||vx(e,null)}),i.forEach(function(e){r.has(e)||vx(e,a)})}xx.set(n,e)},[e]),n}function Cx(e){return e}function wx(e,t){t===void 0&&(t=Cx);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Tx(e){e===void 0&&(e={});var t=wx(null);return t.options=dx({async:!0,ssr:!1},e),t}var Ex=function(e){var t=e.sideCar,n=fx(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return m.createElement(r,dx({},n))};Ex.isSideCarExport=!0;function Dx(e,t){return e.useMedium(t),Ex}var Ox=Tx(),kx=function(){},Ax=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:kx,onWheelCapture:kx,onTouchMoveCapture:kx}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=fx(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Sx([n,t]),w=dx(dx({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:Ox,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),dx(dx({},w),{ref:C})):m.createElement(y,dx({},w,{className:c,ref:C}),s))});Ax.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ax.classNames={fullWidth:hx,zeroRight:mx};var jx=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Mx(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=jx();return t&&e.setAttribute(`nonce`,t),e}function Nx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Px(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Fx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mx())&&(Nx(t,n),Px(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ix=function(){var e=Fx();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Lx=function(){var e=Ix();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Rx={left:0,top:0,right:0,gap:0},zx=function(e){return parseInt(e||``,10)||0},Bx=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[zx(n),zx(r),zx(i)]},Vx=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Rx;var t=Bx(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hx=Lx(),Ux=`data-scroll-locked`,Wx=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
19
19
|
.${gx} {
|
|
20
20
|
overflow: hidden ${r};
|
|
21
21
|
padding-right: ${s}px ${r};
|
|
@@ -94,21 +94,21 @@ Error generating stack: `+e.message+`
|
|
|
94
94
|
…
|
|
95
95
|
}
|
|
96
96
|
.dark { … }`,className:`max-h-56 font-mono text-xs md:text-xs`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 max-md:flex-wrap`,children:[(0,U.jsx)(`input`,{ref:l,type:`file`,accept:`.css,.json,text/css,application/json`,hidden:!0,tabIndex:-1,"aria-label":`Upload a theme file`,onChange:e=>{d(e.target.files?.[0]),e.target.value=``}}),(0,U.jsx)(oj,{label:`Save and apply the pasted theme`,text:`Save theme`,icon:tm,tone:`primary`,disabled:!t.trim()||s,onClick:()=>void u(t,`Custom theme`)}),(0,U.jsx)(oj,{label:`Upload a .css or .json theme file`,text:`Upload file`,icon:qg,disabled:s,onClick:()=>l.current?.click()}),a?(0,U.jsx)(`p`,{role:`alert`,className:`ml-2 min-w-0 text-xs text-destructive max-md:ml-0 max-md:basis-full`,children:a}):null]})]})}function Vq(){let{theme:e,setTheme:t}=eq(),n=RG();return(0,U.jsx)(pH,{prominent:!0,title:fq.appearance,children:(0,U.jsxs)(WK,{children:[(0,U.jsx)(UK,{label:`Prompt sounds`,help:`A droplet for each new actionable prompt or delivery review. Kept in this browser; sound starts after interaction. Desktop notifications remain separate.`,children:(0,U.jsx)(lK,{checked:!n,onCheckedChange:e=>IG(!e),"aria-label":`Prompt sounds`})}),(0,U.jsx)(UK,{label:Nq.themeLabel,help:Nq.appearanceHelp,children:(0,U.jsx)(GK,{value:e,items:Nq.themeItems.map(e=>({value:e.id,label:e.label})),label:Nq.themeLabel,onChange:e=>t(e)})}),(0,U.jsx)(UK,{label:`Colour theme`,help:`The page's colours, the same in every pi session.`,stacked:!0,children:(0,U.jsx)(Lq,{})}),(0,U.jsx)(UK,{label:`Typeface`,help:`The face for the page's text, kept in this browser.`,stacked:!0,children:(0,U.jsx)(tq,{kind:`font`})}),(0,U.jsx)(UK,{label:`Code typeface`,help:`The face for code, paths and commands.`,stacked:!0,children:(0,U.jsx)(tq,{kind:`mono`})}),(0,U.jsx)(UK,{label:`Saved themes`,help:`Themes you imported, kept with pi for every session and project.`,stacked:!0,children:(0,U.jsx)(zq,{})}),(0,U.jsx)(UK,{label:`Import a theme`,stacked:!0,children:(0,U.jsx)(Bq,{})})]})})}var Hq={master:[`master`],designer:[`agents`,`designer`],backend:[`agents`,`backend`],qa:[`agents`,`qa`],scout:[`scout`],researcher:[`researcher`],quickfix:[`quickFix`],planner:[`planner`]},Uq=[...pq,...mq.map(e=>({id:`panel:${e.id}`,label:e.label,help:hq}))];function Wq(e,t){switch(t){case`master`:return e.master;case`scout`:return{model:e.scout.model,thinking:`low`,timeoutMs:e.scout.timeoutMs,mcpTools:e.scout.mcpTools,...e.scout.autoCompact===!1?{autoCompact:!1}:{}};case`researcher`:return e.researcher;case`quickfix`:return e.quickFix;case`planner`:return e.planner;default:return e.agents[t]}}function Gq(e,t){return Hq[e].reduceRight((e,t)=>({[t]:e}),t)}function Kq(e,t){return e.find(e=>e.id===t)?.thinkingLevels??dq}function qq(e,t){return dq[uK(dq,e,Math.max(0,dq.indexOf(t)))]??t}var Jq=e=>e>0?`${e} round${e===1?``:`s`}`:`unlimited`,Yq=e=>e>0?`over ${e} steps`:`never`;function Xq(e){let[t,n]=(0,m.useState)(!1),[r,i]=(0,m.useState)(``),a=e.models.some(t=>t.id===e.value),o=[...e.inherit?[{value:iq,label:aq,help:oq}]:[],...e.none?[{value:iq,label:`none`,help:`Use the primary model`}]:[],...!e.inherit&&!e.none&&e.value===`inherit`?[{value:iq,label:aq,help:oq}]:[],...e.models.map(e=>({value:e.id,label:e.id,...e.label&&e.label!==e.id?{help:e.label}:{}})),...!a&&e.value!==`inherit`?[{value:e.value,label:e.value,help:lq}]:[],{value:sq,label:cq,help:lq}],s=t=>{if(t!==`__custom__`)return e.onChange(t);i(a?``:e.value),n(!0)},c=()=>{let t=r.trim();n(!1),t&&t!==e.value&&e.onChange(t)};return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(GK,{value:e.value,items:o,label:e.label,onChange:s}),t?(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[(0,U.jsx)(cK,{autoFocus:!0,value:r,placeholder:`provider/model`,"aria-label":`Model id`,className:`min-w-0 flex-1 max-md:h-11 max-md:min-h-11`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),(0,U.jsx)(oj,{label:`Use this model`,icon:tm,tone:`primary`,onClick:c})]}):null]})}function Zq({label:e,help:t,checked:n,onChange:r,name:i}){return(0,U.jsxs)(`div`,{className:`flex min-h-0 items-center justify-between gap-4 max-md:min-h-11 max-md:items-start`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`break-words text-[0.8125rem] font-medium`,children:e}),t?(0,U.jsx)(`p`,{className:`break-words text-xs text-muted-foreground`,children:t}):null]}),(0,U.jsx)(lK,{checked:n,onCheckedChange:r,"aria-label":i??e})]})}function Qq({value:e,onSave:t,placeholder:n,label:r}){let[i,a]=(0,m.useState)(e);(0,m.useEffect)(()=>a(e),[e]);let o=()=>{let n=i.trim();n!==e&&t(n)};return(0,U.jsx)(cK,{value:i,placeholder:n,"aria-label":r,className:`max-md:h-11 max-md:min-h-11`,onChange:e=>a(e.target.value),onBlur:o,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())}})}function $q({value:e,label:t,onSave:n}){let r=Math.round(e/6e4);return(0,U.jsx)(tJ,{label:t,value:String(r),min:1,suffix:`min`,onSave:e=>{let t=Number(e);return!Number.isFinite(t)||t<=0?(pp.error(`"${e}" is not a positive number of minutes.`),!1):(n(Math.round(t*6e4)),!0)}})}function eJ({value:e,onSave:t}){return(0,U.jsx)(tJ,{label:Sq,value:String(e),min:0,max:65535,onSave:e=>!/^\d+$/.test(e)||Number(e)>65535?(pp.error(`"${e}" is not a port (0, or 1-65535).`),!1):(t(Number(e)),!0)})}function tJ({label:e,value:t,min:n,max:r,suffix:i,onSave:a}){let[o,s]=(0,m.useState)(t);(0,m.useEffect)(()=>s(t),[t]);let c=()=>{o!==t&&(a(o.trim())||s(t))};return(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(cK,{type:`number`,inputMode:`numeric`,min:n,max:r,value:o,"aria-label":e,className:J(i?`pr-10`:void 0,`max-md:h-11 max-md:min-h-11`),onChange:e=>s(e.target.value),onBlur:c,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),i?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-0 right-2.5 flex items-center text-xs text-muted-foreground`,children:i}):null]})}function nJ({value:e,label:t,onSave:n}){let[r,i]=(0,m.useState)(e);return(0,m.useEffect)(()=>i(e),[e]),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsx)(Dj,{rows:2,value:r,"aria-label":t,onChange:e=>i(e.target.value),onBlur:()=>{r.trim()!==e&&n(r.trim())}}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Saved when you leave the field.`})]})}function rJ({kind:e,config:t,models:n,save:r}){let i=Wq(t,e),a=t=>r(Gq(e,t)),o=rq[e],s=Kq(n,i.model),c=t=>{let r={model:t};e!==`scout`&&!Kq(n,t).includes(i.thinking)&&(r.thinking=qq(Kq(n,t),i.thinking)),a(r)},l=e!==`scout`&&e!==`researcher`,[u,d]=(0,m.useState)(!1),f=iJ(i,e);return(0,U.jsxs)(`section`,{"data-slot":`agent-row`,className:`glass flex min-w-0 flex-col gap-2.5 rounded-xl border px-3.5 pt-2.5 pb-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,U.jsxs)(`h3`,{className:`flex min-w-0 items-center gap-2 break-words text-sm font-semibold`,children:[(0,U.jsx)(XU,{source:e,className:`size-4 shrink-0 text-muted-foreground`}),o]}),(0,U.jsx)(oJ,{open:u,custom:f,onToggle:()=>d(e=>!e)})]}),(0,U.jsx)(Xq,{value:i.model,models:n,label:`${o} model`,inherit:e===`master`,onChange:c}),e===`scout`?(0,U.jsx)(aJ,{}):(0,U.jsx)(EK,{value:i.thinking,levels:dq,supported:s,recommended:uq[e],model:i.model===`inherit`?`the session model`:i.model,label:`${o} effort`,onChange:e=>a({thinking:e})}),(0,U.jsx)(Zq,{label:`Auto-compact`,help:e===`master`?`Compacts the oracle's context as it fills, and files what it learned into the knowledge base, shared with the agents it concerns.`:`Compacts this agent's context as it fills.`,checked:i.autoCompact!==!1,onChange:e=>a({autoCompact:e}),name:`${o} auto-compact`}),(0,U.jsxs)(`div`,{hidden:!u,className:`grid gap-2 border-t border-border pt-2`,children:[e===`master`?null:(0,U.jsx)(UK,{label:`Time limit`,help:`Minutes before this agent's run stops.`,children:(0,U.jsx)($q,{value:i.timeoutMs??t.workflow.agentTimeoutMs,label:`${o} time limit`,onSave:e=>a({timeoutMs:e})})}),l?(0,U.jsx)(nJ,{value:i.instructions??``,label:`${o} instructions`,onSave:e=>a({instructions:e})}):null,(0,U.jsx)(nJ,{value:(i.mcpTools??[]).join(`
|
|
97
|
-
`),label:`${o} MCP tool grants (one exact tool name per line)`,onSave:e=>a({mcpTools:e.split(/\s+/).filter(Boolean)})}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Grant exact names such as mcp__github__get_issue. Children inherit these grants; read-only agents also require read-only tools.`})]})]})}function iJ(e,t){let n=t!==`scout`&&t!==`researcher`&&!!e.instructions;return[e.timeoutMs!==void 0,n,(e.mcpTools??[]).length>0].filter(Boolean).length}function aJ(){return(0,U.jsxs)(`p`,{className:`flex min-h-[4.5rem] items-center gap-2 text-sm text-muted-foreground`,children:[(0,U.jsx)($p,{"aria-hidden":`true`,className:`size-4`}),`Effort `,(0,U.jsx)(`span`,{className:`capitalize`,children:`low`}),` (fixed for scouts)`]})}function oJ({open:e,custom:t,onToggle:n}){return(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":e,onClick:n,className:`-mr-1.5 flex min-h-8 shrink-0 items-center gap-1 rounded-md px-1.5 text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11`,children:[(0,U.jsx)(sm,{"aria-hidden":`true`,className:J(`size-3.5 transition-transform duration-200 ease-snap`,e&&`rotate-90`)}),`More`,t>0?(0,U.jsxs)(`span`,{className:`text-primary`,children:[`· `,t,` customised`]}):null]})}function sJ(e,t){return t.startsWith(`panel:`)?e.lobby.panels[t.slice(6)]:e.lobby[t]}function cJ({config:e,item:t,save:n}){let r=t.id.startsWith(`panel:`);return(0,U.jsx)(Zq,{label:t.label,help:t.help,checked:sJ(e,t.id),onChange:e=>{n(r?{lobby:{panels:{[t.id.slice(6)]:e}}}:{lobby:{[t.id]:e}})}})}function lJ({config:e,save:t}){let n=e.workflow.gitIsolation;return(0,U.jsx)(pH,{prominent:!0,title:fq.workflow,children:(0,U.jsx)(WK,{children:(0,U.jsx)(UK,{label:Dq,help:Eq.find(e=>e.id===n)?.help??`enter cycles off, branch, worktree`,children:(0,U.jsx)(GK,{value:n,items:Eq.map(e=>({value:e.id,label:e.label})),label:Dq,onChange:e=>void t({workflow:{gitIsolation:e}})})})})})}var uJ=e=>e?`${e}/`:kq.top;function dJ(e){return e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean)}function fJ({replaced:e}){let t=IA(`settings.linters`,{},[]),n=t.data?.linters;return(0,U.jsx)(UK,{label:kq.found,help:e?kq.foundReplaced:kq.foundHelp,children:n?n.length===0?(0,U.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:kq.foundNone}):(0,U.jsx)(`ul`,{"aria-label":kq.found,className:J(`flex flex-col gap-1.5 md:items-end`,e&&`opacity-60`),children:n.map(e=>(0,U.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-2 text-sm`,children:[(0,U.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:e.tool}),(0,U.jsx)(`span`,{className:`min-w-0 break-words text-xs text-muted-foreground`,children:uJ(e.folder)}),(0,U.jsxs)(`span`,{title:e.installed?void 0:kq.missingHelp,className:J(`inline-flex shrink-0 items-center gap-1 text-xs`,e.installed?`text-success`:`text-warning`),children:[e.installed?(0,U.jsx)(hm,{"aria-hidden":`true`,className:`size-3.5`}):(0,U.jsx)(pm,{"aria-hidden":`true`,className:`size-3.5`}),e.installed?kq.installed:kq.missing]})]},`${e.tool}:${e.folder}`))}):(0,U.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:t.error?t.error:`Looking…`})})}function pJ({config:e,save:t}){let n=e.lint,r=n.mode===`off`,i=n.command.trim().length>0;return(0,U.jsxs)(pH,{prominent:!0,title:fq.lint,children:[(0,U.jsx)(`p`,{className:`max-w-3xl text-sm text-muted-foreground`,children:kq.intro}),(0,U.jsxs)(WK,{children:[(0,U.jsx)(UK,{label:kq.mode,help:Oq.find(e=>e.id===n.mode)?.help,children:(0,U.jsx)(GK,{value:n.mode,items:Oq.map(e=>({value:e.id,label:e.label})),label:kq.mode,onChange:e=>void t({lint:{mode:e}})})}),(0,U.jsxs)(`div`,{className:J(`flex flex-col divide-y divide-border [&>*]:py-3 [&>*:first-child]:pt-0 [&>*:last-child]:pb-0`,r&&`opacity-60`),"aria-disabled":r||void 0,children:[(0,U.jsx)(UK,{label:kq.command,help:kq.commandHelp,children:(0,U.jsx)(Qq,{value:n.command,label:kq.command,placeholder:kq.commandPlaceholder,onSave:e=>void t({lint:{command:e}})})}),i?(0,U.jsx)(UK,{label:kq.extensions,help:kq.extensionsHelp,children:(0,U.jsx)(Qq,{value:n.extensions.join(` `),label:kq.extensions,placeholder:kq.extensionsPlaceholder,onSave:e=>void t({lint:{extensions:dJ(e)}})})}):null,(0,U.jsx)(UK,{label:kq.timeout,help:kq.timeoutHelp,children:(0,U.jsx)($q,{value:n.timeoutMs,label:`Lint ${kq.timeout.toLowerCase()}`,onSave:e=>void t({lint:{timeoutMs:e}})})}),(0,U.jsx)(fJ,{replaced:i})]})]})]})}function mJ({config:e,save:t}){let n=e.lobby.web;return(0,U.jsx)(pH,{prominent:!0,title:fq.lobby,children:(0,U.jsxs)(WK,{children:[Uq.map(n=>(0,U.jsx)(cJ,{config:e,item:n,save:t},n.id)),(0,U.jsx)(UK,{label:gq,help:_q,children:(0,U.jsx)(GK,{value:String(e.lobby.maxPlanningRounds),items:vq.map(e=>({value:String(e),label:Jq(e)})),label:gq,onChange:e=>void t({lobby:{maxPlanningRounds:Number(e)}})})}),(0,U.jsx)(UK,{label:yq,help:bq,children:(0,U.jsx)(GK,{value:String(e.lobby.splitPlanAbove),items:xq.map(e=>({value:String(e),label:Yq(e)})),label:yq,onChange:e=>void t({lobby:{splitPlanAbove:Number(e)}})})}),(0,U.jsx)(UK,{label:Sq,help:Cq,children:(0,U.jsx)(eJ,{value:n.port,onSave:e=>void t({lobby:{web:{port:e}}})})}),(0,U.jsx)(Zq,{label:wq,help:Tq,checked:n.openBrowser,onChange:e=>void t({lobby:{web:{openBrowser:e}}})})]})})}function hJ({value:e,models:t,classifiers:n,onChange:r}){let[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(``),c=new Set([...n.map(e=>e.id),...t.map(e=>e.id)]),l=[{value:``,label:Mq.engineJev,help:Mq.engineJevHelp},...n.map(e=>({value:e.id,label:e.id,help:`${Mq.engineClassifier}${e.label===e.id?``:` · ${e.label}`}`})),...t.map(e=>({value:e.id,label:e.id,help:`${Mq.engineChat}${e.label&&e.label!==e.id?` · ${e.label}`:``}`})),...e&&!c.has(e)?[{value:e,label:e,help:lq}]:[],{value:sq,label:cq,help:lq}],u=t=>{if(t!==`__custom__`)return r(t);s(c.has(e)?``:e),a(!0)},d=()=>{let t=o.trim();a(!1),t!==e&&r(t)};return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(GK,{value:e,items:l,label:Mq.engine,onChange:u}),i?(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[(0,U.jsx)(cK,{autoFocus:!0,value:o,placeholder:`provider/model`,"aria-label":`Classifier model id`,className:`min-w-0 flex-1 max-md:h-11 max-md:min-h-11`,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())}}),(0,U.jsx)(oj,{label:`Use this model`,icon:tm,tone:`primary`,onClick:d})]}):null]})}function gJ({config:e,models:t,classifiers:n,save:r}){let i=e.classifier,a=Aq.find(e=>e.id===i.provider)?.label,o=!i.engine;return(0,U.jsx)(pH,{prominent:!0,title:fq.classifier,children:(0,U.jsxs)(WK,{children:[(0,U.jsx)(Zq,{label:Mq.enabled,help:Mq.enabledHelp,checked:i.enabled,onChange:e=>void r({classifier:{enabled:e}})}),(0,U.jsx)(UK,{label:Mq.engine,help:Mq.engineHelp,children:(0,U.jsx)(hJ,{value:i.engine,models:t,classifiers:n,onChange:e=>void r({classifier:{engine:e}})})}),o?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(UK,{label:Mq.host,children:(0,U.jsx)(GK,{value:i.provider,items:Aq.map(e=>({value:e.id,label:e.label})),label:Mq.host,onChange:e=>void r({classifier:{provider:e}})})}),(0,U.jsx)(UK,{label:Mq.model,help:Mq.modelHelp,children:(0,U.jsx)(Qq,{value:i.model,label:Mq.model,placeholder:`the host's default`,onSave:e=>void r({classifier:{model:e}})})}),(0,U.jsx)(UK,{label:Mq.key,help:Mq.keyNote,children:(0,U.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:a??i.provider})})]}):null,jq.map(e=>(0,U.jsx)(Zq,{label:e.label,help:e.help,checked:i.features[e.id],onChange:t=>void r({classifier:{features:{[e.id]:t}}})},e.id)),(0,U.jsx)(UK,{label:Mq.cheap,help:Mq.cheapHelp,children:(0,U.jsx)(Xq,{value:i.effort.cheapModel,models:t,label:Mq.cheap,none:!0,onChange:e=>void r({classifier:{effort:{cheapModel:e}}})})})]})})}function _J(){let e=YG(),t=async e=>{if(!e)return ZG();let t=await XG();t===`granted`?pp.success(Nq.notificationsOn):pp.error(t===`unsupported`?Nq.notificationsUnsupported:Nq.notificationsBlocked)};return(0,U.jsx)(pH,{prominent:!0,title:fq.notifications,children:(0,U.jsx)(WK,{children:(0,U.jsx)(Zq,{label:Nq.notificationsLabel,help:Nq.notificationsHelp,checked:e,onChange:e=>void t(e)})})})}function vJ(){let{available:e,install:t}=y(),n=b(),r=x();return(0,U.jsx)(pH,{prominent:!0,title:fq.install,children:(0,U.jsxs)(WK,{children:[(0,U.jsx)(UK,{label:Nq.installLabel,help:n?Nq.installedNow:Nq.installHelp,children:n?null:(0,U.jsx)(`div`,{className:`flex md:justify-end`,children:(0,U.jsx)(oj,{label:Nq.installButton,icon:zm,tone:`primary`,onClick:()=>e?void t().then(()=>pp.success(Nq.installDone)):pp.warning(Nq.installUnavailable)})})}),r.supported?(0,U.jsx)(UK,{label:Nq.fullscreenLabel,help:Nq.fullscreenHelp,children:(0,U.jsx)(`div`,{className:`flex md:justify-end`,children:(0,U.jsx)(oj,{label:r.on?Nq.fullscreenOn:Nq.fullscreenOff,icon:r.on?Uh:kh,pressed:r.on,onClick:()=>void r.toggle()})})}):null]})})}var yJ=[`Agents`,`Workflow`,`Lobby`,`Classifier`,`Appearance & notifications`],bJ=e=>`settings-${e.split(` `)[0]}`;function xJ({config:e,models:t,classifierModels:n=[],onConfig:r}){let[i,a]=(0,m.useState)(`Agents`),o=(0,m.useRef)(Promise.resolve()),s=e=>{let t=async()=>{try{return r((await be(`settings.set`,{patch:e})).config),pp.success(Nq.saved),!0}catch(e){return pp.error(e instanceof Error?e.message:`That did not work. Try again.`),!1}},n=o.current.then(t,t);return o.current=n,n};return(0,U.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 px-4 pt-4 pb-dock md:px-6 md:pt-6`,children:[(0,U.jsxs)(`header`,{className:`flex flex-wrap items-end justify-between gap-x-6 gap-y-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:Nq.title}),(0,U.jsx)(`p`,{className:`max-w-xl text-xs text-muted-foreground`,children:Nq.intro})]}),(0,U.jsx)(`nav`,{"aria-label":`Settings sections`,className:`min-w-0 max-w-full`,children:(0,U.jsx)(lj,{as:`nav`,label:`Settings sections`,items:yJ.map(e=>({id:e,label:e,controls:bJ(e)})),value:i,onChange:a})})]}),(0,U.jsxs)(`div`,{id:bJ(`Agents`),hidden:i!==`Agents`,"aria-hidden":i!==`Agents`,children:[(0,U.jsx)(`h2`,{className:`sr-only`,children:fq.agents}),(0,U.jsx)(`div`,{className:`grid grid-cols-1 items-start gap-3 md:grid-cols-2 lg:grid-cols-3`,children:nq.map(n=>(0,U.jsx)(rJ,{kind:n,config:e,models:t,save:s},n))})]}),(0,U.jsx)(`div`,{id:bJ(`Workflow`),hidden:i!==`Workflow`,"aria-hidden":i!==`Workflow`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(lJ,{config:e,save:s}),(0,U.jsx)(pJ,{config:e,save:s})]})}),(0,U.jsx)(`div`,{id:bJ(`Lobby`),hidden:i!==`Lobby`,"aria-hidden":i!==`Lobby`,children:(0,U.jsx)(mJ,{config:e,save:s})}),(0,U.jsx)(`div`,{id:bJ(`Classifier`),hidden:i!==`Classifier`,"aria-hidden":i!==`Classifier`,children:(0,U.jsx)(gJ,{config:e,models:t,classifiers:n,save:s})}),(0,U.jsx)(`div`,{id:bJ(`Appearance & notifications`),hidden:i!==`Appearance & notifications`,"aria-hidden":i!==`Appearance & notifications`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(Vq,{}),(0,U.jsx)(_J,{}),(0,U.jsx)(vJ,{})]})})]})}function SJ(){return(0,U.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 px-5 pt-5 pb-dock md:px-8 md:pt-8`,role:`status`,"aria-label":Nq.loading,children:[0,1,2,3].map(e=>(0,U.jsx)(yj,{shape:`card`,className:`h-48`},e))})}function CJ(){let e=IA(`settings.get`,{},[`status`]),[t,n]=(0,m.useState)(),r=(0,m.useRef)(0),i=(0,m.useCallback)(e=>{r.current=performance.now(),n(e)},[]);return(0,m.useEffect)(()=>{e.data&&e.requestedAt>r.current&&n(e.data.config)},[e.data,e.requestedAt]),!t&&e.error?(0,U.jsx)(PA,{message:`${Nq.loadFailed} ${e.error}`,onRetry:e.reload}):t?(0,U.jsx)(xJ,{config:t,models:e.data?.models??[],classifierModels:e.data?.classifierModels??[],onConfig:i}):(0,U.jsx)(SJ,{})}function wJ(){let e=globalThis.DOMParser;if(!e)throw Error(`DOMParser is unavailable`);return new e}var TJ=`default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src 'none'; font-src 'none'; connect-src 'none'; media-src 'none'; frame-src 'none'; object-src 'none'; form-action 'none'; base-uri 'none'`,EJ=new Set(`div span p br hr h1 h2 h3 h4 h5 h6 section article header footer main aside nav ul ol li dl dt dd strong em b i u s small sub sup blockquote pre code table thead tbody tfoot tr th td caption colgroup col figure figcaption style button input label select option optgroup textarea details summary fieldset legend progress meter output kbd mark`.split(` `)),DJ=new Set(`class id title role aria-label aria-hidden aria-expanded aria-selected aria-checked aria-pressed aria-current colspan rowspan scope type name value placeholder for checked selected disabled readonly open min max step rows cols tabindex`.split(` `)),OJ=new Set(`text search email tel url number password checkbox radio range color date time month week button reset submit`.split(` `)),kJ=`button,input,select,textarea,summary,label,[role=button],[role=tab]{transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease,opacity .18s ease}button,summary,label,select,[role=button],[role=tab],input[type=checkbox],input[type=radio],input[type=range]{cursor:pointer}button:active,[role=button]:active{transform:scale(.97)}details[open]>:not(summary){animation:mockup-in .22s ease-out}@keyframes mockup-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}`;function AJ(e){if(!e||typeof e!=`object`)return;let t=e;if(!(typeof t.html!=`string`||t.html.length>1e5)&&!(t.css!==void 0&&(typeof t.css!=`string`||t.css.length>5e4)))return{html:t.html,...typeof t.css==`string`?{css:t.css}:{}}}function jJ(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,``);return/\\|@import|url\s*\(|image-set\s*\(|expression\s*\(|behavior\s*:|-moz-binding/i.test(t)?``:t.replace(/<\/?style/gi,``)}function MJ(e){if(!EJ.has(e.localName)||e.namespaceURI!==`http://www.w3.org/1999/xhtml`){e.remove();return}for(let t of[...e.attributes])t.name===`style`?e.setAttribute(`style`,jJ(t.value)):DJ.has(t.name)||e.removeAttribute(t.name);if(e.localName===`input`){let t=[...e.attributes].find(e=>e.name===`type`)?.value.toLowerCase();t!==void 0&&!OJ.has(t)&&e.setAttribute(`type`,`text`)}e.localName===`style`&&(e.textContent=jJ(e.textContent??``));for(let t of[...e.children])MJ(t)}function NJ(e,t){try{return PJ(e,t??wJ())}catch{return`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${TJ}"><meta name="referrer" content="no-referrer"></head><body><p role="status">Static mockup unavailable. The preview could not be safely rendered.</p></body></html>`}}function PJ(e,t){let n=t.parseFromString(e.html,`text/html`);for(let e of[...n.head.children,...n.body.children])MJ(e);let r=[...n.head.querySelectorAll(`style`)].map(e=>e.outerHTML).join(``);return`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${TJ}"><meta name="referrer" content="no-referrer"><style>body{margin:16px;overflow-wrap:anywhere}*{box-sizing:border-box}${kJ}${jJ(e.css??``).replace(/</g,`\\3c `)}</style>${r}</head><body>${n.body.innerHTML}</body></html>`}function FJ({preview:e,label:t,className:n,frameWidth:r,minWidth:i,onOpen:a}){let o=(0,m.useMemo)(()=>NJ(e),[e]),s=(0,m.useRef)(null),[c,l]=(0,m.useState)();if((0,m.useLayoutEffect)(()=>{let e=s.current;if(!r&&!i||!e)return;let t=()=>l({width:e.clientWidth,height:e.clientHeight});if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,i]),!r&&!i)return(0,U.jsx)(`iframe`,{title:`Static mockup: ${t}`,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:o,className:J(`h-80 w-full rounded-lg border bg-background`,n)});let u=r??Math.max(c?.width??0,i??0),d=c&&c.width>0&&u>0?Math.min(1,c.width/u):1;return(0,U.jsxs)(`div`,{ref:s,className:J(`group/mock relative h-80 w-full max-w-full overflow-hidden rounded-lg border bg-background max-md:min-h-0 max-md:max-h-full max-md:overflow-x-hidden max-md:overflow-y-auto max-md:overscroll-contain`,n),children:[(0,U.jsx)(`iframe`,{title:`Static mockup: ${t}`,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:o,className:`absolute top-0 left-0 origin-top-left border-0`,style:{width:u||`100%`,height:c?c.height/d:`100%`,transform:`scale(${d})`}}),a?(0,U.jsx)(`button`,{type:`button`,"data-compact":``,onClick:a,"aria-label":`Expand the mockup: ${t}`,className:`group/open absolute right-2 bottom-2 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring max-md:right-3 max-md:bottom-3`,children:(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-border bg-card/90 px-1.5 py-0.5 text-[0.6875rem] font-medium text-muted-foreground opacity-60 shadow-sm backdrop-blur-sm transition-opacity group-hover/mock:opacity-100 group-focus-visible/open:opacity-100 max-md:min-h-11 max-md:px-3`,children:[(0,U.jsx)(Dh,{"aria-hidden":`true`,className:`size-3`}),`Expand`]})}):null]})}var IJ=/\s*\(recommended\)\s*$/i,LJ=1024,RJ=`(max-width: 767.98px)`,zJ=`max-md:hidden`,BJ=e=>e.replace(IJ,``);function VJ(e){return!!(e&&(e.htmlPreview||e.image||e.preview))}function HJ({option:e}){let t=BJ(e.label);return VJ(e)?(0,U.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[e.htmlPreview?(0,U.jsx)(FJ,{preview:e.htmlPreview,label:t,minWidth:LJ,className:`h-auto min-h-[18rem] flex-1`}):null,e.image?(0,U.jsx)(`img`,{src:R(e.image),alt:`Mockup: ${t}`,className:`min-h-0 w-full flex-1 rounded-lg border bg-background object-contain`}):null,e.preview?(0,U.jsx)(uH,{text:e.preview,className:J(`overflow-auto rounded-lg border bg-background p-4 text-sm`,!e.htmlPreview&&!e.image&&`flex-1`)}):null]}):(0,U.jsx)(`p`,{className:`grid h-full place-items-center p-6 text-sm text-muted-foreground`,children:`No mockup for this option.`})}function UJ({options:e,start:t,title:n,picked:r=[],multi:i=!1,onChoose:a,onClose:o,onIndex:s}){let c=Of(),l=Sk(RJ),{keyboardOpen:u,keyboardInset:d}=eA(),f=(0,m.useRef)(null),p=(0,m.useRef)(null),[h,g]=(0,m.useState)(()=>Math.min(Math.max(0,t),e.length-1)),_=e[h],v=e.length-1;(0,m.useEffect)(()=>s?.(h),[h,s]),(0,m.useLayoutEffect)(()=>{let e=f.current;e&&(e.scrollLeft=h*e.clientWidth),p.current?.focus()},[]);let y=(0,m.useCallback)(e=>{let t=Math.min(Math.max(0,e),v),n=f.current;g(t),n?.scrollTo({left:t*n.clientWidth,behavior:c?`auto`:`smooth`})},[v,c]);(0,m.useEffect)(()=>{let e=f.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{e.scrollLeft=h*e.clientWidth});return t.observe(e),()=>t.disconnect()},[h]);function b(){let e=f.current;if(!e||e.clientWidth===0)return;let t=Math.round(e.scrollLeft/e.clientWidth);t!==h&&t>=0&&t<=v&&g(t)}function x(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=t.target;if(n.closest(`input, textarea, [contenteditable='true']`))return;let r={ArrowLeft:-1,ArrowRight:1,PageUp:-1,PageDown:1}[t.key];if(r){t.preventDefault(),y(h+r);return}if(t.key===`Home`||t.key===`End`){t.preventDefault(),y(t.key===`Home`?0:v);return}let i=Number(t.key);if(Number.isInteger(i)&&i>=1&&i<=e.length){t.preventDefault(),y(i-1);return}t.key===`Enter`&&a&&!(n instanceof HTMLButtonElement)&&(t.preventDefault(),a(h))}let S=r.includes(h),C=l&&u?{height:`calc(100vh - ${d}px - 1.5rem)`,maxHeight:`calc(100vh - ${d}px - 1.5rem)`}:void 0;return(0,U.jsxs)(`div`,{ref:p,tabIndex:-1,"data-autofocus":``,onKeyDown:x,style:C,className:`mockup-viewer flex h-full min-h-0 flex-col outline-none max-md:h-[calc(100svh-1.5rem)] max-md:max-h-[calc(100svh-1.5rem)]`,role:`region`,"aria-label":`Mockups: ${n}`,"aria-roledescription":`carousel`,children:[(0,U.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Back to the question`,title:l?`Back to the question`:`Back · Esc`,onClick:()=>o(h),className:`max-md:size-11`,children:(0,U.jsx)(Vh,{"aria-hidden":`true`})}),(0,U.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium`,children:n}),(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,"aria-live":`polite`,children:[h+1,` of `,e.length]}),(0,U.jsx)(`div`,{role:`tablist`,"aria-label":`Options`,className:`flex w-full flex-wrap gap-1.5 sm:w-auto`,children:e.map((e,t)=>(0,U.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===h,"aria-controls":`mockup-slide-${t}`,"data-compact":``,onClick:()=>y(t),className:J(`inline-flex h-7 max-w-48 items-center gap-1 rounded-lg border px-2.5 text-xs font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:h-11 max-md:min-w-11`,t===h?`border-primary/50 bg-accent text-foreground`:`border-border text-muted-foreground hover:bg-muted hover:text-foreground`),children:[(0,U.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:t+1}),(0,U.jsx)(`span`,{className:`truncate`,children:BJ(e.label)}),r.includes(t)?(0,U.jsx)(tm,{"aria-label":`picked`,className:`size-3 text-primary`}):null]},t))})]}),(0,U.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,U.jsx)(`div`,{ref:f,onScroll:b,className:`mockup-track flex h-full snap-x snap-mandatory overflow-x-auto overflow-y-hidden overscroll-x-contain`,children:e.map((t,n)=>(0,U.jsxs)(`section`,{id:`mockup-slide-${n}`,role:`tabpanel`,"aria-roledescription":`slide`,"aria-label":`${n+1} of ${e.length}: ${BJ(t.label)}`,"aria-hidden":n!==h,className:`flex h-full w-full shrink-0 snap-center snap-always flex-col gap-2 overflow-y-hidden px-4 py-4 sm:px-14 max-md:overflow-y-auto max-md:overscroll-contain`,children:[(0,U.jsxs)(`div`,{className:`flex items-baseline gap-2 text-sm`,children:[(0,U.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[n+1,`.`]}),(0,U.jsx)(`span`,{className:`font-medium`,children:BJ(t.label)}),IJ.test(t.label)?(0,U.jsx)(`span`,{className:`text-xs font-medium text-primary`,children:`Recommended`}):null,r.includes(n)?(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-primary`,children:[(0,U.jsx)(tm,{"aria-hidden":`true`,className:`size-3`}),`picked`]}):null]}),t.description?(0,U.jsx)(uH,{text:t.description,className:`text-sm text-muted-foreground`}):null,(0,U.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,U.jsx)(HJ,{option:t})})]},n))}),h>0?(0,U.jsx)(X,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Previous option`,title:l?`Previous option`:`Previous · ←`,onClick:()=>y(h-1),className:`absolute top-1/2 left-2 -translate-y-1/2 rounded-full max-md:hidden max-md:size-11`,children:(0,U.jsx)(am,{"aria-hidden":`true`})}):null,h<v?(0,U.jsx)(X,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Next option`,title:l?`Next option`:`Next · →`,onClick:()=>y(h+1),className:`absolute top-1/2 right-2 -translate-y-1/2 rounded-full max-md:hidden max-md:size-11`,children:(0,U.jsx)(sm,{"aria-hidden":`true`})}):null]}),(0,U.jsxs)(`footer`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2 border-t border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`←→`,className:zJ,children:`option`}),a?(0,U.jsx)(vk,{chord:`Enter`,className:zJ,children:i?S?`unpick`:`pick`:`choose`}):null,(0,U.jsx)(vk,{chord:`Esc`,className:zJ,children:`back`})]}),a&&_?(0,U.jsxs)(X,{type:`button`,onClick:()=>a(h),className:`max-w-full max-md:min-h-11 max-md:min-w-11`,children:[i&&S?`Unpick`:i?`Pick`:`Choose`,(0,U.jsx)(`span`,{className:`truncate`,children:BJ(_.label)})]}):null]})]})}function WJ(e,t,n){e.nativeEvent.isComposing||(e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n()),e.key===`Enter`&&e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),t()))}function GJ({text:e,disabled:t=!1,onSave:n,onCancel:r}){let[i,a]=(0,m.useState)(e),[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(``),u=(0,m.useRef)(null);(0,m.useEffect)(()=>{u.current?.focus({preventScroll:!0}),u.current?.select()},[]);let d=async()=>{if(!(t||o||!i.trim())){s(!0),l(``);try{await n(i.trim()),r()}catch(e){l(e instanceof Error?e.message:String(e)),s(!1)}}};return(0,U.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,onKeyDown:e=>WJ(e,()=>void d(),()=>{o||r()}),children:[(0,U.jsxs)(`label`,{className:`text-sm`,children:[`Edit message`,(0,U.jsx)(Dj,{ref:u,value:i,onChange:e=>a(e.target.value),disabled:o,className:`mt-2 max-h-[40vh] min-h-24 max-md:min-h-28`})]}),c?(0,U.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Could not save. `,c]}):null,(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(X,{size:`sm`,className:`max-md:min-h-11`,onClick:()=>void d(),disabled:t||o||!i.trim(),children:o?`Saving…`:`Save`}),(0,U.jsx)(X,{size:`sm`,variant:`ghost`,className:`max-md:min-h-11`,disabled:o,onClick:r,children:`Cancel`})]})]})}var KJ=1200;function qJ({question:e}){let[t,n]=(0,m.useState)(),r=uA(t!==void 0,lA.sheet),i=e.options.flatMap((e,t)=>e.mockup?[{option:e,index:t,mockup:e.mockup}]:[]);if(i.length===0)return null;let a=e.options.map(e=>({label:e.label,description:e.description,...e.mockup?{htmlPreview:e.mockup}:{}}));return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`ul`,{"aria-label":`Mockups`,className:`grid grid-cols-2 gap-2 md:grid-cols-3`,children:i.map(({option:e,index:t,mockup:r})=>(0,U.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,U.jsx)(FJ,{preview:r,label:BJ(e.label),frameWidth:KJ,onOpen:()=>n(t),className:`aspect-[3/2] h-auto`}),(0,U.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[(0,U.jsxs)(`span`,{className:`tabular-nums`,children:[t+1,`.`]}),` `,BJ(e.label)]})]},t))}),(0,U.jsx)(nA,{open:t!==void 0&&r,onOpenChange:e=>{e||n(void 0)},label:`Mockups: ${e.text}`,className:`h-[min(92svh,60rem)] max-h-[min(92svh,60rem)] max-w-6xl`,children:t===void 0?null:(0,U.jsx)(UJ,{options:a,start:t,title:e.text,onClose:()=>n(void 0)})})]})}function JJ({questions:e}){return(0,U.jsx)(`ol`,{className:`mt-1 flex flex-col gap-2`,children:e.map((e,t)=>(0,U.jsxs)(`li`,{className:`card-flat flex min-w-0 flex-col gap-2 rounded-xl border p-3 text-sm`,style:{"--orb":tW(e.from)},children:[(0,U.jsxs)(`p`,{className:`flex items-start gap-2`,children:[(0,U.jsxs)(`span`,{className:`mt-px inline-flex shrink-0 items-center gap-1 rounded-full bg-[color-mix(in_oklab,var(--orb)_12%,transparent)] px-2 py-0.5 text-xs font-medium text-[color-mix(in_oklab,var(--orb)_85%,var(--foreground))]`,children:[(0,U.jsx)(XU,{source:e.from,className:`size-3`}),QU(e.from)]}),(0,U.jsxs)(`span`,{className:`min-w-0`,children:[(0,U.jsxs)(`span`,{className:`sr-only`,children:[`Question `,t+1,`: `]}),e.text]})]}),e.options.length?(0,U.jsx)(`ul`,{"aria-label":`Options`,className:`flex flex-wrap gap-1.5`,children:e.options.map(e=>(0,U.jsxs)(`li`,{className:`rounded-lg border border-border bg-muted/60 px-2 py-1 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),e.description?` — ${e.description}`:``]},e.label))}):null,(0,U.jsx)(qJ,{question:e})]},t))})}function YJ({message:e}){let t=e.decided??[];return t.length?(0,U.jsx)(`ul`,{"aria-label":`Settled for you`,className:`mt-1 flex flex-col gap-1`,children:t.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 text-sm`,title:`Settled by the classifier, ${Math.round(e.probability*100)}% sure. Comment on the plan to overrule it.`,children:[(0,U.jsx)(tm,{"aria-hidden":`true`,className:`mt-[0.1875rem] size-3.5 shrink-0 text-success`}),(0,U.jsxs)(`span`,{className:`min-w-0`,children:[(0,U.jsx)(`span`,{className:J(`font-medium`,$U(e.from)),children:QU(e.from)}),` `,(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:e.question}),` `,(0,U.jsx)(`span`,{className:`font-medium`,children:e.answer}),(0,U.jsxs)(`span`,{className:`decided-hint`,children:[`auto · `,Math.round(e.probability*100),`% · comment to overrule`]})]})]},t))}):null}function XJ({message:e,index:t,busy:n,readOnly:r}){let[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(),c=o&&(o.editedAt??0)>(e.editedAt??0)?o:e,l=n||c!==e,u=async n=>{let r=await be(`planner.editMessage`,{messageIndex:t,at:e.at,text:n});s(r.message)},d=!r&&!e.settled?.length&&!i?(0,U.jsxs)(`button`,{type:`button`,disabled:l,onClick:()=>a(!0),className:`chat-action`,children:[(0,U.jsx)(ag,{"aria-hidden":`true`,className:`size-3`}),`Edit`]}):null;return(0,U.jsx)(oW,{time:e.at>0?kj(e.at):void 0,head:!0,note:c.editedAt?`(edited)`:void 0,actions:d,children:i?(0,U.jsx)(GJ,{text:c.text,disabled:n,onSave:u,onCancel:()=>a(!1)}):(0,U.jsx)(uH,{text:c.text})})}function ZJ({message:e,index:t,busy:n,readOnly:r}){if(e.role===`you`)return(0,U.jsx)(XJ,{message:e,index:t,busy:n,readOnly:r});let i=e.questions??[];return(0,U.jsxs)(aW,{source:`PLANNER`,name:`Panel`,time:e.at>0?kj(e.at):void 0,head:!0,bubble:i.length===0,aside:i.length?`${i.length} question${i.length===1?``:`s`}`:void 0,children:[i.length>0?(0,U.jsx)(JJ,{questions:i}):(0,U.jsx)(uH,{text:e.text}),(0,U.jsx)(YJ,{message:e})]})}function QJ({messages:e,seed:t,busy:n=!1,readOnly:r=!1}){return(0,U.jsxs)(`div`,{className:`chat-column`,role:`log`,"aria-label":`Panel conversation`,children:[t?(0,U.jsx)(sW,{children:t}):null,e.map((e,t)=>(0,U.jsx)(ZJ,{message:e,index:t,busy:n,readOnly:r},`${e.at}-${t}`)),n?(0,U.jsx)(aW,{source:`PLANNER`,name:`Panel`,head:!0,live:!0,aside:`the panel is thinking`,children:(0,U.jsx)(cW,{className:`mt-1`})}):null]})}function $J({className:e,...t}){return(0,U.jsx)(VC,{"aria-keyshortcuts":`Space`,"aria-description":`When focused, press Space to toggle.`,"data-slot":`checkbox`,className:J(`peer relative flex size-[1.125rem] shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background bg-clip-padding text-primary-foreground shadow-control transition-[background-color,border-color,box-shadow] duration-150 outline-none before:absolute before:-inset-3 before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-64 data-[state=checked]:shadow-none dark:bg-input/32 data-[state=checked]:border-primary data-[state=checked]:bg-primary`,e),...t,children:(0,U.jsx)(UC,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center`,children:(0,U.jsx)(tm,{"aria-hidden":`true`,className:`size-3`,strokeWidth:3})})})}var eY=`ORACLE`,tY=`No draft yet.`,nY=`The draft appears after the panel's first round.`,rY=`What each seat needs`,iY=[`backend`,`designer`,`qa`,`researcher`],aY={backend:`DEV`,designer:`DESIGN`,qa:`QA`,researcher:`RESEARCH`},oY=`Describe a task in the box below. The panel asks what it needs to know, round by round, until the plan is clear.`,sY={ORACLE:`Chairs the panel, and settles the last round alone.`,DEV:`Code, data and the APIs it touches.`,DESIGN:`Screens, flows and the words on them.`,QA:`Tests, edge cases and what could break.`,RESEARCH:`Prior art, docs and sources.`},cY=[{title:`Describe it`,text:`Say what you want in the box below.`},{title:`The panel asks`,text:`Each seat asks what it needs to know.`},{title:`A draft forms`,text:`Answer, comment on lines, go another round.`},{title:`Save the plan`,text:`Keep it, or start it as a task.`}];function lY(e){let t=e.filter(e=>e.member);return`${t.filter(e=>e.seated).length} of ${t.length} seated`}function uY(e,t=0){return t<=0?`round ${e}`:e>t?`round ${e} · past the limit, revising`:e===t?`final round ${e}/${t}`:`round ${e}/${t}`}function dY(e,t){return`${e} ${t}${e===1?``:`s`}`}function fY(e){return e.round===0&&e.messages.length===0&&!e.busy}function pY(e){let t=e.members.find(e=>e.status===`failed`);if(t)return(t.error??`${aY[t.member]} failed`).split(`
|
|
97
|
+
`),label:`${o} MCP tool grants (one exact tool name per line)`,onSave:e=>a({mcpTools:e.split(/\s+/).filter(Boolean)})}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Grant exact names such as mcp__github__get_issue. Children inherit these grants; read-only agents also require read-only tools.`})]})]})}function iJ(e,t){let n=t!==`scout`&&t!==`researcher`&&!!e.instructions;return[e.timeoutMs!==void 0,n,(e.mcpTools??[]).length>0].filter(Boolean).length}function aJ(){return(0,U.jsxs)(`p`,{className:`flex min-h-[4.5rem] items-center gap-2 text-sm text-muted-foreground`,children:[(0,U.jsx)($p,{"aria-hidden":`true`,className:`size-4`}),`Effort `,(0,U.jsx)(`span`,{className:`capitalize`,children:`low`}),` (fixed for scouts)`]})}function oJ({open:e,custom:t,onToggle:n}){return(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":e,onClick:n,className:`-mr-1.5 flex min-h-8 shrink-0 items-center gap-1 rounded-md px-1.5 text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11`,children:[(0,U.jsx)(sm,{"aria-hidden":`true`,className:J(`size-3.5 transition-transform duration-200 ease-snap`,e&&`rotate-90`)}),`More`,t>0?(0,U.jsxs)(`span`,{className:`text-primary`,children:[`· `,t,` customised`]}):null]})}function sJ(e,t){return t.startsWith(`panel:`)?e.lobby.panels[t.slice(6)]:e.lobby[t]}function cJ({config:e,item:t,save:n}){let r=t.id.startsWith(`panel:`);return(0,U.jsx)(Zq,{label:t.label,help:t.help,checked:sJ(e,t.id),onChange:e=>{n(r?{lobby:{panels:{[t.id.slice(6)]:e}}}:{lobby:{[t.id]:e}})}})}function lJ({config:e,save:t}){let n=e.workflow.gitIsolation;return(0,U.jsx)(pH,{prominent:!0,title:fq.workflow,children:(0,U.jsx)(WK,{children:(0,U.jsx)(UK,{label:Dq,help:Eq.find(e=>e.id===n)?.help??`enter cycles off, branch, worktree`,children:(0,U.jsx)(GK,{value:n,items:Eq.map(e=>({value:e.id,label:e.label})),label:Dq,onChange:e=>void t({workflow:{gitIsolation:e}})})})})})}var uJ=e=>e?`${e}/`:kq.top;function dJ(e){return e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean)}function fJ({replaced:e}){let t=IA(`settings.linters`,{},[]),n=t.data?.linters;return(0,U.jsx)(UK,{label:kq.found,help:e?kq.foundReplaced:kq.foundHelp,children:n?n.length===0?(0,U.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:kq.foundNone}):(0,U.jsx)(`ul`,{"aria-label":kq.found,className:J(`flex flex-col gap-1.5 md:items-end`,e&&`opacity-60`),children:n.map(e=>(0,U.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-2 text-sm`,children:[(0,U.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:e.tool}),(0,U.jsx)(`span`,{className:`min-w-0 break-words text-xs text-muted-foreground`,children:uJ(e.folder)}),(0,U.jsxs)(`span`,{title:e.installed?void 0:kq.missingHelp,className:J(`inline-flex shrink-0 items-center gap-1 text-xs`,e.installed?`text-success`:`text-warning`),children:[e.installed?(0,U.jsx)(hm,{"aria-hidden":`true`,className:`size-3.5`}):(0,U.jsx)(pm,{"aria-hidden":`true`,className:`size-3.5`}),e.installed?kq.installed:kq.missing]})]},`${e.tool}:${e.folder}`))}):(0,U.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:t.error?t.error:`Looking…`})})}function pJ({config:e,save:t}){let n=e.lint,r=n.mode===`off`,i=n.command.trim().length>0;return(0,U.jsxs)(pH,{prominent:!0,title:fq.lint,children:[(0,U.jsx)(`p`,{className:`max-w-3xl text-sm text-muted-foreground`,children:kq.intro}),(0,U.jsxs)(WK,{children:[(0,U.jsx)(UK,{label:kq.mode,help:Oq.find(e=>e.id===n.mode)?.help,children:(0,U.jsx)(GK,{value:n.mode,items:Oq.map(e=>({value:e.id,label:e.label})),label:kq.mode,onChange:e=>void t({lint:{mode:e}})})}),(0,U.jsxs)(`div`,{className:J(`flex flex-col divide-y divide-border [&>*]:py-3 [&>*:first-child]:pt-0 [&>*:last-child]:pb-0`,r&&`opacity-60`),"aria-disabled":r||void 0,children:[(0,U.jsx)(UK,{label:kq.command,help:kq.commandHelp,children:(0,U.jsx)(Qq,{value:n.command,label:kq.command,placeholder:kq.commandPlaceholder,onSave:e=>void t({lint:{command:e}})})}),i?(0,U.jsx)(UK,{label:kq.extensions,help:kq.extensionsHelp,children:(0,U.jsx)(Qq,{value:n.extensions.join(` `),label:kq.extensions,placeholder:kq.extensionsPlaceholder,onSave:e=>void t({lint:{extensions:dJ(e)}})})}):null,(0,U.jsx)(UK,{label:kq.timeout,help:kq.timeoutHelp,children:(0,U.jsx)($q,{value:n.timeoutMs,label:`Lint ${kq.timeout.toLowerCase()}`,onSave:e=>void t({lint:{timeoutMs:e}})})}),(0,U.jsx)(fJ,{replaced:i})]})]})]})}function mJ({config:e,save:t}){let n=e.lobby.web;return(0,U.jsx)(pH,{prominent:!0,title:fq.lobby,children:(0,U.jsxs)(WK,{children:[Uq.map(n=>(0,U.jsx)(cJ,{config:e,item:n,save:t},n.id)),(0,U.jsx)(UK,{label:gq,help:_q,children:(0,U.jsx)(GK,{value:String(e.lobby.maxPlanningRounds),items:vq.map(e=>({value:String(e),label:Jq(e)})),label:gq,onChange:e=>void t({lobby:{maxPlanningRounds:Number(e)}})})}),(0,U.jsx)(UK,{label:yq,help:bq,children:(0,U.jsx)(GK,{value:String(e.lobby.splitPlanAbove),items:xq.map(e=>({value:String(e),label:Yq(e)})),label:yq,onChange:e=>void t({lobby:{splitPlanAbove:Number(e)}})})}),(0,U.jsx)(UK,{label:Sq,help:Cq,children:(0,U.jsx)(eJ,{value:n.port,onSave:e=>void t({lobby:{web:{port:e}}})})}),(0,U.jsx)(Zq,{label:wq,help:Tq,checked:n.openBrowser,onChange:e=>void t({lobby:{web:{openBrowser:e}}})})]})})}function hJ({value:e,models:t,classifiers:n,onChange:r}){let[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(``),c=new Set([...n.map(e=>e.id),...t.map(e=>e.id)]),l=[{value:``,label:Mq.engineJev,help:Mq.engineJevHelp},...n.map(e=>({value:e.id,label:e.id,help:`${Mq.engineClassifier}${e.label===e.id?``:` · ${e.label}`}`})),...t.map(e=>({value:e.id,label:e.id,help:`${Mq.engineChat}${e.label&&e.label!==e.id?` · ${e.label}`:``}`})),...e&&!c.has(e)?[{value:e,label:e,help:lq}]:[],{value:sq,label:cq,help:lq}],u=t=>{if(t!==`__custom__`)return r(t);s(c.has(e)?``:e),a(!0)},d=()=>{let t=o.trim();a(!1),t!==e&&r(t)};return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(GK,{value:e,items:l,label:Mq.engine,onChange:u}),i?(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[(0,U.jsx)(cK,{autoFocus:!0,value:o,placeholder:`provider/model`,"aria-label":`Classifier model id`,className:`min-w-0 flex-1 max-md:h-11 max-md:min-h-11`,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())}}),(0,U.jsx)(oj,{label:`Use this model`,icon:tm,tone:`primary`,onClick:d})]}):null]})}function gJ({config:e,models:t,classifiers:n,save:r}){let i=e.classifier,a=Aq.find(e=>e.id===i.provider)?.label,o=!i.engine;return(0,U.jsx)(pH,{prominent:!0,title:fq.classifier,children:(0,U.jsxs)(WK,{children:[(0,U.jsx)(Zq,{label:Mq.enabled,help:Mq.enabledHelp,checked:i.enabled,onChange:e=>void r({classifier:{enabled:e}})}),(0,U.jsx)(UK,{label:Mq.engine,help:Mq.engineHelp,children:(0,U.jsx)(hJ,{value:i.engine,models:t,classifiers:n,onChange:e=>void r({classifier:{engine:e}})})}),o?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(UK,{label:Mq.host,children:(0,U.jsx)(GK,{value:i.provider,items:Aq.map(e=>({value:e.id,label:e.label})),label:Mq.host,onChange:e=>void r({classifier:{provider:e}})})}),(0,U.jsx)(UK,{label:Mq.model,help:Mq.modelHelp,children:(0,U.jsx)(Qq,{value:i.model,label:Mq.model,placeholder:`the host's default`,onSave:e=>void r({classifier:{model:e}})})}),(0,U.jsx)(UK,{label:Mq.key,help:Mq.keyNote,children:(0,U.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:a??i.provider})})]}):null,jq.map(e=>(0,U.jsx)(Zq,{label:e.label,help:e.help,checked:i.features[e.id],onChange:t=>void r({classifier:{features:{[e.id]:t}}})},e.id)),(0,U.jsx)(UK,{label:Mq.cheap,help:Mq.cheapHelp,children:(0,U.jsx)(Xq,{value:i.effort.cheapModel,models:t,label:Mq.cheap,none:!0,onChange:e=>void r({classifier:{effort:{cheapModel:e}}})})})]})})}function _J(){let e=YG(),t=async e=>{if(!e)return ZG();let t=await XG();t===`granted`?pp.success(Nq.notificationsOn):pp.error(t===`unsupported`?Nq.notificationsUnsupported:Nq.notificationsBlocked)};return(0,U.jsx)(pH,{prominent:!0,title:fq.notifications,children:(0,U.jsx)(WK,{children:(0,U.jsx)(Zq,{label:Nq.notificationsLabel,help:Nq.notificationsHelp,checked:e,onChange:e=>void t(e)})})})}function vJ(){let{available:e,install:t}=y(),n=b(),r=x();return(0,U.jsx)(pH,{prominent:!0,title:fq.install,children:(0,U.jsxs)(WK,{children:[(0,U.jsx)(UK,{label:Nq.installLabel,help:n?Nq.installedNow:Nq.installHelp,children:n?null:(0,U.jsx)(`div`,{className:`flex md:justify-end`,children:(0,U.jsx)(oj,{label:Nq.installButton,icon:zm,tone:`primary`,onClick:()=>e?void t().then(()=>pp.success(Nq.installDone)):pp.warning(Nq.installUnavailable)})})}),r.supported?(0,U.jsx)(UK,{label:Nq.fullscreenLabel,help:Nq.fullscreenHelp,children:(0,U.jsx)(`div`,{className:`flex md:justify-end`,children:(0,U.jsx)(oj,{label:r.on?Nq.fullscreenOn:Nq.fullscreenOff,icon:r.on?Uh:kh,pressed:r.on,onClick:()=>void r.toggle()})})}):null]})})}var yJ=[`Agents`,`Workflow`,`Lobby`,`Classifier`,`Appearance & notifications`],bJ=e=>`settings-${e.split(` `)[0]}`;function xJ({config:e,models:t,classifierModels:n=[],onConfig:r}){let[i,a]=(0,m.useState)(`Agents`),o=(0,m.useRef)(Promise.resolve()),s=e=>{let t=async()=>{try{return r((await be(`settings.set`,{patch:e})).config),pp.success(Nq.saved),!0}catch(e){return pp.error(e instanceof Error?e.message:`That did not work. Try again.`),!1}},n=o.current.then(t,t);return o.current=n,n};return(0,U.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 px-4 pt-4 pb-dock md:px-6 md:pt-6`,children:[(0,U.jsxs)(`header`,{className:`flex flex-wrap items-end justify-between gap-x-6 gap-y-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:Nq.title}),(0,U.jsx)(`p`,{className:`max-w-xl text-xs text-muted-foreground`,children:Nq.intro})]}),(0,U.jsx)(`nav`,{"aria-label":`Settings sections`,className:`min-w-0 max-w-full`,children:(0,U.jsx)(lj,{as:`nav`,label:`Settings sections`,items:yJ.map(e=>({id:e,label:e,controls:bJ(e)})),value:i,onChange:a})})]}),(0,U.jsxs)(`div`,{id:bJ(`Agents`),hidden:i!==`Agents`,"aria-hidden":i!==`Agents`,children:[(0,U.jsx)(`h2`,{className:`sr-only`,children:fq.agents}),(0,U.jsx)(`div`,{className:`grid grid-cols-1 items-start gap-3 md:grid-cols-2 lg:grid-cols-3`,children:nq.map(n=>(0,U.jsx)(rJ,{kind:n,config:e,models:t,save:s},n))})]}),(0,U.jsx)(`div`,{id:bJ(`Workflow`),hidden:i!==`Workflow`,"aria-hidden":i!==`Workflow`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(lJ,{config:e,save:s}),(0,U.jsx)(pJ,{config:e,save:s})]})}),(0,U.jsx)(`div`,{id:bJ(`Lobby`),hidden:i!==`Lobby`,"aria-hidden":i!==`Lobby`,children:(0,U.jsx)(mJ,{config:e,save:s})}),(0,U.jsx)(`div`,{id:bJ(`Classifier`),hidden:i!==`Classifier`,"aria-hidden":i!==`Classifier`,children:(0,U.jsx)(gJ,{config:e,models:t,classifiers:n,save:s})}),(0,U.jsx)(`div`,{id:bJ(`Appearance & notifications`),hidden:i!==`Appearance & notifications`,"aria-hidden":i!==`Appearance & notifications`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(Vq,{}),(0,U.jsx)(_J,{}),(0,U.jsx)(vJ,{})]})})]})}function SJ(){return(0,U.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 px-5 pt-5 pb-dock md:px-8 md:pt-8`,role:`status`,"aria-label":Nq.loading,children:[0,1,2,3].map(e=>(0,U.jsx)(yj,{shape:`card`,className:`h-48`},e))})}function CJ(){let e=IA(`settings.get`,{},[`status`]),[t,n]=(0,m.useState)(),r=(0,m.useRef)(0),i=(0,m.useCallback)(e=>{r.current=performance.now(),n(e)},[]);return(0,m.useEffect)(()=>{e.data&&e.requestedAt>r.current&&n(e.data.config)},[e.data,e.requestedAt]),!t&&e.error?(0,U.jsx)(PA,{message:`${Nq.loadFailed} ${e.error}`,onRetry:e.reload}):t?(0,U.jsx)(xJ,{config:t,models:e.data?.models??[],classifierModels:e.data?.classifierModels??[],onConfig:i}):(0,U.jsx)(SJ,{})}function wJ(){let e=globalThis.DOMParser;if(!e)throw Error(`DOMParser is unavailable`);return new e}var TJ=`default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src 'none'; font-src 'none'; connect-src 'none'; media-src 'none'; frame-src 'none'; object-src 'none'; form-action 'none'; base-uri 'none'`,EJ=new Set(`div span p br hr h1 h2 h3 h4 h5 h6 section article header footer main aside nav ul ol li dl dt dd strong em b i u s small sub sup blockquote pre code table thead tbody tfoot tr th td caption colgroup col figure figcaption style button input label select option optgroup textarea details summary fieldset legend progress meter output kbd mark`.split(` `)),DJ=new Set(`class id title role aria-label aria-hidden aria-expanded aria-selected aria-checked aria-pressed aria-current colspan rowspan scope type name value placeholder for checked selected disabled readonly open min max step rows cols tabindex`.split(` `)),OJ=new Set(`text search email tel url number password checkbox radio range color date time month week button reset submit`.split(` `)),kJ=`button,input,select,textarea,summary,label,[role=button],[role=tab]{transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease,opacity .18s ease}button,summary,label,select,[role=button],[role=tab],input[type=checkbox],input[type=radio],input[type=range]{cursor:pointer}button:active,[role=button]:active{transform:scale(.97)}details[open]>:not(summary){animation:mockup-in .22s ease-out}@keyframes mockup-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}`;function AJ(e){if(!e||typeof e!=`object`)return;let t=e;if(!(typeof t.html!=`string`||t.html.length>1e5)&&!(t.css!==void 0&&(typeof t.css!=`string`||t.css.length>12e4)))return{html:t.html,...typeof t.css==`string`?{css:t.css}:{}}}function jJ(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,``);return/\\|@import|url\s*\(|image-set\s*\(|expression\s*\(|behavior\s*:|-moz-binding/i.test(t)?``:t.replace(/<\/?style/gi,``)}function MJ(e){if(!EJ.has(e.localName)||e.namespaceURI!==`http://www.w3.org/1999/xhtml`){e.remove();return}for(let t of[...e.attributes])t.name===`style`?e.setAttribute(`style`,jJ(t.value)):DJ.has(t.name)||e.removeAttribute(t.name);if(e.localName===`input`){let t=[...e.attributes].find(e=>e.name===`type`)?.value.toLowerCase();t!==void 0&&!OJ.has(t)&&e.setAttribute(`type`,`text`)}e.localName===`style`&&(e.textContent=jJ(e.textContent??``));for(let t of[...e.children])MJ(t)}function NJ(e,t){try{return PJ(e,t??wJ())}catch{return`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${TJ}"><meta name="referrer" content="no-referrer"></head><body><p role="status">Static mockup unavailable. The preview could not be safely rendered.</p></body></html>`}}function PJ(e,t){let n=t.parseFromString(e.html,`text/html`);for(let e of[...n.head.children,...n.body.children])MJ(e);let r=[...n.head.querySelectorAll(`style`)].map(e=>e.outerHTML).join(``);return`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${TJ}"><meta name="referrer" content="no-referrer"><style>body{margin:16px;overflow-wrap:anywhere}*{box-sizing:border-box}${kJ}${jJ(e.css??``).replace(/</g,`\\3c `)}</style>${r}</head><body>${n.body.innerHTML}</body></html>`}function FJ({preview:e,label:t,className:n,frameWidth:r,minWidth:i,onOpen:a}){let o=(0,m.useMemo)(()=>NJ(e),[e]),s=(0,m.useRef)(null),[c,l]=(0,m.useState)();if((0,m.useLayoutEffect)(()=>{let e=s.current;if(!r&&!i||!e)return;let t=()=>l({width:e.clientWidth,height:e.clientHeight});if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,i]),!r&&!i)return(0,U.jsx)(`iframe`,{title:`Static mockup: ${t}`,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:o,className:J(`h-80 w-full rounded-lg border bg-background`,n)});let u=r??Math.max(c?.width??0,i??0),d=c&&c.width>0&&u>0?Math.min(1,c.width/u):1;return(0,U.jsxs)(`div`,{ref:s,className:J(`group/mock relative h-80 w-full max-w-full overflow-hidden rounded-lg border bg-background max-md:min-h-0 max-md:max-h-full max-md:overflow-x-hidden max-md:overflow-y-auto max-md:overscroll-contain`,n),children:[(0,U.jsx)(`iframe`,{title:`Static mockup: ${t}`,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:o,className:`absolute top-0 left-0 origin-top-left border-0`,style:{width:u||`100%`,height:c?c.height/d:`100%`,transform:`scale(${d})`}}),a?(0,U.jsx)(`button`,{type:`button`,"data-compact":``,onClick:a,"aria-label":`Expand the mockup: ${t}`,className:`group/open absolute right-2 bottom-2 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring max-md:right-3 max-md:bottom-3`,children:(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-border bg-card/90 px-1.5 py-0.5 text-[0.6875rem] font-medium text-muted-foreground opacity-60 shadow-sm backdrop-blur-sm transition-opacity group-hover/mock:opacity-100 group-focus-visible/open:opacity-100 max-md:min-h-11 max-md:px-3`,children:[(0,U.jsx)(Dh,{"aria-hidden":`true`,className:`size-3`}),`Expand`]})}):null]})}var IJ=/\s*\(recommended\)\s*$/i,LJ=1024,RJ=`(max-width: 767.98px)`,zJ=`max-md:hidden`,BJ=e=>e.replace(IJ,``);function VJ(e){return!!(e&&(e.htmlPreview||e.image||e.preview))}function HJ({option:e}){let t=BJ(e.label);return VJ(e)?(0,U.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[e.htmlPreview?(0,U.jsx)(FJ,{preview:e.htmlPreview,label:t,minWidth:LJ,className:`h-auto min-h-[18rem] flex-1`}):null,e.image?(0,U.jsx)(`img`,{src:R(e.image),alt:`Mockup: ${t}`,className:`min-h-0 w-full flex-1 rounded-lg border bg-background object-contain`}):null,e.preview?(0,U.jsx)(uH,{text:e.preview,className:J(`overflow-auto rounded-lg border bg-background p-4 text-sm`,!e.htmlPreview&&!e.image&&`flex-1`)}):null]}):(0,U.jsx)(`p`,{className:`grid h-full place-items-center p-6 text-sm text-muted-foreground`,children:`No mockup for this option.`})}function UJ({options:e,start:t,title:n,picked:r=[],multi:i=!1,onChoose:a,onClose:o,onIndex:s}){let c=Of(),l=Sk(RJ),{keyboardOpen:u,keyboardInset:d}=eA(),f=(0,m.useRef)(null),p=(0,m.useRef)(null),[h,g]=(0,m.useState)(()=>Math.min(Math.max(0,t),e.length-1)),_=e[h],v=e.length-1;(0,m.useEffect)(()=>s?.(h),[h,s]),(0,m.useLayoutEffect)(()=>{let e=f.current;e&&(e.scrollLeft=h*e.clientWidth),p.current?.focus()},[]);let y=(0,m.useCallback)(e=>{let t=Math.min(Math.max(0,e),v),n=f.current;g(t),n?.scrollTo({left:t*n.clientWidth,behavior:c?`auto`:`smooth`})},[v,c]);(0,m.useEffect)(()=>{let e=f.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{e.scrollLeft=h*e.clientWidth});return t.observe(e),()=>t.disconnect()},[h]);function b(){let e=f.current;if(!e||e.clientWidth===0)return;let t=Math.round(e.scrollLeft/e.clientWidth);t!==h&&t>=0&&t<=v&&g(t)}function x(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=t.target;if(n.closest(`input, textarea, [contenteditable='true']`))return;let r={ArrowLeft:-1,ArrowRight:1,PageUp:-1,PageDown:1}[t.key];if(r){t.preventDefault(),y(h+r);return}if(t.key===`Home`||t.key===`End`){t.preventDefault(),y(t.key===`Home`?0:v);return}let i=Number(t.key);if(Number.isInteger(i)&&i>=1&&i<=e.length){t.preventDefault(),y(i-1);return}t.key===`Enter`&&a&&!(n instanceof HTMLButtonElement)&&(t.preventDefault(),a(h))}let S=r.includes(h),C=l&&u?{height:`calc(100vh - ${d}px - 1.5rem)`,maxHeight:`calc(100vh - ${d}px - 1.5rem)`}:void 0;return(0,U.jsxs)(`div`,{ref:p,tabIndex:-1,"data-autofocus":``,onKeyDown:x,style:C,className:`mockup-viewer flex h-full min-h-0 flex-col outline-none max-md:h-[calc(100svh-1.5rem)] max-md:max-h-[calc(100svh-1.5rem)]`,role:`region`,"aria-label":`Mockups: ${n}`,"aria-roledescription":`carousel`,children:[(0,U.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Back to the question`,title:l?`Back to the question`:`Back · Esc`,onClick:()=>o(h),className:`max-md:size-11`,children:(0,U.jsx)(Vh,{"aria-hidden":`true`})}),(0,U.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium`,children:n}),(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,"aria-live":`polite`,children:[h+1,` of `,e.length]}),(0,U.jsx)(`div`,{role:`tablist`,"aria-label":`Options`,className:`flex w-full flex-wrap gap-1.5 sm:w-auto`,children:e.map((e,t)=>(0,U.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===h,"aria-controls":`mockup-slide-${t}`,"data-compact":``,onClick:()=>y(t),className:J(`inline-flex h-7 max-w-48 items-center gap-1 rounded-lg border px-2.5 text-xs font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:h-11 max-md:min-w-11`,t===h?`border-primary/50 bg-accent text-foreground`:`border-border text-muted-foreground hover:bg-muted hover:text-foreground`),children:[(0,U.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:t+1}),(0,U.jsx)(`span`,{className:`truncate`,children:BJ(e.label)}),r.includes(t)?(0,U.jsx)(tm,{"aria-label":`picked`,className:`size-3 text-primary`}):null]},t))})]}),(0,U.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,U.jsx)(`div`,{ref:f,onScroll:b,className:`mockup-track flex h-full snap-x snap-mandatory overflow-x-auto overflow-y-hidden overscroll-x-contain`,children:e.map((t,n)=>(0,U.jsxs)(`section`,{id:`mockup-slide-${n}`,role:`tabpanel`,"aria-roledescription":`slide`,"aria-label":`${n+1} of ${e.length}: ${BJ(t.label)}`,"aria-hidden":n!==h,className:`flex h-full w-full shrink-0 snap-center snap-always flex-col gap-2 overflow-y-hidden px-4 py-4 sm:px-14 max-md:overflow-y-auto max-md:overscroll-contain`,children:[(0,U.jsxs)(`div`,{className:`flex items-baseline gap-2 text-sm`,children:[(0,U.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[n+1,`.`]}),(0,U.jsx)(`span`,{className:`font-medium`,children:BJ(t.label)}),IJ.test(t.label)?(0,U.jsx)(`span`,{className:`text-xs font-medium text-primary`,children:`Recommended`}):null,r.includes(n)?(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-primary`,children:[(0,U.jsx)(tm,{"aria-hidden":`true`,className:`size-3`}),`picked`]}):null]}),t.description?(0,U.jsx)(uH,{text:t.description,className:`text-sm text-muted-foreground`}):null,(0,U.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,U.jsx)(HJ,{option:t})})]},n))}),h>0?(0,U.jsx)(X,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Previous option`,title:l?`Previous option`:`Previous · ←`,onClick:()=>y(h-1),className:`absolute top-1/2 left-2 -translate-y-1/2 rounded-full max-md:hidden max-md:size-11`,children:(0,U.jsx)(am,{"aria-hidden":`true`})}):null,h<v?(0,U.jsx)(X,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Next option`,title:l?`Next option`:`Next · →`,onClick:()=>y(h+1),className:`absolute top-1/2 right-2 -translate-y-1/2 rounded-full max-md:hidden max-md:size-11`,children:(0,U.jsx)(sm,{"aria-hidden":`true`})}):null]}),(0,U.jsxs)(`footer`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2 border-t border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`←→`,className:zJ,children:`option`}),a?(0,U.jsx)(vk,{chord:`Enter`,className:zJ,children:i?S?`unpick`:`pick`:`choose`}):null,(0,U.jsx)(vk,{chord:`Esc`,className:zJ,children:`back`})]}),a&&_?(0,U.jsxs)(X,{type:`button`,onClick:()=>a(h),className:`max-w-full max-md:min-h-11 max-md:min-w-11`,children:[i&&S?`Unpick`:i?`Pick`:`Choose`,(0,U.jsx)(`span`,{className:`truncate`,children:BJ(_.label)})]}):null]})]})}function WJ(e,t,n){e.nativeEvent.isComposing||(e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n()),e.key===`Enter`&&e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),t()))}function GJ({text:e,disabled:t=!1,onSave:n,onCancel:r}){let[i,a]=(0,m.useState)(e),[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(``),u=(0,m.useRef)(null);(0,m.useEffect)(()=>{u.current?.focus({preventScroll:!0}),u.current?.select()},[]);let d=async()=>{if(!(t||o||!i.trim())){s(!0),l(``);try{await n(i.trim()),r()}catch(e){l(e instanceof Error?e.message:String(e)),s(!1)}}};return(0,U.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,onKeyDown:e=>WJ(e,()=>void d(),()=>{o||r()}),children:[(0,U.jsxs)(`label`,{className:`text-sm`,children:[`Edit message`,(0,U.jsx)(Dj,{ref:u,value:i,onChange:e=>a(e.target.value),disabled:o,className:`mt-2 max-h-[40vh] min-h-24 max-md:min-h-28`})]}),c?(0,U.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Could not save. `,c]}):null,(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(X,{size:`sm`,className:`max-md:min-h-11`,onClick:()=>void d(),disabled:t||o||!i.trim(),children:o?`Saving…`:`Save`}),(0,U.jsx)(X,{size:`sm`,variant:`ghost`,className:`max-md:min-h-11`,disabled:o,onClick:r,children:`Cancel`})]})]})}var KJ=1200;function qJ({question:e}){let[t,n]=(0,m.useState)(),r=uA(t!==void 0,lA.sheet),i=e.options.flatMap((e,t)=>e.mockup?[{option:e,index:t,mockup:e.mockup}]:[]);if(i.length===0)return null;let a=e.options.map(e=>({label:e.label,description:e.description,...e.mockup?{htmlPreview:e.mockup}:{}}));return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`ul`,{"aria-label":`Mockups`,className:`grid grid-cols-2 gap-2 md:grid-cols-3`,children:i.map(({option:e,index:t,mockup:r})=>(0,U.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,U.jsx)(FJ,{preview:r,label:BJ(e.label),frameWidth:KJ,onOpen:()=>n(t),className:`aspect-[3/2] h-auto`}),(0,U.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[(0,U.jsxs)(`span`,{className:`tabular-nums`,children:[t+1,`.`]}),` `,BJ(e.label)]})]},t))}),(0,U.jsx)(nA,{open:t!==void 0&&r,onOpenChange:e=>{e||n(void 0)},label:`Mockups: ${e.text}`,className:`h-[min(92svh,60rem)] max-h-[min(92svh,60rem)] max-w-6xl`,children:t===void 0?null:(0,U.jsx)(UJ,{options:a,start:t,title:e.text,onClose:()=>n(void 0)})})]})}function JJ({questions:e}){return(0,U.jsx)(`ol`,{className:`mt-1 flex flex-col gap-2`,children:e.map((e,t)=>(0,U.jsxs)(`li`,{className:`card-flat flex min-w-0 flex-col gap-2 rounded-xl border p-3 text-sm`,style:{"--orb":tW(e.from)},children:[(0,U.jsxs)(`p`,{className:`flex items-start gap-2`,children:[(0,U.jsxs)(`span`,{className:`mt-px inline-flex shrink-0 items-center gap-1 rounded-full bg-[color-mix(in_oklab,var(--orb)_12%,transparent)] px-2 py-0.5 text-xs font-medium text-[color-mix(in_oklab,var(--orb)_85%,var(--foreground))]`,children:[(0,U.jsx)(XU,{source:e.from,className:`size-3`}),QU(e.from)]}),(0,U.jsxs)(`span`,{className:`min-w-0`,children:[(0,U.jsxs)(`span`,{className:`sr-only`,children:[`Question `,t+1,`: `]}),e.text]})]}),e.options.length?(0,U.jsx)(`ul`,{"aria-label":`Options`,className:`flex flex-wrap gap-1.5`,children:e.options.map(e=>(0,U.jsxs)(`li`,{className:`rounded-lg border border-border bg-muted/60 px-2 py-1 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),e.description?` — ${e.description}`:``]},e.label))}):null,(0,U.jsx)(qJ,{question:e})]},t))})}function YJ({message:e}){let t=e.decided??[];return t.length?(0,U.jsx)(`ul`,{"aria-label":`Settled for you`,className:`mt-1 flex flex-col gap-1`,children:t.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 text-sm`,title:`Settled by the classifier, ${Math.round(e.probability*100)}% sure. Comment on the plan to overrule it.`,children:[(0,U.jsx)(tm,{"aria-hidden":`true`,className:`mt-[0.1875rem] size-3.5 shrink-0 text-success`}),(0,U.jsxs)(`span`,{className:`min-w-0`,children:[(0,U.jsx)(`span`,{className:J(`font-medium`,$U(e.from)),children:QU(e.from)}),` `,(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:e.question}),` `,(0,U.jsx)(`span`,{className:`font-medium`,children:e.answer}),(0,U.jsxs)(`span`,{className:`decided-hint`,children:[`auto · `,Math.round(e.probability*100),`% · comment to overrule`]})]})]},t))}):null}function XJ({message:e,index:t,busy:n,readOnly:r}){let[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(),c=o&&(o.editedAt??0)>(e.editedAt??0)?o:e,l=n||c!==e,u=async n=>{let r=await be(`planner.editMessage`,{messageIndex:t,at:e.at,text:n});s(r.message)},d=!r&&!e.settled?.length&&!i?(0,U.jsxs)(`button`,{type:`button`,disabled:l,onClick:()=>a(!0),className:`chat-action`,children:[(0,U.jsx)(ag,{"aria-hidden":`true`,className:`size-3`}),`Edit`]}):null;return(0,U.jsx)(oW,{time:e.at>0?kj(e.at):void 0,head:!0,note:c.editedAt?`(edited)`:void 0,actions:d,children:i?(0,U.jsx)(GJ,{text:c.text,disabled:n,onSave:u,onCancel:()=>a(!1)}):(0,U.jsx)(uH,{text:c.text})})}function ZJ({message:e,index:t,busy:n,readOnly:r}){if(e.role===`you`)return(0,U.jsx)(XJ,{message:e,index:t,busy:n,readOnly:r});let i=e.questions??[];return(0,U.jsxs)(aW,{source:`PLANNER`,name:`Panel`,time:e.at>0?kj(e.at):void 0,head:!0,bubble:i.length===0,aside:i.length?`${i.length} question${i.length===1?``:`s`}`:void 0,children:[i.length>0?(0,U.jsx)(JJ,{questions:i}):(0,U.jsx)(uH,{text:e.text}),(0,U.jsx)(YJ,{message:e})]})}function QJ({messages:e,seed:t,busy:n=!1,readOnly:r=!1}){return(0,U.jsxs)(`div`,{className:`chat-column`,role:`log`,"aria-label":`Panel conversation`,children:[t?(0,U.jsx)(sW,{children:t}):null,e.map((e,t)=>(0,U.jsx)(ZJ,{message:e,index:t,busy:n,readOnly:r},`${e.at}-${t}`)),n?(0,U.jsx)(aW,{source:`PLANNER`,name:`Panel`,head:!0,live:!0,aside:`the panel is thinking`,children:(0,U.jsx)(cW,{className:`mt-1`})}):null]})}function $J({className:e,...t}){return(0,U.jsx)(VC,{"aria-keyshortcuts":`Space`,"aria-description":`When focused, press Space to toggle.`,"data-slot":`checkbox`,className:J(`peer relative flex size-[1.125rem] shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background bg-clip-padding text-primary-foreground shadow-control transition-[background-color,border-color,box-shadow] duration-150 outline-none before:absolute before:-inset-3 before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-64 data-[state=checked]:shadow-none dark:bg-input/32 data-[state=checked]:border-primary data-[state=checked]:bg-primary`,e),...t,children:(0,U.jsx)(UC,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center`,children:(0,U.jsx)(tm,{"aria-hidden":`true`,className:`size-3`,strokeWidth:3})})})}var eY=`ORACLE`,tY=`No draft yet.`,nY=`The draft appears after the panel's first round.`,rY=`What each seat needs`,iY=[`backend`,`designer`,`qa`,`researcher`],aY={backend:`DEV`,designer:`DESIGN`,qa:`QA`,researcher:`RESEARCH`},oY=`Describe a task in the box below. The panel asks what it needs to know, round by round, until the plan is clear.`,sY={ORACLE:`Chairs the panel, and settles the last round alone.`,DEV:`Code, data and the APIs it touches.`,DESIGN:`Screens, flows and the words on them.`,QA:`Tests, edge cases and what could break.`,RESEARCH:`Prior art, docs and sources.`},cY=[{title:`Describe it`,text:`Say what you want in the box below.`},{title:`The panel asks`,text:`Each seat asks what it needs to know.`},{title:`A draft forms`,text:`Answer, comment on lines, go another round.`},{title:`Save the plan`,text:`Keep it, or start it as a task.`}];function lY(e){let t=e.filter(e=>e.member);return`${t.filter(e=>e.seated).length} of ${t.length} seated`}function uY(e,t=0){return t<=0?`round ${e}`:e>t?`round ${e} · past the limit, revising`:e===t?`final round ${e}/${t}`:`round ${e}/${t}`}function dY(e,t){return`${e} ${t}${e===1?``:`s`}`}function fY(e){return e.round===0&&e.messages.length===0&&!e.busy}function pY(e){let t=e.members.find(e=>e.status===`failed`);if(t)return(t.error??`${aY[t.member]} failed`).split(`
|
|
98
98
|
`)[0]}function mY(e){let t=[],n=pY(e);return e.busy?t.push(uY(e.round,e.limit)):n?t.push(`${n} — Retry runs the round again`):e.questions.length>0&&t.push(`${dY(e.questions.length,`question`)} waiting`),!e.busy&&e.round>0&&t.push(uY(e.round,e.limit)),!e.busy&&e.limit>0&&e.round+1===e.limit&&t.push(`the next round is the last: the oracle settles the rest`),t}function hY(e,t){let n=aY[e],r=t.seats.includes(e),i=t.members.find(t=>t.member===e),a={member:e,label:n,seated:r,working:!1};if(!r)return{...a,text:`off`};if(i?.status===`thinking`)return{...a,working:!0,text:i.step??`thinking`};if(i?.status===`failed`)return{...a,text:`failed — Retry`};if(!i)return{...a,text:`·`};if(i.reply?.status===`ready`)return{...a,text:`ready`};let o=t.questions.filter(e=>e.from===n).length;return{...a,text:o===0?`done`:dY(o,`question`)}}function gY(e){let t=e.questions.filter(e=>e.from===eY).length;return[{label:eY,seated:!0,working:e.busy,text:e.busy?`chairing`:t?dY(t,`question`):`·`},...iY.map(t=>hY(t,e))]}function _Y({cell:e,intro:t}){let n=t?e.member?e.seated?`seated`:`not seated`:`chairs`:e.text;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{className:J(`inline-flex items-center gap-1 font-medium`,e.seated?$U(e.label):`text-muted-foreground`),children:[(0,U.jsx)(XU,{source:e.label,className:`size-3`}),QU(e.label)]}),e.working&&!t?(0,U.jsx)(OA,{className:`size-3`,"aria-hidden":`true`}):null,n===`·`?null:(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:n})]})}function vY({cell:e,intro:t,onToggled:n}){let{member:r}=e,i=`roster-chip inline-flex h-7 items-center gap-1.5 rounded-full border px-2.5 text-xs whitespace-nowrap max-md:min-h-11`;if(!r)return(0,U.jsx)(`li`,{className:J(i,`border-transparent bg-muted`),children:(0,U.jsx)(_Y,{cell:e,intro:t})});let a=async()=>{await W(`planner.toggleSeat`,{member:r})&&n()};return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`label`,{className:J(i,`cursor-pointer pl-1.5 transition-colors`,e.seated?`border-border bg-card hover:bg-muted`:`border-dashed border-border text-muted-foreground hover:bg-muted`),children:[(0,U.jsx)($J,{checked:e.seated,onCheckedChange:()=>void a(),"aria-label":`${QU(e.label)} sits on the panel`,className:`size-3.5 rounded-[4px] [&_svg]:size-2.5`}),(0,U.jsx)(_Y,{cell:e,intro:t})]})})}function yY({cells:e,intro:t,onToggled:n,className:r}){return(0,U.jsx)(`ul`,{"aria-label":`Panel`,className:J(`flex flex-wrap items-center gap-1.5`,r),children:e.map(e=>(0,U.jsx)(vY,{cell:e,intro:t,onToggled:n},e.label))})}function bY({cell:e,onToggled:t}){let{member:n}=e,r=QU(e.label),i=J(`flex h-full flex-col gap-2 rounded-xl border p-3.5 transition-[background-color,border-color,box-shadow]`,e.seated?`border-[color-mix(in_oklab,var(--orb)_26%,var(--border))] bg-[color-mix(in_oklab,var(--orb)_5%,var(--card))] shadow-card`:`border-dashed border-input bg-transparent`),a=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:J(`grid size-6 place-items-center rounded-lg bg-[color-mix(in_oklab,var(--orb)_14%,transparent)] text-[color-mix(in_oklab,var(--orb)_85%,var(--foreground))]`,!e.seated&&`opacity-50 grayscale`),children:(0,U.jsx)(XU,{source:e.label,className:`size-3.5`})}),(0,U.jsx)(`span`,{className:J(`truncate text-sm font-semibold`,e.seated?$U(e.label):`text-muted-foreground`),children:r})]}),n?(0,U.jsx)($J,{checked:e.seated,onCheckedChange:()=>void xY(n,t),"aria-label":`${r} sits on the panel`}):null]}),(0,U.jsx)(`span`,{className:`text-xs leading-relaxed text-muted-foreground`,children:sY[e.label]}),(0,U.jsx)(`span`,{className:J(`mt-auto text-xs font-medium`,e.seated?`text-foreground`:`text-muted-foreground`),children:n?e.seated?`seated`:`sits this one out`:`always chairs`})]}),o={"--orb":tW(e.label)};return n?(0,U.jsx)(`li`,{style:o,children:(0,U.jsx)(`label`,{className:J(i,`cursor-pointer`,e.seated?`hover:shadow-[0_0_0_3px_color-mix(in_oklab,var(--orb)_10%,transparent)]`:`hover:bg-muted`),children:a})}):(0,U.jsx)(`li`,{style:o,children:(0,U.jsx)(`div`,{className:i,children:a})})}async function xY(e,t){await W(`planner.toggleSeat`,{member:e})&&t()}function SY({cells:e,onToggled:t}){return(0,U.jsx)(`ul`,{"aria-label":`Panel`,className:`grid grid-cols-1 gap-3 @lg:grid-cols-2 @4xl:grid-cols-5`,children:e.map(e=>(0,U.jsx)(bY,{cell:e,onToggled:t},e.label))})}function CY({snap:e}){let t=mY(e),n=!e.busy&&pY(e)!==void 0;return(0,U.jsxs)(`p`,{role:`status`,className:n?`inline-flex items-center gap-2 text-sm text-destructive`:`inline-flex items-center gap-2 text-sm text-muted-foreground`,children:[e.busy?(0,U.jsx)(OA,{className:`size-3.5`,"aria-hidden":`true`}):null,t.join(` · `)]})}function wY({onOpen:e}){let t=(0,m.useRef)(null);return ij(`v`,()=>t.current?.click()),(0,U.jsxs)(`button`,{ref:t,type:`button`,"aria-haspopup":`dialog`,"aria-keyshortcuts":`V`,onClick:e,className:`plan-link group`,children:[`View plan`,(0,U.jsx)(sm,{"aria-hidden":`true`,className:`size-3.5 transition-transform duration-150 group-hover:translate-x-0.5 motion-reduce:transition-none`}),(0,U.jsx)(_k,{chord:`V`,className:`kbd-hint ml-1`})]})}function TY({iconOnly:e}){return(0,U.jsx)(oj,{label:`Previous plans`,text:`Previous`,icon:pg,shortcut:`H`,iconOnly:e,onClick:()=>bA(yA(`plan`,`previous`))})}function EY({snap:e,onDone:t}){let n=xk(`status`).data?.keys.find(e=>e.action===`savePlan`)?.label,r=Sk(`(max-width: 767.98px)`),i=e=>async()=>{await W(e,{})&&t()};return(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1 @min-[68rem]:shrink-0`,children:[e.questions.length>0&&!e.busy?(0,U.jsx)(oj,{label:`Answer questions`,icon:Nh,tone:`primary`,shortcut:`A`,onClick:()=>void i(`planner.answer`)()}):null,e.retryable?(0,U.jsx)(oj,{label:`Retry`,icon:_g,shortcut:`R`,onClick:()=>void i(`planner.retry`)()}):null,(0,U.jsx)(TY,{iconOnly:r}),(0,U.jsx)(oj,{"data-plan-save":!0,label:`Save the plan`,text:`Save`,icon:xg,shortcut:n??`Ctrl+S`,iconOnly:r,disabled:!e.draft||e.busy,onClick:()=>void i(`planner.save`)()}),(0,U.jsx)(Hj,{icon:Ym,label:`New plan`,shortcut:`N`,iconOnly:r,title:`Start a new plan?`,description:`The conversation and the draft are left behind. Saved plans are not touched.`,confirmLabel:`New plan`,onConfirm:()=>void W(`planner.new`,{}).then(t)})]})}function DY({snap:e,onDone:t,onViewPlan:n}){return(0,U.jsxs)(`header`,{className:`@container flex shrink-0 flex-col gap-2.5 border-b border-border px-5 pt-3 pb-3 max-md:shrink max-md:px-4 max-md:py-2.5`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:`Planning`}),(0,U.jsx)(CY,{snap:e}),e.draft?(0,U.jsx)(wY,{onOpen:n}):null]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 @min-[68rem]:flex-nowrap`,children:[(0,U.jsx)(yY,{cells:gY(e),intro:!1,onToggled:t,className:`order-last basis-full max-md:-mx-4 max-md:flex-nowrap max-md:overflow-x-auto max-md:px-4 max-md:[scrollbar-width:none] @min-[68rem]:order-none @min-[68rem]:min-w-0 @min-[68rem]:basis-auto`}),(0,U.jsx)(EY,{snap:e,onDone:t})]})]})}function OY(e){let t=!1;return e.split(`
|
|
99
|
-
`).map(e=>{let n=e.trimStart().startsWith("```");return n&&(t=!t),{text:e,fenced:t||n}})}function kY({notes:e}){return(0,U.jsx)(U.Fragment,{children:e.map((e,t)=>(0,U.jsx)(`p`,{className:`ml-6 rounded-lg border border-primary/15 bg-accent px-3 py-1.5 text-sm text-foreground italic`,children:e},t))})}var AY=[],jY=(0,m.memo)(function({row:e,index:t,notes:n,form:r,onComment:i}){let a=e.text.trim(),o=()=>i(t);return(0,U.jsxs)(`li`,{"data-line":t,className:J(`group/line`,!r&&`[contain-intrinsic-size:auto_2.75rem] [content-visibility:auto]`),children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start gap-1`,children:[(0,U.jsx)(`span`,{className:`flex w-4 shrink-0 justify-center pt-3.5`,"aria-hidden":`true`,children:n.length>0?(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-primary`}):null}),(0,U.jsx)(`div`,{className:J(`min-w-0 flex-1 cursor-pointer rounded-lg px-2 py-1.5 transition-colors hover:bg-muted`,r&&`bg-muted`,e.fenced&&`font-mono text-sm whitespace-pre-wrap break-words`),onClick:e=>!e.target.closest(`a`)&&o(),children:e.fenced?e.text:(0,U.jsx)(uH,{text:e.text})}),(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,className:`shrink-0 text-muted-foreground max-md:size-11 opacity-0 transition-opacity group-hover/line:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100`,"aria-label":`Comment on this line: ${a}`,onClick:o,children:(0,U.jsx)(Fh,{"aria-hidden":`true`})})]}),(0,U.jsx)(kY,{notes:n}),r]})});function MY({draft:e,comments:t,commenting:n,form:r,onComment:i}){let a=(0,m.useMemo)(()=>OY(e),[e]),o=tH(a.length);return(0,U.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`Draft plan lines`,children:a.slice(0,o).map((e,a)=>e.text.trim()?(0,U.jsx)(jY,{row:e,index:a,notes:t.get(e.text.trim())??AY,form:a===n?r:void 0,onComment:i},a):(0,U.jsx)(`li`,{"aria-hidden":`true`,className:`h-2`},a))})}function NY({notes:e}){return e.length===0?null:(0,U.jsx)(pH,{title:rY,children:(0,U.jsx)(`dl`,{className:`flex flex-col gap-2 text-sm`,children:e.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex min-w-0 gap-3 max-md:flex-wrap`,children:[(0,U.jsx)(`dt`,{className:J(`w-20 shrink-0 font-medium`,$U(e.from)),children:QU(e.from)}),(0,U.jsx)(`dd`,{className:`min-w-0 flex-1`,children:(0,U.jsx)(uH,{text:e.text})})]},t))})})}function PY({line:e,onCancel:t,onSent:n}){let r=(0,m.useRef)(null);return(0,m.useEffect)(()=>{let e=r.current?.querySelector(`textarea`);e?.focus(),e?.scrollIntoView({block:`nearest`})},[]),(0,U.jsxs)(`div`,{ref:r,role:`group`,"aria-label":`Comment on this line`,className:`line-comment relative mt-1 mb-2 ml-6 rounded-xl border p-3`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Cancel the comment`,title:`Cancel · Esc`,onClick:t,className:`absolute top-1.5 right-1.5 size-7 text-muted-foreground max-md:size-11`,children:(0,U.jsx)(r_,{"aria-hidden":`true`})}),(0,U.jsx)(aU,{label:`Your comment`,hint:`Enter adds the comment · Esc cancels`,buttonLabel:`Add comment`,onSend:async t=>await W(`planner.commentLine`,{line:e,text:t.trim()})?(n(t.trim()),!0):!1})]})}function FY({open:e,onClose:t,snap:n,comments:r,onSent:i}){let a=uA(e,lA.sheet),o=Sk(`(max-width: 767.98px)`),s=(0,m.useRef)(null),[c,l]=(0,m.useState)(),u=(0,m.useMemo)(()=>n.draft?OY(n.draft):[],[n.draft]),d=c===void 0?void 0:u[c]?.text.trim(),f=()=>{let e=c;l(void 0),requestAnimationFrame(()=>s.current?.querySelector(`[data-line="${e}"] button[aria-label^="Comment on this line"]`)?.focus())};return(0,U.jsx)(uj,{open:e&&a,onOpenChange:e=>!e&&t(),children:(0,U.jsxs)(mj,{showCloseButton:!1,side:o?`bottom`:`right`,"aria-label":`Draft plan`,onEscapeKeyDown:e=>{d!==void 0&&(e.preventDefault(),f())},onCloseAutoFocus:()=>l(void 0),className:J(`plan-sheet gap-0`,o?`data-[side=bottom]:inset-0 data-[side=bottom]:h-full data-[side=bottom]:max-w-none data-[side=bottom]:rounded-none`:`data-[side=right]:w-[min(44rem,92vw)] data-[side=right]:sm:max-w-none`),children:[(0,U.jsxs)(hj,{className:`flex-row items-center justify-between gap-3 border-b px-5 py-3 max-md:px-4`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,U.jsx)(gj,{className:`text-base font-semibold tracking-tight`,children:`Draft plan`}),(0,U.jsxs)(_j,{className:`text-xs text-muted-foreground`,children:[n.round>0?`${uY(n.round,n.limit)} · `:``,`choose a line to comment on it`]})]}),(0,U.jsx)(dj,{asChild:!0,children:(0,U.jsxs)(X,{variant:`ghost`,size:`sm`,"aria-label":`Close the plan`,title:`Close · Esc`,className:J(`gap-2 text-muted-foreground`,o&&`h-11 px-3 text-sm`),children:[(0,U.jsx)(r_,{"aria-hidden":`true`}),`Close`,o?null:(0,U.jsx)(_k,{chord:`Esc`,className:`kbd-hint`})]})})]}),(0,U.jsxs)(`div`,{ref:s,className:`flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overscroll-contain px-5 pt-4 pb-8 max-md:px-3 max-md:pb-[max(1.5rem,env(safe-area-inset-bottom))]`,children:[n.draft?(0,U.jsx)(MY,{draft:n.draft,comments:r,commenting:d===void 0?void 0:c,form:d===void 0?void 0:(0,U.jsx)(PY,{line:d,onCancel:f,onSent:e=>(i(d,e),f())},c),onComment:l}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.busy?nY:tY}),(0,U.jsx)(NY,{notes:n.notes})]}),(0,U.jsx)(zv,{target:s})]})})}var IY=()=>bA(yA(`plan`,`previous`)),LY=e=>bA(yA(`plan`,`previous`,e));function RY(e){let t=Date.now()-Date.parse(e);return Number.isFinite(t)?jj(Math.max(0,t)):``}function zY(e,t){return[`${t} message${t===1?``:`s`}`,`round ${e.rounds}`,RY(e.updatedAt)].filter(Boolean).join(` · `)}function BY({plan:e,selected:t}){return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>LY(e.id),className:J(QH,`max-md:min-h-11`),children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),e.hasDraft?(0,U.jsx)(ZH,{variant:`secondary`,children:`draft`}):null]}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:zY(e,e.messages)})]})})}function VY({id:e,onGone:t}){let n=IA(`planner.previousGet`,{id:e},[`planner`]),r=n.data;if(!r)return n.error?(0,U.jsx)(PA,{message:`Could not load that plan. ${n.error}`,onRetry:n.reload}):null;let i=!!r.archivedAt,a=async()=>{await W(`planner.previousOpen`,{id:e})&&bA(yA(`plan`))},o=async()=>{await W(`planner.previousArchive`,{id:e,archived:!i})&&t()},s=async()=>{await W(`planner.previousDelete`,{id:e})&&t()};return(0,U.jsxs)(`article`,{className:`flex flex-col gap-5`,"aria-label":r.title,children:[(0,U.jsxs)(sj,{children:[(0,U.jsx)(oj,{label:`Carry on planning`,text:`Carry on`,icon:sg,tone:`primary`,shortcut:`C`,onClick:()=>void a()}),(0,U.jsx)(oj,{label:i?`Bring it back from the archive`:`Archive`,text:i?`Unarchive`:`Archive`,icon:i?jp:Np,shortcut:`E`,onClick:()=>void o()}),(0,U.jsx)(Hj,{icon:Vg,label:`Delete`,shortcut:`Delete`,title:`Delete "${r.title}"?`,description:`The conversation and the draft are removed for good.`,confirmLabel:`Delete plan`,variant:`destructive`,onConfirm:()=>void s()})]}),(0,U.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:r.title}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:[i?`archived`:``,zY(r,r.messages.length),r.seed??``].filter(Boolean).join(` · `)})]}),(0,U.jsxs)(pH,{title:`Draft plan`,children:[r.draft?(0,U.jsx)(uH,{text:r.draft}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The panel had not written a draft yet.`}),(0,U.jsx)(NY,{notes:r.notes})]}),(0,U.jsx)(pH,{title:`Conversation`,children:(0,U.jsx)(QJ,{messages:r.messages,readOnly:!0})})]})}function HY({id:e}){let t=bj(),[n,r]=(0,m.useState)(!1),i=IA(`planner.previous`,n?{archived:!0}:{},[`planner`]),a=i.data?.plans??[];if(!i.data&&i.error)return(0,U.jsx)(PA,{message:`Could not load the previous plans. ${i.error}`,onRetry:i.reload});let o=(0,U.jsxs)(Tj,{title:n?`Archived plans`:`Previous plans`,count:i.data?String(a.length):void 0,children:[(0,U.jsx)(oj,{label:`Back to the current plan`,icon:Lp,iconOnly:!0,onClick:()=>bA(yA(`plan`))}),(0,U.jsx)(oj,{label:n?`Show the previous plans`:`Show the archived plans`,text:n?`Previous`:`Archived`,icon:n?pg:Np,pressed:n,onClick:()=>{r(e=>!e),IY()}})]}),s=i.data?a.length===0?(0,U.jsx)(`p`,{className:`px-4 py-6 text-sm text-muted-foreground`,children:n?`No archived plans.`:`No previous plans. A plan you leave without saving it as a task waits here; one saved as a task is in the Tasks tab.`}):(0,U.jsx)(`ul`,{className:J($H,`pt-2`),"aria-label":n?`Archived plans`:`Previous plans`,children:a.map(t=>(0,U.jsx)(BY,{plan:t,selected:t.id===e},t.id))}):(0,U.jsx)(Ej,{});return(0,U.jsx)(wj,{wide:t,list:(0,U.jsxs)(U.Fragment,{children:[o,s]}),detail:e?(0,U.jsx)(VY,{id:e,onGone:()=>{i.reload(),IY()}},e):null,open:e!==void 0,onClose:IY,hint:`Pick a plan to read it, carry it on, archive it or delete it.`,describe:`A previous plan`})}function UY({limit:e}){return e<=0?null:(0,U.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`flex gap-1`,children:Array.from({length:e},(t,n)=>(0,U.jsx)(`span`,{className:J(`h-1.5 w-4 rounded-full`,n===e-1?`bg-primary`:`bg-border`)},n))}),(0,U.jsxs)(`span`,{children:[`up to `,e,` rounds, the last the oracle's`]})]})}function WY({snap:e,onDone:t}){let n=gY(e),r=(0,m.useRef)(null);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{ref:r,className:`@container flex-1 overflow-y-auto px-5 pt-8 pb-dock max-md:px-4 max-md:pt-5 md:px-8 md:pt-10`,children:(0,U.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-8`,children:[(0,U.jsxs)(`header`,{className:`flex flex-col gap-4 @3xl:flex-row @3xl:items-end @3xl:justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`card-flat grid size-11 shrink-0 place-items-center rounded-xl border text-primary`,children:(0,U.jsx)(yg,{className:`size-5`})}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:`Plan with the panel`}),(0,U.jsx)(`p`,{className:`max-w-xl text-sm leading-relaxed text-muted-foreground`,children:oY})]})]}),(0,U.jsxs)(`div`,{className:`flex flex-col items-start gap-2 @3xl:items-end`,children:[(0,U.jsx)(TY,{}),(0,U.jsx)(UY,{limit:e.limit})]})]}),(0,U.jsxs)(`section`,{"aria-labelledby":`plan-panel`,className:`flex flex-col gap-3`,children:[(0,U.jsx)(`h3`,{id:`plan-panel`,className:`text-xs text-muted-foreground`,children:(0,U.jsx)(fH,{title:`The panel`,right:lY(n)})}),(0,U.jsx)(SY,{cells:n,onToggled:t})]}),(0,U.jsxs)(`section`,{"aria-labelledby":`plan-steps`,className:`flex flex-col gap-3`,children:[(0,U.jsx)(`h3`,{id:`plan-steps`,className:`text-xs text-muted-foreground`,children:(0,U.jsx)(fH,{title:`How a plan comes together`})}),(0,U.jsx)(`ol`,{className:`grid gap-3 @2xl:grid-cols-2 @4xl:grid-cols-4`,children:cY.map((e,t)=>(0,U.jsxs)(`li`,{className:`card-flat relative flex gap-3 rounded-xl border p-3.5`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-6 shrink-0 place-items-center rounded-full bg-accent text-xs font-semibold text-primary tabular-nums`,children:t+1}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),(0,U.jsx)(`span`,{className:`text-xs leading-relaxed text-muted-foreground`,children:e.text})]})]},e.title))})]}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-muted-foreground`,children:[(0,U.jsx)(Fp,{"aria-hidden":`true`,className:`size-4 text-primary motion-safe:animate-bounce`}),`Start in the box below.`,(0,U.jsx)(vk,{chord:`/`,className:`max-md:hidden`,children:`write`}),(0,U.jsx)(vk,{chord:`Enter`,className:`max-md:hidden`,children:`send to the panel`})]})]})}),(0,U.jsx)(zv,{target:r})]})}function GY({snap:e,reload:t}){let[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(new Map),o=(e,t)=>a(n=>new Map(n).set(e,[...n.get(e)??[],t])),{ref:s,onScroll:c}=GU(`${JSON.stringify(e.messages)}${e.busy}`);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(DY,{snap:e,onDone:t,onViewPlan:()=>r(!0)}),(0,U.jsx)(`div`,{ref:s,onScroll:c,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-5 pt-5 pb-dock max-md:px-4`,children:(0,U.jsx)(QJ,{messages:e.messages,busy:e.busy})}),(0,U.jsx)(zv,{target:s}),(0,U.jsx)(FY,{open:n,onClose:()=>r(!1),snap:e,comments:i,onSent:o})]})}function KY({rest:e=[]}){return e[0]===`previous`?(0,U.jsx)(HY,{id:e[1]}):(0,U.jsx)(qY,{})}function qY(){let e=IA(`planner.get`,{},[`planner`]),t=e.data;if(!t&&e.error)return(0,U.jsx)(PA,{message:`Could not load the plan. ${e.error}`,onRetry:e.reload});if(!t)return(0,U.jsx)(`p`,{role:`status`,className:`p-5 text-sm text-muted-foreground`,children:`Loading the plan…`});let n=fY(t);return(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:n?(0,U.jsx)(WY,{snap:t,onDone:e.reload}):(0,U.jsx)(GY,{snap:t,reload:e.reload})})}var JY=`Describe a small change in the box below and one agent makes it now, beside any running task.`;function YY(e){return e.prompt.split(`
|
|
100
|
-
`).find(e=>e.trim())?.trim()??`(empty)`}function
|
|
101
|
-
`)?(0,U.jsx)(uH,{text:e.prompt}):null,(0,U.jsx)(tX,{job:e}),(0,U.jsx)(pH,{title:`Steps`,children:(0,U.jsx)(nX,{job:e})}),e.files?.length?(0,U.jsx)(pH,{title:`Edited`,children:(0,U.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.files.map(e=>(0,U.jsxs)(`li`,{className:`break-all`,children:[`· `,e]},e))})}):null,e.error?(0,U.jsx)(`p`,{className:`rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:e.error}):null,e.report?(0,U.jsx)(pH,{title:`Report`,children:(0,U.jsx)(uH,{text:e.report})}):null]})}function aX({status:e}){if(e===`running`)return(0,U.jsx)(OA,{className:`size-3.5`,"aria-label":`running`});let t={queued:km,success:tm,failed:r_,timeout:r_,cancelled:Gh,held:tg,running:km}[e];return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(t,{"aria-hidden":`true`,className:`size-4 ${e===`success`?`text-success`:e===`failed`||e===`timeout`?`text-destructive`:e===`held`?`text-warning`:`text-muted-foreground`}`}),(0,U.jsx)(`span`,{className:`sr-only`,children:e})]})}function oX({job:e,selected:t,now:n,onSelect:r}){let i=QY(e,n);return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>r(e.id),className:J(QH,`flex-row items-start gap-2.5 text-sm max-md:min-h-11`),children:[(0,U.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:(0,U.jsx)(aX,{status:e.status})}),(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words`,t?`font-medium text-foreground`:`text-foreground`),children:YY(e)}),i?(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:i}):null]})})}function sX({jobs:e,selectedId:t,now:n,onSelect:r}){return(0,U.jsx)(`ul`,{className:$H,children:e.map(e=>(0,U.jsx)(oX,{job:e,selected:e.id===t,now:n,onSelect:r},e.id))})}var cX=()=>bA(yA(`quickfix`)),lX=e=>bA(yA(`quickfix`,e));function uX(e){let[t,n]=(0,m.useState)(()=>Date.now());return(0,m.useEffect)(()=>{if(!e)return;let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),e?t:Date.now()}function dX(){return(0,U.jsx)(SA,{className:`m-4 flex-1`,children:(0,U.jsxs)(CA,{children:[(0,U.jsx)(TA,{variant:`icon`,children:(0,U.jsx)(a_,{"aria-hidden":`true`})}),(0,U.jsx)(DA,{className:`font-medium text-foreground`,children:JY})]})})}function fX({id:e}){let t=bj(),n=IA(`quickfix.list`,{},[`quickfix`]),r=XY(n.data?.jobs??[]),i=uX(r.some(e=>e.status===`running`));if(!n.data&&n.error)return(0,U.jsx)(PA,{message:`Could not load quick fixes. ${n.error}`,onRetry:n.reload});let a=n.data&&r.length===0?(0,U.jsx)(dX,{}):(0,U.jsx)(pX,{id:e,wide:t,loaded:!!n.data,jobs:r,now:i});return(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:a})}function pX({id:e,wide:t,loaded:n,jobs:r,now:i}){let a=e??(t?r[0]?.id:void 0),o=r.find(e=>e.id===a),s=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Tj,{title:`Quick fixes`,count:String(r.length)}),n?(0,U.jsx)(sX,{jobs:r,selectedId:a,now:i,onSelect:lX}):(0,U.jsx)(Ej,{})]});return(0,U.jsx)(wj,{wide:t,list:s,detail:o?(0,U.jsx)(iX,{job:o,now:i}):e?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That quick fix is not on the list any more.`}):null,open:!!e,onClose:cX,hint:`Select a quick fix to see its steps.`,describe:`Quick fix detail`})}var mX={},hX=new Set;function gX(e){mX=e;for(let e of[...hX])e()}function _X(e){mX.taskId!==e&&gX({...mX,taskId:e})}function vX(e){return hX.add(e),()=>{hX.delete(e)}}function yX(){return(0,m.useSyncExternalStore)(vX,()=>mX,()=>mX)}function bX(e,t=0,n=!1){let r=!n&&!e.waiting&&!!e.runningSince,i=r?Date.parse(e.serverNow)-Date.parse(e.runningSince):0;return Math.max(0,e.elapsedMs)+(Number.isFinite(i)?Math.max(0,i):0)+(r?Math.max(0,t):0)}function xX(e){let t=Math.floor(e/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}function SX(e,t){let[n,r]=(0,m.useState)(0);return(0,m.useEffect)(()=>{if(r(0),!e)return;let t=performance.now(),n=window.setInterval(()=>r(performance.now()-t),1e3);return()=>window.clearInterval(n)},[e,t]),e?n:0}function CX({timing:e,stopped:t}){let[n,r]=(0,m.useState)(0);return(0,m.useEffect)(()=>{if(r(0),t||e.waiting||!e.runningSince)return;let n=performance.now(),i=window.setInterval(()=>r(performance.now()-n),1e3);return()=>window.clearInterval(i)},[e,t]),(0,U.jsxs)(`span`,{className:`tabular-nums break-words`,children:[e.waiting?`Waiting for you · `:``,e.phase.replaceAll(`_`,` `),` · `,xX(bX(e,n,t)),` execution`]})}function wX({work:e,timing:t,stopped:n}){let r=e.running&&!n&&!t?.waiting,i=SX(r,e);return(0,U.jsxs)(`span`,{className:`tabular-nums break-words`,"data-work-clock":r?`running`:`stopped`,children:[t?.waiting?`Waiting for you · `:``,t?`${t.phase.replaceAll(`_`,` `)} · `:``,`worked `,xX(e.workedMs+i)]})}function TX({timing:e,work:t,stopped:n=!1}){return t?(0,U.jsx)(wX,{work:t,...e?{timing:e}:{},stopped:n}):e?(0,U.jsx)(CX,{timing:e,stopped:n},JSON.stringify(e)):(0,U.jsx)(`span`,{children:`Timing unavailable`})}var EX=`This merges the reviewed commit into main and pushes main, then removes the task worktree after verifying the merge. The task branch is kept.`,DX={pending_approval:`Ready for your review`,deferred:`Saved for later`,in_progress:`Delivery in progress`,successful:`Delivered`,recoverable_failure:`Delivery needs attention`};function OX({delivery:e,title:t}){return(0,U.jsxs)(`div`,{className:`grid gap-2 text-sm`,children:[(0,U.jsx)(`p`,{className:`font-medium break-words`,children:t}),(0,U.jsxs)(`dl`,{className:`grid gap-1 break-all text-muted-foreground`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Project: `}),(0,U.jsx)(`dd`,{className:`inline`,children:e.project})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Repository: `}),(0,U.jsx)(`dd`,{className:`inline`,children:e.repository??`Unavailable — refresh review`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Source: `}),(0,U.jsxs)(`dd`,{className:`inline`,children:[e.sourceBranch,` · `,e.sourceCommit??`Commit unavailable`]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Target: `}),(0,U.jsxs)(`dd`,{className:`inline`,children:[`main`,e.targetCommit?` · ${e.targetCommit}`:``]})]})]}),(0,U.jsxs)(`p`,{children:[`Checks: `,e.verification?.checks??`unavailable`]}),(0,U.jsx)(`p`,{children:e.verification?.summary??`Verification unavailable. Refresh the review before delivery.`}),e.verification?(0,U.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Local completion/QA: `,e.verification.localVerified?`passed`:`not verified`,` · Repository rules: `,e.verification.rulesKnown?`known`:`unavailable`,e.verification.requiredChecks.length?` · Required: ${e.verification.requiredChecks.join(`, `)}`:``]}):null]})}function kX({action:e,delivery:t,busy:n,onAction:r}){let i=t.blocked[e],a=e===`merge_main`&&t.status===`successful`&&!!t.cleanupError,o=n||t.status===`in_progress`||t.status===`successful`&&!a||!!i;return(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,U.jsx)(X,{variant:`outline`,className:`max-md:min-h-11 max-md:whitespace-normal`,disabled:o,onClick:()=>r(e),children:e===`create_pr`?`Create PR`:a?`Retry worktree cleanup`:`Merge to main`}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e===`create_pr`?`Pushes the task branch and opens a PR targeting main. Does not merge.`:a?`Main was delivered. Removes the retained worktree after confirmation.`:`Updates and pushes main, then removes the task worktree. Requires confirmation.`}),i?(0,U.jsxs)(`p`,{className:`text-sm text-destructive`,children:[i,` Refresh review after resolving this restriction, then choose the action again.`]}):null]})}async function AX(e,t,n){let r={taskId:t,reviewId:n};return e===`refresh`?be(`tasks.deliveryReview`,{taskId:t}):e===`defer`?be(`tasks.deliveryDefer`,r):be(`tasks.deliver`,{...r,action:e,...e===`merge_main`?{confirmMain:!0}:{}})}function jX({taskId:e,delivery:t}){let[n,r]=(0,m.useState)(t),[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(),[c,l]=(0,m.useState)(!1),u=(0,m.useRef)(null),d=ue(),f=`${d}:${e}`,p=(0,m.useRef)(f);return p.current=f,(0,m.useEffect)(()=>(p.current=f,()=>{p.current=``}),[f]),(0,m.useEffect)(()=>{r(t),l(!1)},[t,e]),{current:n,setCurrent:r,busy:i,setBusy:a,error:o,setError:s,confirm:c,setConfirm:l,trigger:u,project:d,identity:f,scope:p}}function MX(e){return e.scope.current===e.identity&&e.project===ue()}function NX(e,t){let n=(0,m.useRef)(!1);async function r(r){if(!(n.current||r===`merge_main`&&!e.confirm)){n.current=!0,e.setBusy(!0),e.setError(void 0),e.setConfirm(!1);try{let n=await AX(r,t.taskId,e.current.reviewId);MX(e)&&(e.setCurrent(n.delivery),t.onChanged())}catch(t){MX(e)&&e.setError(t instanceof Error?t.message:String(t))}finally{n.current=!1,e.scope.current&&e.setBusy(!1)}}}return r}function PX(e){let t=jX(e),n=NX(t,e),r=uA(t.confirm,lA.confirm),i=t.current.status===`successful`||t.current.status===`in_progress`;function a(){t.trigger.current=document.activeElement,t.setConfirm(!0)}return{...t,request:n,slot:r,terminal:i,reviewMerge:a}}function FX({review:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Task completion is recorded separately. Nothing is published without your approval.`}),(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:e.busy?`Updating delivery…`:e.current.operation?`Operation: ${e.current.operation.stage}`:DX[e.current.status]}),e.current.error||e.error?(0,U.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[e.error??e.current.error,` Completed work is retained. Refresh review to reconcile the result before retrying.`]}):null,e.current.cleanupError?(0,U.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[e.current.cleanupError,` Retry cleanup after resolving it.`]}):null,e.current.operation?.worktreeRemoved?(0,U.jsx)(`p`,{className:`text-sm`,children:`Task worktree removed.`}):null,e.current.result?(0,U.jsxs)(`p`,{className:`text-sm break-all`,children:[e.current.result.action===`create_pr`?`PR #${e.current.result.pullNumber??``} created`:`main pushed · ${e.current.result.commit??``}`,e.current.result.pullUrl?(0,U.jsxs)(`span`,{children:[` · `,e.current.result.pullUrl]}):null]}):null]})}function IX({review:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`mt-3 grid gap-3 max-md:grid-cols-1 md:grid-cols-2`,children:[(0,U.jsx)(kX,{action:`create_pr`,delivery:e.current,busy:e.busy,onAction:()=>void e.request(`create_pr`)}),(0,U.jsx)(kX,{action:`merge_main`,delivery:e.current,busy:e.busy,onAction:e.reviewMerge})]}),(0,U.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,U.jsx)(X,{variant:`ghost`,className:`max-md:min-h-11`,disabled:e.busy,onClick:()=>void e.request(`refresh`),children:`Refresh review`}),(0,U.jsx)(X,{variant:`ghost`,className:`max-md:min-h-11`,disabled:e.busy||e.terminal,onClick:()=>void e.request(`defer`),children:`Not now`})]})]})}function LX({review:e}){let t=e.current.status===`successful`&&!!e.current.cleanupError,n=t?`Main was already delivered. Remove the task worktree if it still contains only the reviewed commit. The task branch is kept.`:EX;return(0,U.jsx)(nA,{open:e.slot,onOpenChange:e.setConfirm,label:t?`Confirm worktree removal`:`Confirm merge to main`,description:n,onCloseAutoFocus:t=>{t.preventDefault(),requestAnimationFrame(()=>e.trigger.current?.focus())},children:(0,U.jsxs)(`div`,{className:`grid gap-3 p-4 max-md:p-3`,children:[(0,U.jsx)(`h3`,{className:`font-medium`,children:t?`Remove task worktree?`:`Merge to main?`}),(0,U.jsx)(`p`,{className:`text-sm`,children:n}),(0,U.jsxs)(`p`,{className:`break-all text-sm text-muted-foreground`,children:[e.current.repository,` · `,e.current.sourceCommit,` → main`]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,U.jsx)(X,{variant:`outline`,className:`max-md:min-h-11`,onClick:()=>e.setConfirm(!1),children:`Cancel`}),(0,U.jsx)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,disabled:e.busy||!!e.current.blocked.merge_main||e.terminal&&!t,onClick:()=>void e.request(`merge_main`),children:t?`Confirm worktree removal`:`Confirm merge and push main`})]})]})})}function RX({title:e,review:t}){return(0,U.jsxs)(pH,{title:`Completed work · delivery review`,right:DX[t.current.status],children:[(0,U.jsx)(OX,{delivery:t.current,title:e}),(0,U.jsx)(FX,{review:t}),(0,U.jsx)(IX,{review:t}),(0,U.jsx)(LX,{review:t})]})}function zX(e){let t=PX(e);return(0,U.jsx)(RX,{title:e.title,review:t})}var BX=8;function VX(e){return e?e.path===`fast`?`fast track (${e.size})`:`full workflow (${e.size})`:``}function HX(e,t){let n=Math.min(t,BX);if(n<=0)return[];let r=Math.min(n,Math.round(Math.max(0,e)/t*n));return Array.from({length:n},(e,t)=>t<r)}function UX({done:e,total:t}){return(0,U.jsx)(`span`,{className:`inline-flex items-center gap-0.5`,"aria-hidden":`true`,children:HX(e,t).map((e,t)=>(0,U.jsx)(`span`,{className:J(`h-1.5 w-3 rounded-full`,e?`bg-primary`:`bg-muted-foreground/25`)},t))})}function WX({check:e,className:t}){return(0,U.jsx)(e===`done`?hm:e===`dropped`?Tm:Dm,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,e===`done`?`text-success`:`text-muted-foreground`,t)})}var GX={open:Dm,delivered:_m,addressed:hm},KX={open:`waiting for the owning session`,delivered:`sent to the oracle`,addressed:`plan amended`};function qX({comment:e}){let t=jj(Date.now()-Date.parse(e.createdAt)),n=GX[e.status];return(0,U.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(n,{"aria-hidden":`true`,className:e.status===`addressed`?`size-3.5 text-success`:`size-3.5`}),KX[e.status],`, `,t,e.editedAt?` (edited)`:``]})}function JX({comment:e,taskId:t,own:n}){let[r,i]=(0,m.useState)(!1),[a,o]=(0,m.useState)(),s=a&&(a.editedAt??``)>(e.editedAt??``)?a:e;return(0,U.jsxs)(`li`,{className:`card-flat min-w-0 rounded-lg border px-3.5 py-2.5`,children:[r?(0,U.jsx)(GJ,{text:s.text,onSave:async n=>{let r=await be(`tasks.editComment`,{taskId:t,commentId:e.id,text:n});o(r.comment)},onCancel:()=>i(!1)}):(0,U.jsx)(uH,{text:s.text}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(qX,{comment:s}),n&&!r?(0,U.jsx)(X,{size:`sm`,variant:`ghost`,className:`max-md:min-h-11`,onClick:()=>i(!0),children:`Edit`}):null]})]})}function YX({taskId:e,finished:t,canComment:n}){let r=IA(`tasks.comments`,{taskId:e},[`tasks`]),i=xk(`status`),a=r.data?.comments??[],o=a.filter(e=>e.status!==`addressed`).length;return(0,U.jsxs)(`section`,{"aria-labelledby":`comments-${e}`,className:`flex flex-col gap-3`,children:[(0,U.jsx)(`h3`,{id:`comments-${e}`,className:`text-sm`,children:(0,U.jsx)(fH,{title:`Comments`,right:o>0?`${o} open`:void 0})}),a.length===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`No comments.`:n?`No comments yet. Comment on the plan in the box below (Markdown and images work); the oracle amends it.`:`No comments yet.`}):(0,U.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:a.map(t=>(0,U.jsx)(JX,{taskId:e,comment:t,own:!!(t.by&&t.by===i.data?.sessionId)},`${e}-${t.id}`))})]})}var XX={mine:`This session`,others:`Other sessions`,pending:`Pending`,recent:`Finished`,archived:`Archived`},ZX={open:`open`,done:`done`,dropped:`abandoned`},QX={none:{label:`None`,depth:`nothing that runs changed: the engine's checks decide, no QA agent`,tone:`bg-accent text-muted-foreground`},low:{label:`Low`,depth:`a light check: the diff, the nearest tests, done once confident`,tone:`bg-success/10 text-success`},medium:{label:`Medium`,depth:`a standard check: the acceptance criteria and realistic regressions`,tone:`bg-warning/10 text-warning`},high:{label:`High`,depth:`a deep, adversarial review: invariants, recovery and everything the change reaches`,tone:`bg-destructive/10 text-destructive`}};function $X(e){let t=e.source===`classifier`?`Jev`:`rules`;if(!e.qaRequired)return`${t} · no QA agent`;let{min:n,max:r}=e.testBudget;return`${t} · ${n===r?r:`${n}-${r}`} new tests at most`}var eZ=`No tasks yet. Start one from the Lobby tab, or plan one in the Plan tab.`;function tZ(e,t){return`${e.replace(/_/g,` `)}${t?` · paused`:``}`}function nZ(e){return e===`now`?`just now`:`${e} ago`}function rZ(e){if(e.kind===`plan`)return[`planned`,e.age?e.age===`now`?`saved just now`:`saved ${e.age} ago`:``,e.issue?`#${e.issue}`:``].filter(Boolean).join(` · `);let t=e.owner??(e.section===`mine`?`this session`:``);return[tZ(e.status,e.paused),e.auto?`auto`:``,t].filter(Boolean).join(` · `)}function iZ(e){let t=[];for(let n of e){let e=t.at(-1);e&&e.section===n.section?e.rows.push(n):t.push({section:n.section,rows:[n]})}return t}function aZ(e){let t=e.filter(e=>e.kind!==`archived`),n=t.filter(e=>e.check===`open`).length,r=t.length-n,i=e.length-t.length;return[n?`${n} open`:``,r?`${r} finished`:``,i?`${i} archived`:``].filter(Boolean).join(` · `)||`0`}function oZ({step:e,stopped:t}){let n=SX(!t,e);return(0,U.jsx)(`span`,{className:`tabular-nums`,children:xX((e.workedMs??0)+n)})}function sZ(){return(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:`relative mt-[0.3125rem] grid size-4 shrink-0 place-items-center`,children:[(0,U.jsx)(`span`,{className:`absolute size-2.5 rounded-full bg-primary/30 motion-safe:animate-status-ping`}),(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-primary`})]})}function cZ(e){return(e.split(`
|
|
102
|
-
`).find(e=>e.trim())?.trim()??``).replace(/^steps?\s+\d+(?:\s*[-–]\s*\d+)?\s*[:.\-–]\s*/i,``).replace(/^\*\*?goal\*\*?\s*[:\-–]\s*/i,``)}function lZ({name:e,className:t}){return(0,U.jsx)(`span`,{"aria-hidden":`true`,className:J(`grid size-5 shrink-0 place-items-center rounded-md border border-border bg-card`,$U(e),t),children:(0,U.jsx)(XU,{source:e,className:`size-3`})})}function uZ({id:e,agents:t,stepText:n}){let[r,i]=(0,m.useState)(Date.now);(0,m.useEffect)(()=>{let e=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let a=t.filter(e=>!e.parentRunId||!t.some(t=>t.runId===e.parentRunId)).flatMap(e=>[e,...t.filter(t=>t.parentRunId===e.runId)]);return(0,U.jsx)(`ul`,{id:e,"aria-label":`Agents on this step`,className:`mt-2 flex flex-col overflow-hidden rounded-lg border border-border bg-card`,children:a.map(e=>{let i=nW({domain:e.domain}),a=!!e.parentRunId&&t.some(t=>t.runId===e.parentRunId),o=Date.parse(e.startedAt),s=cZ(e.instruction),c=s&&s.toLowerCase()!==n.trim().toLowerCase()?s:``;return(0,U.jsxs)(`li`,{className:`flex min-w-0 items-center gap-2.5 border-b border-border px-3 py-2 text-xs last:border-b-0`,children:[a?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`ml-1.5 h-4 w-3 shrink-0 rounded-bl-md border-b border-l border-border`}):null,(0,U.jsx)(lZ,{name:i}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:J(`font-medium`,$U(i)),children:QU(i)}),a?(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`child`}):null,(0,U.jsx)(yW,{className:`size-3 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`working`})]}),c?(0,U.jsx)(`span`,{className:`truncate text-muted-foreground`,title:e.instruction,children:c}):null]}),Number.isFinite(o)?(0,U.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground`,children:xX(Math.max(0,r-o))}):null]},e.runId)})})}function dZ({agents:e,count:t,step:n,stopped:r}){let i=[...new Set(e.map(e=>nW({domain:e.domain})))].slice(0,3);return(0,U.jsxs)(U.Fragment,{children:[i.length>0?(0,U.jsx)(`span`,{className:`flex -space-x-1.5`,children:i.map(e=>(0,U.jsx)(lZ,{name:e,className:`size-[1.125rem] ring-2 ring-card`},e))}):null,(0,U.jsxs)(`span`,{children:[t,` `,t===1?`agent`:`agents`,(0,U.jsx)(`span`,{className:`sr-only`,children:` working`})]}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground/60`,children:`·`}),(0,U.jsx)(oZ,{step:n,stopped:r})]})}var fZ=`inline-flex h-6 shrink-0 items-center gap-1.5 rounded-full border border-primary/20 bg-primary/5 pr-2 pl-1 text-xs font-medium text-primary`;function pZ({step:e,index:t,stopped:n}){let r=!!e.active&&!n,i=r?e.agents??[]:[],a=i.length||(e.activeAgentCount??1),[o,s]=(0,m.useState)(!1),c=(0,m.useId)(),l=e.status===`done`,u=l?`text-success`:e.status===`current`?`text-primary`:`text-muted-foreground`,d=l?hm:Dm;return(0,U.jsxs)(`li`,{className:`flex min-w-0 flex-col`,"data-step":r?`active`:e.status,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5 text-sm max-md:flex-wrap`,children:[r?(0,U.jsx)(sZ,{}):(0,U.jsx)(d,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 ${u}`}),(0,U.jsxs)(`span`,{className:`shrink-0 text-xs leading-5 text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,U.jsx)(`span`,{className:J(`min-w-0 break-words`,r||e.status===`current`?`text-foreground`:`text-muted-foreground`),children:e.text}),r&&i.length>0?(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":o,"aria-controls":c,onClick:()=>s(e=>!e),className:J(fZ,`-my-0.5 transition-colors outline-none hover:bg-primary/10 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`),children:[(0,U.jsx)(dZ,{agents:i,count:a,step:e,stopped:n}),(0,U.jsx)(rm,{"aria-hidden":`true`,className:J(`size-3 transition-transform duration-200`,o&&`rotate-180`)}),(0,U.jsx)(`span`,{className:`sr-only`,children:` (being worked on now)`})]}):r?(0,U.jsxs)(`span`,{className:J(fZ,`-my-0.5`),children:[(0,U.jsx)(dZ,{agents:i,count:a,step:e,stopped:n}),(0,U.jsx)(`span`,{className:`sr-only`,children:` (being worked on now)`})]}):e.status===`current`&&!n?(0,U.jsxs)(`span`,{className:`shrink-0 rounded-md bg-accent px-2 py-0.5 text-xs font-medium`,children:[`next`,(0,U.jsx)(`span`,{className:`sr-only`,children:` (the step up next)`})]}):null]}),o&&i.length>0?(0,U.jsx)(`div`,{className:`pl-[3.25rem] max-md:pl-0`,children:(0,U.jsx)(uZ,{id:c,agents:i,stepText:e.text})}):null]})}function mZ({steps:e,stopped:t}){let n=e.filter(e=>e.status===`done`).length;return(0,U.jsx)(pH,{title:`Steps`,right:`${n}/${e.length} done`,children:(0,U.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Steps`,children:e.map((e,n)=>(0,U.jsx)(pZ,{step:e,index:n,stopped:t},`${n}-${e.text}`))})})}function hZ({text:e}){let[t,n]=(0,m.useState)(!1),r=(0,m.useId)();return(0,U.jsxs)(pH,{title:`Full plan`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":t,"aria-controls":r,onClick:()=>n(e=>!e),className:`inline-flex min-h-11 w-fit items-center gap-1.5 rounded-md text-sm text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[(0,U.jsx)(sm,{"aria-hidden":`true`,className:J(`size-4 transition-transform duration-200 ease-snap`,t&&`rotate-90`)}),t?`Hide the details`:`Read the details of each step`]}),t?(0,U.jsx)(`div`,{id:r,children:(0,U.jsx)(uH,{text:e})}):null]})}function gZ({detail:e,finished:t}){return e.plan&&e.planDetails?(0,U.jsx)(hZ,{text:e.planDetails}):e.plan?(0,U.jsx)(pH,{title:`Approved plan`,children:(0,U.jsx)(uH,{text:e.plan})}):e.proposal?(0,U.jsx)(pH,{title:t?`Proposal`:`Proposal (no plan yet)`,children:(0,U.jsx)(uH,{text:e.proposal})}):(0,U.jsx)(pH,{title:`Plan`,children:(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`It ended before a plan was made.`:`No proposal or plan yet — the oracle is still clarifying or scouting.`})})}function _Z({amendments:e}){return e.length===0?null:(0,U.jsx)(pH,{title:`Amendments`,children:(0,U.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,children:e.map(e=>(0,U.jsx)(`li`,{className:`break-words`,children:e},e))})})}function vZ({risk:e}){let t=QX[e.risk];return(0,U.jsxs)(pH,{title:`QA risk`,right:$X(e),children:[(0,U.jsxs)(`p`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-1 text-sm`,"data-qa-risk":e.risk,children:[(0,U.jsx)(`span`,{className:J(`rounded-md px-2 py-0.5 text-xs font-medium`,t.tone),children:t.label}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:t.depth})]}),e.focusAreas.length>0?(0,U.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,"aria-label":`What QA looks at first`,children:e.focusAreas.map(e=>(0,U.jsx)(`li`,{className:`break-words`,children:e},e))}):null,(0,U.jsxs)(`p`,{className:`text-xs break-words text-muted-foreground`,children:[e.riskFactors.join(` · `),e.qaRequired?` · existing tests ${e.existingTestsLikelySufficient?`likely enough`:`likely not enough`}`:``]})]})}function yZ({runs:e}){return e.length===0?null:(0,U.jsx)(pH,{title:`Recent runs`,children:(0,U.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.map((e,t)=>(0,U.jsx)(`li`,{className:`break-words`,children:e},`${t}-${e}`))})})}function bZ({detail:e,finished:t}){return(0,U.jsxs)(U.Fragment,{children:[e.steps.length>0?(0,U.jsx)(mZ,{steps:e.steps,stopped:t}):null,e.request?(0,U.jsx)(pH,{title:`Request`,children:(0,U.jsx)(uH,{text:e.request})}):null,(0,U.jsx)(gZ,{detail:e,finished:t})]})}function xZ({detail:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(_Z,{amendments:e.amendments}),e.qaRisk?(0,U.jsx)(vZ,{risk:e.qaRisk}):null,(0,U.jsx)(yZ,{runs:e.runs})]})}function SZ({row:e,quiet:t=!1}){let n=(0,m.useRef)(!0);(0,m.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]);async function r(){if(e.section===`mine`)return bA(`#/lobby`);let t=ue(),r=()=>n.current&&ue()===t;try{let t=await be(`tasks.open`,{taskId:e.id});if(!r())return;let n=await be(`status.get`,{});if(!r())return;if(t.sessionId&&t.sessionId===n.sessionId)return bA(`#/lobby`);if(t.sessionId&&!t.key)return pp.info(`This task runs in another terminal. Switch to that terminal to work on it.`);if(n.busy)return pp.info(`The oracle is working in this window. Stop it first, then open the task in its session.`);await W(`sessions.switch`,t.key?{key:t.key}:{claimTaskId:e.id})&&r()&&bA(`#/lobby`)}catch(e){r()&&pp.error(e instanceof Error?e.message:String(e))}}let i=e.section===`mine`;return(0,U.jsx)(oj,{label:i?`Open in its session: this window`:`Open in its session`,text:`Open in session`,icon:zp,tone:t?`neutral`:`primary`,shortcut:`S`,onClick:()=>void r()})}function CZ({split:e}){let t=e.after.length>0?`, after ${e.after.map(e=>`part ${e}`).join(` and `)}`:``;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,U.jsxs)(`span`,{className:`font-medium text-primary`,children:[`part `,e.part,` of `,e.of]}),` of one plan that was split into tasks`,t?(0,U.jsx)(`span`,{className:`text-foreground`,children:t}):null]}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.titles.map((t,n)=>(0,U.jsxs)(`span`,{children:[n>0?(0,U.jsx)(`span`,{className:`text-muted-foreground/60`,children:` · `}):null,(0,U.jsxs)(`span`,{className:n+1===e.part?`font-medium text-foreground`:void 0,children:[n+1,`. `,t]})]},`${n}-${t}`))})]})}function wZ({planId:e}){let t=IA(`plans.get`,{planId:e},[`plans`]),n=t.data;return n?(0,U.jsxs)(U.Fragment,{children:[n.issue?(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`from issue #`,n.issue.number,` — `,n.issue.title,n.issue.url?(0,U.jsxs)(`span`,{className:`break-all`,children:[` `,n.issue.url]}):null]}):null,n.split?(0,U.jsx)(CZ,{split:n.split}):null,(0,U.jsx)(pH,{title:`Agreed plan`,children:(0,U.jsx)(uH,{text:n.brief})})]}):t.error?(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the agreed plan. `,t.error]}):null}function TZ({row:e,onGone:t}){let n=async n=>{await W(`plans.start`,{planId:e.id,where:n})&&t()},r=async()=>{await W(`plans.discard`,{planId:e.id})&&t()};return(0,U.jsxs)(`article`,{className:`flex min-w-0 flex-col gap-4`,"aria-label":e.title,children:[(0,U.jsxs)(sj,{children:[(0,U.jsx)(oj,{label:`Start here`,icon:sg,tone:`primary`,shortcut:`S`,onClick:()=>void n(`here`)}),(0,U.jsx)(oj,{label:`Start in a new session`,text:`New session`,icon:jg,shortcut:`N`,onClick:()=>void n(`session`)}),(0,U.jsx)(Hj,{icon:Vg,label:`Discard`,shortcut:`Delete`,title:`Discard "${e.title}"?`,description:`The saved plan is removed from the list. This cannot be undone.`,confirmLabel:`Discard`,variant:`destructive`,onConfirm:()=>void r()})]}),(0,U.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,U.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-medium`,children:[(0,U.jsx)(WX,{check:`open`,className:`mt-1.5`}),(0,U.jsx)(`span`,{className:`min-w-0 break-words`,children:e.title})]}),(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`pending`,e.age?` · saved ${nZ(e.age)}`:``]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),(0,U.jsx)(wZ,{planId:e.id})]})}function EZ({row:e,onResumed:t}){let[n,r]=(0,m.useState)(!1),i=(0,m.useRef)(!0);(0,m.useEffect)(()=>(i.current=!0,()=>{i.current=!1}),[]);async function a(){let n=ue();r(!0);try{let r=await be(`tasks.resume`,{taskId:e.id});if(ue()!==n)return;pp(r.notice,{action:{label:`View task`,onClick:()=>bA(yA(`tasks`,e.id))}}),t()}catch(e){ue()===n&&pp.error(e instanceof Error?e.message:String(e))}finally{i.current&&r(!1)}}let o=e.owner===`not running`;return(0,U.jsx)(oj,{label:o?`Resume: carry it on in a background session`:`Resume: unpause it where it runs`,text:`Resume`,icon:sg,tone:`primary`,shortcut:`R`,disabled:n,onClick:()=>void a()})}function DZ(e){return e instanceof Error?e.message:`That did not work. Try again.`}function OZ({run:e,onDone:t}){let[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(``),[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(``);return{open:n,change:e=>{o||(r(e),a(``),l(``))},typed:i,setTyped:a,busy:o,error:c,submit:async()=>{s(!0),l(``);try{pp((await e(i)).notice),r(!1),t()}catch(e){l(DZ(e))}finally{s(!1)}}}}function kZ({expected:e,value:t,onChange:n,disabled:r}){let i=(0,m.useId)();return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsx)(`label`,{htmlFor:i,className:`text-sm font-medium`,children:`Type the task's title to confirm`}),(0,U.jsx)(`p`,{className:`break-words rounded-md bg-muted px-2 py-1 font-mono text-xs select-all`,children:e}),(0,U.jsx)(cK,{id:i,value:t,disabled:r,autoComplete:`off`,spellCheck:!1,className:`max-md:min-h-11`,onChange:e=>n(e.target.value)})]})}function AZ(e){let t=OZ(e),n=uA(t.open,lA.confirm),r=e.typeToConfirm!==void 0&&t.typed!==e.typeToConfirm,i=e.tone??`neutral`;return(0,U.jsxs)(Mj,{open:t.open&&n,onOpenChange:t.change,children:[(0,U.jsx)(oj,{label:e.label,icon:e.icon,tone:i,onClick:()=>t.change(!0)}),(0,U.jsxs)(Fj,{children:[(0,U.jsxs)(Ij,{children:[(0,U.jsx)(Rj,{children:e.title}),(0,U.jsx)(zj,{children:e.description})]}),e.typeToConfirm===void 0?null:(0,U.jsx)(kZ,{expected:e.typeToConfirm,value:t.typed,onChange:t.setTyped,disabled:t.busy}),t.error?(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:t.error}):null,(0,U.jsxs)(Lj,{children:[(0,U.jsx)(Vj,{disabled:t.busy,className:`max-md:min-h-11 max-md:whitespace-normal`,children:`Cancel`}),(0,U.jsx)(X,{variant:i===`danger`?`destructive`:`default`,disabled:r||t.busy,"aria-busy":t.busy,className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:()=>void t.submit(),children:t.busy?`Working…`:e.confirmLabel})]})]})]})}function jZ({taskId:e,item:t,onDone:n}){let r=n=>()=>be(`tasks.resolveApproval`,{taskId:e,approvalId:t.id,decision:n}),i=`${t.kind}${t.domain?` for ${t.domain}`:``}`;return(0,U.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(AZ,{label:`Approve`,icon:tm,title:`Approve the ${i}?`,description:`${t.detail} The task's oracle is told and carries on with it.`,confirmLabel:`Approve`,run:r(`approved`),onDone:n}),(0,U.jsx)(AZ,{label:`Reject`,icon:r_,tone:`danger`,title:`Reject the ${i}?`,description:`${t.detail} The task's oracle is told and works without it.`,confirmLabel:`Reject`,run:r(`rejected`),onDone:n})]})}function MZ({taskId:e,item:t,live:n,onDone:r}){return(0,U.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-1 basis-60 gap-2`,children:[(0,U.jsx)(pm,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,U.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[t.kind,` `,t.detail]})]}),n&&t.id?(0,U.jsx)(jZ,{taskId:e,item:t,onDone:r}):null]})}function NZ({blockers:e}){return e.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex gap-2`,children:[(0,U.jsx)(Tm,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,U.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.reason,` (needs: `,e.need,`)`]})]},`${t}-${e.reason}`))}function PZ({row:e,detail:t,onChanged:n}){let r=e.id;return(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.resumable?(0,U.jsx)(EZ,{row:e,onResumed:n}):null,t.canAccept?(0,U.jsx)(AZ,{label:`Accept as is`,icon:kg,title:`Accept "${e.title}" as is?`,description:`You accept the work unverified: missing QA and lint checks are waived on your word. The task's oracle is asked to complete it; nothing is merged.`,confirmLabel:`Accept as is`,run:()=>be(`tasks.accept`,{taskId:r}),onDone:n}):null,t.canForceClose?(0,U.jsx)(AZ,{label:`Force close`,icon:xm,tone:`danger`,title:`Force close "${e.title}"?`,description:`The task is abandoned and its running work cancelled. Its code, worktree and history are kept; it is not marked complete.`,confirmLabel:`Force close`,typeToConfirm:e.title,run:e=>be(`tasks.forceClose`,{taskId:r,title:e}),onDone:n}):null]})}function FZ({row:e,detail:t,onChanged:n}){let r=e.kind===`task`&&e.check===`open`,i=r&&!!(e.resumable||t.canAccept||t.canForceClose),a=t.waiting;return a.length===0&&t.blockers.length===0&&!i?null:(0,U.jsxs)(pH,{title:`Waiting on`,children:[(0,U.jsxs)(`ul`,{className:`flex flex-col gap-2 text-sm`,children:[a.map((t,i)=>(0,U.jsx)(MZ,{taskId:e.id,item:t,live:r,onDone:n},`${i}-${t.id||t.kind}`)),(0,U.jsx)(NZ,{blockers:t.blockers})]}),i?(0,U.jsx)(PZ,{row:e,detail:t,onChanged:n}):null]})}function IZ(e){if(e.kind===`archived`)return{state:`archived`,rest:nZ(e.age??`now`)};let t=e.check!==`open`,n=e.owner??(e.section===`mine`?`this session`:``),r=t&&e.age?`${e.check===`dropped`?`dropped`:`done`} ${nZ(e.age)}`:``;return{state:tZ(e.status,e.paused),rest:[t?``:n,r].filter(Boolean).join(` · `)}}function LZ(e){return e?[VX(e.track),e.domains.join(`, `)].filter(Boolean).join(` · `):``}function RZ({row:e}){return e.progress?(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,U.jsx)(UX,{done:e.progress.done,total:e.progress.total}),(0,U.jsxs)(`span`,{children:[e.progress.done,` of `,e.progress.total,` steps`]})]}):null}function zZ({row:e,task:t}){let n=t?.git?`branch ${t.git.branch}${t.git.from?` · from ${t.git.from}`:``}`:``,{state:r,rest:i}=IZ(e);return(0,U.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-semibold tracking-tight`,children:[(0,U.jsx)(WX,{check:e.check,className:`mt-1.5`}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[ZX[e.check],`:`]}),(0,U.jsx)(`span`,{className:e.check===`dropped`?`min-w-0 break-words line-through`:`min-w-0 break-words`,children:e.title})]}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium text-foreground`,children:r}),i?(0,U.jsx)(`span`,{children:i}):null]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:[e.id,LZ(t),n].filter(Boolean).join(` · `)}),(0,U.jsx)(RZ,{row:e})]})}function BZ({row:e,onGone:t,onChanged:n}){let r=e.id;return{restore:async()=>{await W(`tasks.restore`,{taskId:r},{undo:()=>void W(`tasks.archive`,{taskId:r})})&&t()},archive:async()=>{await W(`tasks.archive`,{taskId:r},{undo:()=>void W(`tasks.restore`,{taskId:r})})&&t()},remove:async()=>{await W(`tasks.delete`,{taskId:r,where:e.kind===`archived`?`archive`:`list`})&&t()},toggleAuto:()=>void W(`tasks.auto`,{taskId:r,on:!e.auto}).then(n)}}function VZ({row:e,archive:t}){return e.check===`open`?(0,U.jsx)(Hj,{label:`Archive`,icon:Np,shortcut:`E`,title:`Archive "${e.title}"?`,description:`A task still under way is abandoned first, then moved to the archive. Restore brings it back.`,confirmLabel:`Archive`,onConfirm:()=>void t()}):(0,U.jsx)(oj,{label:`Archive`,icon:Np,shortcut:`E`,onClick:()=>void t()})}function HZ({on:e,toggle:t}){return ij(`a`,t),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsxs)(`label`,{className:`flex h-8 cursor-pointer items-center gap-2 rounded-lg px-2.5 text-[0.8125rem] font-medium transition-colors hover:bg-accent max-md:min-h-11`,children:[(0,U.jsx)(dg,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,U.jsx)(`span`,{children:`Auto`}),(0,U.jsx)(lK,{checked:e,onCheckedChange:t,"aria-label":`Auto mode`,"aria-keyshortcuts":`A`}),(0,U.jsx)(_k,{chord:`A`,className:`kbd-hint`})]})}),(0,U.jsx)(BA,{children:`Auto mode: the oracle decides without asking`})]})}function UZ(e){let{row:t}=e,{restore:n,archive:r,remove:i,toggleAuto:a}=BZ(e),o=t.kind===`archived`,s=t.kind===`task`&&t.check===`open`&&!!t.resumable;return(0,U.jsxs)(sj,{children:[t.kind===`task`&&t.check===`open`?(0,U.jsx)(SZ,{row:t,quiet:s}):null,o?(0,U.jsx)(oj,{label:`Restore`,icon:hg,shortcut:`R`,onClick:()=>void n()}):null,t.check===`open`&&!o?(0,U.jsx)(HZ,{on:!!t.auto,toggle:a}):null,o?null:(0,U.jsx)(VZ,{row:t,archive:r}),(0,U.jsx)(Hj,{icon:Vg,label:o?`Delete for good`:`Delete`,text:`Delete`,shortcut:`Delete`,title:`Delete "${t.title}" for good?`,description:`This cannot be undone.`,confirmLabel:`Delete`,variant:`destructive`,onConfirm:()=>void i()})]})}function WZ(e){let{row:t}=e,n=t.kind===`plan`,r=IA(`tasks.get`,{taskId:t.id},[`tasks`],!n),i=xk(`lobby`).data?.task,a=i?.id===t.id?i:void 0;if(n)return(0,U.jsx)(TZ,{row:t,onGone:e.onGone});let o=t.check===`open`&&t.kind===`task`,s=r.data?r.data.work:t.work;return(0,U.jsxs)(`article`,{className:`flex min-w-0 flex-col gap-5`,"aria-label":t.title,children:[(0,U.jsx)(UZ,{...e}),(0,U.jsx)(zZ,{row:t,task:a}),r.data?(0,U.jsx)(FZ,{row:t,detail:r.data,onChanged:()=>{r.reload(),e.onChanged()}}):null,(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,U.jsx)(TX,{timing:r.data?.timing??t.timing,...s?{work:s}:{},stopped:t.check!==`open`})}),r.data?.delivery?(0,U.jsx)(zX,{taskId:t.id,title:t.title,delivery:r.data.delivery,onChanged:r.reload},t.id):null,r.data?(0,U.jsx)(bZ,{detail:r.data,finished:!o}):null,(0,U.jsx)(YX,{taskId:t.id,finished:!o,canComment:o}),r.data?(0,U.jsx)(xZ,{detail:r.data}):null,r.error&&!r.data?(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the plan detail. `,r.error]}):null]})}function GZ({row:e}){return e.check===`open`&&e.progress?(0,U.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground tabular-nums`,children:[(0,U.jsx)(UX,{done:e.progress.done,total:e.progress.total}),(0,U.jsxs)(`span`,{children:[e.progress.done,`/`,e.progress.total]})]}):e.age&&e.check!==`open`?(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.age}):null}function KZ(e){return e.check===`dropped`?`text-muted-foreground line-through`:e.kind===`archived`||e.check===`done`?`text-muted-foreground`:`text-foreground`}function qZ({row:e}){return(0,U.jsxs)(U.Fragment,{children:[e.check===`open`?(0,U.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:rZ(e)}):null,e.kind===`plan`?null:(0,U.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:(0,U.jsx)(TX,{timing:e.timing,...e.work?{work:e.work}:{},stopped:e.check!==`open`})}),e.delivery?(0,U.jsxs)(`span`,{className:`pl-6 text-xs text-foreground`,children:[`Delivery: `,e.delivery.status.replaceAll(`_`,` `),` · open task to review`]}):null]})}function JZ({row:e,selected:t,onSelect:n}){return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:J(QH,`max-md:min-h-11`),children:[(0,U.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,U.jsx)(WX,{check:e.check,className:`mt-0.5`}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[ZX[e.check],`:`]}),(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words`,KZ(e),t&&`font-medium text-foreground`),children:e.title}),(0,U.jsx)(GZ,{row:e})]}),(0,U.jsx)(qZ,{row:e})]})})}function YZ({rows:e,selectedId:t,onSelect:n}){return(0,U.jsx)(`div`,{className:`flex flex-col pb-2`,children:iZ(e).map(({section:e,rows:r})=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h3`,{className:eU,children:(0,U.jsx)(fH,{title:XX[e],right:String(r.length),className:`[&>span:first-child]:font-medium [&>span:first-child]:text-muted-foreground`})}),(0,U.jsx)(`ul`,{className:$H,children:r.map(e=>(0,U.jsx)(JZ,{row:e,selected:e.id===t,onSelect:n},`${e.kind}-${e.id}`))})]},e))})}var XZ=()=>bA(yA(`tasks`)),ZZ=e=>bA(yA(`tasks`,e));function QZ(){return(0,U.jsxs)(SA,{className:`m-4 flex-1`,children:[(0,U.jsxs)(CA,{children:[(0,U.jsx)(TA,{variant:`icon`,children:(0,U.jsx)(_h,{"aria-hidden":`true`})}),(0,U.jsx)(DA,{children:eZ})]}),(0,U.jsx)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:()=>bA(yA(`plan`)),children:`Plan a task`})]})}function $Z({shown:e,count:t,onToggle:n}){return(0,U.jsxs)(`label`,{className:`btn-outline flex h-7 min-w-0 cursor-pointer items-center gap-2 rounded-lg border bg-card px-2 text-xs font-medium transition-[box-shadow] max-md:h-11 max-md:min-w-11`,children:[(0,U.jsx)($J,{checked:e,onCheckedChange:n,"aria-label":`Show archived tasks`,className:`size-4`}),`Archived`,(0,U.jsx)(ZH,{variant:`secondary`,className:`h-5 px-1.5`,children:t})]})}function eQ({id:e}){let t=bj(),[n,r]=(0,m.useState)(!1),i=IA(`tasks.list`,{},[`tasks`,`plans`]),a=IA(`tasks.archived`,{},[`tasks`]),o=i.data?.rows??[],s=a.data?.rows??[],c=n?[...o,...s]:o,l=e??(t?c[0]?.id:void 0),u=[...c,...s].find(e=>e.id===l&&e.kind===`task`)?.id;if((0,m.useEffect)(()=>(_X(u),()=>_X(void 0)),[u]),!i.data&&i.error)return(0,U.jsx)(PA,{message:`Could not load tasks. ${i.error}`,onRetry:i.reload});if(i.data&&o.length===0&&s.length===0)return(0,U.jsx)(QZ,{});let d=[...c,...s].find(e=>e.id===l),f=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Tj,{title:`Tasks`,count:aZ(c),children:(0,U.jsx)($Z,{shown:n,count:s.length,onToggle:()=>r(e=>!e)})}),i.data?c.length===0?(0,U.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:eZ}):(0,U.jsx)(YZ,{rows:c,selectedId:l,onSelect:ZZ}):(0,U.jsx)(Ej,{})]}),p=d?(0,U.jsx)(WZ,{row:d,onGone:XZ,onChanged:i.reload},d.id):e?(0,U.jsx)(tQ,{}):null;return(0,U.jsx)(wj,{wide:t,list:f,detail:p,open:!!e,onClose:XZ,hint:`Select a task to see its detail.`,describe:`Task detail`})}function tQ(){return(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That task is not on the list any more.`})}var nQ={l:`lobby`,p:`plan`,t:`tasks`,u:`git`,n:`knowledge`,q:`quickfix`,e:`settings`};function rQ(e){let t=e[0];if(t)try{return decodeURIComponent(t)}catch{return t}}function iQ(e){if(e.kind===`settings`)return(0,U.jsx)(CJ,{});switch(e.tab){case`lobby`:return(0,U.jsx)(EG,{});case`tasks`:return(0,U.jsx)(eQ,{...CG(e.rest)});case`plan`:return(0,U.jsx)(KY,{rest:e.rest});case`quickfix`:return(0,U.jsx)(fX,{id:rQ(e.rest)});case`git`:return(0,U.jsx)(WU,{rest:e.rest});case`knowledge`:return(0,U.jsx)(SG,{rest:e.rest})}}function aQ(e,t){return t.overlay?!0:e===`savePlan`&&!t.saveAvailable}var oQ={tab:`Tab`,esc:`Escape`,escape:`Escape`,enter:`Enter`,space:`Space`,pageup:`PageUp`,pagedown:`PageDown`,home:`Home`,end:`End`,"]":`BracketRight`,"[":`BracketLeft`,"/":`Slash`,"?":`Slash`,",":`Comma`,".":`Period`};function sQ(e){return e.length===1&&/[a-z]/i.test(e)?`Key${e.toUpperCase()}`:e.length===1&&/[0-9]/.test(e)?`Digit${e}`:oQ[e]}function cQ(e){let t={alt:!1,ctrl:!1,shift:!1,meta:!1,code:``};for(let n of e.toLowerCase().split(`+`))if(n===`alt`)t.alt=!0;else if(n===`ctrl`||n===`control`)t.ctrl=!0;else if(n===`shift`)t.shift=!0;else if(n===`meta`||n===`cmd`)t.meta=!0;else{let e=sQ(n);if(!e)return;t.code=e}return t.code?t:void 0}function lQ(e,t){return e.code===t.code&&e.altKey===t.alt&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift&&e.metaKey===t.meta}function uQ(e,t){let n=cQ(t);return n?lQ(e,n):!1}function dQ(e,t){for(let n of t)if(uQ(e,n.key))return n.action}function fQ(e,t){for(let n of t)if(uQ(e,n.key))return n.id}function pQ(e){return UA(e.target)||e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||dA()||!!document.querySelector(`[role='dialog'], [role='menu'], [role='listbox']`)}function mQ(e,t,n,r){let i=!e.shiftKey&&/^[1-9]$/.test(e.key)?t[Number(e.key)-1]:void 0;if(i)r(i.id);else if(e.key===`/`)n(`search`);else if(e.key===`?`)n(`help`);else if(e.key===`j`||e.key===`k`)YA(e.key===`j`?1:-1);else return!1;return!0}function hQ(e,t){let n=fQ(e,t.tabs),r=dQ(e,t.keys);return!n&&!r?!1:aQ(r,{overlay:!!document.querySelector(`[role='dialog']:not([data-state='closed']), [role='menu']:not([data-state='closed']), [role='listbox']`)||dA(),typing:UA(e.target)||e.target instanceof HTMLInputElement,saveAvailable:!!document.querySelector(`[data-plan-save]:not([disabled])`)})||(r===`search`||r===`savePlan`)&&!t.insideApp()?!0:(e.preventDefault(),n?t.onTab(n):r&&t.onAction(r),!0)}function gQ(e,t,n){if(e.key===`Escape`)return Date.now()<n&&e.preventDefault(),0;if(Date.now()<n){let n=nQ[e.key];return n&&(e.preventDefault(),t.onTab(n)),0}return e.key===`g`?Date.now()+1500:(mQ(e,t.tabs,t.onAction,t.onTab)&&e.preventDefault(),0)}function _Q(e){(0,m.useEffect)(()=>{if(!e.enabled)return;let t=0,n=n=>{if(n.defaultPrevented||n.isComposing)return;if(!e.insideApp()){dQ(n,e.keys)===`help`&&(n.preventDefault(),e.onAction(`help`));return}let r=!n.altKey&&!n.ctrlKey&&!n.metaKey;if(r&&pQ(n)){t=0;return}if(hQ(n,e)){t=0;return}t=r?gQ(n,e,t):0};return window.addEventListener(`keydown`,n,!0),()=>window.removeEventListener(`keydown`,n,!0)},[e.enabled,e.keys,e.tabs,e.insideApp,e.onAction,e.onTab])}var vQ=[{id:`focus`,caps:[`/`],help:`focus search, or the message box`},{id:`send`,label:`Enter`,help:`send the message`},{id:`newline`,label:`Shift+Enter`,help:`a new line (lists carry on)`},{id:`format`,label:`Ctrl+B`,help:`bold; Ctrl+I italic, Ctrl+E code, Ctrl+K link`},{id:`leave`,label:`Esc`,help:`leave the box for the tab bar`}],yQ=[{id:`digits`,caps:[`1`,`…`,`9`],help:`jump to a tab in current order`},{id:`help`,caps:[`?`],help:`keyboard shortcuts`},...Object.entries(nQ).map(([e,t])=>({id:`go.${t}`,caps:[`g`,e],help:`jump to ${t}`})),{id:`project`,caps:[`P`],help:`open the project switcher`},{id:`theme`,caps:[`D`],help:`switch between light and dark`},{id:`edit`,label:`Ctrl+Enter`,help:`save an edited message; Esc cancels`}],bQ=[{id:`tasks`,page:`Tasks`,keys:[[`E`,`archive`],[`R`,`restore`],[`A`,`auto mode`],[`Delete`,`delete`]]},{id:`saved`,page:`Saved plan`,keys:[[`S`,`start here`],[`N`,`new session`],[`Delete`,`discard`]]},{id:`plan`,page:`Plan`,keys:[[`A`,`answer`],[`R`,`retry`],[`Ctrl+S`,`save`],[`N`,`new plan`]]},{id:`quickfix`,page:`Quick fix`,keys:[[`R`,`run anyway`],[`T`,`make a task`],[`C`,`cancel`]]},{id:`git`,page:`Git`,keys:[[`R`,`refresh both lists`],[`V`,`review`],[`Q`,`Jev's read`],[`X`,`stop`],[`N`,`plan an issue`]]},{id:`knowledge`,page:`Knowledge`,keys:[[`E`,`edit`],[`A`,`add`],[`C`,`comment`],[`F`,`edit file`],[`Delete`,`delete`]]},{id:`confirm`,page:`Asked to confirm`,keys:[[`Y`,`yes, do it`],[`Esc`,`keep it`]]}],xQ=[{id:`enter`,caps:[`↓`],help:`from the tab bar, into the page`},{id:`rows`,caps:[`↑`,`↓`],help:`move through a list (j and k work too)`},{id:`pane`,caps:[`←`,`→`],help:`between a list and its detail (h and l)`},{id:`ends`,caps:[`Home`,`End`],help:`first and last row`},{id:`open`,caps:[`Enter`,`Space`],help:`activate the focused button or row (links: Enter; checkboxes: Space)`},{id:`back`,label:`Esc`,help:`back up to the tab bar`}],SQ=[{id:`qmove`,caps:[`↑`,`↓`],help:`move between the options`},{id:`qpick`,label:`Space`,help:`pick an option (several when allowed)`},{id:`qchoose`,label:`Enter`,help:`choose and go on; in your own answer, send it`},{id:`qacross`,caps:[`←`,`→`],help:`previous and next question`},{id:`qdigit`,caps:[`1`,`2`,`…`],help:`pick that option`},{id:`qesc`,label:`Esc`,help:`put the question away for later`}];function CQ({line:e}){return(0,U.jsxs)(`div`,{className:`flex items-center gap-3 py-1`,children:[(0,U.jsx)(`span`,{className:`flex w-28 shrink-0 items-center`,children:e.caps?(0,U.jsx)(`span`,{className:`inline-flex items-center gap-1`,children:e.caps.map(e=>(0,U.jsx)(dk,{children:e},e))}):(0,U.jsx)(_k,{chord:e.label??``})}),(0,U.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.help})]})}function wQ(){return(0,U.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Buttons on a page`}),bQ.map(e=>(0,U.jsxs)(`div`,{className:`flex items-start gap-3 py-1`,children:[(0,U.jsx)(`span`,{className:`w-28 shrink-0 pt-0.5 text-sm font-medium`,children:e.page}),(0,U.jsx)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5 text-sm text-muted-foreground`,children:e.keys.map(([e,t])=>(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,U.jsx)(_k,{chord:e}),t]},e))})]},e.id))]})}function TQ({title:e,lines:t}){return(0,U.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:e}),t.map(e=>(0,U.jsx)(CQ,{line:e},e.id))]})}function EQ(e){return e.map(e=>({id:e.action,label:e.label,help:e.help}))}function DQ(e){return e.map(e=>({id:`tab.${e.id}`,label:e.key,help:`jump to the ${e.label} tab`}))}function OQ({open:e,onOpenChange:t,keys:n,tabs:r}){let i=Sk(`(max-width: 767.98px)`),a=e&&!i,o=uA(a,lA.help),s=(0,m.useRef)(null);return(0,m.useEffect)(()=>{i&&e&&t(!1)},[i,e,t]),(0,m.useEffect)(()=>{if(!a||!o)return;let e=e=>{let r=n.find(e=>e.action===`help`)?.key;(e.key===`Escape`||r&&uQ(e,r))&&(e.preventDefault(),t(!1))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[n,t,o,a]),i?null:(0,U.jsxs)(nA,{open:a&&o,onOpenChange:t,label:`Keys`,className:`max-w-4xl`,children:[(0,U.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsx)(`h2`,{"aria-hidden":`true`,className:`text-base font-semibold tracking-tight`,children:`Keyboard shortcuts`}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(_k,{chord:`Esc`}),(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Close`,onClick:()=>t(!1),children:(0,U.jsx)(r_,{"aria-hidden":`true`})})]})]}),(0,U.jsxs)(`div`,{ref:s,className:`grid min-h-0 flex-1 gap-x-10 gap-y-6 overflow-y-auto p-4 max-md:p-3 md:grid-cols-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(TQ,{title:`Everywhere`,lines:EQ(n)}),(0,U.jsx)(TQ,{title:`Jump to a tab`,lines:DQ(r)}),(0,U.jsx)(TQ,{title:`Navigation and editing`,lines:yQ}),(0,U.jsx)(TQ,{title:`Message box`,lines:vQ})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(TQ,{title:`Lists and panes`,lines:xQ}),(0,U.jsx)(wQ,{}),(0,U.jsx)(TQ,{title:`Questions`,lines:SQ})]})]}),(0,U.jsx)(zv,{target:s})]})}var kQ=`size-[1.05rem]`;function AQ({hint:e,onHelp:t,className:n,side:r=`top`}){return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"aria-keyshortcuts":e,"aria-describedby":`focused-action-help`,onClick:t,className:n,children:(0,U.jsx)(ph,{"aria-hidden":`true`,className:kQ})})}),(0,U.jsxs)(BA,{side:r,children:[`Keyboard shortcuts `,(0,U.jsx)(_k,{chord:e})]})]})}function jQ({className:e,side:t=`top`}){let n=RG(),r=Sk(`(max-width: 767.98px)`),i=r?`App sounds`:n?`Unmute prompt sounds`:`Mute prompt sounds`;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":i,"aria-pressed":n,"aria-describedby":r?`app-sounds-help focused-action-help`:`focused-action-help`,className:e,onClick:()=>IG(!n),children:n?(0,U.jsx)(Zg,{"aria-hidden":`true`,className:kQ}):(0,U.jsx)(Yg,{"aria-hidden":`true`,className:kQ})})}),(0,U.jsx)(BA,{side:t,children:i})]}),r?(0,U.jsx)(`span`,{id:`app-sounds-help`,className:`sr-only`,children:`App sounds controls prompt tones and navigation ticks.`}):null]})}function MQ({className:e,side:t=`top`}){let{theme:n,setTheme:r}=eq(),i=n===`dark`||n===`system`&&typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":i?`Switch to light mode`:`Switch to dark mode`,"aria-keyshortcuts":`D`,"aria-describedby":`focused-action-help`,onClick:()=>r(i?`light`:`dark`),className:e,children:i?(0,U.jsx)(Fg,{"aria-hidden":`true`,className:kQ}):(0,U.jsx)(qh,{"aria-hidden":`true`,className:kQ})})}),(0,U.jsxs)(BA,{side:t,children:[i?`Light mode`:`Dark mode`,` `,(0,U.jsx)(`span`,{className:`max-md:hidden`,children:(0,U.jsx)(_k,{chord:`D`})})]})]})}var NQ=[{id:`light`,label:`Light`},{id:`dark`,label:`Dark`},{id:`system`,label:`System`}];function PQ({className:e,side:t=`top`}){let{theme:n,setTheme:r}=eq();return(0,U.jsxs)(DK,{children:[(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(OK,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Appearance`,className:e,children:(0,U.jsx)(Yh,{"aria-hidden":`true`,className:kQ})})})}),(0,U.jsx)(BA,{side:t,children:`Appearance`})]}),(0,U.jsxs)(kK,{side:t===`right`?`right`:`top`,align:t===`right`?`start`:`center`,sideOffset:10,collisionPadding:12,"aria-label":`Appearance`,onOpenAutoFocus:e=>{e.preventDefault(),e.currentTarget.focus({preventScroll:!0})},tabIndex:-1,className:`glass-pop flex max-h-[85svh] w-[26rem] max-w-[calc(100vw-1.5rem)] flex-col gap-3 overflow-y-auto rounded-2xl p-3`,children:[(0,U.jsx)(lj,{label:`Mode`,items:NQ,value:n,onChange:e=>r(e),className:`w-full [&>button]:flex-1`}),(0,U.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,U.jsx)(`p`,{className:`px-0.5 text-xs font-medium text-muted-foreground`,children:`Colour theme`}),(0,U.jsx)(`div`,{className:`[&_[role=radiogroup]]:!grid-cols-3 [&_[role=radiogroup]]:gap-1.5`,children:(0,U.jsx)(Lq,{})})]}),(0,U.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,U.jsx)(`p`,{className:`px-0.5 text-xs font-medium text-muted-foreground`,children:`Typeface`}),(0,U.jsx)(tq,{kind:`font`,dense:!0})]}),(0,U.jsx)(`a`,{href:`#/settings`,className:`px-0.5 text-xs text-link underline-offset-2 hover:underline`,children:`More in Settings`})]})]})}function FQ({className:e,side:t=`top`}){let n=YG(),r=n?`Turn off desktop notifications`:`Turn on desktop notifications`,i=async()=>{if(n)return ZG();let e=await XG();e===`granted`?pp.success(`Desktop notifications are on.`):pp.error(e===`unsupported`?`This browser cannot show notifications.`:`Notifications are blocked for this page in the browser's settings.`)};return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":r,"aria-pressed":n,className:e,onClick:()=>void i(),children:n?(0,U.jsx)(Gp,{"aria-hidden":`true`,className:kQ}):(0,U.jsx)(Up,{"aria-hidden":`true`,className:kQ})})}),(0,U.jsx)(BA,{side:t,children:r})]})}function IQ({className:e,side:t=`top`}){let n=x();if(!n.supported)return null;let r=n.on?`Leave full screen`:`Full screen`;return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":r,"aria-pressed":n.on,className:e,onClick:()=>void n.toggle(),children:n.on?(0,U.jsx)(Uh,{"aria-hidden":`true`,className:kQ}):(0,U.jsx)(kh,{"aria-hidden":`true`,className:kQ})})}),(0,U.jsx)(BA,{side:t,children:r})]})}function LQ(e){return e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}async function RQ(e){if(e.size===0)throw Error(`${e.name||`That file`} is empty.`);if(e.size>20971520)throw Error(`${e.name||`That file`} is larger than 20 MB.`);let t=new URLSearchParams({name:e.name||`pasted-file`,type:e.type}),n=await fetch(R(`/api/files.upload?${t}`),{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e,credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new ve(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw new ve(r.error,r.code,n.status);return r.result}function zQ(e,t,n,r){let i=e.slice(0,t),a=e.slice(t,n),o=e.slice(n);if(a.length>=r.length*2&&a.startsWith(r)&&a.endsWith(r)){let e=a.slice(r.length,a.length-r.length);return{value:i+e+o,start:t,end:t+e.length}}return i.endsWith(r)&&o.startsWith(r)?{value:i.slice(0,i.length-r.length)+a+o.slice(r.length),start:t-r.length,end:n-r.length}:{value:i+r+a+r+o,start:t+r.length,end:n+r.length}}function BQ(e,t,n){let r=e.slice(t,n)||`text`,i=`[${r}](url)`,a=t+r.length+3;return{value:e.slice(0,t)+i+e.slice(n),start:a,end:a+3}}var VQ=/^(\s*)(?:([-*+])|(\d+)([.)]))\s+(\[[ xX]\]\s+)?/;function HQ(e,t){let n=e.lastIndexOf(`
|
|
99
|
+
`).map(e=>{let n=e.trimStart().startsWith("```");return n&&(t=!t),{text:e,fenced:t||n}})}function kY({notes:e}){return(0,U.jsx)(U.Fragment,{children:e.map((e,t)=>(0,U.jsx)(`p`,{className:`ml-6 rounded-lg border border-primary/15 bg-accent px-3 py-1.5 text-sm text-foreground italic`,children:e},t))})}var AY=[],jY=(0,m.memo)(function({row:e,index:t,notes:n,form:r,onComment:i}){let a=e.text.trim(),o=()=>i(t);return(0,U.jsxs)(`li`,{"data-line":t,className:J(`group/line`,!r&&`[contain-intrinsic-size:auto_2.75rem] [content-visibility:auto]`),children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start gap-1`,children:[(0,U.jsx)(`span`,{className:`flex w-4 shrink-0 justify-center pt-3.5`,"aria-hidden":`true`,children:n.length>0?(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-primary`}):null}),(0,U.jsx)(`div`,{className:J(`min-w-0 flex-1 cursor-pointer rounded-lg px-2 py-1.5 transition-colors hover:bg-muted`,r&&`bg-muted`,e.fenced&&`font-mono text-sm whitespace-pre-wrap break-words`),onClick:e=>!e.target.closest(`a`)&&o(),children:e.fenced?e.text:(0,U.jsx)(uH,{text:e.text})}),(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,className:`shrink-0 text-muted-foreground max-md:size-11 opacity-0 transition-opacity group-hover/line:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100`,"aria-label":`Comment on this line: ${a}`,onClick:o,children:(0,U.jsx)(Fh,{"aria-hidden":`true`})})]}),(0,U.jsx)(kY,{notes:n}),r]})});function MY({draft:e,comments:t,commenting:n,form:r,onComment:i}){let a=(0,m.useMemo)(()=>OY(e),[e]),o=tH(a.length);return(0,U.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`Draft plan lines`,children:a.slice(0,o).map((e,a)=>e.text.trim()?(0,U.jsx)(jY,{row:e,index:a,notes:t.get(e.text.trim())??AY,form:a===n?r:void 0,onComment:i},a):(0,U.jsx)(`li`,{"aria-hidden":`true`,className:`h-2`},a))})}function NY({notes:e}){return e.length===0?null:(0,U.jsx)(pH,{title:rY,children:(0,U.jsx)(`dl`,{className:`flex flex-col gap-2 text-sm`,children:e.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex min-w-0 gap-3 max-md:flex-wrap`,children:[(0,U.jsx)(`dt`,{className:J(`w-20 shrink-0 font-medium`,$U(e.from)),children:QU(e.from)}),(0,U.jsx)(`dd`,{className:`min-w-0 flex-1`,children:(0,U.jsx)(uH,{text:e.text})})]},t))})})}function PY({line:e,onCancel:t,onSent:n}){let r=(0,m.useRef)(null);return(0,m.useEffect)(()=>{let e=r.current?.querySelector(`textarea`);e?.focus(),e?.scrollIntoView({block:`nearest`})},[]),(0,U.jsxs)(`div`,{ref:r,role:`group`,"aria-label":`Comment on this line`,className:`line-comment relative mt-1 mb-2 ml-6 rounded-xl border p-3`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Cancel the comment`,title:`Cancel · Esc`,onClick:t,className:`absolute top-1.5 right-1.5 size-7 text-muted-foreground max-md:size-11`,children:(0,U.jsx)(r_,{"aria-hidden":`true`})}),(0,U.jsx)(aU,{label:`Your comment`,hint:`Enter adds the comment · Esc cancels`,buttonLabel:`Add comment`,onSend:async t=>await W(`planner.commentLine`,{line:e,text:t.trim()})?(n(t.trim()),!0):!1})]})}function FY({open:e,onClose:t,snap:n,comments:r,onSent:i}){let a=uA(e,lA.sheet),o=Sk(`(max-width: 767.98px)`),s=(0,m.useRef)(null),[c,l]=(0,m.useState)(),u=(0,m.useMemo)(()=>n.draft?OY(n.draft):[],[n.draft]),d=c===void 0?void 0:u[c]?.text.trim(),f=()=>{let e=c;l(void 0),requestAnimationFrame(()=>s.current?.querySelector(`[data-line="${e}"] button[aria-label^="Comment on this line"]`)?.focus())};return(0,U.jsx)(uj,{open:e&&a,onOpenChange:e=>!e&&t(),children:(0,U.jsxs)(mj,{showCloseButton:!1,side:o?`bottom`:`right`,"aria-label":`Draft plan`,onEscapeKeyDown:e=>{d!==void 0&&(e.preventDefault(),f())},onCloseAutoFocus:()=>l(void 0),className:J(`plan-sheet gap-0`,o?`data-[side=bottom]:inset-0 data-[side=bottom]:h-full data-[side=bottom]:max-w-none data-[side=bottom]:rounded-none`:`data-[side=right]:w-[min(44rem,92vw)] data-[side=right]:sm:max-w-none`),children:[(0,U.jsxs)(hj,{className:`flex-row items-center justify-between gap-3 border-b px-5 py-3 max-md:px-4`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,U.jsx)(gj,{className:`text-base font-semibold tracking-tight`,children:`Draft plan`}),(0,U.jsxs)(_j,{className:`text-xs text-muted-foreground`,children:[n.round>0?`${uY(n.round,n.limit)} · `:``,`choose a line to comment on it`]})]}),(0,U.jsx)(dj,{asChild:!0,children:(0,U.jsxs)(X,{variant:`ghost`,size:`sm`,"aria-label":`Close the plan`,title:`Close · Esc`,className:J(`gap-2 text-muted-foreground`,o&&`h-11 px-3 text-sm`),children:[(0,U.jsx)(r_,{"aria-hidden":`true`}),`Close`,o?null:(0,U.jsx)(_k,{chord:`Esc`,className:`kbd-hint`})]})})]}),(0,U.jsxs)(`div`,{ref:s,className:`flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overscroll-contain px-5 pt-4 pb-8 max-md:px-3 max-md:pb-[max(1.5rem,env(safe-area-inset-bottom))]`,children:[n.draft?(0,U.jsx)(MY,{draft:n.draft,comments:r,commenting:d===void 0?void 0:c,form:d===void 0?void 0:(0,U.jsx)(PY,{line:d,onCancel:f,onSent:e=>(i(d,e),f())},c),onComment:l}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.busy?nY:tY}),(0,U.jsx)(NY,{notes:n.notes})]}),(0,U.jsx)(zv,{target:s})]})})}var IY=()=>bA(yA(`plan`,`previous`)),LY=e=>bA(yA(`plan`,`previous`,e));function RY(e){let t=Date.now()-Date.parse(e);return Number.isFinite(t)?jj(Math.max(0,t)):``}function zY(e,t){return[`${t} message${t===1?``:`s`}`,`round ${e.rounds}`,RY(e.updatedAt)].filter(Boolean).join(` · `)}function BY({plan:e,selected:t}){return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>LY(e.id),className:J(QH,`max-md:min-h-11`),children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),e.hasDraft?(0,U.jsx)(ZH,{variant:`secondary`,children:`draft`}):null]}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:zY(e,e.messages)})]})})}function VY({id:e,onGone:t}){let n=IA(`planner.previousGet`,{id:e},[`planner`]),r=n.data;if(!r)return n.error?(0,U.jsx)(PA,{message:`Could not load that plan. ${n.error}`,onRetry:n.reload}):null;let i=!!r.archivedAt,a=async()=>{await W(`planner.previousOpen`,{id:e})&&bA(yA(`plan`))},o=async()=>{await W(`planner.previousArchive`,{id:e,archived:!i})&&t()},s=async()=>{await W(`planner.previousDelete`,{id:e})&&t()};return(0,U.jsxs)(`article`,{className:`flex flex-col gap-5`,"aria-label":r.title,children:[(0,U.jsxs)(sj,{children:[(0,U.jsx)(oj,{label:`Carry on planning`,text:`Carry on`,icon:sg,tone:`primary`,shortcut:`C`,onClick:()=>void a()}),(0,U.jsx)(oj,{label:i?`Bring it back from the archive`:`Archive`,text:i?`Unarchive`:`Archive`,icon:i?jp:Np,shortcut:`E`,onClick:()=>void o()}),(0,U.jsx)(Hj,{icon:Vg,label:`Delete`,shortcut:`Delete`,title:`Delete "${r.title}"?`,description:`The conversation and the draft are removed for good.`,confirmLabel:`Delete plan`,variant:`destructive`,onConfirm:()=>void s()})]}),(0,U.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:r.title}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:[i?`archived`:``,zY(r,r.messages.length),r.seed??``].filter(Boolean).join(` · `)})]}),(0,U.jsxs)(pH,{title:`Draft plan`,children:[r.draft?(0,U.jsx)(uH,{text:r.draft}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The panel had not written a draft yet.`}),(0,U.jsx)(NY,{notes:r.notes})]}),(0,U.jsx)(pH,{title:`Conversation`,children:(0,U.jsx)(QJ,{messages:r.messages,readOnly:!0})})]})}function HY({id:e}){let t=bj(),[n,r]=(0,m.useState)(!1),i=IA(`planner.previous`,n?{archived:!0}:{},[`planner`]),a=i.data?.plans??[];if(!i.data&&i.error)return(0,U.jsx)(PA,{message:`Could not load the previous plans. ${i.error}`,onRetry:i.reload});let o=(0,U.jsxs)(Tj,{title:n?`Archived plans`:`Previous plans`,count:i.data?String(a.length):void 0,children:[(0,U.jsx)(oj,{label:`Back to the current plan`,icon:Lp,iconOnly:!0,onClick:()=>bA(yA(`plan`))}),(0,U.jsx)(oj,{label:n?`Show the previous plans`:`Show the archived plans`,text:n?`Previous`:`Archived`,icon:n?pg:Np,pressed:n,onClick:()=>{r(e=>!e),IY()}})]}),s=i.data?a.length===0?(0,U.jsx)(`p`,{className:`px-4 py-6 text-sm text-muted-foreground`,children:n?`No archived plans.`:`No previous plans. A plan you leave without saving it as a task waits here; one saved as a task is in the Tasks tab.`}):(0,U.jsx)(`ul`,{className:J($H,`pt-2`),"aria-label":n?`Archived plans`:`Previous plans`,children:a.map(t=>(0,U.jsx)(BY,{plan:t,selected:t.id===e},t.id))}):(0,U.jsx)(Ej,{});return(0,U.jsx)(wj,{wide:t,list:(0,U.jsxs)(U.Fragment,{children:[o,s]}),detail:e?(0,U.jsx)(VY,{id:e,onGone:()=>{i.reload(),IY()}},e):null,open:e!==void 0,onClose:IY,hint:`Pick a plan to read it, carry it on, archive it or delete it.`,describe:`A previous plan`})}function UY({limit:e}){return e<=0?null:(0,U.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`flex gap-1`,children:Array.from({length:e},(t,n)=>(0,U.jsx)(`span`,{className:J(`h-1.5 w-4 rounded-full`,n===e-1?`bg-primary`:`bg-border`)},n))}),(0,U.jsxs)(`span`,{children:[`up to `,e,` rounds, the last the oracle's`]})]})}function WY({snap:e,onDone:t}){let n=gY(e),r=(0,m.useRef)(null);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{ref:r,className:`@container flex-1 overflow-y-auto px-5 pt-8 pb-dock max-md:px-4 max-md:pt-5 md:px-8 md:pt-10`,children:(0,U.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-8`,children:[(0,U.jsxs)(`header`,{className:`flex flex-col gap-4 @3xl:flex-row @3xl:items-end @3xl:justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`card-flat grid size-11 shrink-0 place-items-center rounded-xl border text-primary`,children:(0,U.jsx)(yg,{className:`size-5`})}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:`Plan with the panel`}),(0,U.jsx)(`p`,{className:`max-w-xl text-sm leading-relaxed text-muted-foreground`,children:oY})]})]}),(0,U.jsxs)(`div`,{className:`flex flex-col items-start gap-2 @3xl:items-end`,children:[(0,U.jsx)(TY,{}),(0,U.jsx)(UY,{limit:e.limit})]})]}),(0,U.jsxs)(`section`,{"aria-labelledby":`plan-panel`,className:`flex flex-col gap-3`,children:[(0,U.jsx)(`h3`,{id:`plan-panel`,className:`text-xs text-muted-foreground`,children:(0,U.jsx)(fH,{title:`The panel`,right:lY(n)})}),(0,U.jsx)(SY,{cells:n,onToggled:t})]}),(0,U.jsxs)(`section`,{"aria-labelledby":`plan-steps`,className:`flex flex-col gap-3`,children:[(0,U.jsx)(`h3`,{id:`plan-steps`,className:`text-xs text-muted-foreground`,children:(0,U.jsx)(fH,{title:`How a plan comes together`})}),(0,U.jsx)(`ol`,{className:`grid gap-3 @2xl:grid-cols-2 @4xl:grid-cols-4`,children:cY.map((e,t)=>(0,U.jsxs)(`li`,{className:`card-flat relative flex gap-3 rounded-xl border p-3.5`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-6 shrink-0 place-items-center rounded-full bg-accent text-xs font-semibold text-primary tabular-nums`,children:t+1}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),(0,U.jsx)(`span`,{className:`text-xs leading-relaxed text-muted-foreground`,children:e.text})]})]},e.title))})]}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-muted-foreground`,children:[(0,U.jsx)(Fp,{"aria-hidden":`true`,className:`size-4 text-primary motion-safe:animate-bounce`}),`Start in the box below.`,(0,U.jsx)(vk,{chord:`/`,className:`max-md:hidden`,children:`write`}),(0,U.jsx)(vk,{chord:`Enter`,className:`max-md:hidden`,children:`send to the panel`})]})]})}),(0,U.jsx)(zv,{target:r})]})}function GY({snap:e,onOpen:t}){return e.draft?(0,U.jsx)(`div`,{className:`pointer-events-none sticky top-0 z-10 -mt-2 mb-3 flex justify-center`,children:(0,U.jsxs)(`button`,{type:`button`,"aria-haspopup":`dialog`,onClick:t,className:`plan-pill pointer-events-auto inline-flex items-center gap-2 rounded-full border py-1.5 ps-2.5 pe-3 text-sm font-medium shadow-card backdrop-blur-sm`,children:[(0,U.jsx)(Zm,{"aria-hidden":`true`,className:`size-4 text-primary`}),`View plan`,e.round>0?(0,U.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:uY(e.round,e.limit)}):null]})}):null}function KY({snap:e,reload:t}){let[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(new Map),o=(e,t)=>a(n=>new Map(n).set(e,[...n.get(e)??[],t])),{ref:s,onScroll:c}=GU(`${JSON.stringify(e.messages)}${e.busy}`);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(DY,{snap:e,onDone:t,onViewPlan:()=>r(!0)}),(0,U.jsxs)(`div`,{ref:s,onScroll:c,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-5 pt-5 pb-dock max-md:px-4`,children:[(0,U.jsx)(GY,{snap:e,onOpen:()=>r(!0)}),(0,U.jsx)(QJ,{messages:e.messages,busy:e.busy})]}),(0,U.jsx)(zv,{target:s}),(0,U.jsx)(FY,{open:n,onClose:()=>r(!1),snap:e,comments:i,onSent:o})]})}function qY({rest:e=[]}){return e[0]===`previous`?(0,U.jsx)(HY,{id:e[1]}):(0,U.jsx)(JY,{})}function JY(){let e=IA(`planner.get`,{},[`planner`]),t=e.data;if(!t&&e.error)return(0,U.jsx)(PA,{message:`Could not load the plan. ${e.error}`,onRetry:e.reload});if(!t)return(0,U.jsx)(`p`,{role:`status`,className:`p-5 text-sm text-muted-foreground`,children:`Loading the plan…`});let n=fY(t);return(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:n?(0,U.jsx)(WY,{snap:t,onDone:e.reload}):(0,U.jsx)(KY,{snap:t,reload:e.reload})})}var YY=`Describe a small change in the box below and one agent makes it now, beside any running task.`;function XY(e){return e.prompt.split(`
|
|
100
|
+
`).find(e=>e.trim())?.trim()??`(empty)`}function ZY(e){return[...e].reverse()}function QY(e){let t=Number.isFinite(e)?Math.max(0,Math.round(e/1e3)):0,n=Math.floor(t/60);if(n===0)return`${t}s`;let r=t%60;return r===0?`${n}m`:`${n}m ${String(r).padStart(2,`0`)}s`}function $Y(e,t){return e.startedAt?QY((e.finishedAt??t)-e.startedAt):``}function eX(e,t){let n=e.model?`${e.model}${e.thinking?` · ${e.thinking}`:``}`:e.thinking??``;return[$Y(e,t),n,e.tools?`${e.tools} tool${e.tools===1?``:`s`}`:``,e.usage?.cost?`$${e.usage.cost.toFixed(2)}`:``].filter(Boolean).join(` · `)}function tX(e){return e===`queued`?`Waiting for the quick fix ahead of it.`:e===`running`?`starting…`:e===`held`?`Not started.`:`No tool calls.`}function nX({job:e}){let t=e.status===`held`;return(0,U.jsxs)(U.Fragment,{children:[e.route?(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Routed `,e.route]}):null,e.note&&t?(0,U.jsxs)(`p`,{className:`flex items-start gap-2 rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-foreground`,children:[(0,U.jsx)(Ug,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,U.jsxs)(`span`,{children:[`Held: `,e.note,`.`]})]}):null,e.note&&!t?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.routed?`Routed here by the oracle — ${e.note}`:e.note}):null,e.routed&&!e.note?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Routed here by the oracle.`}):null]})}function rX({job:e}){let t=e.status===`running`;return e.steps.length===0?(0,U.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[t?(0,U.jsx)(OA,{className:`size-3.5`}):null,tX(e.status)]}):(0,U.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.steps.map((e,n)=>(0,U.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:kj(e.at)}),(0,U.jsx)(`span`,{className:`flex h-5 w-3.5 shrink-0 items-center justify-center`,"aria-hidden":`true`,children:e.pending&&t?(0,U.jsx)(OA,{className:`size-3.5`}):(0,U.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/40`})}),(0,U.jsx)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:e.pending&&t?`${e.text}…`:e.text})]},n))})}function iX({job:e}){return e.status===`held`?(0,U.jsxs)(sj,{children:[(0,U.jsx)(oj,{label:`Run anyway`,icon:sg,tone:`primary`,shortcut:`R`,onClick:()=>void W(`quickfix.runAnyway`,{id:e.id})}),(0,U.jsx)(oj,{label:`Turn it into a task`,text:`Make it a task`,icon:yh,shortcut:`T`,onClick:()=>void W(`quickfix.movedToTask`,{id:e.id})})]}):e.status!==`queued`&&e.status!==`running`?null:(0,U.jsx)(sj,{children:(0,U.jsx)(Hj,{icon:Cm,label:`Cancel the quick fix`,text:`Cancel`,shortcut:`C`,title:`Cancel this quick fix?`,description:`The agent stops. Files it already edited stay as they are.`,confirmLabel:`Cancel quick fix`,variant:`destructive`,onConfirm:()=>void W(`quickfix.cancel`,{id:e.id})})})}function aX({job:e,now:t}){return(0,U.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Quick fix detail`,children:[(0,U.jsx)(iX,{job:e}),(0,U.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:XY(e)}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium text-foreground`,children:e.status}),eX(e,t)?(0,U.jsx)(`span`,{children:eX(e,t)}):null]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),e.prompt.trim().includes(`
|
|
101
|
+
`)?(0,U.jsx)(uH,{text:e.prompt}):null,(0,U.jsx)(nX,{job:e}),(0,U.jsx)(pH,{title:`Steps`,children:(0,U.jsx)(rX,{job:e})}),e.files?.length?(0,U.jsx)(pH,{title:`Edited`,children:(0,U.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.files.map(e=>(0,U.jsxs)(`li`,{className:`break-all`,children:[`· `,e]},e))})}):null,e.error?(0,U.jsx)(`p`,{className:`rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:e.error}):null,e.report?(0,U.jsx)(pH,{title:`Report`,children:(0,U.jsx)(uH,{text:e.report})}):null]})}function oX({status:e}){if(e===`running`)return(0,U.jsx)(OA,{className:`size-3.5`,"aria-label":`running`});let t={queued:km,success:tm,failed:r_,timeout:r_,cancelled:Gh,held:tg,running:km}[e];return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(t,{"aria-hidden":`true`,className:`size-4 ${e===`success`?`text-success`:e===`failed`||e===`timeout`?`text-destructive`:e===`held`?`text-warning`:`text-muted-foreground`}`}),(0,U.jsx)(`span`,{className:`sr-only`,children:e})]})}function sX({job:e,selected:t,now:n,onSelect:r}){let i=$Y(e,n);return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>r(e.id),className:J(QH,`flex-row items-start gap-2.5 text-sm max-md:min-h-11`),children:[(0,U.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:(0,U.jsx)(oX,{status:e.status})}),(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words`,t?`font-medium text-foreground`:`text-foreground`),children:XY(e)}),i?(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:i}):null]})})}function cX({jobs:e,selectedId:t,now:n,onSelect:r}){return(0,U.jsx)(`ul`,{className:$H,children:e.map(e=>(0,U.jsx)(sX,{job:e,selected:e.id===t,now:n,onSelect:r},e.id))})}var lX=()=>bA(yA(`quickfix`)),uX=e=>bA(yA(`quickfix`,e));function dX(e){let[t,n]=(0,m.useState)(()=>Date.now());return(0,m.useEffect)(()=>{if(!e)return;let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),e?t:Date.now()}function fX(){return(0,U.jsx)(SA,{className:`m-4 flex-1`,children:(0,U.jsxs)(CA,{children:[(0,U.jsx)(TA,{variant:`icon`,children:(0,U.jsx)(a_,{"aria-hidden":`true`})}),(0,U.jsx)(DA,{className:`font-medium text-foreground`,children:YY})]})})}function pX({id:e}){let t=bj(),n=IA(`quickfix.list`,{},[`quickfix`]),r=ZY(n.data?.jobs??[]),i=dX(r.some(e=>e.status===`running`));if(!n.data&&n.error)return(0,U.jsx)(PA,{message:`Could not load quick fixes. ${n.error}`,onRetry:n.reload});let a=n.data&&r.length===0?(0,U.jsx)(fX,{}):(0,U.jsx)(mX,{id:e,wide:t,loaded:!!n.data,jobs:r,now:i});return(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:a})}function mX({id:e,wide:t,loaded:n,jobs:r,now:i}){let a=e??(t?r[0]?.id:void 0),o=r.find(e=>e.id===a),s=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Tj,{title:`Quick fixes`,count:String(r.length)}),n?(0,U.jsx)(cX,{jobs:r,selectedId:a,now:i,onSelect:uX}):(0,U.jsx)(Ej,{})]});return(0,U.jsx)(wj,{wide:t,list:s,detail:o?(0,U.jsx)(aX,{job:o,now:i}):e?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That quick fix is not on the list any more.`}):null,open:!!e,onClose:lX,hint:`Select a quick fix to see its steps.`,describe:`Quick fix detail`})}var hX={},gX=new Set;function _X(e){hX=e;for(let e of[...gX])e()}function vX(e){hX.taskId!==e&&_X({...hX,taskId:e})}function yX(e){return gX.add(e),()=>{gX.delete(e)}}function bX(){return(0,m.useSyncExternalStore)(yX,()=>hX,()=>hX)}function xX(e,t=0,n=!1){let r=!n&&!e.waiting&&!!e.runningSince,i=r?Date.parse(e.serverNow)-Date.parse(e.runningSince):0;return Math.max(0,e.elapsedMs)+(Number.isFinite(i)?Math.max(0,i):0)+(r?Math.max(0,t):0)}function SX(e){let t=Math.floor(e/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}function CX(e,t){let[n,r]=(0,m.useState)(0);return(0,m.useEffect)(()=>{if(r(0),!e)return;let t=performance.now(),n=window.setInterval(()=>r(performance.now()-t),1e3);return()=>window.clearInterval(n)},[e,t]),e?n:0}function wX({timing:e,stopped:t}){let[n,r]=(0,m.useState)(0);return(0,m.useEffect)(()=>{if(r(0),t||e.waiting||!e.runningSince)return;let n=performance.now(),i=window.setInterval(()=>r(performance.now()-n),1e3);return()=>window.clearInterval(i)},[e,t]),(0,U.jsxs)(`span`,{className:`tabular-nums break-words`,children:[e.waiting?`Waiting for you · `:``,e.phase.replaceAll(`_`,` `),` · `,SX(xX(e,n,t)),` execution`]})}function TX({work:e,timing:t,stopped:n}){let r=e.running&&!n&&!t?.waiting,i=CX(r,e);return(0,U.jsxs)(`span`,{className:`tabular-nums break-words`,"data-work-clock":r?`running`:`stopped`,children:[t?.waiting?`Waiting for you · `:``,t?`${t.phase.replaceAll(`_`,` `)} · `:``,`worked `,SX(e.workedMs+i)]})}function EX({timing:e,work:t,stopped:n=!1}){return t?(0,U.jsx)(TX,{work:t,...e?{timing:e}:{},stopped:n}):e?(0,U.jsx)(wX,{timing:e,stopped:n},JSON.stringify(e)):(0,U.jsx)(`span`,{children:`Timing unavailable`})}var DX=`This merges the reviewed commit into main and pushes main, then removes the task worktree after verifying the merge. The task branch is kept.`,OX={pending_approval:`Ready for your review`,deferred:`Saved for later`,in_progress:`Delivery in progress`,successful:`Delivered`,recoverable_failure:`Delivery needs attention`};function kX({delivery:e,title:t}){return(0,U.jsxs)(`div`,{className:`grid gap-2 text-sm`,children:[(0,U.jsx)(`p`,{className:`font-medium break-words`,children:t}),(0,U.jsxs)(`dl`,{className:`grid gap-1 break-all text-muted-foreground`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Project: `}),(0,U.jsx)(`dd`,{className:`inline`,children:e.project})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Repository: `}),(0,U.jsx)(`dd`,{className:`inline`,children:e.repository??`Unavailable — refresh review`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Source: `}),(0,U.jsxs)(`dd`,{className:`inline`,children:[e.sourceBranch,` · `,e.sourceCommit??`Commit unavailable`]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`inline`,children:`Target: `}),(0,U.jsxs)(`dd`,{className:`inline`,children:[`main`,e.targetCommit?` · ${e.targetCommit}`:``]})]})]}),(0,U.jsxs)(`p`,{children:[`Checks: `,e.verification?.checks??`unavailable`]}),(0,U.jsx)(`p`,{children:e.verification?.summary??`Verification unavailable. Refresh the review before delivery.`}),e.verification?(0,U.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Local completion/QA: `,e.verification.localVerified?`passed`:`not verified`,` · Repository rules: `,e.verification.rulesKnown?`known`:`unavailable`,e.verification.requiredChecks.length?` · Required: ${e.verification.requiredChecks.join(`, `)}`:``]}):null]})}function AX({action:e,delivery:t,busy:n,onAction:r}){let i=t.blocked[e],a=e===`merge_main`&&t.status===`successful`&&!!t.cleanupError,o=n||t.status===`in_progress`||t.status===`successful`&&!a||!!i;return(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,U.jsx)(X,{variant:`outline`,className:`max-md:min-h-11 max-md:whitespace-normal`,disabled:o,onClick:()=>r(e),children:e===`create_pr`?`Create PR`:a?`Retry worktree cleanup`:`Merge to main`}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e===`create_pr`?`Pushes the task branch and opens a PR targeting main. Does not merge.`:a?`Main was delivered. Removes the retained worktree after confirmation.`:`Updates and pushes main, then removes the task worktree. Requires confirmation.`}),i?(0,U.jsxs)(`p`,{className:`text-sm text-destructive`,children:[i,` Refresh review after resolving this restriction, then choose the action again.`]}):null]})}async function jX(e,t,n){let r={taskId:t,reviewId:n};return e===`refresh`?be(`tasks.deliveryReview`,{taskId:t}):e===`defer`?be(`tasks.deliveryDefer`,r):be(`tasks.deliver`,{...r,action:e,...e===`merge_main`?{confirmMain:!0}:{}})}function MX({taskId:e,delivery:t}){let[n,r]=(0,m.useState)(t),[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(),[c,l]=(0,m.useState)(!1),u=(0,m.useRef)(null),d=ue(),f=`${d}:${e}`,p=(0,m.useRef)(f);return p.current=f,(0,m.useEffect)(()=>(p.current=f,()=>{p.current=``}),[f]),(0,m.useEffect)(()=>{r(t),l(!1)},[t,e]),{current:n,setCurrent:r,busy:i,setBusy:a,error:o,setError:s,confirm:c,setConfirm:l,trigger:u,project:d,identity:f,scope:p}}function NX(e){return e.scope.current===e.identity&&e.project===ue()}function PX(e,t){let n=(0,m.useRef)(!1);async function r(r){if(!(n.current||r===`merge_main`&&!e.confirm)){n.current=!0,e.setBusy(!0),e.setError(void 0),e.setConfirm(!1);try{let n=await jX(r,t.taskId,e.current.reviewId);NX(e)&&(e.setCurrent(n.delivery),t.onChanged())}catch(t){NX(e)&&e.setError(t instanceof Error?t.message:String(t))}finally{n.current=!1,e.scope.current&&e.setBusy(!1)}}}return r}function FX(e){let t=MX(e),n=PX(t,e),r=uA(t.confirm,lA.confirm),i=t.current.status===`successful`||t.current.status===`in_progress`;function a(){t.trigger.current=document.activeElement,t.setConfirm(!0)}return{...t,request:n,slot:r,terminal:i,reviewMerge:a}}function IX({review:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Task completion is recorded separately. Nothing is published without your approval.`}),(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:e.busy?`Updating delivery…`:e.current.operation?`Operation: ${e.current.operation.stage}`:OX[e.current.status]}),e.current.error||e.error?(0,U.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[e.error??e.current.error,` Completed work is retained. Refresh review to reconcile the result before retrying.`]}):null,e.current.cleanupError?(0,U.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[e.current.cleanupError,` Retry cleanup after resolving it.`]}):null,e.current.operation?.worktreeRemoved?(0,U.jsx)(`p`,{className:`text-sm`,children:`Task worktree removed.`}):null,e.current.result?(0,U.jsxs)(`p`,{className:`text-sm break-all`,children:[e.current.result.action===`create_pr`?`PR #${e.current.result.pullNumber??``} created`:`main pushed · ${e.current.result.commit??``}`,e.current.result.pullUrl?(0,U.jsxs)(`span`,{children:[` · `,e.current.result.pullUrl]}):null]}):null]})}function LX({review:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`mt-3 grid gap-3 max-md:grid-cols-1 md:grid-cols-2`,children:[(0,U.jsx)(AX,{action:`create_pr`,delivery:e.current,busy:e.busy,onAction:()=>void e.request(`create_pr`)}),(0,U.jsx)(AX,{action:`merge_main`,delivery:e.current,busy:e.busy,onAction:e.reviewMerge})]}),(0,U.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,U.jsx)(X,{variant:`ghost`,className:`max-md:min-h-11`,disabled:e.busy,onClick:()=>void e.request(`refresh`),children:`Refresh review`}),(0,U.jsx)(X,{variant:`ghost`,className:`max-md:min-h-11`,disabled:e.busy||e.terminal,onClick:()=>void e.request(`defer`),children:`Not now`})]})]})}function RX({review:e}){let t=e.current.status===`successful`&&!!e.current.cleanupError,n=t?`Main was already delivered. Remove the task worktree if it still contains only the reviewed commit. The task branch is kept.`:DX;return(0,U.jsx)(nA,{open:e.slot,onOpenChange:e.setConfirm,label:t?`Confirm worktree removal`:`Confirm merge to main`,description:n,onCloseAutoFocus:t=>{t.preventDefault(),requestAnimationFrame(()=>e.trigger.current?.focus())},children:(0,U.jsxs)(`div`,{className:`grid gap-3 p-4 max-md:p-3`,children:[(0,U.jsx)(`h3`,{className:`font-medium`,children:t?`Remove task worktree?`:`Merge to main?`}),(0,U.jsx)(`p`,{className:`text-sm`,children:n}),(0,U.jsxs)(`p`,{className:`break-all text-sm text-muted-foreground`,children:[e.current.repository,` · `,e.current.sourceCommit,` → main`]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,U.jsx)(X,{variant:`outline`,className:`max-md:min-h-11`,onClick:()=>e.setConfirm(!1),children:`Cancel`}),(0,U.jsx)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,disabled:e.busy||!!e.current.blocked.merge_main||e.terminal&&!t,onClick:()=>void e.request(`merge_main`),children:t?`Confirm worktree removal`:`Confirm merge and push main`})]})]})})}function zX({title:e,review:t}){return(0,U.jsxs)(pH,{title:`Completed work · delivery review`,right:OX[t.current.status],children:[(0,U.jsx)(kX,{delivery:t.current,title:e}),(0,U.jsx)(IX,{review:t}),(0,U.jsx)(LX,{review:t}),(0,U.jsx)(RX,{review:t})]})}function BX(e){let t=FX(e);return(0,U.jsx)(zX,{title:e.title,review:t})}var VX=8;function HX(e){return e?e.path===`fast`?`fast track (${e.size})`:`full workflow (${e.size})`:``}function UX(e,t){let n=Math.min(t,VX);if(n<=0)return[];let r=Math.min(n,Math.round(Math.max(0,e)/t*n));return Array.from({length:n},(e,t)=>t<r)}function WX({done:e,total:t}){return(0,U.jsx)(`span`,{className:`inline-flex items-center gap-0.5`,"aria-hidden":`true`,children:UX(e,t).map((e,t)=>(0,U.jsx)(`span`,{className:J(`h-1.5 w-3 rounded-full`,e?`bg-primary`:`bg-muted-foreground/25`)},t))})}function GX({check:e,className:t}){return(0,U.jsx)(e===`done`?hm:e===`dropped`?Tm:Dm,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,e===`done`?`text-success`:`text-muted-foreground`,t)})}var KX={open:Dm,delivered:_m,addressed:hm},qX={open:`waiting for the owning session`,delivered:`sent to the oracle`,addressed:`plan amended`};function JX({comment:e}){let t=jj(Date.now()-Date.parse(e.createdAt)),n=KX[e.status];return(0,U.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(n,{"aria-hidden":`true`,className:e.status===`addressed`?`size-3.5 text-success`:`size-3.5`}),qX[e.status],`, `,t,e.editedAt?` (edited)`:``]})}function YX({comment:e,taskId:t,own:n}){let[r,i]=(0,m.useState)(!1),[a,o]=(0,m.useState)(),s=a&&(a.editedAt??``)>(e.editedAt??``)?a:e;return(0,U.jsxs)(`li`,{className:`card-flat min-w-0 rounded-lg border px-3.5 py-2.5`,children:[r?(0,U.jsx)(GJ,{text:s.text,onSave:async n=>{let r=await be(`tasks.editComment`,{taskId:t,commentId:e.id,text:n});o(r.comment)},onCancel:()=>i(!1)}):(0,U.jsx)(uH,{text:s.text}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(JX,{comment:s}),n&&!r?(0,U.jsx)(X,{size:`sm`,variant:`ghost`,className:`max-md:min-h-11`,onClick:()=>i(!0),children:`Edit`}):null]})]})}function XX({taskId:e,finished:t,canComment:n}){let r=IA(`tasks.comments`,{taskId:e},[`tasks`]),i=xk(`status`),a=r.data?.comments??[],o=a.filter(e=>e.status!==`addressed`).length;return(0,U.jsxs)(`section`,{"aria-labelledby":`comments-${e}`,className:`flex flex-col gap-3`,children:[(0,U.jsx)(`h3`,{id:`comments-${e}`,className:`text-sm`,children:(0,U.jsx)(fH,{title:`Comments`,right:o>0?`${o} open`:void 0})}),a.length===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`No comments.`:n?`No comments yet. Comment on the plan in the box below (Markdown and images work); the oracle amends it.`:`No comments yet.`}):(0,U.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:a.map(t=>(0,U.jsx)(YX,{taskId:e,comment:t,own:!!(t.by&&t.by===i.data?.sessionId)},`${e}-${t.id}`))})]})}var ZX={mine:`This session`,others:`Other sessions`,pending:`Pending`,recent:`Finished`,archived:`Archived`},QX={open:`open`,done:`done`,dropped:`abandoned`},$X={none:{label:`None`,depth:`nothing that runs changed: the engine's checks decide, no QA agent`,tone:`bg-accent text-muted-foreground`},low:{label:`Low`,depth:`a light check: the diff, the nearest tests, done once confident`,tone:`bg-success/10 text-success`},medium:{label:`Medium`,depth:`a standard check: the acceptance criteria and realistic regressions`,tone:`bg-warning/10 text-warning`},high:{label:`High`,depth:`a deep, adversarial review: invariants, recovery and everything the change reaches`,tone:`bg-destructive/10 text-destructive`}};function eZ(e){let t=e.source===`classifier`?`Jev`:`rules`;if(!e.qaRequired)return`${t} · no QA agent`;let{min:n,max:r}=e.testBudget;return`${t} · ${n===r?r:`${n}-${r}`} new tests at most`}var tZ=`No tasks yet. Start one from the Lobby tab, or plan one in the Plan tab.`;function nZ(e,t){return`${e.replace(/_/g,` `)}${t?` · paused`:``}`}function rZ(e){return e===`now`?`just now`:`${e} ago`}function iZ(e){if(e.kind===`plan`)return[`planned`,e.age?e.age===`now`?`saved just now`:`saved ${e.age} ago`:``,e.issue?`#${e.issue}`:``].filter(Boolean).join(` · `);let t=e.owner??(e.section===`mine`?`this session`:``);return[nZ(e.status,e.paused),e.auto?`auto`:``,t].filter(Boolean).join(` · `)}function aZ(e){let t=[];for(let n of e){let e=t.at(-1);e&&e.section===n.section?e.rows.push(n):t.push({section:n.section,rows:[n]})}return t}function oZ(e){let t=e.filter(e=>e.kind!==`archived`),n=t.filter(e=>e.check===`open`).length,r=t.length-n,i=e.length-t.length;return[n?`${n} open`:``,r?`${r} finished`:``,i?`${i} archived`:``].filter(Boolean).join(` · `)||`0`}function sZ({step:e,stopped:t}){let n=CX(!t,e);return(0,U.jsx)(`span`,{className:`tabular-nums`,children:SX((e.workedMs??0)+n)})}function cZ(){return(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:`relative mt-[0.3125rem] grid size-4 shrink-0 place-items-center`,children:[(0,U.jsx)(`span`,{className:`absolute size-2.5 rounded-full bg-primary/30 motion-safe:animate-status-ping`}),(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-primary`})]})}function lZ(e){return(e.split(`
|
|
102
|
+
`).find(e=>e.trim())?.trim()??``).replace(/^steps?\s+\d+(?:\s*[-–]\s*\d+)?\s*[:.\-–]\s*/i,``).replace(/^\*\*?goal\*\*?\s*[:\-–]\s*/i,``)}function uZ({name:e,className:t}){return(0,U.jsx)(`span`,{"aria-hidden":`true`,className:J(`grid size-5 shrink-0 place-items-center rounded-md border border-border bg-card`,$U(e),t),children:(0,U.jsx)(XU,{source:e,className:`size-3`})})}function dZ({id:e,agents:t,stepText:n}){let[r,i]=(0,m.useState)(Date.now);(0,m.useEffect)(()=>{let e=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let a=t.filter(e=>!e.parentRunId||!t.some(t=>t.runId===e.parentRunId)).flatMap(e=>[e,...t.filter(t=>t.parentRunId===e.runId)]);return(0,U.jsx)(`ul`,{id:e,"aria-label":`Agents on this step`,className:`mt-2 flex flex-col overflow-hidden rounded-lg border border-border bg-card`,children:a.map(e=>{let i=nW({domain:e.domain}),a=!!e.parentRunId&&t.some(t=>t.runId===e.parentRunId),o=Date.parse(e.startedAt),s=lZ(e.instruction),c=s&&s.toLowerCase()!==n.trim().toLowerCase()?s:``;return(0,U.jsxs)(`li`,{className:`flex min-w-0 items-center gap-2.5 border-b border-border px-3 py-2 text-xs last:border-b-0`,children:[a?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`ml-1.5 h-4 w-3 shrink-0 rounded-bl-md border-b border-l border-border`}):null,(0,U.jsx)(uZ,{name:i}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:J(`font-medium`,$U(i)),children:QU(i)}),a?(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`child`}):null,(0,U.jsx)(yW,{className:`size-3 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`working`})]}),c?(0,U.jsx)(`span`,{className:`truncate text-muted-foreground`,title:e.instruction,children:c}):null]}),Number.isFinite(o)?(0,U.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground`,children:SX(Math.max(0,r-o))}):null]},e.runId)})})}function fZ({agents:e,count:t,step:n,stopped:r}){let i=[...new Set(e.map(e=>nW({domain:e.domain})))].slice(0,3);return(0,U.jsxs)(U.Fragment,{children:[i.length>0?(0,U.jsx)(`span`,{className:`flex -space-x-1.5`,children:i.map(e=>(0,U.jsx)(uZ,{name:e,className:`size-[1.125rem] ring-2 ring-card`},e))}):null,(0,U.jsxs)(`span`,{children:[t,` `,t===1?`agent`:`agents`,(0,U.jsx)(`span`,{className:`sr-only`,children:` working`})]}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground/60`,children:`·`}),(0,U.jsx)(sZ,{step:n,stopped:r})]})}var pZ=`inline-flex h-6 shrink-0 items-center gap-1.5 rounded-full border border-primary/20 bg-primary/5 pr-2 pl-1 text-xs font-medium text-primary`;function mZ({step:e,index:t,stopped:n}){let r=!!e.active&&!n,i=r?e.agents??[]:[],a=i.length||(e.activeAgentCount??1),[o,s]=(0,m.useState)(!1),c=(0,m.useId)(),l=e.status===`done`,u=l?`text-success`:e.status===`current`?`text-primary`:`text-muted-foreground`,d=l?hm:Dm;return(0,U.jsxs)(`li`,{className:`flex min-w-0 flex-col`,"data-step":r?`active`:e.status,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5 text-sm max-md:flex-wrap`,children:[r?(0,U.jsx)(cZ,{}):(0,U.jsx)(d,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 ${u}`}),(0,U.jsxs)(`span`,{className:`shrink-0 text-xs leading-5 text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,U.jsx)(`span`,{className:J(`min-w-0 break-words`,r||e.status===`current`?`text-foreground`:`text-muted-foreground`),children:e.text}),r&&i.length>0?(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":o,"aria-controls":c,onClick:()=>s(e=>!e),className:J(pZ,`-my-0.5 transition-colors outline-none hover:bg-primary/10 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`),children:[(0,U.jsx)(fZ,{agents:i,count:a,step:e,stopped:n}),(0,U.jsx)(rm,{"aria-hidden":`true`,className:J(`size-3 transition-transform duration-200`,o&&`rotate-180`)}),(0,U.jsx)(`span`,{className:`sr-only`,children:` (being worked on now)`})]}):r?(0,U.jsxs)(`span`,{className:J(pZ,`-my-0.5`),children:[(0,U.jsx)(fZ,{agents:i,count:a,step:e,stopped:n}),(0,U.jsx)(`span`,{className:`sr-only`,children:` (being worked on now)`})]}):e.status===`current`&&!n?(0,U.jsxs)(`span`,{className:`shrink-0 rounded-md bg-accent px-2 py-0.5 text-xs font-medium`,children:[`next`,(0,U.jsx)(`span`,{className:`sr-only`,children:` (the step up next)`})]}):null]}),o&&i.length>0?(0,U.jsx)(`div`,{className:`pl-[3.25rem] max-md:pl-0`,children:(0,U.jsx)(dZ,{id:c,agents:i,stepText:e.text})}):null]})}function hZ({steps:e,stopped:t}){let n=e.filter(e=>e.status===`done`).length;return(0,U.jsx)(pH,{title:`Steps`,right:`${n}/${e.length} done`,children:(0,U.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Steps`,children:e.map((e,n)=>(0,U.jsx)(mZ,{step:e,index:n,stopped:t},`${n}-${e.text}`))})})}function gZ({text:e}){let[t,n]=(0,m.useState)(!1),r=(0,m.useId)();return(0,U.jsxs)(pH,{title:`Full plan`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":t,"aria-controls":r,onClick:()=>n(e=>!e),className:`inline-flex min-h-11 w-fit items-center gap-1.5 rounded-md text-sm text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[(0,U.jsx)(sm,{"aria-hidden":`true`,className:J(`size-4 transition-transform duration-200 ease-snap`,t&&`rotate-90`)}),t?`Hide the details`:`Read the details of each step`]}),t?(0,U.jsx)(`div`,{id:r,children:(0,U.jsx)(uH,{text:e})}):null]})}function _Z({detail:e,finished:t}){return e.plan&&e.planDetails?(0,U.jsx)(gZ,{text:e.planDetails}):e.plan?(0,U.jsx)(pH,{title:`Approved plan`,children:(0,U.jsx)(uH,{text:e.plan})}):e.proposal?(0,U.jsx)(pH,{title:t?`Proposal`:`Proposal (no plan yet)`,children:(0,U.jsx)(uH,{text:e.proposal})}):(0,U.jsx)(pH,{title:`Plan`,children:(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`It ended before a plan was made.`:`No proposal or plan yet — the oracle is still clarifying or scouting.`})})}function vZ({amendments:e}){return e.length===0?null:(0,U.jsx)(pH,{title:`Amendments`,children:(0,U.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,children:e.map(e=>(0,U.jsx)(`li`,{className:`break-words`,children:e},e))})})}function yZ({risk:e}){let t=$X[e.risk];return(0,U.jsxs)(pH,{title:`QA risk`,right:eZ(e),children:[(0,U.jsxs)(`p`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-1 text-sm`,"data-qa-risk":e.risk,children:[(0,U.jsx)(`span`,{className:J(`rounded-md px-2 py-0.5 text-xs font-medium`,t.tone),children:t.label}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:t.depth})]}),e.focusAreas.length>0?(0,U.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,"aria-label":`What QA looks at first`,children:e.focusAreas.map(e=>(0,U.jsx)(`li`,{className:`break-words`,children:e},e))}):null,(0,U.jsxs)(`p`,{className:`text-xs break-words text-muted-foreground`,children:[e.riskFactors.join(` · `),e.qaRequired?` · existing tests ${e.existingTestsLikelySufficient?`likely enough`:`likely not enough`}`:``]})]})}function bZ({runs:e}){return e.length===0?null:(0,U.jsx)(pH,{title:`Recent runs`,children:(0,U.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.map((e,t)=>(0,U.jsx)(`li`,{className:`break-words`,children:e},`${t}-${e}`))})})}function xZ({detail:e,finished:t}){return(0,U.jsxs)(U.Fragment,{children:[e.steps.length>0?(0,U.jsx)(hZ,{steps:e.steps,stopped:t}):null,e.request?(0,U.jsx)(pH,{title:`Request`,children:(0,U.jsx)(uH,{text:e.request})}):null,(0,U.jsx)(_Z,{detail:e,finished:t})]})}function SZ({detail:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(vZ,{amendments:e.amendments}),e.qaRisk?(0,U.jsx)(yZ,{risk:e.qaRisk}):null,(0,U.jsx)(bZ,{runs:e.runs})]})}function CZ({row:e,quiet:t=!1}){let n=(0,m.useRef)(!0);(0,m.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]);async function r(){if(e.section===`mine`)return bA(`#/lobby`);let t=ue(),r=()=>n.current&&ue()===t;try{let t=await be(`tasks.open`,{taskId:e.id});if(!r())return;let n=await be(`status.get`,{});if(!r())return;if(t.sessionId&&t.sessionId===n.sessionId)return bA(`#/lobby`);if(t.sessionId&&!t.key)return pp.info(`This task runs in another terminal. Switch to that terminal to work on it.`);if(n.busy)return pp.info(`The oracle is working in this window. Stop it first, then open the task in its session.`);await W(`sessions.switch`,t.key?{key:t.key}:{claimTaskId:e.id})&&r()&&bA(`#/lobby`)}catch(e){r()&&pp.error(e instanceof Error?e.message:String(e))}}let i=e.section===`mine`;return(0,U.jsx)(oj,{label:i?`Open in its session: this window`:`Open in its session`,text:`Open in session`,icon:zp,tone:t?`neutral`:`primary`,shortcut:`S`,onClick:()=>void r()})}function wZ({split:e}){let t=e.after.length>0?`, after ${e.after.map(e=>`part ${e}`).join(` and `)}`:``;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,U.jsxs)(`span`,{className:`font-medium text-primary`,children:[`part `,e.part,` of `,e.of]}),` of one plan that was split into tasks`,t?(0,U.jsx)(`span`,{className:`text-foreground`,children:t}):null]}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.titles.map((t,n)=>(0,U.jsxs)(`span`,{children:[n>0?(0,U.jsx)(`span`,{className:`text-muted-foreground/60`,children:` · `}):null,(0,U.jsxs)(`span`,{className:n+1===e.part?`font-medium text-foreground`:void 0,children:[n+1,`. `,t]})]},`${n}-${t}`))})]})}function TZ({planId:e}){let t=IA(`plans.get`,{planId:e},[`plans`]),n=t.data;return n?(0,U.jsxs)(U.Fragment,{children:[n.issue?(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`from issue #`,n.issue.number,` — `,n.issue.title,n.issue.url?(0,U.jsxs)(`span`,{className:`break-all`,children:[` `,n.issue.url]}):null]}):null,n.split?(0,U.jsx)(wZ,{split:n.split}):null,(0,U.jsx)(pH,{title:`Agreed plan`,children:(0,U.jsx)(uH,{text:n.brief})})]}):t.error?(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the agreed plan. `,t.error]}):null}function EZ({row:e,onGone:t}){let n=async n=>{await W(`plans.start`,{planId:e.id,where:n})&&t()},r=async()=>{await W(`plans.discard`,{planId:e.id})&&t()};return(0,U.jsxs)(`article`,{className:`flex min-w-0 flex-col gap-4`,"aria-label":e.title,children:[(0,U.jsxs)(sj,{children:[(0,U.jsx)(oj,{label:`Start here`,icon:sg,tone:`primary`,shortcut:`S`,onClick:()=>void n(`here`)}),(0,U.jsx)(oj,{label:`Start in a new session`,text:`New session`,icon:jg,shortcut:`N`,onClick:()=>void n(`session`)}),(0,U.jsx)(Hj,{icon:Vg,label:`Discard`,shortcut:`Delete`,title:`Discard "${e.title}"?`,description:`The saved plan is removed from the list. This cannot be undone.`,confirmLabel:`Discard`,variant:`destructive`,onConfirm:()=>void r()})]}),(0,U.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,U.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-medium`,children:[(0,U.jsx)(GX,{check:`open`,className:`mt-1.5`}),(0,U.jsx)(`span`,{className:`min-w-0 break-words`,children:e.title})]}),(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`pending`,e.age?` · saved ${rZ(e.age)}`:``]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),(0,U.jsx)(TZ,{planId:e.id})]})}function DZ({row:e,onResumed:t}){let[n,r]=(0,m.useState)(!1),i=(0,m.useRef)(!0);(0,m.useEffect)(()=>(i.current=!0,()=>{i.current=!1}),[]);async function a(){let n=ue();r(!0);try{let r=await be(`tasks.resume`,{taskId:e.id});if(ue()!==n)return;pp(r.notice,{action:{label:`View task`,onClick:()=>bA(yA(`tasks`,e.id))}}),t()}catch(e){ue()===n&&pp.error(e instanceof Error?e.message:String(e))}finally{i.current&&r(!1)}}let o=e.owner===`not running`;return(0,U.jsx)(oj,{label:o?`Resume: carry it on in a background session`:`Resume: unpause it where it runs`,text:`Resume`,icon:sg,tone:`primary`,shortcut:`R`,disabled:n,onClick:()=>void a()})}function OZ(e){return e instanceof Error?e.message:`That did not work. Try again.`}function kZ({run:e,onDone:t}){let[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(``),[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(``);return{open:n,change:e=>{o||(r(e),a(``),l(``))},typed:i,setTyped:a,busy:o,error:c,submit:async()=>{s(!0),l(``);try{pp((await e(i)).notice),r(!1),t()}catch(e){l(OZ(e))}finally{s(!1)}}}}function AZ({expected:e,value:t,onChange:n,disabled:r}){let i=(0,m.useId)();return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsx)(`label`,{htmlFor:i,className:`text-sm font-medium`,children:`Type the task's title to confirm`}),(0,U.jsx)(`p`,{className:`break-words rounded-md bg-muted px-2 py-1 font-mono text-xs select-all`,children:e}),(0,U.jsx)(cK,{id:i,value:t,disabled:r,autoComplete:`off`,spellCheck:!1,className:`max-md:min-h-11`,onChange:e=>n(e.target.value)})]})}function jZ(e){let t=kZ(e),n=uA(t.open,lA.confirm),r=e.typeToConfirm!==void 0&&t.typed!==e.typeToConfirm,i=e.tone??`neutral`;return(0,U.jsxs)(Mj,{open:t.open&&n,onOpenChange:t.change,children:[(0,U.jsx)(oj,{label:e.label,icon:e.icon,tone:i,onClick:()=>t.change(!0)}),(0,U.jsxs)(Fj,{children:[(0,U.jsxs)(Ij,{children:[(0,U.jsx)(Rj,{children:e.title}),(0,U.jsx)(zj,{children:e.description})]}),e.typeToConfirm===void 0?null:(0,U.jsx)(AZ,{expected:e.typeToConfirm,value:t.typed,onChange:t.setTyped,disabled:t.busy}),t.error?(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:t.error}):null,(0,U.jsxs)(Lj,{children:[(0,U.jsx)(Vj,{disabled:t.busy,className:`max-md:min-h-11 max-md:whitespace-normal`,children:`Cancel`}),(0,U.jsx)(X,{variant:i===`danger`?`destructive`:`default`,disabled:r||t.busy,"aria-busy":t.busy,className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:()=>void t.submit(),children:t.busy?`Working…`:e.confirmLabel})]})]})]})}function MZ({taskId:e,item:t,onDone:n}){let r=n=>()=>be(`tasks.resolveApproval`,{taskId:e,approvalId:t.id,decision:n}),i=`${t.kind}${t.domain?` for ${t.domain}`:``}`;return(0,U.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(jZ,{label:`Approve`,icon:tm,title:`Approve the ${i}?`,description:`${t.detail} The task's oracle is told and carries on with it.`,confirmLabel:`Approve`,run:r(`approved`),onDone:n}),(0,U.jsx)(jZ,{label:`Reject`,icon:r_,tone:`danger`,title:`Reject the ${i}?`,description:`${t.detail} The task's oracle is told and works without it.`,confirmLabel:`Reject`,run:r(`rejected`),onDone:n})]})}function NZ({taskId:e,item:t,live:n,onDone:r}){return(0,U.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-1 basis-60 gap-2`,children:[(0,U.jsx)(pm,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,U.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[t.kind,` `,t.detail]})]}),n&&t.id?(0,U.jsx)(MZ,{taskId:e,item:t,onDone:r}):null]})}function PZ({blockers:e}){return e.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex gap-2`,children:[(0,U.jsx)(Tm,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,U.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.reason,` (needs: `,e.need,`)`]})]},`${t}-${e.reason}`))}function FZ({row:e,detail:t,onChanged:n}){let r=e.id;return(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.resumable?(0,U.jsx)(DZ,{row:e,onResumed:n}):null,t.canAccept?(0,U.jsx)(jZ,{label:`Accept as is`,icon:kg,title:`Accept "${e.title}" as is?`,description:`You accept the work unverified: missing QA and lint checks are waived on your word. The task's oracle is asked to complete it; nothing is merged.`,confirmLabel:`Accept as is`,run:()=>be(`tasks.accept`,{taskId:r}),onDone:n}):null,t.canForceClose?(0,U.jsx)(jZ,{label:`Force close`,icon:xm,tone:`danger`,title:`Force close "${e.title}"?`,description:`The task is abandoned and its running work cancelled. Its code, worktree and history are kept; it is not marked complete.`,confirmLabel:`Force close`,typeToConfirm:e.title,run:e=>be(`tasks.forceClose`,{taskId:r,title:e}),onDone:n}):null]})}function IZ({row:e,detail:t,onChanged:n}){let r=e.kind===`task`&&e.check===`open`,i=r&&!!(e.resumable||t.canAccept||t.canForceClose),a=t.waiting;return a.length===0&&t.blockers.length===0&&!i?null:(0,U.jsxs)(pH,{title:`Waiting on`,children:[(0,U.jsxs)(`ul`,{className:`flex flex-col gap-2 text-sm`,children:[a.map((t,i)=>(0,U.jsx)(NZ,{taskId:e.id,item:t,live:r,onDone:n},`${i}-${t.id||t.kind}`)),(0,U.jsx)(PZ,{blockers:t.blockers})]}),i?(0,U.jsx)(FZ,{row:e,detail:t,onChanged:n}):null]})}function LZ(e){if(e.kind===`archived`)return{state:`archived`,rest:rZ(e.age??`now`)};let t=e.check!==`open`,n=e.owner??(e.section===`mine`?`this session`:``),r=t&&e.age?`${e.check===`dropped`?`dropped`:`done`} ${rZ(e.age)}`:``;return{state:nZ(e.status,e.paused),rest:[t?``:n,r].filter(Boolean).join(` · `)}}function RZ(e){return e?[HX(e.track),e.domains.join(`, `)].filter(Boolean).join(` · `):``}function zZ({row:e}){return e.progress?(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,U.jsx)(WX,{done:e.progress.done,total:e.progress.total}),(0,U.jsxs)(`span`,{children:[e.progress.done,` of `,e.progress.total,` steps`]})]}):null}function BZ({row:e,task:t}){let n=t?.git?`branch ${t.git.branch}${t.git.from?` · from ${t.git.from}`:``}`:``,{state:r,rest:i}=LZ(e);return(0,U.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-semibold tracking-tight`,children:[(0,U.jsx)(GX,{check:e.check,className:`mt-1.5`}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[QX[e.check],`:`]}),(0,U.jsx)(`span`,{className:e.check===`dropped`?`min-w-0 break-words line-through`:`min-w-0 break-words`,children:e.title})]}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium text-foreground`,children:r}),i?(0,U.jsx)(`span`,{children:i}):null]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:[e.id,RZ(t),n].filter(Boolean).join(` · `)}),(0,U.jsx)(zZ,{row:e})]})}function VZ({row:e,onGone:t,onChanged:n}){let r=e.id;return{restore:async()=>{await W(`tasks.restore`,{taskId:r},{undo:()=>void W(`tasks.archive`,{taskId:r})})&&t()},archive:async()=>{await W(`tasks.archive`,{taskId:r},{undo:()=>void W(`tasks.restore`,{taskId:r})})&&t()},remove:async()=>{await W(`tasks.delete`,{taskId:r,where:e.kind===`archived`?`archive`:`list`})&&t()},toggleAuto:()=>void W(`tasks.auto`,{taskId:r,on:!e.auto}).then(n)}}function HZ({row:e,archive:t}){return e.check===`open`?(0,U.jsx)(Hj,{label:`Archive`,icon:Np,shortcut:`E`,title:`Archive "${e.title}"?`,description:`A task still under way is abandoned first, then moved to the archive. Restore brings it back.`,confirmLabel:`Archive`,onConfirm:()=>void t()}):(0,U.jsx)(oj,{label:`Archive`,icon:Np,shortcut:`E`,onClick:()=>void t()})}function UZ({on:e,toggle:t}){return ij(`a`,t),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsxs)(`label`,{className:`flex h-8 cursor-pointer items-center gap-2 rounded-lg px-2.5 text-[0.8125rem] font-medium transition-colors hover:bg-accent max-md:min-h-11`,children:[(0,U.jsx)(dg,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,U.jsx)(`span`,{children:`Auto`}),(0,U.jsx)(lK,{checked:e,onCheckedChange:t,"aria-label":`Auto mode`,"aria-keyshortcuts":`A`}),(0,U.jsx)(_k,{chord:`A`,className:`kbd-hint`})]})}),(0,U.jsx)(BA,{children:`Auto mode: the oracle decides without asking`})]})}function WZ(e){let{row:t}=e,{restore:n,archive:r,remove:i,toggleAuto:a}=VZ(e),o=t.kind===`archived`,s=t.kind===`task`&&t.check===`open`&&!!t.resumable;return(0,U.jsxs)(sj,{children:[t.kind===`task`&&t.check===`open`?(0,U.jsx)(CZ,{row:t,quiet:s}):null,o?(0,U.jsx)(oj,{label:`Restore`,icon:hg,shortcut:`R`,onClick:()=>void n()}):null,t.check===`open`&&!o?(0,U.jsx)(UZ,{on:!!t.auto,toggle:a}):null,o?null:(0,U.jsx)(HZ,{row:t,archive:r}),(0,U.jsx)(Hj,{icon:Vg,label:o?`Delete for good`:`Delete`,text:`Delete`,shortcut:`Delete`,title:`Delete "${t.title}" for good?`,description:`This cannot be undone.`,confirmLabel:`Delete`,variant:`destructive`,onConfirm:()=>void i()})]})}function GZ(e){let{row:t}=e,n=t.kind===`plan`,r=IA(`tasks.get`,{taskId:t.id},[`tasks`],!n),i=xk(`lobby`).data?.task,a=i?.id===t.id?i:void 0;if(n)return(0,U.jsx)(EZ,{row:t,onGone:e.onGone});let o=t.check===`open`&&t.kind===`task`,s=r.data?r.data.work:t.work;return(0,U.jsxs)(`article`,{className:`flex min-w-0 flex-col gap-5`,"aria-label":t.title,children:[(0,U.jsx)(WZ,{...e}),(0,U.jsx)(BZ,{row:t,task:a}),r.data?(0,U.jsx)(IZ,{row:t,detail:r.data,onChanged:()=>{r.reload(),e.onChanged()}}):null,(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,U.jsx)(EX,{timing:r.data?.timing??t.timing,...s?{work:s}:{},stopped:t.check!==`open`})}),r.data?.delivery?(0,U.jsx)(BX,{taskId:t.id,title:t.title,delivery:r.data.delivery,onChanged:r.reload},t.id):null,r.data?(0,U.jsx)(xZ,{detail:r.data,finished:!o}):null,(0,U.jsx)(XX,{taskId:t.id,finished:!o,canComment:o}),r.data?(0,U.jsx)(SZ,{detail:r.data}):null,r.error&&!r.data?(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the plan detail. `,r.error]}):null]})}function KZ({row:e}){return e.check===`open`&&e.progress?(0,U.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground tabular-nums`,children:[(0,U.jsx)(WX,{done:e.progress.done,total:e.progress.total}),(0,U.jsxs)(`span`,{children:[e.progress.done,`/`,e.progress.total]})]}):e.age&&e.check!==`open`?(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.age}):null}function qZ(e){return e.check===`dropped`?`text-muted-foreground line-through`:e.kind===`archived`||e.check===`done`?`text-muted-foreground`:`text-foreground`}function JZ({row:e}){return(0,U.jsxs)(U.Fragment,{children:[e.check===`open`?(0,U.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:iZ(e)}):null,e.kind===`plan`?null:(0,U.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:(0,U.jsx)(EX,{timing:e.timing,...e.work?{work:e.work}:{},stopped:e.check!==`open`})}),e.delivery?(0,U.jsxs)(`span`,{className:`pl-6 text-xs text-foreground`,children:[`Delivery: `,e.delivery.status.replaceAll(`_`,` `),` · open task to review`]}):null]})}function YZ({row:e,selected:t,onSelect:n}){return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:J(QH,`max-md:min-h-11`),children:[(0,U.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,U.jsx)(GX,{check:e.check,className:`mt-0.5`}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[QX[e.check],`:`]}),(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words`,qZ(e),t&&`font-medium text-foreground`),children:e.title}),(0,U.jsx)(KZ,{row:e})]}),(0,U.jsx)(JZ,{row:e})]})})}function XZ({rows:e,selectedId:t,onSelect:n}){return(0,U.jsx)(`div`,{className:`flex flex-col pb-2`,children:aZ(e).map(({section:e,rows:r})=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h3`,{className:eU,children:(0,U.jsx)(fH,{title:ZX[e],right:String(r.length),className:`[&>span:first-child]:font-medium [&>span:first-child]:text-muted-foreground`})}),(0,U.jsx)(`ul`,{className:$H,children:r.map(e=>(0,U.jsx)(YZ,{row:e,selected:e.id===t,onSelect:n},`${e.kind}-${e.id}`))})]},e))})}var ZZ=()=>bA(yA(`tasks`)),QZ=e=>bA(yA(`tasks`,e));function $Z(){return(0,U.jsxs)(SA,{className:`m-4 flex-1`,children:[(0,U.jsxs)(CA,{children:[(0,U.jsx)(TA,{variant:`icon`,children:(0,U.jsx)(_h,{"aria-hidden":`true`})}),(0,U.jsx)(DA,{children:tZ})]}),(0,U.jsx)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:()=>bA(yA(`plan`)),children:`Plan a task`})]})}function eQ({shown:e,count:t,onToggle:n}){return(0,U.jsxs)(`label`,{className:`btn-outline flex h-7 min-w-0 cursor-pointer items-center gap-2 rounded-lg border bg-card px-2 text-xs font-medium transition-[box-shadow] max-md:h-11 max-md:min-w-11`,children:[(0,U.jsx)($J,{checked:e,onCheckedChange:n,"aria-label":`Show archived tasks`,className:`size-4`}),`Archived`,(0,U.jsx)(ZH,{variant:`secondary`,className:`h-5 px-1.5`,children:t})]})}function tQ({id:e}){let t=bj(),[n,r]=(0,m.useState)(!1),i=IA(`tasks.list`,{},[`tasks`,`plans`]),a=IA(`tasks.archived`,{},[`tasks`]),o=i.data?.rows??[],s=a.data?.rows??[],c=n?[...o,...s]:o,l=e??(t?c[0]?.id:void 0),u=[...c,...s].find(e=>e.id===l&&e.kind===`task`)?.id;if((0,m.useEffect)(()=>(vX(u),()=>vX(void 0)),[u]),!i.data&&i.error)return(0,U.jsx)(PA,{message:`Could not load tasks. ${i.error}`,onRetry:i.reload});if(i.data&&o.length===0&&s.length===0)return(0,U.jsx)($Z,{});let d=[...c,...s].find(e=>e.id===l),f=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Tj,{title:`Tasks`,count:oZ(c),children:(0,U.jsx)(eQ,{shown:n,count:s.length,onToggle:()=>r(e=>!e)})}),i.data?c.length===0?(0,U.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:tZ}):(0,U.jsx)(XZ,{rows:c,selectedId:l,onSelect:QZ}):(0,U.jsx)(Ej,{})]}),p=d?(0,U.jsx)(GZ,{row:d,onGone:ZZ,onChanged:i.reload},d.id):e?(0,U.jsx)(nQ,{}):null;return(0,U.jsx)(wj,{wide:t,list:f,detail:p,open:!!e,onClose:ZZ,hint:`Select a task to see its detail.`,describe:`Task detail`})}function nQ(){return(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That task is not on the list any more.`})}var rQ={l:`lobby`,p:`plan`,t:`tasks`,u:`git`,n:`knowledge`,q:`quickfix`,e:`settings`};function iQ(e){let t=e[0];if(t)try{return decodeURIComponent(t)}catch{return t}}function aQ(e){if(e.kind===`settings`)return(0,U.jsx)(CJ,{});switch(e.tab){case`lobby`:return(0,U.jsx)(EG,{});case`tasks`:return(0,U.jsx)(tQ,{...CG(e.rest)});case`plan`:return(0,U.jsx)(qY,{rest:e.rest});case`quickfix`:return(0,U.jsx)(pX,{id:iQ(e.rest)});case`git`:return(0,U.jsx)(WU,{rest:e.rest});case`knowledge`:return(0,U.jsx)(SG,{rest:e.rest})}}function oQ(e,t){return t.overlay?!0:e===`savePlan`&&!t.saveAvailable}var sQ={tab:`Tab`,esc:`Escape`,escape:`Escape`,enter:`Enter`,space:`Space`,pageup:`PageUp`,pagedown:`PageDown`,home:`Home`,end:`End`,"]":`BracketRight`,"[":`BracketLeft`,"/":`Slash`,"?":`Slash`,",":`Comma`,".":`Period`};function cQ(e){return e.length===1&&/[a-z]/i.test(e)?`Key${e.toUpperCase()}`:e.length===1&&/[0-9]/.test(e)?`Digit${e}`:sQ[e]}function lQ(e){let t={alt:!1,ctrl:!1,shift:!1,meta:!1,code:``};for(let n of e.toLowerCase().split(`+`))if(n===`alt`)t.alt=!0;else if(n===`ctrl`||n===`control`)t.ctrl=!0;else if(n===`shift`)t.shift=!0;else if(n===`meta`||n===`cmd`)t.meta=!0;else{let e=cQ(n);if(!e)return;t.code=e}return t.code?t:void 0}function uQ(e,t){return e.code===t.code&&e.altKey===t.alt&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift&&e.metaKey===t.meta}function dQ(e,t){let n=lQ(t);return n?uQ(e,n):!1}function fQ(e,t){for(let n of t)if(dQ(e,n.key))return n.action}function pQ(e,t){for(let n of t)if(dQ(e,n.key))return n.id}function mQ(e){return UA(e.target)||e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||dA()||!!document.querySelector(`[role='dialog'], [role='menu'], [role='listbox']`)}function hQ(e,t,n,r){let i=!e.shiftKey&&/^[1-9]$/.test(e.key)?t[Number(e.key)-1]:void 0;if(i)r(i.id);else if(e.key===`/`)n(`search`);else if(e.key===`?`)n(`help`);else if(e.key===`j`||e.key===`k`)YA(e.key===`j`?1:-1);else return!1;return!0}function gQ(e,t){let n=pQ(e,t.tabs),r=fQ(e,t.keys);return!n&&!r?!1:oQ(r,{overlay:!!document.querySelector(`[role='dialog']:not([data-state='closed']), [role='menu']:not([data-state='closed']), [role='listbox']`)||dA(),typing:UA(e.target)||e.target instanceof HTMLInputElement,saveAvailable:!!document.querySelector(`[data-plan-save]:not([disabled])`)})||(r===`search`||r===`savePlan`)&&!t.insideApp()?!0:(e.preventDefault(),n?t.onTab(n):r&&t.onAction(r),!0)}function _Q(e,t,n){if(e.key===`Escape`)return Date.now()<n&&e.preventDefault(),0;if(Date.now()<n){let n=rQ[e.key];return n&&(e.preventDefault(),t.onTab(n)),0}return e.key===`g`?Date.now()+1500:(hQ(e,t.tabs,t.onAction,t.onTab)&&e.preventDefault(),0)}function vQ(e){(0,m.useEffect)(()=>{if(!e.enabled)return;let t=0,n=n=>{if(n.defaultPrevented||n.isComposing)return;if(!e.insideApp()){fQ(n,e.keys)===`help`&&(n.preventDefault(),e.onAction(`help`));return}let r=!n.altKey&&!n.ctrlKey&&!n.metaKey;if(r&&mQ(n)){t=0;return}if(gQ(n,e)){t=0;return}t=r?_Q(n,e,t):0};return window.addEventListener(`keydown`,n,!0),()=>window.removeEventListener(`keydown`,n,!0)},[e.enabled,e.keys,e.tabs,e.insideApp,e.onAction,e.onTab])}var yQ=[{id:`focus`,caps:[`/`],help:`focus search, or the message box`},{id:`send`,label:`Enter`,help:`send the message`},{id:`newline`,label:`Shift+Enter`,help:`a new line (lists carry on)`},{id:`format`,label:`Ctrl+B`,help:`bold; Ctrl+I italic, Ctrl+E code, Ctrl+K link`},{id:`leave`,label:`Esc`,help:`leave the box for the tab bar`}],bQ=[{id:`digits`,caps:[`1`,`…`,`9`],help:`jump to a tab in current order`},{id:`help`,caps:[`?`],help:`keyboard shortcuts`},...Object.entries(rQ).map(([e,t])=>({id:`go.${t}`,caps:[`g`,e],help:`jump to ${t}`})),{id:`project`,caps:[`P`],help:`open the project switcher`},{id:`theme`,caps:[`D`],help:`switch between light and dark`},{id:`edit`,label:`Ctrl+Enter`,help:`save an edited message; Esc cancels`}],xQ=[{id:`tasks`,page:`Tasks`,keys:[[`E`,`archive`],[`R`,`restore`],[`A`,`auto mode`],[`Delete`,`delete`]]},{id:`saved`,page:`Saved plan`,keys:[[`S`,`start here`],[`N`,`new session`],[`Delete`,`discard`]]},{id:`plan`,page:`Plan`,keys:[[`A`,`answer`],[`R`,`retry`],[`Ctrl+S`,`save`],[`N`,`new plan`]]},{id:`quickfix`,page:`Quick fix`,keys:[[`R`,`run anyway`],[`T`,`make a task`],[`C`,`cancel`]]},{id:`git`,page:`Git`,keys:[[`R`,`refresh both lists`],[`V`,`review`],[`Q`,`Jev's read`],[`X`,`stop`],[`N`,`plan an issue`]]},{id:`knowledge`,page:`Knowledge`,keys:[[`E`,`edit`],[`A`,`add`],[`C`,`comment`],[`F`,`edit file`],[`Delete`,`delete`]]},{id:`confirm`,page:`Asked to confirm`,keys:[[`Y`,`yes, do it`],[`Esc`,`keep it`]]}],SQ=[{id:`enter`,caps:[`↓`],help:`from the tab bar, into the page`},{id:`rows`,caps:[`↑`,`↓`],help:`move through a list (j and k work too)`},{id:`pane`,caps:[`←`,`→`],help:`between a list and its detail (h and l)`},{id:`ends`,caps:[`Home`,`End`],help:`first and last row`},{id:`open`,caps:[`Enter`,`Space`],help:`activate the focused button or row (links: Enter; checkboxes: Space)`},{id:`back`,label:`Esc`,help:`back up to the tab bar`}],CQ=[{id:`qmove`,caps:[`↑`,`↓`],help:`move between the options`},{id:`qpick`,label:`Space`,help:`pick an option (several when allowed)`},{id:`qchoose`,label:`Enter`,help:`choose and go on; in your own answer, send it`},{id:`qacross`,caps:[`←`,`→`],help:`previous and next question`},{id:`qdigit`,caps:[`1`,`2`,`…`],help:`pick that option`},{id:`qesc`,label:`Esc`,help:`put the question away for later`}];function wQ({line:e}){return(0,U.jsxs)(`div`,{className:`flex items-center gap-3 py-1`,children:[(0,U.jsx)(`span`,{className:`flex w-28 shrink-0 items-center`,children:e.caps?(0,U.jsx)(`span`,{className:`inline-flex items-center gap-1`,children:e.caps.map(e=>(0,U.jsx)(dk,{children:e},e))}):(0,U.jsx)(_k,{chord:e.label??``})}),(0,U.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.help})]})}function TQ(){return(0,U.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Buttons on a page`}),xQ.map(e=>(0,U.jsxs)(`div`,{className:`flex items-start gap-3 py-1`,children:[(0,U.jsx)(`span`,{className:`w-28 shrink-0 pt-0.5 text-sm font-medium`,children:e.page}),(0,U.jsx)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5 text-sm text-muted-foreground`,children:e.keys.map(([e,t])=>(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,U.jsx)(_k,{chord:e}),t]},e))})]},e.id))]})}function EQ({title:e,lines:t}){return(0,U.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:e}),t.map(e=>(0,U.jsx)(wQ,{line:e},e.id))]})}function DQ(e){return e.map(e=>({id:e.action,label:e.label,help:e.help}))}function OQ(e){return e.map(e=>({id:`tab.${e.id}`,label:e.key,help:`jump to the ${e.label} tab`}))}function kQ({open:e,onOpenChange:t,keys:n,tabs:r}){let i=Sk(`(max-width: 767.98px)`),a=e&&!i,o=uA(a,lA.help),s=(0,m.useRef)(null);return(0,m.useEffect)(()=>{i&&e&&t(!1)},[i,e,t]),(0,m.useEffect)(()=>{if(!a||!o)return;let e=e=>{let r=n.find(e=>e.action===`help`)?.key;(e.key===`Escape`||r&&dQ(e,r))&&(e.preventDefault(),t(!1))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[n,t,o,a]),i?null:(0,U.jsxs)(nA,{open:a&&o,onOpenChange:t,label:`Keys`,className:`max-w-4xl`,children:[(0,U.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsx)(`h2`,{"aria-hidden":`true`,className:`text-base font-semibold tracking-tight`,children:`Keyboard shortcuts`}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(_k,{chord:`Esc`}),(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Close`,onClick:()=>t(!1),children:(0,U.jsx)(r_,{"aria-hidden":`true`})})]})]}),(0,U.jsxs)(`div`,{ref:s,className:`grid min-h-0 flex-1 gap-x-10 gap-y-6 overflow-y-auto p-4 max-md:p-3 md:grid-cols-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(EQ,{title:`Everywhere`,lines:DQ(n)}),(0,U.jsx)(EQ,{title:`Jump to a tab`,lines:OQ(r)}),(0,U.jsx)(EQ,{title:`Navigation and editing`,lines:bQ}),(0,U.jsx)(EQ,{title:`Message box`,lines:yQ})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(EQ,{title:`Lists and panes`,lines:SQ}),(0,U.jsx)(TQ,{}),(0,U.jsx)(EQ,{title:`Questions`,lines:CQ})]})]}),(0,U.jsx)(zv,{target:s})]})}var AQ=`size-[1.05rem]`;function jQ({hint:e,onHelp:t,className:n,side:r=`top`}){return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"aria-keyshortcuts":e,"aria-describedby":`focused-action-help`,onClick:t,className:n,children:(0,U.jsx)(ph,{"aria-hidden":`true`,className:AQ})})}),(0,U.jsxs)(BA,{side:r,children:[`Keyboard shortcuts `,(0,U.jsx)(_k,{chord:e})]})]})}function MQ({className:e,side:t=`top`}){let n=RG(),r=Sk(`(max-width: 767.98px)`),i=r?`App sounds`:n?`Unmute prompt sounds`:`Mute prompt sounds`;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":i,"aria-pressed":n,"aria-describedby":r?`app-sounds-help focused-action-help`:`focused-action-help`,className:e,onClick:()=>IG(!n),children:n?(0,U.jsx)(Zg,{"aria-hidden":`true`,className:AQ}):(0,U.jsx)(Yg,{"aria-hidden":`true`,className:AQ})})}),(0,U.jsx)(BA,{side:t,children:i})]}),r?(0,U.jsx)(`span`,{id:`app-sounds-help`,className:`sr-only`,children:`App sounds controls prompt tones and navigation ticks.`}):null]})}function NQ({className:e,side:t=`top`}){let{theme:n,setTheme:r}=eq(),i=n===`dark`||n===`system`&&typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":i?`Switch to light mode`:`Switch to dark mode`,"aria-keyshortcuts":`D`,"aria-describedby":`focused-action-help`,onClick:()=>r(i?`light`:`dark`),className:e,children:i?(0,U.jsx)(Fg,{"aria-hidden":`true`,className:AQ}):(0,U.jsx)(qh,{"aria-hidden":`true`,className:AQ})})}),(0,U.jsxs)(BA,{side:t,children:[i?`Light mode`:`Dark mode`,` `,(0,U.jsx)(`span`,{className:`max-md:hidden`,children:(0,U.jsx)(_k,{chord:`D`})})]})]})}var PQ=[{id:`light`,label:`Light`},{id:`dark`,label:`Dark`},{id:`system`,label:`System`}];function FQ({className:e,side:t=`top`}){let{theme:n,setTheme:r}=eq();return(0,U.jsxs)(DK,{children:[(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(OK,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Appearance`,className:e,children:(0,U.jsx)(Yh,{"aria-hidden":`true`,className:AQ})})})}),(0,U.jsx)(BA,{side:t,children:`Appearance`})]}),(0,U.jsxs)(kK,{side:t===`right`?`right`:`top`,align:t===`right`?`start`:`center`,sideOffset:10,collisionPadding:12,"aria-label":`Appearance`,onOpenAutoFocus:e=>{e.preventDefault(),e.currentTarget.focus({preventScroll:!0})},tabIndex:-1,className:`glass-pop flex max-h-[85svh] w-[26rem] max-w-[calc(100vw-1.5rem)] flex-col gap-3 overflow-y-auto rounded-2xl p-3`,children:[(0,U.jsx)(lj,{label:`Mode`,items:PQ,value:n,onChange:e=>r(e),className:`w-full [&>button]:flex-1`}),(0,U.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,U.jsx)(`p`,{className:`px-0.5 text-xs font-medium text-muted-foreground`,children:`Colour theme`}),(0,U.jsx)(`div`,{className:`[&_[role=radiogroup]]:!grid-cols-3 [&_[role=radiogroup]]:gap-1.5`,children:(0,U.jsx)(Lq,{})})]}),(0,U.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,U.jsx)(`p`,{className:`px-0.5 text-xs font-medium text-muted-foreground`,children:`Typeface`}),(0,U.jsx)(tq,{kind:`font`,dense:!0})]}),(0,U.jsx)(`a`,{href:`#/settings`,className:`px-0.5 text-xs text-link underline-offset-2 hover:underline`,children:`More in Settings`})]})]})}function IQ({className:e,side:t=`top`}){let n=YG(),r=n?`Turn off desktop notifications`:`Turn on desktop notifications`,i=async()=>{if(n)return ZG();let e=await XG();e===`granted`?pp.success(`Desktop notifications are on.`):pp.error(e===`unsupported`?`This browser cannot show notifications.`:`Notifications are blocked for this page in the browser's settings.`)};return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":r,"aria-pressed":n,className:e,onClick:()=>void i(),children:n?(0,U.jsx)(Gp,{"aria-hidden":`true`,className:AQ}):(0,U.jsx)(Up,{"aria-hidden":`true`,className:AQ})})}),(0,U.jsx)(BA,{side:t,children:r})]})}function LQ({className:e,side:t=`top`}){let n=x();if(!n.supported)return null;let r=n.on?`Leave full screen`:`Full screen`;return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":r,"aria-pressed":n.on,className:e,onClick:()=>void n.toggle(),children:n.on?(0,U.jsx)(Uh,{"aria-hidden":`true`,className:AQ}):(0,U.jsx)(kh,{"aria-hidden":`true`,className:AQ})})}),(0,U.jsx)(BA,{side:t,children:r})]})}function RQ(e){return e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}async function zQ(e){if(e.size===0)throw Error(`${e.name||`That file`} is empty.`);if(e.size>20971520)throw Error(`${e.name||`That file`} is larger than 20 MB.`);let t=new URLSearchParams({name:e.name||`pasted-file`,type:e.type}),n=await fetch(R(`/api/files.upload?${t}`),{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e,credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new ve(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw new ve(r.error,r.code,n.status);return r.result}function BQ(e,t,n,r){let i=e.slice(0,t),a=e.slice(t,n),o=e.slice(n);if(a.length>=r.length*2&&a.startsWith(r)&&a.endsWith(r)){let e=a.slice(r.length,a.length-r.length);return{value:i+e+o,start:t,end:t+e.length}}return i.endsWith(r)&&o.startsWith(r)?{value:i.slice(0,i.length-r.length)+a+o.slice(r.length),start:t-r.length,end:n-r.length}:{value:i+r+a+r+o,start:t+r.length,end:n+r.length}}function VQ(e,t,n){let r=e.slice(t,n)||`text`,i=`[${r}](url)`,a=t+r.length+3;return{value:e.slice(0,t)+i+e.slice(n),start:a,end:a+3}}var HQ=/^(\s*)(?:([-*+])|(\d+)([.)]))\s+(\[[ xX]\]\s+)?/;function UQ(e,t){let n=e.lastIndexOf(`
|
|
103
103
|
`,t-1)+1,r=e.indexOf(`
|
|
104
|
-
`,t),i=e.slice(n,r<0?e.length:r),a=VQ.exec(i);if(!a||t-n<a[0].length)return;let[o,s=``,c,l,u=`.`,d]=a;if(i.slice(o.length).trim()===``)return{value:e.slice(0,n)+e.slice(r<0?e.length:r),start:n,end:n};let f=`\n${s}${c??`${Number(l)+1}${u}`} ${d?`[ ] `:``}`;return{value:e.slice(0,t)+f+e.slice(t),start:t+f.length,end:t+f.length}}function UQ({rest:e}){let{chat:t}=HW(e);return(0,U.jsx)(`div`,{role:`group`,"aria-label":`Knowledge pane`,className:`flex items-center gap-0.5 rounded-lg bg-muted p-0.5`,children:[`Chat`,`Docs`].map(n=>(0,U.jsx)(`button`,{type:`button`,"aria-pressed":t===(n===`Chat`),onClick:()=>bA(UW(e,n===`Chat`)),className:J(`h-6 rounded-md border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,t===(n===`Chat`)?`btn-outline btn-soft bg-card text-foreground`:`btn-ghost text-muted-foreground hover:text-foreground`),children:n},n))})}function WQ(e){let[t,n]=(0,m.useState)(!1),[r,i]=(0,m.useState)();async function a(r){if(!t){n(!0),i(void 0);try{let{project:t}=await be(`projects.open`,{path:r});he([t]),z(t.id,e)}catch(e){i(e.message)}finally{n(!1)}}}return{opening:t,error:r,open:a}}function GQ({path:e,parent:t,busy:n,browse:r}){let[i,a]=(0,m.useState)(e);return(0,m.useEffect)(()=>a(e),[e]),(0,U.jsxs)(`form`,{className:`flex h-9 min-w-0 items-center rounded-md border border-input bg-background shadow-xs transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/20 max-md:h-11`,onSubmit:e=>{e.preventDefault(),r(i)},children:[(0,U.jsx)(`button`,{type:`button`,"aria-label":`Parent folder`,title:`Parent folder (Backspace)`,disabled:n||!t,onClick:()=>t&&r(t),className:`grid h-full w-9 shrink-0 place-items-center border-r border-input text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-40`,children:(0,U.jsx)(Vp,{"aria-hidden":`true`,className:`size-4`})}),(0,U.jsx)(`input`,{"aria-label":`Folder path`,value:i,disabled:n,spellCheck:!1,autoComplete:`off`,onChange:e=>a(e.target.value),className:`h-full min-w-0 flex-1 bg-transparent px-3 font-mono text-[0.8125rem] text-foreground outline-none placeholder:text-muted-foreground disabled:opacity-60`}),(0,U.jsx)(`button`,{type:`submit`,disabled:n||!i.trim(),className:`h-full shrink-0 border-l border-input px-3 text-xs font-medium text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-40`,children:`Go`})]})}function KQ(e,t,n){let r=[...e.currentTarget.querySelectorAll(`button[data-folder]:not(:disabled)`)],i=r.indexOf(document.activeElement),a={ArrowDown:Math.min(r.length-1,i+1),ArrowUp:Math.max(0,i-1),Home:0,End:r.length-1}[e.key];a!==void 0&&r.length>0?(e.preventDefault(),r[a]?.focus()):e.key===`Backspace`&&t&&(e.preventDefault(),n(t))}function qQ({data:e,loading:t,busy:n,browse:r}){let i=e?.folders.length??0;return(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-hidden rounded-md border border-border`,children:[(0,U.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center justify-between border-b border-border bg-muted/50 px-3 text-[0.7rem] font-medium tracking-wide text-muted-foreground uppercase`,children:[(0,U.jsx)(`span`,{children:`Name`}),(0,U.jsx)(`span`,{className:`normal-case tracking-normal`,children:t?`Loading…`:`${i.toLocaleString()} ${i===1?`folder`:`folders`}${e?.truncated?` (first 2,000)`:``}`})]}),(0,U.jsxs)(`div`,{"aria-label":`Folders`,role:`group`,onKeyDown:t=>KQ(t,e?.parent,r),className:`h-64 overflow-y-auto overscroll-contain py-1 max-md:h-[min(40vh,16rem)]`,children:[e?.folders.map(e=>{let t=e.name.startsWith(`.`);return(0,U.jsxs)(`button`,{type:`button`,"data-folder":!0,disabled:n,onClick:()=>r(e.path),title:e.path,className:`group/row flex h-8 w-full min-w-0 items-center gap-2.5 px-3 text-left text-[0.8125rem] transition-colors outline-none hover:bg-muted focus-visible:bg-accent focus-visible:text-accent-foreground disabled:opacity-60 max-md:h-11`,children:[(0,U.jsx)(rh,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,t?`text-muted-foreground/60`:`text-muted-foreground`)}),(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 truncate`,t&&`text-muted-foreground`),children:e.name}),(0,U.jsx)(sm,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground/0 transition-colors group-hover/row:text-muted-foreground group-focus-visible/row:text-muted-foreground`})]},e.path)}),e&&!i?(0,U.jsx)(`p`,{className:`px-3 py-6 text-center text-xs text-muted-foreground`,children:`No subfolders. You can open this folder.`}):null,e?.truncated?(0,U.jsx)(`p`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:`Only the first 2,000 entries are listed. Enter a path to go further.`}):null]})]})}function JQ({tab:e,close:t,busyChanged:n}){let[r,i]=(0,m.useState)(),a=IA(`projects.browse`,r===void 0?{}:{path:r},[]),o=WQ(e);return(0,m.useEffect)(()=>n(o.opening),[o.opening,n]),(0,U.jsxs)(`div`,{className:`flex min-h-0 max-h-full w-[min(40rem,calc(100vw-2rem))] flex-col overflow-y-auto max-md:max-h-[calc(100svh-2rem)]`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 border-b border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsx)(`h2`,{className:`text-[0.9375rem] font-semibold`,children:`Open project folder`}),(0,U.jsx)(`p`,{className:`break-words text-xs text-muted-foreground`,children:`Folders on the machine running bot-lobby. The project opens in a session of its own; this one keeps running, and its project-local extensions stay off until you enable them.`})]}),(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-3 p-4 max-md:p-3`,children:[(0,U.jsx)(GQ,{path:a.data?.path??r??``,parent:a.data?.parent,busy:o.opening,browse:i}),(0,U.jsx)(qQ,{data:a.data,loading:a.loading,busy:a.loading||o.opening,browse:i}),a.loading?(0,U.jsx)(`p`,{role:`status`,className:`sr-only`,children:`Loading folders…`}):null,a.error||o.error?(0,U.jsx)(`p`,{role:`alert`,className:`break-words text-xs text-destructive`,children:a.error??o.error}):null]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 border-t border-border bg-muted/30 px-4 py-3 max-md:px-3`,children:[a.error?(0,U.jsx)(X,{variant:`outline`,onClick:a.reload,disabled:a.loading,className:`max-md:min-h-11`,children:`Retry`}):null,(0,U.jsx)(X,{variant:`outline`,onClick:t,disabled:o.opening,className:`max-md:min-h-11`,children:`Cancel`}),(0,U.jsx)(X,{disabled:!a.data||a.loading||!!a.error||o.opening,onClick:()=>void o.open(a.data.path),className:`max-md:min-h-11`,children:o.opening?`Opening project…`:`Open this folder`})]})]})}function YQ({open:e,onClose:t,tab:n}){let r=uA(e,lA.help),[i,a]=(0,m.useState)(!1);return(0,U.jsx)(nA,{open:r,label:`Open project folder`,className:`max-md:max-h-[calc(100svh-2rem)] max-md:max-w-[calc(100vw-2rem)]`,onOpenChange:e=>{!e&&!i&&t()},dismissOnBackdrop:!i,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[role="combobox"][aria-label="Project"]`)?.focus()},children:e?(0,U.jsx)(JQ,{tab:n,close:t,busyChanged:a}):null})}function XQ(){try{return{id:ue()}}catch(e){return{error:e.message}}}function ZQ(e,t){if(e){if(t&&!e.projects.some(e=>e.id===t))return`Selected project is unknown or offline. Refresh or choose a running project.`;if(!e.projects.length)return`No authorized running projects found. Open a folder from the Project menu, or refresh.`}}function QQ(){let[e,t]=(0,m.useState)(),[n,r]=(0,m.useState)(),[i,a]=(0,m.useState)(!1),o=(0,m.useRef)(0);async function s(){let e=++o.current;a(!0),r(void 0);try{let n=await be(`projects.list`,{});he(n.projects),e===o.current&&t(n)}catch(t){e===o.current&&r(t.message)}finally{e===o.current&&a(!1)}}(0,m.useEffect)(()=>(s(),()=>{o.current++}),[]);let[c,l]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(!i)return l(!1);let e=setTimeout(()=>l(!0),300);return()=>clearTimeout(e)},[i]),{data:e,error:n,busy:i,slow:c,refresh:s}}function $Q({data:e,error:t}){let n=XQ();return n.error??t??ZQ(e,n.id)}function e$({projects:e}){let t=$Q(e);return t?(0,U.jsxs)(`p`,{role:`alert`,className:`notice flex min-w-0 items-start gap-2 pt-1 pb-0.5 text-xs break-words text-destructive`,children:[(0,U.jsx)(Ug,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,U.jsx)(`span`,{children:t})]}):null}function t$(e){let t=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0,n=e.key===`Home`?`first`:e.key===`End`?`last`:void 0;if(!t&&!n)return;let r=[...e.currentTarget.querySelectorAll(`[role='option']`)];if(r.length===0)return;e.preventDefault();let i=r.indexOf(document.activeElement);r[n===`first`?0:n===`last`?r.length-1:Math.max(0,Math.min(r.length-1,(i<0?t>0?-1:r.length:i)+t))]?.focus()}var n$=`bot-lobby:open-projects`;function r$({projects:e,tab:t,name:n,branch:r,look:i}){let a=i===`chip`,{data:o,busy:s,slow:c,refresh:l}=e,[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(!1),h=XQ(),g=$Q(e),_=h.error?`invalid`:h.id??o?.currentId??``;ij(`p`,()=>d(!0)),(0,m.useEffect)(()=>{let e=()=>d(!0);return window.addEventListener(n$,e),()=>window.removeEventListener(n$,e)},[]),ij(`r`,()=>void l(),{enabled:u,inDialog:!0});function v(e){d(!1),e!==_&&z(e,t)}return(0,U.jsxs)(`div`,{"aria-busy":s,className:`flex min-w-0 items-center gap-1`,children:[(0,U.jsxs)(DK,{open:u,onOpenChange:d,children:[(0,U.jsxs)(OK,{type:`button`,role:`combobox`,"aria-label":`Project`,"aria-description":`${n}${r?`, branch ${r}`:``}`,"aria-haspopup":`listbox`,"aria-expanded":u,"aria-keyshortcuts":`P ArrowDown`,onKeyDown:e=>{e.key!==`ArrowDown`||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),d(!0))},title:r?`${n} · ${r}`:n,className:J(`group flex min-w-0 items-center outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none`,a?`composer-chip h-7 gap-1.5 rounded-full px-2.5 text-xs font-medium text-foreground aria-expanded:bg-[var(--composer-chip-hover)]`:`h-10 gap-2 rounded-lg px-1.5 text-sm font-medium hover:bg-accent aria-expanded:bg-accent`),children:[a?(0,U.jsx)(rh,{"aria-hidden":`true`,className:J(`size-3.5 shrink-0`,g&&`text-destructive`)}):(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`project-mark`,"data-problem":g?!0:void 0,children:n.trim().charAt(0).toUpperCase()||`?`}),(0,U.jsx)(`span`,{className:`truncate`,children:n}),a?(0,U.jsx)(rm,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground transition-transform duration-150 group-aria-expanded:rotate-180 motion-reduce:transition-none`}):(0,U.jsx)(dm,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`})]}),(0,U.jsxs)(kK,{align:`start`,side:a?`top`:`bottom`,sideOffset:8,"aria-label":`Projects`,onKeyDown:t$,onOpenAutoFocus:e=>{let t=e.currentTarget?.querySelector(`[role='option'][aria-selected='true']`)??e.currentTarget?.querySelector(`[role='option']`);t&&(e.preventDefault(),t.focus())},className:`p-0 flex max-h-[calc(100svh-2rem)] w-[min(26rem,calc(100vw-1.5rem))] origin-(--radix-popover-content-transform-origin) flex-col overflow-hidden rounded-xl outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 max-md:w-[calc(100vw-2rem)]`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-2`,children:[(0,U.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Running projects`}),(0,U.jsxs)(`button`,{type:`button`,onClick:()=>void l(),disabled:s,"aria-label":`Refresh list`,"aria-keyshortcuts":`R`,className:`inline-flex h-7 items-center gap-1.5 rounded-lg px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:opacity-60 max-md:h-11`,children:[s?(0,U.jsx)(OA,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}):(0,U.jsx)(dg,{"aria-hidden":`true`,className:`size-3`}),`Refresh`,(0,U.jsx)(_k,{chord:`R`,className:`kbd-hint`})]})]}),(0,U.jsx)(`div`,{role:`listbox`,"aria-label":`Projects`,className:`flex max-h-72 flex-col overflow-y-auto overscroll-contain p-1 max-md:max-h-[calc(100svh-12rem)]`,children:o?.projects.map(e=>{let t=e.id===_;return(0,U.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>v(e.id),className:J(`flex min-h-10 w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11`,t&&`bg-accent`),children:[(0,U.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:t?(0,U.jsx)(tm,{"aria-hidden":`true`,className:`size-3.5 text-primary`}):null}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block whitespace-normal break-words text-sm font-medium`,children:e.name}),(0,U.jsxs)(`span`,{className:`block whitespace-normal break-all text-xs text-muted-foreground`,children:[e.cwd,` · :`,e.port]})]})]},e.id)})}),(0,U.jsxs)(`button`,{type:`button`,className:`flex min-h-11 items-center gap-2 border-t border-border px-3 py-3 text-sm font-medium outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:()=>{d(!1),p(!0)},children:[(0,U.jsx)(th,{"aria-hidden":`true`,className:`size-4`}),`Open folder…`]})]})]}),(0,U.jsx)(YQ,{open:f,onClose:()=>p(!1),tab:t}),c||g?(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Refresh projects`,disabled:s,onClick:()=>void l(),className:J(`inline-flex shrink-0 items-center justify-center text-muted-foreground outline-none transition-[background-color,color,scale] hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] disabled:opacity-60 motion-reduce:active:scale-100`,a?`composer-chip size-7 rounded-full`:`size-8 rounded-lg hover:bg-accent max-md:size-11`),children:s?(0,U.jsx)(OA,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5`}):(0,U.jsx)(dg,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,U.jsx)(BA,{side:a?`top`:`bottom`,children:`Refresh projects`})]}):null]})}var i$={id:`oracle`,pill:`Oracle`,label:`Message the oracle`,placeholder:`Message the oracle…`},a$=new Set([`lobby`,`tasks`,`plan`,`quickfix`,`knowledge`]);function o$(e){return e.kind===`tab`&&a$.has(e.tab)}function s$(e,t){if(e.kind!==`tab`)return[i$];if(e.tab===`knowledge`)return[{id:`knowledge`,pill:`Oracle`,label:`Ask the oracle about this project`,placeholder:`Ask about this project — the oracle searches the code and learns what is missing…`}];if(e.tab===`plan`)return[{id:`panel`,pill:`Panel`,label:`Message the panel`,placeholder:`Describe a task, or answer the panel…`},i$];if(e.tab===`quickfix`)return[{id:`quickfix`,pill:`Quick fix`,label:`Describe a quick fix`,placeholder:`Describe a small change…`},i$];let n=e.tab===`tasks`?CG(e.rest).id??t:void 0;return n?[{id:`comment`,pill:`Comment`,label:`Comment on ${n}`,placeholder:`Comment on ${n}'s plan…`,taskId:n},{id:`task`,pill:`Task's oracle`,label:`Message ${n}'s oracle`,placeholder:`Leave a message for ${n}'s oracle…`,taskId:n},i$]:[i$]}var c$=0,l$=`toolbar-button composer-tool relative inline-flex size-8 items-center justify-center rounded-full border text-foreground transition-[background-color,border-color,scale] duration-150 ease-snap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] motion-reduce:active:scale-100`,u$=`composer-chip inline-flex h-7 min-w-0 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`;function d$(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function f$({file:e,onRemove:t}){let n=(0,U.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,onClick:t,className:J(`btn-ghost flex shrink-0 items-center justify-center rounded-lg border text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,e.image?`absolute top-1 right-1 size-5 bg-background/80 text-foreground backdrop-blur-sm`:`size-7`),children:(0,U.jsx)(r_,{"aria-hidden":`true`,className:`size-3.5`})});return e.image?(0,U.jsxs)(Qf.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},title:`${e.name} · ${LQ(e.size)}`,className:`relative size-16 shrink-0 overflow-hidden rounded-lg border border-border bg-muted`,children:[(0,U.jsx)(`img`,{src:R(e.image),alt:e.name,className:`size-full object-cover`}),e.state===`uploading`?(0,U.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center bg-background/60`,children:(0,U.jsx)(OA,{className:`size-4`,"aria-hidden":`true`,role:`presentation`})}):null,n]}):(0,U.jsxs)(Qf.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},className:`flex h-9 min-w-0 items-center gap-2 rounded-lg border border-border bg-muted pr-1 pl-2.5`,children:[(0,U.jsxs)(`span`,{className:`relative flex shrink-0 items-center justify-center text-muted-foreground`,children:[(0,U.jsx)(Zm,{"aria-hidden":`true`,className:`size-4`}),e.state===`uploading`?(0,U.jsx)(OA,{className:`absolute -right-1 -bottom-1 size-2.5`,"aria-hidden":`true`,role:`presentation`}):null]}),(0,U.jsxs)(`span`,{className:`min-w-0 max-w-40`,children:[(0,U.jsx)(`span`,{className:`block truncate text-xs font-medium`,children:e.name}),(0,U.jsx)(`span`,{className:`block text-[0.65rem] leading-tight text-muted-foreground`,children:e.state===`uploading`?`uploading…`:LQ(e.size)})]}),n]})}function p$(e,t,n){let[r,i]=(0,m.useState)(!1),a=n.kind===`tab`?n.tab:n.kind;return(0,m.useEffect)(()=>i(!1),[a]),(0,m.useEffect)(()=>{if(!t)return;let n=0,r=t=>{e.current?.contains(t.target)||(n=performance.now())},a=t=>{[`PageDown`,`PageUp`,`ArrowDown`,`ArrowUp`,`Home`,`End`,` `].includes(t.key)&&!e.current?.contains(t.target)&&(n=performance.now())},o=t=>{let r=e.current;!r||performance.now()-n>400||r.contains(document.activeElement)||r.contains(t.target)||i(!0)};return document.addEventListener(`wheel`,r,{capture:!0,passive:!0}),document.addEventListener(`touchmove`,r,{capture:!0,passive:!0}),document.addEventListener(`keydown`,a,{capture:!0}),document.addEventListener(`scroll`,o,{capture:!0,passive:!0}),()=>{document.removeEventListener(`wheel`,r,{capture:!0}),document.removeEventListener(`touchmove`,r,{capture:!0}),document.removeEventListener(`keydown`,a,{capture:!0}),document.removeEventListener(`scroll`,o,{capture:!0})}},[t,e]),{shrunk:r,expand:(0,m.useCallback)(()=>i(!1),[])}}function m$({route:e,keys:t,projects:n,onHelp:r,dockNav:i}){let[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)([]),[l,u]=(0,m.useState)(!1),[d,f]=(0,m.useState)(!1),[p,h]=(0,m.useState)(!1),[g,_]=(0,m.useState)(),v=xk(`status`),y=xk(`lobby`),b=fA(),x=(v.data?.busy??!1)||!!y.data?.reply?.trim(),S=Ck(),C=Sk(`(max-width: 767.98px)`),{keyboardOpen:w,keyboardInset:T}=eA(),E=o$(e),D=(0,m.useRef)(E);D.current=E;let{taskId:O}=yX(),k=(0,m.useMemo)(()=>s$(e,O),[e,O]),A=k.map(e=>`${e.id}:${e.taskId??``}`).join(`|`),j=k.find(e=>e.id===g)??k[0];(0,m.useEffect)(()=>_(void 0),[A]);let M=(0,m.useRef)(null),{shrunk:N,expand:P}=p$(M,E&&!b,e),F=(0,m.useRef)(null),I=(0,m.useRef)(null),ee=(0,m.useRef)(s);ee.current=s;let te=(0,m.useRef)(void 0);(0,m.useLayoutEffect)(()=>{let e=te.current,t=F.current;e&&t&&(te.current=void 0,t.setSelectionRange(e.start,e.end))},[a]);let ne=(0,m.useCallback)(e=>{te.current={start:e.start,end:e.end},o(e.value)},[]);(0,m.useEffect)(()=>{let e=M.current;if(!e)return;let t=document.documentElement,n=()=>{let n=e.getBoundingClientRect();if(t.style.setProperty(`--composer-h`,b||!E?`0px`:`${Math.ceil(n.height+(C?T:0))}px`),!E||n.width===0){t.style.removeProperty(`--composer-x`),t.style.removeProperty(`--composer-w`);return}t.style.setProperty(`--composer-x`,`${Math.round(n.left)}px`),t.style.setProperty(`--composer-w`,`${Math.round(n.width)}px`)};n();let r=new ResizeObserver(n);return r.observe(e),window.addEventListener(`resize`,n),()=>{r.disconnect(),window.removeEventListener(`resize`,n),t.style.setProperty(`--composer-h`,`0px`),t.style.removeProperty(`--composer-x`),t.style.removeProperty(`--composer-w`)}},[b,T,w,C,E]);let re=(0,m.useCallback)(e=>{if(!D.current)return;let t=[...e],n=8-ee.current.length;t.length>n&&pp.warning(`At most 8 files go with one message.`);for(let e of t.slice(0,Math.max(0,n))){let t=`f${++c$}`,n=e.type.startsWith(`image/`)?URL.createObjectURL(e):void 0;c(r=>[...r,{key:t,name:e.name||(n?`image.png`:`file`),size:e.size,...n?{image:n}:{},state:`uploading`}]),RQ(e).then(e=>c(n=>n.map(n=>n.key===t?{...n,state:`ready`,info:e}:n))).catch(e=>{pp.error(e instanceof Error?e.message:`That file did not upload.`),c(e=>e.filter(e=>e.key!==t))})}},[]),ie=(0,m.useCallback)(e=>{c(t=>{let n=t.find(t=>t.key===e);return n?.image&&URL.revokeObjectURL(n.image),t.filter(t=>t.key!==e)})},[]),ae=s.some(e=>e.state===`uploading`),oe=s.flatMap(e=>e.info?[e.info.id]:[]),se=(a.trim().length>0||oe.length>0)&&!ae&&!d,L=(0,m.useCallback)(async()=>{if(!se||!D.current)return;f(!0);let t=oe.length>0?oe:void 0,n={text:a,...t?{attachments:t}:{}};try{let t=!0;if(j.id===`oracle`){let e=await be(`lobby.send`,n);e.notice&&pp(e.notice)}else j.id===`knowledge`?(t=await W(`knowledge.ask`,n)!==void 0,t&&e.kind===`tab`&&bA(UW(e.rest,!0))):t=j.id===`panel`?await W(`planner.send`,n)!==void 0:j.id===`quickfix`?await W(`quickfix.submit`,n)!==void 0:j.id===`task`?await W(`tasks.message`,{taskId:j.taskId,...n})!==void 0:await W(`tasks.comment`,{taskId:j.taskId,...n})!==void 0;if(t){o(``);for(let e of ee.current)e.image&&URL.revokeObjectURL(e.image);c([])}}catch(e){pp.error(e instanceof Error?e.message:`Could not send`)}finally{f(!1)}},[se,oe,j,a,e]),ce=(0,m.useCallback)(async()=>{try{await be(`lobby.abort`,{})}catch(e){pp.error(e instanceof Error?e.message:`Could not stop`)}},[]),le=e=>{if(e.key===`Escape`&&!e.nativeEvent.isComposing){e.preventDefault(),QA();return}let t=e.currentTarget,n=e.key.toLowerCase();if((e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey&&[`b`,`i`,`e`,`k`].includes(n)){e.preventDefault();let{selectionStart:r,selectionEnd:i,value:a}=t;ne(n===`k`?BQ(a,r,i):zQ(a,r,i,n===`b`?`**`:n===`i`?`_`:"`"));return}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&n===`p`){e.preventDefault(),u(e=>!e);return}if(e.key===`Enter`&&e.shiftKey&&!e.nativeEvent.isComposing&&t.selectionStart===t.selectionEnd){let n=HQ(t.value,t.selectionStart);n&&(e.preventDefault(),ne(n));return}if(e.key===`Backspace`&&t.value===``&&ee.current.length>0){e.preventDefault(),ie(ee.current.at(-1).key);return}(d$(e)||e.key===`Enter`&&(e.metaKey||e.ctrlKey))&&(e.preventDefault(),L())},ue=e=>{let t=[...e.clipboardData.files];t.length!==0&&(e.preventDefault(),re(t))},R=e=>{e.preventDefault(),h(!1),e.dataTransfer.files.length>0&&re(e.dataTransfer.files)},z=e.kind===`tab`&&e.tab===`knowledge`,de=!C&&!S,fe=S&&k.length>1?(0,U.jsxs)(NK,{value:j.id,onValueChange:e=>_(e),children:[(0,U.jsx)(FK,{"aria-label":`Send to`,className:`h-7 min-w-0 gap-1.5 px-2 text-xs`,children:(0,U.jsx)(PK,{})}),(0,U.jsx)(IK,{children:k.map(e=>(0,U.jsx)(LK,{value:e.id,children:e.pill},e.id))})]}):k.length>1?(0,U.jsx)(`div`,{role:`radiogroup`,"aria-label":`Send to`,className:J(`flex items-center gap-0.5 max-md:flex-wrap`,!de&&`rounded-lg bg-muted p-0.5 shadow-[inset_0_1px_2px_rgb(0_0_0/0.07)]`),children:k.map(e=>(0,U.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,role:`radio`,"data-compact":!0,"aria-checked":e.id===j.id,onClick:()=>_(e.id),className:J(de?u$:`h-6 rounded-md border border-transparent px-2.5 text-xs font-medium transition-[background-color,color,box-shadow] duration-150 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,de?e.id===j.id?`composer-chip-on`:`text-muted-foreground hover:text-foreground`:e.id===j.id?`btn-outline btn-soft bg-card text-foreground`:`btn-ghost text-muted-foreground hover:text-foreground`),children:e.pill},e.id))}):de?(0,U.jsxs)(`span`,{className:J(u$,`text-muted-foreground`),children:[(0,U.jsx)(Lh,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),`To the `,j.pill.toLowerCase()]}):(0,U.jsxs)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:[`To the `,j.pill.toLowerCase()]}),pe=v.data?.workspace.name??`bot-lobby`,me=v.data?.branch??v.data?.workspace.branch,he=de?(0,U.jsxs)(`div`,{className:`composer-tray pointer-events-auto mx-auto w-full max-w-3xl`,"aria-label":`Message context`,role:`group`,children:[(0,U.jsx)(r$,{look:`chip`,projects:n,tab:e.kind===`tab`?e.tab:e.kind,name:pe,branch:me}),z?null:fe,(0,U.jsxs)(`div`,{className:`@container ml-auto flex min-w-0 flex-1 items-center justify-end gap-3 overflow-hidden`,children:[e.kind===`tab`&&e.tab===`plan`?(0,U.jsx)(vk,{chord:t.savePlan??`Ctrl+S`,className:`hidden @[24rem]:inline-flex`,children:`save plan`}):null,(0,U.jsx)(vk,{chord:`Shift+Enter`,className:`hidden @[14rem]:inline-flex`,children:`new line`}),(0,U.jsxs)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"data-compact":!0,onClick:r,className:J(u$,`kbd-hint shrink-0 px-1.5 text-muted-foreground hover:text-foreground`),children:[(0,U.jsx)(_k,{chord:t.help??`Alt+H`,className:`kbd-hint`}),(0,U.jsx)(`span`,{className:`hidden @[8rem]:inline`,children:`shortcuts`})]})]}),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`a`,{href:`#/settings`,"aria-label":`Models and effort`,className:J(u$,`size-7 shrink-0 justify-center px-0 text-muted-foreground hover:text-foreground`),children:(0,U.jsx)(Tg,{"aria-hidden":`true`,className:`size-4`})})}),(0,U.jsx)(BA,{children:`Each agent's model and effort`})]})]}):null;return(0,U.jsxs)(`div`,{id:`app-dock`,ref:M,"data-shrunk":N||void 0,onFocus:P,style:C&&w?{bottom:`${T}px`}:void 0,className:J(`dock pointer-events-none absolute inset-x-0 bottom-0 z-30 px-6 pb-[max(1.25rem,env(safe-area-inset-bottom))] transition-opacity duration-200 ease-snap max-md:px-2`,C&&w?`max-md:pb-2`:`max-md:pb-[max(0.5rem,env(safe-area-inset-bottom))]`,b&&`opacity-0`),hidden:!E,"aria-hidden":!E||void 0,inert:b||!E,children:[i?(0,U.jsx)(`div`,{className:`pointer-events-auto mx-auto mb-1.5 w-full max-w-[46rem]`,children:i}):null,(0,U.jsxs)(`div`,{className:`composer-shell mx-auto w-full max-w-[46rem]`,children:[he,(0,U.jsx)(`div`,{className:`pointer-events-auto relative mx-auto w-full max-w-[46rem]`,onPointerDown:P,children:(0,U.jsxs)(`div`,{className:J(`group/composer composer-box relative rounded-[22px] border border-dock-border bg-dock shadow-dock transition-[border-color,box-shadow] duration-200 ease-snap focus-within:border-[color-mix(in_oklab,var(--ring)_28%,var(--dock-border))] focus-within:shadow-dock-focus`,S&&`min-[500px]:max-md:grid min-[500px]:max-md:grid-cols-[minmax(0,1fr)_auto] min-[500px]:max-md:min-w-0`,p&&`border-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--ring)_30%,transparent)]`),onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:R,children:[(0,U.jsx)(Nu,{initial:!1,children:s.length>0?(0,U.jsx)(Qf.ul,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:420,damping:36},"aria-label":`Attachments`,className:J(`composer-files flex flex-wrap items-end gap-2 overflow-hidden px-3 pt-3`,S&&`min-[500px]:max-md:col-span-full min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full`),children:s.map(e=>(0,U.jsx)(f$,{file:e,onRemove:()=>ie(e.key)},e.key))},`files`):null}),l?(0,U.jsx)(`div`,{"aria-label":`Markdown preview`,role:`region`,className:J(`max-h-48 overflow-y-auto border-b border-border px-4 py-3`,S&&`min-[500px]:max-md:col-span-full min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full`),children:a.trim()?(0,U.jsx)(uH,{text:a}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing to preview yet.`})}):null,(0,U.jsx)(`div`,{className:J(`composer-text flex px-4 pt-3.5 pb-1`,S&&`min-[500px]:max-md:col-start-1 min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full min-[500px]:max-md:pt-1 min-[500px]:max-md:pb-1`),children:(0,U.jsx)(`textarea`,{ref:F,id:`composer-text`,"aria-label":j.label,value:a,onChange:e=>o(e.target.value),onKeyDown:le,onPaste:ue,placeholder:x&&j.id===`oracle`?`The oracle is working. Enter steers it…`:j.placeholder,rows:1,className:J(`field-sizing-content max-h-[min(45vh,20rem)] min-h-[1.75rem] md:min-h-[2.75rem] w-full min-w-0 flex-1 resize-none bg-transparent text-base leading-relaxed caret-primary outline-none placeholder:text-muted-foreground md:text-[0.9375rem] md:leading-relaxed`,S&&`min-[500px]:max-md:max-h-[44px] min-[500px]:max-md:overflow-y-auto`)})}),(0,U.jsxs)(`div`,{className:J(`composer-tools flex flex-wrap items-center gap-x-2 gap-y-2 px-2 pt-1 pb-2`,S&&`min-[500px]:max-md:col-start-2 min-[500px]:max-md:min-w-0 min-[500px]:max-md:flex-nowrap min-[500px]:max-md:gap-y-0 min-[500px]:max-md:pt-1 min-[500px]:max-md:pb-1`),children:[(0,U.jsx)(`input`,{ref:I,type:`file`,multiple:!0,hidden:!0,tabIndex:-1,"aria-label":`Attach files`,onChange:e=>{re(e.target.files??[]),e.target.value=``}}),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-label":`Attach images, PDFs or files`,"data-compact":!0,onClick:()=>I.current?.click(),className:l$,children:(0,U.jsx)(lg,{"aria-hidden":`true`,className:`size-[1.125rem]`})})}),(0,U.jsx)(BA,{children:`Attach images, PDFs or files`})]}),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Preview the Markdown`,"aria-pressed":l,"aria-keyshortcuts":`Alt+P`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>u(e=>!e),className:l$,children:(0,U.jsx)(Um,{"aria-hidden":`true`,className:`size-4`})})}),(0,U.jsxs)(BA,{children:[`Preview `,(0,U.jsx)(_k,{chord:`Alt+P`})]})]}),z||!de?(0,U.jsx)(`div`,{className:J(`contents`,C&&!S&&`max-md:block max-md:w-full max-md:order-last`),children:z?(0,U.jsx)(UQ,{rest:e.kind===`tab`?e.rest:[]}):fe}):null,(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsxs)(`div`,{className:`contents max-md:ml-auto max-md:flex max-md:items-center max-md:gap-2`,children:[x&&j.id===`oracle`?(0,U.jsx)(Hj,{label:`Stop`,icon:Ng,iconOnly:!0,compact:!0,title:`Stop the oracle?`,description:`The current response stops. Work already recorded is kept.`,confirmLabel:`Stop`,variant:`destructive`,onConfirm:()=>void ce()}):null,(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Send`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>void L(),disabled:!se,className:`relative inline-flex size-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-xs shadow-primary/24 inset-shadow-[0_1px_rgb(255_255_255/16%)] before:absolute before:-inset-1 before:content-[''] transition-[background-color,box-shadow,scale] duration-150 ease-snap outline-none hover:scale-105 hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background active:inset-shadow-[0_1px_rgb(0_0_0/8%)] active:shadow-none disabled:opacity-64 disabled:shadow-none disabled:hover:scale-100 motion-reduce:hover:scale-100`,children:d?(0,U.jsx)(OA,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5 text-primary-foreground`}):(0,U.jsx)(Vp,{"aria-hidden":`true`,className:`size-4`,strokeWidth:2.25})})}),(0,U.jsxs)(BA,{children:[`Send `,(0,U.jsx)(_k,{chord:`Enter`})]})]})]})]}),p?(0,U.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 flex items-center justify-center rounded-xl bg-card/90 text-sm font-medium text-primary backdrop-blur-[2px]`,children:`Drop to attach`}):null]})})]})]})}function h$({state:e}){return e===`live`?(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`span`,{role:`img`,"aria-label":`Connected`,className:`grid size-6 place-items-center`,children:(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-success`})})}),(0,U.jsx)(BA,{children:`Connected`})]}):e===`connecting`?(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-warning motion-safe:animate-status-pulse`}),`reconnecting…`]}):(0,U.jsx)(`span`,{className:`text-xs font-medium text-destructive`,children:`Connection lost`})}function g$(e){if(!e)return 0;let t=[...e.children].filter(e=>e instanceof HTMLElement&&e.offsetParent!==null&&getComputedStyle(e).position!==`absolute`);if(!t.length)return 0;let n=Math.min(...t.map(e=>e.getBoundingClientRect().left)),r=Math.max(...t.map(e=>e.getBoundingClientRect().right)),i=0;for(let t of e.querySelectorAll(`*`))t.clientWidth<=1||t.offsetParent===null||t.scrollWidth<=t.clientWidth+1||getComputedStyle(t).textOverflow===`ellipsis`&&(i+=t.scrollWidth-t.clientWidth);return r-n+i}var _$=24;function v$(){let e=(0,m.useRef)(null),[t,n]=(0,m.useState)(!1),r=(0,m.useRef)(()=>{});return r.current=()=>{let t=e.current;if(!t)return;let r=t.querySelector(`[role="tablist"]`),i=getComputedStyle(t),a=parseFloat(i.columnGap)||0,o=t.clientWidth-(parseFloat(i.paddingLeft)||0)-(parseFloat(i.paddingRight)||0),s=g$(t.querySelector(`.where`))+(r?.offsetWidth??0)+g$(t.querySelector(`.tools`))+a*2;n(s+_$<=o)},(0,m.useLayoutEffect)(()=>r.current()),(0,m.useLayoutEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>r.current());n.observe(t);for(let e of t.querySelectorAll(`[role="tablist"], .where, .tools`))n.observe(e);return()=>n.disconnect()},[]),{header:e,one:t}}function y$({connection:e,projects:t,lead:n,tabs:r,extra:i,tools:a}){let{header:o,one:s}=v$(),c=Sk(`(max-width: 767.98px)`);return(0,U.jsxs)(`header`,{ref:o,className:`app-header shrink-0`,"data-one-row":s||void 0,children:[(0,U.jsx)(`div`,{className:`where flex min-w-0 items-center gap-2`,children:n}),c?(0,U.jsx)(`div`,{className:`phone-status flex min-w-0 items-center justify-end gap-2`,children:(0,U.jsx)(h$,{state:e})}):null,(0,U.jsx)(`div`,{className:`tabs min-w-0`,children:r}),(0,U.jsxs)(`div`,{className:`tools flex min-w-0 items-center justify-end gap-2`,children:[i,c?null:(0,U.jsx)(h$,{state:e}),a,(0,U.jsx)(`span`,{id:`focused-action-help`,className:`sr-only`,children:`Focused buttons: Enter or Space. Links: Enter. Checkboxes: Space.`})]}),(0,U.jsx)(e$,{projects:t})]})}var b$=`group/item flex min-h-8 w-full min-w-0 items-center gap-2 rounded-lg px-2.5 text-sm text-sidebar-foreground outline-none transition-colors duration-150 hover:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:bg-sidebar-accent aria-[current=page]:bg-[var(--sidebar-selected)] aria-[current=page]:font-medium [&>svg]:text-[var(--sidebar-icon)] hover:[&>svg]:text-sidebar-foreground aria-[current=page]:[&>svg]:text-sidebar-foreground max-md:min-h-11`;function x$({route:e,keys:t,rail:n}){let r=t.settings??`Alt+S`,i=(0,U.jsxs)(`a`,{href:`#/settings`,"aria-label":`Settings`,"aria-current":e.kind===`settings`?`page`:void 0,"aria-keyshortcuts":r,className:n?C$:J(b$,`flex-1`),children:[(0,U.jsx)(Dg,{"aria-hidden":`true`,className:`size-4 shrink-0`}),n?null:(0,U.jsx)(`span`,{className:`flex-1`,children:`Settings`})]});return(0,U.jsx)(w$,{label:`Settings`,hint:r,side:n?`right`:`top`,children:i})}function S$({route:e,keys:t,onHelp:n,closer:r,phone:i=!1}){let a=J(C$,i?`size-11`:`size-8`);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`flex min-h-12 items-center justify-end px-1`,children:r}),(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsxs)(`div`,{className:`sidebar-foot flex items-center gap-1 px-1 py-2`,children:[(0,U.jsx)(x$,{route:e,keys:t}),i?null:(0,U.jsx)(AQ,{hint:t.help??`Alt+H`,onHelp:n,className:a}),(0,U.jsx)(MQ,{className:a}),(0,U.jsx)(jQ,{className:a})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 border-t border-[var(--glass-edge)] px-1 py-2`,children:[(0,U.jsx)(PQ,{className:a}),(0,U.jsx)(FQ,{className:a}),(0,U.jsx)(IQ,{className:a})]})]})}var C$=`inline-flex size-8 shrink-0 items-center justify-center rounded-lg text-[var(--sidebar-icon)] outline-none transition-[background-color,color,scale] duration-150 hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] aria-pressed:text-sidebar-foreground aria-[current=page]:bg-[var(--sidebar-selected)] aria-[current=page]:text-sidebar-foreground aria-[current=page]:shadow-control motion-reduce:active:scale-100`;function w$({label:e,hint:t,side:n=`right`,children:r}){return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:r}),(0,U.jsxs)(BA,{side:n,children:[e,` `,t?(0,U.jsx)(_k,{chord:t}):null]})]})}function T$({route:e,keys:t,onHelp:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(PQ,{className:C$,side:`right`}),(0,U.jsx)(FQ,{className:C$,side:`right`}),(0,U.jsx)(IQ,{className:C$,side:`right`}),(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsx)(AQ,{hint:t.help??`Alt+H`,onHelp:n,className:C$,side:`right`}),(0,U.jsx)(MQ,{className:C$,side:`right`}),(0,U.jsx)(jQ,{className:C$,side:`right`}),(0,U.jsx)(x$,{route:e,keys:t,rail:!0})]})}function E$(e){return(0,U.jsx)(`aside`,{id:`app-sidebar`,"aria-label":`Sidebar`,"data-folded":!0,className:`app-sidebar`,children:(0,U.jsx)(T$,{...e})})}function D$({open:e,onOpenChange:t,...n}){return(0,U.jsx)(uj,{open:e,onOpenChange:t,children:(0,U.jsxs)(mj,{side:`left`,showCloseButton:!1,"aria-describedby":`sidebar-sheet-description`,className:`app-sidebar-sheet gap-0 p-0 pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[(0,U.jsx)(gj,{className:`sr-only`,children:`Sidebar`}),(0,U.jsx)(_j,{id:`sidebar-sheet-description`,className:`sr-only`,children:`Settings and the app's switches.`}),(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-1`,onClick:e=>{e.target.closest(`a[href]`)&&t(!1)},children:(0,U.jsx)(S$,{...n,phone:!0,closer:(0,U.jsx)(dj,{"aria-label":`Close sidebar`,className:J(C$,`size-11`),children:(0,U.jsx)(r_,{"aria-hidden":`true`,className:`size-4`})})})})]})})}function O$({onOpen:e,expanded:t}){return(0,U.jsx)(`button`,{type:`button`,"aria-label":`Open sidebar`,"aria-haspopup":`dialog`,"aria-expanded":t,onClick:e,className:J(C$,`size-11 text-foreground`),children:(0,U.jsx)(jh,{"aria-hidden":`true`,className:`size-[1.15rem]`})})}function k$(e){let t=e.match(/[#&?]?token=([^&\s#]+)/i);if(t?.[1])return decodeURIComponent(t[1]);let n=e.trim();return n&&!n.includes(`/`)&&!n.includes(` `)?n:void 0}function A$(){let[e,t]=(0,m.useState)(``),[n,r]=(0,m.useState)(),[i,a]=(0,m.useState)(!1);async function o(e){a(!0),r(void 0),e&&(window.location.hash=`token=${encodeURIComponent(e)}`),await Se()?window.location.reload():(r(e?`That link did not sign in. Copy the link from Pi and try again.`:`Paste the link from Pi below.`),a(!1))}function s(t){t.preventDefault(),o(k$(e))}return(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-y-auto p-6 max-md:items-start max-md:p-4`,children:(0,U.jsxs)(`form`,{onSubmit:s,className:`glass flex min-h-0 w-full max-w-md flex-col gap-4 rounded-xl p-6 max-md:max-h-[calc(100svh-2rem)] max-md:max-w-[28rem] max-md:overflow-y-auto max-md:p-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(dh,{className:`size-5`,"aria-hidden":`true`}),(0,U.jsx)(`h1`,{className:`text-base font-medium`,children:`Sign in to bot-lobby`})]}),(0,U.jsxs)(`p`,{className:`break-words text-sm text-muted-foreground`,children:[`Pi printed a link when it started (or run `,(0,U.jsx)(`code`,{className:`rounded-lg bg-muted px-1.5 py-0.5 font-mono text-xs`,children:`/bot-lobby web`}),`to see it again). Paste it here.`]}),(0,U.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Lobby link or token`}),(0,U.jsx)(`input`,{value:e,onChange:e=>t(e.target.value),autoComplete:`off`,spellCheck:!1,placeholder:`http://127.0.0.1:7347/#token=…`,className:`h-8 min-w-0 rounded-lg border border-input bg-background px-3.5 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 max-md:h-11`})]}),n?(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:n}):null,(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,disabled:i,onClick:()=>void o(void 0),className:`max-md:min-h-11`,children:`Retry`}),(0,U.jsx)(X,{type:`submit`,disabled:i||!e.trim(),className:`max-md:min-h-11`,children:`Sign in`})]})]})})}var j$=.6;function M$(e,t,n={}){return{initial:e?void 0:!1,animate:t,transition:{duration:j$,...n}}}var N$=(e,t)=>[0,Math.max(e,.001),Math.min(Math.max(t,e+.01),.999),1];function P$(e,t=0,n=1){return M$(e,{pathLength:[0,0,1,1],strokeOpacity:[0,0,1,1]},{pathLength:{duration:j$,times:N$(t,n),ease:`easeInOut`},strokeOpacity:{duration:j$,times:N$(t,t+.02)}})}function F$(e,t){return M$(e,{scale:[0,0,1.3,1]},{times:N$(t,t+.18),ease:`easeOut`})}function I$(e,t,n=1.3){return M$(e,{scale:[1,1,n,1,1]},{times:[0,Math.max(t,.001),Math.min(t+.15,.9),Math.min(t+.35,.99),1],ease:`easeInOut`})}var L$=(e=.5,t=.5)=>({transformBox:`fill-box`,originX:e,originY:t});function R$({play:e}){return(0,U.jsxs)(Qf.g,{style:L$(.1,.9),...M$(e,{rotate:[0,-12,8,-4,0],scale:[1,1.12,.96,1.02,1]},{ease:`easeInOut`}),children:[(0,U.jsx)(`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}),[8,12,16].map((t,n)=>(0,U.jsx)(Qf.circle,{cx:t,cy:11,r:1.15,fill:`currentColor`,stroke:`none`,...M$(e,{fillOpacity:[0,0,1,1,0],y:[0,0,-1.5,0,0]},{times:[0,.12+n*.12,.24+n*.12,.72,1]})},t))]})}function z$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.path,{d:`M13 5h8`,...P$(e,.15,.45)}),(0,U.jsx)(Qf.path,{d:`M13 12h8`,...P$(e,.3,.6)}),(0,U.jsx)(Qf.path,{d:`M13 19h8`,...P$(e,.45,.75)}),(0,U.jsx)(Qf.path,{d:`m3 17 2 2 4-4`,...P$(e,.35,.7)}),(0,U.jsx)(Qf.path,{d:`m3 7 2 2 4-4`,...P$(e,0,.35)})]})}function B$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.circle,{cx:6,cy:19,r:3,style:L$(),...I$(e,0)}),(0,U.jsx)(Qf.path,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,...P$(e,.1,.7)}),(0,U.jsx)(Qf.circle,{cx:18,cy:5,r:3,style:L$(),...F$(e,.62)})]})}function V$({play:e}){return(0,U.jsx)(Qf.g,{style:L$(),...M$(e,{rotate:[0,-14,10,-6,0],scale:[1,1.18,.94,1.04,1]},{duration:.5,ease:`easeInOut`}),children:(0,U.jsx)(Qf.path,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,fill:`currentColor`,...M$(e,{fillOpacity:[0,.85,0]},{duration:.5,times:[0,.2,1]})})})}function H$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.circle,{cx:12,cy:12,r:10,style:L$(),...M$(e,{scale:[1,1,1.4],strokeOpacity:[0,.5,0]},{times:[0,.25,1],ease:`easeOut`})}),(0,U.jsx)(Qf.circle,{cx:12,cy:12,r:10,style:L$(),...M$(e,{scale:[1,.86,1.06,1]},{times:[0,.25,.55,1],ease:`easeInOut`})}),(0,U.jsx)(Qf.circle,{cx:12,cy:12,r:1,fill:`currentColor`,style:L$(),...M$(e,{scale:[1,2.4,.8,1]},{times:[0,.3,.6,1],ease:`easeInOut`})})]})}function U$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.circle,{cx:6,cy:6,r:3,style:L$(),...I$(e,0)}),(0,U.jsx)(Qf.line,{x1:6,x2:6,y1:9,y2:21,...P$(e,.05,.45)}),(0,U.jsx)(Qf.path,{d:`M13 6h3a2 2 0 0 1 2 2v7`,...P$(e,.2,.62)}),(0,U.jsx)(Qf.circle,{cx:18,cy:18,r:3,style:L$(),...F$(e,.58)})]})}function W$({play:e}){return(0,U.jsxs)(Qf.g,{style:L$(),...M$(e,{scaleX:[1,.55,1.08,1],y:[0,-1,0,0]},{times:[0,.35,.65,1],ease:`easeInOut`}),children:[(0,U.jsx)(Qf.path,{d:`M12 5v16`,style:L$(),...M$(e,{scaleY:[1,1.12,1,1]},{times:[0,.35,.65,1]})}),(0,U.jsx)(`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`})]})}var G$={lobby:R$,tasks:z$,plan:B$,quickfix:V$,issues:H$,git:U$,knowledge:W$};function K$({id:e,play:t,className:n}){let r=G$[e];return r?(0,U.jsx)(`svg`,{"aria-hidden":`true`,"data-tab-icon":e,"data-play":t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,className:J(`overflow-visible`,n),children:(0,U.jsx)(r,{play:t})},t):null}function q$(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0||n<2)return e;let r=Math.floor(n/2),i=(r-.75)*t,a=(r+1.75)*t;return e<i?e+Math.ceil((i-e)/t)*t:e>a?e-Math.ceil((e-a)/t)*t:e}function J$(e){return/(\d)$/.exec(e)?.[1]}function Y$(e,t,n=5){return q$(e,t,n)}function X$(e,t,n){let r=t.find(t=>t.id===e);if(r)return r.label;let i=n.replace(/^#\/?/,``).split(`/`)[0];return i===`settings`?`Settings`:i?i.charAt(0).toUpperCase()+i.slice(1):`Lobby`}var Z$=`phone-tab-card inline-flex h-11 min-w-11 shrink-0 items-center justify-center gap-1.5 rounded-lg border px-2.5 text-sm font-medium whitespace-nowrap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`;function Q$(e){let t=J$(e.key);return t?`${t}. ${e.label}`:e.label}function $$(e,t){let n=J$(e.key);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(K$,{id:e.id,play:+!!t,className:`size-4 shrink-0`}),n?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`text-[0.7rem] font-semibold tabular-nums text-muted-foreground`,children:n}):null,t?(0,U.jsx)(`span`,{className:`max-w-[8.5rem] truncate`,children:e.label}):null]})}function e1(e){return e?{duration:0}:{type:`spring`,stiffness:520,damping:30,mass:.5}}function t1({tab:e,selected:t,reduced:n}){return(0,U.jsx)(Qf.span,{className:`inline-flex items-center gap-1.5`,animate:{scale:t?1.04:1},transition:e1(n),children:$$(e,t)})}function n1({tab:e,selected:t,canonical:n,reduced:r,onClick:i,roving:a}){let o=Q$(e);return n?(0,U.jsx)(`button`,{type:`button`,role:`tab`,id:`tab-${e.id}`,"data-phone-tab-id":e.id,"aria-controls":`main`,"aria-label":o,"aria-keyshortcuts":e.key,"aria-selected":t,tabIndex:t||a?0:-1,onClick:i,className:Z$,children:(0,U.jsx)(t1,{tab:e,selected:t,reduced:r})}):(0,U.jsx)(`span`,{"data-phone-tab-id":e.id,"data-active":t?`true`:`false`,className:Z$,"aria-hidden":`true`,children:(0,U.jsx)(t1,{tab:e,selected:t,reduced:r})})}function r1({tabs:e,activeId:t,canonical:n,reduced:r,onClick:i,canonicalRef:a}){let o=t??e[0]?.id;return(0,U.jsx)(`div`,{ref:n?a:void 0,"data-phone-period":n?`canonical`:`copy`,"aria-hidden":!n||void 0,role:n?`tablist`:void 0,"aria-label":n?`Lobby tabs`:void 0,className:`phone-tabs-period`,children:e.map(e=>(0,U.jsx)(n1,{tab:e,selected:e.id===t,canonical:n,reduced:r,roving:e.id===o,onClick:t=>i(e.id,t)},e.id))})}function i1(e){return e<=0?0:e===1?1:5}function a1({tabs:e,activeId:t,reduced:n,onClick:r,canonicalRef:i}){let a=i1(e.length),o=Math.floor(a/2);return a?(0,U.jsx)(U.Fragment,{children:Array.from({length:a},(a,s)=>(0,U.jsx)(r1,{tabs:e,activeId:t,canonical:s===o,reduced:n,onClick:r,canonicalRef:s===o?i:void 0},s))}):null}function o1(e){e.current!==void 0&&window.clearTimeout(e.current),e.current=void 0}function s1(e){return e?.closest(`[data-phone-tab-id]`)?.dataset.phoneTabId}function c1(e){return s1(e.target instanceof Element?e.target:null)}function l1(e){return s1(document.elementFromPoint(e.clientX,e.clientY))??s1(e.target instanceof Element?e.target:null)}function u1(e,t){let n=e.dataset.phoneTabId;if(!n)return;let r=e.getBoundingClientRect();if(Number.isFinite(r.width))return{id:n,element:e,distance:Math.abs(r.left+r.width/2-t)}}function d1(e,t){return[...e.querySelectorAll(`[data-phone-tab-id]`)].map(e=>u1(e,t)).filter(e=>e!==void 0)}function f1(e){return e.reduce((e,t)=>!e||t.distance<e.distance?t:e,void 0)}function p1(e,t){return f1(d1(t,e.getBoundingClientRect().left+e.clientWidth/2))}function m1(e,t){if(e&&t)return[...e.querySelectorAll(`[data-phone-tab-id]`)].find(e=>e.dataset.phoneTabId===t)}function h1(e){let t=Number.parseFloat(getComputedStyle(e.parentElement??e).columnGap)||6;return e.offsetWidth+t}function g1(e,t,n){let r=Math.max(0,n.findIndex(e=>e.id===t));if(e===`Home`)return n[0]?.id;if(e===`End`)return n.at(-1)?.id;if(e===`ArrowRight`)return n[(r+1)%n.length]?.id;if(e===`ArrowLeft`)return n[(r-1+n.length)%n.length]?.id}function _1(e,t){return Math.abs(e-t)<=2}function v1(){let e=(0,m.useRef)(null),t=(0,m.useRef)(null),n=(0,m.useRef)(null),r=(0,m.useRef)(void 0),i=(0,m.useRef)(void 0),a=(0,m.useRef)(void 0),o=(0,m.useRef)(void 0),s=(0,m.useRef)(void 0),c=(0,m.useRef)(void 0),l=(0,m.useRef)(0),u=(0,m.useRef)(0),d=(0,m.useRef)(void 0);return(0,m.useMemo)(()=>({scroller:e,track:t,canonical:n,gesture:r,candidate:i,crossed:a,settleTimer:o,commitTimer:s,clickGuard:c,generation:l,scrollGeneration:u,programmatic:d}),[])}function y1(e){return{clearPending:(0,m.useCallback)(()=>{o1(e.settleTimer),o1(e.commitTimer),e.candidate.current=void 0,e.generation.current+=1},[e])}}function b1(e){let t=(0,m.useCallback)(t=>{let n=e.scroller.current;if(!n)return;let r=e.scrollGeneration.current+1;e.scrollGeneration.current=r;let i={value:Math.max(0,t),generation:r};e.programmatic.current=i,n.scrollLeft=i.value,i.value=n.scrollLeft},[e]),n=(0,m.useCallback)(n=>{let r=e.scroller.current;if(!r||!n||r.clientWidth<=0)return;let i=r.getBoundingClientRect(),a=n.getBoundingClientRect(),o=r.scrollLeft+a.left+a.width/2-(i.left+r.clientWidth/2);t(o)},[e,t]);return{centre:n,centreCanonical:(0,m.useCallback)(t=>{let r=m1(e.canonical.current,t);r&&(e.crossed.current=r),n(r)},[n,e]),rebase:(0,m.useCallback)((n,r)=>{let i=Y$(n.scrollLeft,h1(r));if(_1(i,n.scrollLeft))return!1;let a=i-n.scrollLeft;return e.gesture.current&&(e.gesture.current.originScrollLeft+=a),t(i),!0},[e,t])}}function x1(e){let t=(0,m.useCallback)(()=>{e.clickGuard.current=void 0},[e]);return{clearGuard:t,guardClick:(0,m.useCallback)(n=>{t(),e.clickGuard.current={kind:n}},[t,e]),consumeGuard:(0,m.useCallback)(n=>!n||!e.clickGuard.current?!1:(t(),!0),[t,e])}}function S1(e){return(0,m.useCallback)(()=>{let t=e.scroller.current,n=e.track.current;if(!t||!n)return;let r=p1(t,n);return r&&r.element!==e.crossed.current&&(e.crossed.current=r.element,VG()),e.candidate.current=r,r},[e])}function C1(e,t,n,r,i){let a=(0,m.useCallback)((r,i)=>{r&&r.id!==e.activeId&&(o1(t.commitTimer),t.commitTimer.current=window.setTimeout(()=>{i!==t.generation.current||t.candidate.current?.element!==r.element||e.blocked||(n(),e.onSelect(r.id))},500))},[n,e,t]);return(0,m.useCallback)(()=>{o1(t.settleTimer),o1(t.commitTimer);let e=++t.generation.current;t.settleTimer.current=window.setTimeout(()=>{if(e!==t.generation.current||t.gesture.current)return;let n=r();n&&(i(n.element),a(n,e))},120)},[a,i,r,t])}function w1(e,t,n){return(0,m.useCallback)(r=>e.tabs.some(e=>e.id===r)?(t(),e.onSelect(r),n(r),!0):!1,[n,t,e])}function T1(e,t,n,r){return(0,m.useCallback)(()=>{let i=e.scroller.current,a=e.canonical.current;if(!i||!a)return;let o=e.programmatic.current;if(o&&o.generation===e.scrollGeneration.current&&_1(i.scrollLeft,o.value)){e.programmatic.current=void 0;return}if(e.programmatic.current=void 0,o1(e.commitTimer),o1(e.settleTimer),e.candidate.current=void 0,e.generation.current+=1,t(i,a)){e.gesture.current||r();return}n(),e.gesture.current||r()},[n,t,e,r])}function E1(e,t,n,r){let i=(0,m.useRef)({clearPending:t,settle:n});i.current={clearPending:t,settle:n},(0,m.useEffect)(()=>{let t=e.scroller.current;if(!r||!t)return;let n=n=>{let r=n.deltaX||(n.shiftKey?n.deltaY:0);r&&(n.preventDefault(),e.programmatic.current=void 0,i.current.clearPending(),t.scrollLeft+=r,i.current.settle())};return t.addEventListener(`wheel`,n,{passive:!1}),()=>t.removeEventListener(`wheel`,n)},[r,e])}function D1(e,t,n){return(0,m.useCallback)(r=>{t(),n(),e.programmatic.current=void 0,e.gesture.current={id:r.pointerId,x:r.clientX,y:r.clientY,moved:!1,originScrollLeft:r.currentTarget.scrollLeft,downTabId:c1(r)},r.currentTarget.setPointerCapture?.(r.pointerId)},[n,t,e])}function O1(e,t){return(0,m.useCallback)(n=>{let r=e.gesture.current;r&&r.id===n.pointerId&&(Math.hypot(n.clientX-r.x,n.clientY-r.y)<8||(r.moved=!0,t(),(n.pointerType===`mouse`||n.pointerType===`pen`)&&(n.currentTarget.scrollLeft=r.originScrollLeft+r.x-n.clientX,n.preventDefault())))},[t,e])}function k1(e,t,n,r){return(0,m.useCallback)(i=>{let a=e.gesture.current;if(!a||a.id!==i.pointerId)return;e.gesture.current=void 0;let o=l1(i),s=a.downTabId;if(s&&!a.moved&&(!o||o===s)){n.guardClick(`committed`),t(s);return}(a.moved||s&&o&&o!==s)&&n.guardClick(`drag`),a.moved&&r()},[t,n,e,r])}function A1(e,t,n){return(0,m.useCallback)(()=>{let r=e.gesture.current?.moved;e.gesture.current=void 0,r&&t.guardClick(`drag`),r&&n()},[t,e,n])}function j1(e,t,n,r,i){return{onPointerDown:D1(e,i,n.clearGuard),onPointerMove:O1(e,i),onPointerUp:k1(e,t,n,r),onPointerCancel:A1(e,n,r)}}function M1(e,t){return(0,m.useCallback)((n,r)=>{t.consumeGuard(r.detail!==0)||e(n)},[e,t])}function N1(e,t){return(0,m.useCallback)(n=>{if(t.consumeGuard(n.detail!==0))return;let r=n.target instanceof Element?n.target.closest(`[data-phone-tab-id]`):null;if(!r||r.closest(`button`))return;let i=r.dataset.phoneTabId;i&&e(i)},[e,t])}function P1(e,t,n){return(0,m.useCallback)(r=>{if(r.key===`ArrowDown`&&!r.altKey){ZA()&&r.preventDefault();return}if(!e.tabs.length)return;let i=r.target.closest(`[role='tab']`)?.dataset.phoneTabId??e.activeId??e.tabs[0].id,a=g1(r.key,i,e.tabs);a?(r.preventDefault(),$A.active=!0,$A.to=a,n(a),m1(t.canonical.current,a)?.focus({preventScroll:!0})):(r.key===`Enter`||r.key===` `)&&i&&(r.preventDefault(),n(i))},[n,e,t])}function F1(e){let[t,n]=(0,m.useState)(0),[r,i]=(0,m.useState)(!1);return{sidePad:t,peek:r,setPeek:i,updatePad:(0,m.useCallback)(()=>{let t=e.scroller.current;if(!t||t.clientWidth<=0)return;let r=Math.max(22,t.clientWidth/2);n(e=>Math.abs(e-r)<.5?e:r)},[e])}}function I1(e,t){return e.find(e=>e.id===t)?.id??e[0]?.id}function L1(e,t,n,r){let{activeId:i,keyboardOpen:a,tabs:o}=e;(0,m.useLayoutEffect)(()=>{n(),t(I1(o,i))},[i,t,a,o,n,r])}function R1(e,t,n,r,i){let{activeId:a,tabs:o}=e;(0,m.useEffect)(()=>{let e=t.scroller.current;if(!e||typeof ResizeObserver>`u`)return;let s=new ResizeObserver(()=>{e.clientWidth<=0||(n(),i(),r(I1(o,a)))});return s.observe(e),t.track.current&&s.observe(t.track.current),()=>s.disconnect()},[a,r,n,t,o,i])}function z1(e){(0,m.useEffect)(()=>{let t=()=>e();return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[e])}function B1(e,t,n,r){(0,m.useEffect)(()=>{n(),t.crossed.current=void 0},[n,e.activeId,e.blocked,e.keyboardOpen,t,r])}function V1(e,t,n){(0,m.useEffect)(()=>()=>{t(),n(),e.programmatic.current=void 0},[n,t,e])}function H1(e,t,n){(0,m.useEffect)(()=>{e.keyboardOpen||n(!1),t()},[t,e.blocked,e.keyboardOpen,n])}function U1(e){let t=v1(),{clearPending:n}=y1(t),r=b1(t),i=x1(t),a=F1(t),o=S1(t),s=C1(e,t,n,o,r.centre),c=w1(e,n,r.centreCanonical),l=T1(t,r.rebase,o,s),u=j1(t,c,i,s,n);E1(t,n,s,e.tabs.length>0);let d=P1(e,t,c),f=N1(c,i),p=M1(c,i),m=e.tabs.map(e=>e.id).join(`\0`);return L1(e,r.centreCanonical,a.updatePad,!e.keyboardOpen||a.peek),R1(e,t,n,r.centreCanonical,a.updatePad),B1(e,t,n,m),z1(n),V1(t,n,i.clearGuard),H1(e,n,a.setPeek),{scroller:t.scroller,track:t.track,canonical:t.canonical,sidePad:a.sidePad,periods:i1(e.tabs.length),peek:a.peek,setPeek:a.setPeek,onScroll:l,...u,onSurfaceClick:f,onCardClick:p,onKeyDown:d}}function W1(e,t){return X$(e,t,window.location.hash)}function G1({tabs:e,activeId:t,onSelect:n}){let r=fA(),{keyboardOpen:i}=eA(),a=!!Of(),o=W1(t,e),s=U1({tabs:e,activeId:t,blocked:r,keyboardOpen:i,reduced:a,onSelect:n});if(!e.length)return null;let c=i&&!s.peek;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{"aria-hidden":c?`true`:void 0,inert:c,hidden:c,children:(0,U.jsx)(q1,{tabs:e,activeId:t,label:o,reduced:a,carousel:s,keyboardOpen:i})}),c?(0,U.jsx)(K1,{label:o,onOpen:()=>s.setPeek(!0)}):null]})}function K1({label:e,onOpen:t}){return(0,U.jsx)(`div`,{className:`phone-tabs phone-tabs-handle`,children:(0,U.jsxs)(`button`,{type:`button`,"data-phone-tabs-handle":!0,"aria-expanded":`false`,"aria-label":`Open tabs, current page ${e}`,onPointerDown:e=>e.preventDefault(),onClick:t,className:`phone-tabs-current inline-flex min-h-11 items-center gap-2 rounded-lg border px-4 text-sm font-medium focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[(0,U.jsx)(`span`,{className:`truncate`,children:e}),(0,U.jsx)(lm,{"aria-hidden":`true`,className:`size-4`})]})})}function q1({tabs:e,activeId:t,label:n,reduced:r,carousel:i,keyboardOpen:a}){return(0,U.jsxs)(`div`,{className:`phone-tabs`,"data-phone-tabs":!0,"data-periods":i.periods,children:[t&&!e.some(e=>e.id===t)?(0,U.jsx)(`span`,{"data-phone-page-handle":!0,className:`phone-tabs-page-handle`,children:n}):null,(0,U.jsx)(`div`,{ref:i.scroller,className:`phone-tabs-scroller`,onScroll:i.onScroll,onPointerDown:i.onPointerDown,onPointerMove:i.onPointerMove,onPointerUp:i.onPointerUp,onPointerCancel:i.onPointerCancel,onClick:i.onSurfaceClick,children:(0,U.jsx)(`div`,{ref:i.track,className:`phone-tabs-track`,style:{"--phone-period-pad":`${i.sidePad}px`},onKeyDown:i.onKeyDown,children:(0,U.jsx)(a1,{tabs:e,activeId:t,reduced:r,onClick:i.onCardClick,canonicalRef:i.canonical})})}),a&&i.peek?(0,U.jsx)(`button`,{type:`button`,"aria-label":`Close tabs`,onPointerDown:e=>e.preventDefault(),onClick:()=>i.setPeek(!1),className:`phone-tabs-close`,children:(0,U.jsx)(rm,{"aria-hidden":`true`,className:`size-4`})}):null]})}function J1(e){return/(\d)$/.exec(e)?.[1]}var Y1=160;function X1(e){let t=Of(),[n,r]=(0,m.useState)(0),i=(0,m.useRef)(0),a=(0,m.useCallback)(()=>{t||performance.now()<i.current||(i.current=performance.now()+j$*1e3,r(e=>e+1))},[t]),o=(0,m.useRef)(e);return(0,m.useEffect)(()=>{let t=e&&!o.current;if(o.current=e,!t)return;let n=window.setTimeout(a,Y1);return()=>window.clearTimeout(n)},[e,a]),{play:n,onPointerEnter:(0,m.useCallback)(e=>{e.pointerType!==`touch`&&a()},[a])}}var Z1=(0,m.forwardRef)(function({tab:e,active:t},n){let r=J1(e.key),{play:i,onPointerEnter:a}=X1(t);return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsxs)(`a`,{ref:n,role:`tab`,id:`tab-${e.id}`,href:`#/${e.id}`,"aria-selected":t,"aria-keyshortcuts":e.key,tabIndex:t?0:-1,onPointerEnter:a,className:J(`relative z-10 inline-flex h-7 shrink-0 items-center gap-1.5 rounded-lg border border-[var(--tab-outline)] px-2.5 text-[0.8125rem] leading-none font-medium whitespace-nowrap outline-none`,`transition-colors duration-200 ease-snap focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,t?`text-foreground`:`bg-[var(--tab-idle)] text-muted-foreground hover:bg-accent hover:text-foreground`),children:[(0,U.jsx)(K$,{id:e.id,play:i,className:J(`size-3.5 shrink-0 transition-colors duration-200`,t&&`text-primary`)}),r?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:J(`text-[0.72rem] font-semibold tabular-nums transition-colors duration-200`,t?`text-primary`:`text-muted-foreground/75`),children:r}):null,(0,U.jsx)(`span`,{children:e.label})]})}),(0,U.jsxs)(BA,{children:[e.label,` `,(0,U.jsx)(_k,{chord:e.key})]})]})}),Q1=1.5;function $1(e,t,n=t?.left??0,r=t?.right??0,i=1){if(e){if(!t||r-n<.5){e.style.opacity=`0`;return}e.style.opacity=String(Math.min(1,(r-n)/14)),e.style.top=`${t.top}px`,e.style.height=`${t.height}px`,e.style.width=`${r-n}px`,e.style.transform=`translateX(${n}px)`,e.style.scale=i===1?``:`1 ${i}`}}function e0(e,t){let n=e.right-e.left,{height:r}=e,i=Q1/2,a=Math.max(0,Math.min(e.radius-i,r/2-i,n/2-i)),o=r/2,s=e=>+(t===`left`?e:n-e).toFixed(2),c=+(t===`left`),l=1-c,u=i,d=n-i,f=r-i;return[`M${s(u)} ${o}L${s(u)} ${i+a}A${a} ${a} 0 0 ${c} ${s(u+a)} ${i}L${s(d-a)} ${i}A${a} ${a} 0 0 ${c} ${s(d)} ${i+a}L${s(d)} ${o}`,`M${s(u)} ${o}L${s(u)} ${f-a}A${a} ${a} 0 0 ${l} ${s(u+a)} ${f}L${s(d-a)} ${f}A${a} ${a} 0 0 ${l} ${s(d)} ${f-a}L${s(d)} ${o}`]}function t0(e,t,n,r){if(!e)return;if(!t||r<=.002){e.style.opacity=`0`;return}let i=t.right-t.left,a=`${i}x${t.height}r${t.radius}${n}`;e.dataset.shape!==a&&(e.dataset.shape=a,e.dataset.port=n,e.setAttribute(`viewBox`,`0 0 ${i} ${t.height}`),e0(t,n).forEach((t,n)=>e.children[n]?.setAttribute(`d`,t))),e.style.opacity=String(Math.min(1,r*12)),e.style.top=`${t.top}px`,e.style.height=`${t.height}px`,e.style.width=`${i}px`,e.style.transform=`translateX(${t.left}px)`;let o=`${Math.min(1,r)} 2`;for(let t of e.children)t.style.strokeDasharray=o}var n0={type:`spring`,visualDuration:.12,bounce:0},r0={type:`spring`,visualDuration:.17,bounce:.15,delay:.015},i0={type:`spring`,visualDuration:.17,bounce:.05,delay:.07},a0={type:`spring`,visualDuration:.22,bounce:.25},o0={type:`spring`,visualDuration:.2,bounce:0},s0={type:`spring`,stiffness:900,damping:18,velocity:45,restDelta:.02,restSpeed:1},c0=(()=>{let e=kr({keyframes:[0,1],visualDuration:a0.visualDuration,bounce:a0.bounce}),t=0;for(;t<1e3&&e.next(t).value<.97;)t+=4;return t/1e3})(),l0={type:`spring`,visualDuration:.28,bounce:.6};function u0(e,t){let n=(0,m.useRef)(null),r=(0,m.useRef)(null),i=(0,m.useRef)(null),a=(0,m.useRef)(null),o=(0,m.useRef)(null),s=(0,m.useRef)({}),c=(0,m.useRef)([]),l=(0,m.useRef)(void 0),u=(0,m.useRef)([]),d=(0,m.useRef)(1),f=(0,m.useRef)(1),p=(0,m.useCallback)(e=>{let t=e?s.current[e]:void 0;if(!t)return;let n=parseFloat(getComputedStyle(t).borderTopLeftRadius)||0;return{left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,height:t.offsetHeight,radius:n}},[]),h=(0,m.useCallback)(()=>{for(let e of u.current)e.stop();u.current=[];for(let e of Object.values(s.current))e?.style.translate&&(e.style.translate=``)},[]),g=(0,m.useCallback)(e=>{h(),l.current=e,d.current=1,f.current=1;let t=p(e);$1(r.current,t),$1(i.current,void 0),t0(a.current,t,`left`,1),t0(o.current,void 0,`left`,0);for(let e of c.current)e&&(e.style.width=`0px`);QV()},[p,h]),_=(0,m.useCallback)((e,t)=>{let n=p(e),m=p(t);if(!n||!m)return g(t);h(),ZV(),l.current=t;let _=m.left>n.left?1:-1,v=_>0?n.right:n.left,y=_>0?m.left:m.right,b=Math.abs(y-v),x=_>0?`right`:`left`,S=_>0?`left`:`right`,C=c.current.map(e=>{let t=e?.parentElement;return t?{liquid:e,from:t.offsetLeft,to:t.offsetLeft+t.offsetWidth}:void 0}),w=b>4?1-4/b:0,T={drained:1-Math.min(1,d.current),unrung:1-Math.min(1,f.current),head:0,tail:0,filled:0,rung:0,squash:1,budge:0},E=s.current[t];d.current=0,f.current=0;let D=()=>{let e=(n.right-n.left)*Math.min(1,T.drained);$1(i.current,n,_>0?n.left+e:n.left,_>0?n.right:n.right-e),t0(o.current,n,x,1-T.unrung);let t=v+_*b*T.head,s=v+_*b*T.tail,c=Math.min(t,s),l=Math.max(t,s);for(let e of C){if(!e?.liquid)continue;let t=Math.max(c,e.from),n=Math.min(l,e.to);e.liquid.style.width=`${Math.max(0,n-t)}px`,e.liquid.style.transform=`translateX(${Math.max(0,t-e.from)}px)`}let u=_*T.budge,d=u?{...m,left:m.left+u,right:m.right+u}:m;E&&(E.style.translate=Math.abs(u)>.01?`${u.toFixed(2)}px`:``);let f=(d.right-d.left)*Math.min(1,Math.max(0,T.filled));$1(r.current,d,_>0?d.left:d.right-f,_>0?d.left+f:d.right,Math.min(1,T.squash)),t0(a.current,d,S,T.rung)},O=(e,t,n,r,i=1)=>{let a=Zf(t,i,{...n,onUpdate:t=>{T[e]=t,r?.(t),D()}});return u.current.push(a),a},k=!1,A=()=>{if(k)return;k=!0;let e=O(`filled`,0,a0,e=>{d.current=e});e.then(()=>{l.current===t&&QV()}),O(`squash`,.8,l0),O(`rung`,0,o0,e=>{f.current=e}),O(`budge`,0,{...s0,delay:c0},void 0,0),Promise.all([e,...u.current]).then(()=>{l.current===t&&u.current.includes(e)&&g(t)})};O(`drained`,T.drained,n0),O(`unrung`,T.unrung,n0),O(`head`,0,r0,e=>{e>=w&&A()}),O(`tail`,0,i0),D()},[p,g,h]);(0,m.useLayoutEffect)(()=>{let t=l.current,n=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;!t||!e||t===e||n?g(e):_(t,e)},[e,t,_,g]);let v=(0,m.useRef)(e);return v.current=e,(0,m.useEffect)(()=>{let e=n.current;if(!e||typeof ResizeObserver>`u`)return;let t=!0,r=new ResizeObserver(()=>{if(t){t=!1;return}g(v.current)});return r.observe(e),()=>{r.disconnect(),h()}},[g,h]),{track:n,fill:r,drain:i,ring:a,unring:o,cells:s,liquids:c}}var d0=(0,m.forwardRef)(function({which:e},t){return(0,U.jsxs)(`svg`,{ref:t,"aria-hidden":`true`,[`data-tab-${e}`]:``,className:`pointer-events-none absolute left-0 z-20 overflow-visible opacity-0 will-change-transform`,fill:`none`,children:[(0,U.jsx)(`path`,{pathLength:1,strokeWidth:Q1,strokeLinecap:`round`,className:`stroke-tab-rim`}),(0,U.jsx)(`path`,{pathLength:1,strokeWidth:Q1,strokeLinecap:`round`,className:`stroke-tab-rim`})]})});function f0(e){if(e.left||e.right)return`linear-gradient(to right, ${e.left?`transparent 0, black 28px`:`black 0`}, ${e.right?`black calc(100% - 28px), transparent 100%`:`black 100%`})`}function p0({tabs:e,activeId:t,onSelect:n}){let r=Sk(`(max-width: 767.98px)`),{track:i,fill:a,drain:o,ring:s,unring:c,cells:l,liquids:u}=u0(t,e.length),d=(0,m.useRef)(null),[f,p]=(0,m.useState)({left:!1,right:!1}),h=(0,m.useCallback)(()=>{let e=d.current;if(!e)return;let t=e.scrollLeft>2,n=e.scrollLeft+e.clientWidth<e.scrollWidth-2;p(e=>e.left===t&&e.right===n?e:{left:t,right:n})},[]);(0,m.useEffect)(()=>{let e=d.current;if(!e||typeof ResizeObserver>`u`)return;h();let t=new ResizeObserver(h);return t.observe(e),e.firstElementChild&&t.observe(e.firstElementChild),()=>t.disconnect()},[h,e.length]),(0,m.useEffect)(()=>{let e=d.current,n=t?l.current[t]:void 0;e&&n&&(n.offsetLeft<e.scrollLeft?e.scrollLeft=n.offsetLeft-8:n.offsetLeft+n.offsetWidth>e.scrollLeft+e.clientWidth&&(e.scrollLeft=n.offsetLeft+n.offsetWidth-e.clientWidth+8))},[t,l]);function g(r){if(r.key===`ArrowDown`&&!r.altKey){ZA()&&r.preventDefault();return}let i=r.key===`ArrowRight`?1:r.key===`ArrowLeft`?-1:0;if(!i||e.length===0)return;r.preventDefault();let a=r.target.closest(`[role='tab']`)?.id.replace(/^tab-/,``)??t,o=e[(Math.max(0,e.findIndex(e=>e.id===a))+i+e.length)%e.length];$A.active=!0,$A.to=o.id,window.setTimeout(()=>{$A.active=!1,$A.to=void 0},3e3),n(o.id),l.current[o.id]?.focus({preventScroll:!0})}return r?(0,U.jsx)(G1,{tabs:e,activeId:t,onSelect:n}):(0,U.jsx)(`div`,{ref:d,onScroll:h,style:{maskImage:f0(f),WebkitMaskImage:f0(f)},className:`min-w-0 max-w-full overflow-x-auto [scrollbar-width:none] pointer-coarse:-my-1.5 pointer-coarse:py-1.5 [&::-webkit-scrollbar]:hidden`,children:(0,U.jsxs)(`div`,{ref:i,role:`tablist`,"aria-label":`Lobby tabs`,onKeyDown:g,className:`relative mx-auto flex w-max items-center py-0.5`,children:[(0,U.jsx)(`span`,{ref:o,"aria-hidden":`true`,"data-tab-drain":!0,className:`pointer-events-none absolute left-0 z-0 rounded-lg bg-tab-fill opacity-0 will-change-transform`}),(0,U.jsx)(`span`,{ref:a,"aria-hidden":`true`,"data-tab-fill":!0,className:`pointer-events-none absolute left-0 z-0 rounded-lg bg-tab-fill opacity-0 will-change-transform`}),(0,U.jsx)(d0,{ref:c,which:`unring`}),(0,U.jsx)(d0,{ref:s,which:`ring`}),e.map((e,n)=>(0,U.jsxs)(m.Fragment,{children:[n>0?(0,U.jsxs)(`span`,{"aria-hidden":`true`,"data-tab-link":!0,className:`relative h-[2px] w-3.5 shrink-0 sm:w-4`,children:[(0,U.jsx)(`span`,{className:`absolute inset-0 border-t-2 border-dotted border-input`}),(0,U.jsx)(`span`,{ref:e=>{u.current[n-1]=e},"data-tab-liquid":!0,className:`absolute top-0 left-0 h-[2px] w-0 rounded-full bg-tab-liquid shadow-[0_0_6px_var(--tab-liquid)] will-change-transform`})]}):null,(0,U.jsx)(Z1,{ref:t=>{l.current[e.id]=t},tab:e,active:e.id===t})]},e.id))]})})}function m0({oracleBusy:e,runs:t,activity:n,background:r}){let i=new Set;e&&i.add(`Oracle`);for(let e of t)e.status===`running`&&i.add(QU(nW(e)));for(let e of n)e.pending&&e.source!==`LOBBY`&&i.add(e.source===`MASTER`?`Oracle`:QU(e.source));let a=r.filter(e=>e.alive&&e.busy).length;return a&&i.add(a===1?`1 in the background`:`${a} in the background`),[...i]}function h0(e){return e.length<=2?e.join(`, `):`${e.slice(0,2).join(`, `)} +${e.length-2}`}function g0(...e){let t=e.filter(e=>!!e);if(!t.length)return;let n=Math.max(...t.map(e=>e.left)),r=Math.max(...t.map(e=>e.top)),i=Math.min(...t.map(e=>e.left+e.width)),a=Math.min(...t.map(e=>e.top+e.height));return i>n&&a>r?{left:n,top:r,width:i-n,height:a-r}:void 0}function _0(e,t){return g0(e,{left:e.left,top:e.top,width:e.width,height:Math.max(0,t-e.top)})}var v0=6,y0=`bot-lobby.orb`,b0=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=1;function x0(e,t,n,r){let i=e=>e+v0,a=(e,t)=>Math.max(e+v0,e+t-r-v0);return{x:Math.min(a(n.left,n.width),Math.max(i(n.left),e)),y:Math.min(a(n.top,n.height),Math.max(i(n.top),t))}}function S0(e,t,n,r){let i=e=>Math.max(1,e-r),a=x0(e,t,n,r);return{fx:Math.min(1,Math.max(0,(a.x-n.left)/i(n.width))),fy:Math.min(1,Math.max(0,(a.y-n.top)/i(n.height)))}}function C0(e,t,n){return x0(t.left+e.fx*Math.max(0,t.width-n),t.top+e.fy*Math.max(0,t.height-n),t,n)}function w0(e){if(e)try{let t=JSON.parse(e);return b0(t.fx)&&b0(t.fy)?{fx:t.fx,fy:t.fy}:void 0}catch{return}}function T0(){try{return w0(localStorage.getItem(y0))}catch{return}}function E0(e){try{localStorage.setItem(y0,JSON.stringify(e))}catch{}}var D0=5,O0=16,k0={fx:1,fy:1};function A0(e){return{left:e.left,top:e.top,width:e.width,height:e.height}}function j0(e){let t=document.getElementById(`main`)?.getBoundingClientRect();if(!t)return;if(!e)return A0(t);let n=window.visualViewport,r=A0({left:n?.offsetLeft??0,top:n?.offsetTop??0,width:n?.width??window.innerWidth,height:n?.height??window.innerHeight}),i=g0(A0(t),r);if(!i)return;let a=document.getElementById(`app-dock`)?.getBoundingClientRect().top;return a===void 0?i:_0(i,a)}function M0(e,t){return!e||!t?e===t:e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function N0(e){let[t,n]=(0,m.useState)(()=>j0(e));return(0,m.useEffect)(()=>{let t=()=>{let t=j0(e);n(e=>M0(e,t)?e:t)},r=document.getElementById(`main`),i=document.getElementById(`app-dock`),a=typeof ResizeObserver>`u`?void 0:new ResizeObserver(t);r&&a?.observe(r),i&&a?.observe(i);let o=window.visualViewport;return window.addEventListener(`resize`,t),window.addEventListener(`orientationchange`,t),o?.addEventListener(`resize`,t),o?.addEventListener(`scroll`,t),t(),()=>{a?.disconnect(),window.removeEventListener(`resize`,t),window.removeEventListener(`orientationchange`,t),o?.removeEventListener(`resize`,t),o?.removeEventListener(`scroll`,t)}},[e]),t}var P0=(0,m.forwardRef)(function({spotlight:e,thinking:t,busy:n=[],tone:r,expanded:i,hidden:a,shortcut:o,onOpen:s},c){let l=Sk(`(max-width: 767.98px)`),u=N0(l),[d,f]=(0,m.useState)(T0),[p,h]=(0,m.useState)(),[g,_]=(0,m.useState)(!1),v=(0,m.useRef)(void 0),y=(0,m.useRef)(!1),b=(0,m.useRef)(44),x=d??(l?k0:void 0),S=p??(x&&u?C0(x,u,b.current):void 0),C=(0,m.useCallback)((e,t)=>{let n=j0(l);if(!n)return;let r=S0(e,t,n,b.current);f(r),E0(r)},[l]);(0,m.useEffect)(()=>{u&&h(e=>e&&x0(e.x,e.y,u,b.current))},[u]);function w(e){if(e.button!==0)return;let t=e.currentTarget.getBoundingClientRect();b.current=t.width,v.current={id:e.pointerId,sx:e.clientX,sy:e.clientY,ox:t.left,oy:t.top,moved:!1},e.currentTarget.setPointerCapture?.(e.pointerId)}function T(e){let t=v.current;if(!t||t.id!==e.pointerId)return;let n=e.clientX-t.sx,r=e.clientY-t.sy;if(!t.moved&&Math.hypot(n,r)<D0)return;t.moved=!0;let i=j0(l);i&&h(x0(t.ox+n,t.oy+r,i,b.current))}function E(e){let t=v.current;v.current=void 0,t?.moved&&(y.current=!0,C(t.ox+e.clientX-t.sx,t.oy+e.clientY-t.sy),h(void 0))}function D(e){let t=e.shiftKey?64:O0,n={ArrowLeft:[-t,0],ArrowRight:[t,0],ArrowUp:[0,-t],ArrowDown:[0,t]}[e.key];if(!n||e.altKey||e.ctrlKey||e.metaKey)return;e.preventDefault();let r=e.currentTarget.getBoundingClientRect();b.current=r.width,C(r.left+n[0],r.top+n[1])}let O=!e&&n.length>0,k=e?QU(e):O?h0(n):void 0,A=e?`${t.map(QU).join(`, `)} thinking. `:O?`${n.join(`, `)} at work. `:``,j=S&&u?S.x-u.left<140:!1,M={"--orb":r,...S?{left:S.x,top:S.y,right:`auto`,bottom:`auto`}:{}};return(0,U.jsxs)(RA,{open:g&&!p,onOpenChange:_,children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsxs)(`button`,{ref:c,type:`button`,"aria-label":`Open Thinking`,"aria-description":`${A}Drag, or use the arrow keys, to move it.`,"aria-haspopup":`dialog`,"aria-expanded":i,"aria-keyshortcuts":o?`${o} Enter Space`:`Enter Space`,onClick:e=>{if(y.current){y.current=!1,e.preventDefault();return}s()},onPointerDown:w,onPointerMove:T,onPointerUp:E,onPointerCancel:()=>{v.current=void 0,h(void 0)},onKeyDown:D,style:M,"data-thinking":e?``:void 0,"data-busy":O?``:void 0,"data-dragging":p?``:void 0,"data-placed":S?``:void 0,"data-flip":j||void 0,className:J(`thinking-bubble fixed z-20 touch-none rounded-full outline-none select-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,a&&`invisible`),children:[(0,U.jsx)(Nu,{initial:!1,children:k?(0,U.jsx)(Qf.span,{className:`orb-label`,initial:{opacity:0,x:j?-8:8,scale:.9},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:j?-8:8,scale:.9},transition:{type:`spring`,visualDuration:.3,bounce:.35},children:(0,U.jsx)(Nu,{mode:`popLayout`,initial:!1,children:(0,U.jsx)(Qf.span,{className:`inline-flex items-center gap-1`,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{type:`spring`,visualDuration:.28,bounce:.3},children:k},k)})},`label`):null}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`orb orb-float`,children:(0,U.jsx)(`span`,{className:`orb-icon`,children:(0,U.jsx)(XU,{source:e,strokeWidth:2.25,className:`size-3.5`})})})]})}),(0,U.jsxs)(BA,{side:`top`,children:[`Thinking `,!l&&o?(0,U.jsx)(_k,{chord:o}):null,(0,U.jsx)(`span`,{className:`text-background/70`,children:` · drag to move`})]})]})}),F0=/^\s*(?:#{1,6}\s+(.+?)\s*#*|\*\*([^*\n]{2,90}?):?\*\*:?|__([^_\n]{2,90}?):?__:?)\s*$/,I0=260,L0=200,R0=/^\s*(?:[-*+]\s|\d+[.)]\s|>|```|~~~|\|)/m;function z0(e){let t=[],n=[],r=!1;for(let i of e){if(/^\s*(```|~~~)/.test(i)&&(r=!r),!r&&!i.trim()){n.length&&t.push(n.join(`
|
|
104
|
+
`,t),i=e.slice(n,r<0?e.length:r),a=HQ.exec(i);if(!a||t-n<a[0].length)return;let[o,s=``,c,l,u=`.`,d]=a;if(i.slice(o.length).trim()===``)return{value:e.slice(0,n)+e.slice(r<0?e.length:r),start:n,end:n};let f=`\n${s}${c??`${Number(l)+1}${u}`} ${d?`[ ] `:``}`;return{value:e.slice(0,t)+f+e.slice(t),start:t+f.length,end:t+f.length}}function WQ({rest:e}){let{chat:t}=HW(e);return(0,U.jsx)(`div`,{role:`group`,"aria-label":`Knowledge pane`,className:`flex items-center gap-0.5 rounded-lg bg-muted p-0.5`,children:[`Chat`,`Docs`].map(n=>(0,U.jsx)(`button`,{type:`button`,"aria-pressed":t===(n===`Chat`),onClick:()=>bA(UW(e,n===`Chat`)),className:J(`h-6 rounded-md border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,t===(n===`Chat`)?`btn-outline btn-soft bg-card text-foreground`:`btn-ghost text-muted-foreground hover:text-foreground`),children:n},n))})}function GQ(e){let[t,n]=(0,m.useState)(!1),[r,i]=(0,m.useState)();async function a(r){if(!t){n(!0),i(void 0);try{let{project:t}=await be(`projects.open`,{path:r});he([t]),z(t.id,e)}catch(e){i(e.message)}finally{n(!1)}}}return{opening:t,error:r,open:a}}function KQ({path:e,parent:t,busy:n,browse:r}){let[i,a]=(0,m.useState)(e);return(0,m.useEffect)(()=>a(e),[e]),(0,U.jsxs)(`form`,{className:`flex h-9 min-w-0 items-center rounded-md border border-input bg-background shadow-xs transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/20 max-md:h-11`,onSubmit:e=>{e.preventDefault(),r(i)},children:[(0,U.jsx)(`button`,{type:`button`,"aria-label":`Parent folder`,title:`Parent folder (Backspace)`,disabled:n||!t,onClick:()=>t&&r(t),className:`grid h-full w-9 shrink-0 place-items-center border-r border-input text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-40`,children:(0,U.jsx)(Vp,{"aria-hidden":`true`,className:`size-4`})}),(0,U.jsx)(`input`,{"aria-label":`Folder path`,value:i,disabled:n,spellCheck:!1,autoComplete:`off`,onChange:e=>a(e.target.value),className:`h-full min-w-0 flex-1 bg-transparent px-3 font-mono text-[0.8125rem] text-foreground outline-none placeholder:text-muted-foreground disabled:opacity-60`}),(0,U.jsx)(`button`,{type:`submit`,disabled:n||!i.trim(),className:`h-full shrink-0 border-l border-input px-3 text-xs font-medium text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-40`,children:`Go`})]})}function qQ(e,t,n){let r=[...e.currentTarget.querySelectorAll(`button[data-folder]:not(:disabled)`)],i=r.indexOf(document.activeElement),a={ArrowDown:Math.min(r.length-1,i+1),ArrowUp:Math.max(0,i-1),Home:0,End:r.length-1}[e.key];a!==void 0&&r.length>0?(e.preventDefault(),r[a]?.focus()):e.key===`Backspace`&&t&&(e.preventDefault(),n(t))}function JQ({data:e,loading:t,busy:n,browse:r}){let i=e?.folders.length??0;return(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-hidden rounded-md border border-border`,children:[(0,U.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center justify-between border-b border-border bg-muted/50 px-3 text-[0.7rem] font-medium tracking-wide text-muted-foreground uppercase`,children:[(0,U.jsx)(`span`,{children:`Name`}),(0,U.jsx)(`span`,{className:`normal-case tracking-normal`,children:t?`Loading…`:`${i.toLocaleString()} ${i===1?`folder`:`folders`}${e?.truncated?` (first 2,000)`:``}`})]}),(0,U.jsxs)(`div`,{"aria-label":`Folders`,role:`group`,onKeyDown:t=>qQ(t,e?.parent,r),className:`h-64 overflow-y-auto overscroll-contain py-1 max-md:h-[min(40vh,16rem)]`,children:[e?.folders.map(e=>{let t=e.name.startsWith(`.`);return(0,U.jsxs)(`button`,{type:`button`,"data-folder":!0,disabled:n,onClick:()=>r(e.path),title:e.path,className:`group/row flex h-8 w-full min-w-0 items-center gap-2.5 px-3 text-left text-[0.8125rem] transition-colors outline-none hover:bg-muted focus-visible:bg-accent focus-visible:text-accent-foreground disabled:opacity-60 max-md:h-11`,children:[(0,U.jsx)(rh,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,t?`text-muted-foreground/60`:`text-muted-foreground`)}),(0,U.jsx)(`span`,{className:J(`min-w-0 flex-1 truncate`,t&&`text-muted-foreground`),children:e.name}),(0,U.jsx)(sm,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground/0 transition-colors group-hover/row:text-muted-foreground group-focus-visible/row:text-muted-foreground`})]},e.path)}),e&&!i?(0,U.jsx)(`p`,{className:`px-3 py-6 text-center text-xs text-muted-foreground`,children:`No subfolders. You can open this folder.`}):null,e?.truncated?(0,U.jsx)(`p`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:`Only the first 2,000 entries are listed. Enter a path to go further.`}):null]})]})}function YQ({tab:e,close:t,busyChanged:n}){let[r,i]=(0,m.useState)(),a=IA(`projects.browse`,r===void 0?{}:{path:r},[]),o=GQ(e);return(0,m.useEffect)(()=>n(o.opening),[o.opening,n]),(0,U.jsxs)(`div`,{className:`flex min-h-0 max-h-full w-[min(40rem,calc(100vw-2rem))] flex-col overflow-y-auto max-md:max-h-[calc(100svh-2rem)]`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 border-b border-border px-4 py-3 max-md:px-3`,children:[(0,U.jsx)(`h2`,{className:`text-[0.9375rem] font-semibold`,children:`Open project folder`}),(0,U.jsx)(`p`,{className:`break-words text-xs text-muted-foreground`,children:`Folders on the machine running bot-lobby. The project opens in a session of its own; this one keeps running, and its project-local extensions stay off until you enable them.`})]}),(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-3 p-4 max-md:p-3`,children:[(0,U.jsx)(KQ,{path:a.data?.path??r??``,parent:a.data?.parent,busy:o.opening,browse:i}),(0,U.jsx)(JQ,{data:a.data,loading:a.loading,busy:a.loading||o.opening,browse:i}),a.loading?(0,U.jsx)(`p`,{role:`status`,className:`sr-only`,children:`Loading folders…`}):null,a.error||o.error?(0,U.jsx)(`p`,{role:`alert`,className:`break-words text-xs text-destructive`,children:a.error??o.error}):null]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 border-t border-border bg-muted/30 px-4 py-3 max-md:px-3`,children:[a.error?(0,U.jsx)(X,{variant:`outline`,onClick:a.reload,disabled:a.loading,className:`max-md:min-h-11`,children:`Retry`}):null,(0,U.jsx)(X,{variant:`outline`,onClick:t,disabled:o.opening,className:`max-md:min-h-11`,children:`Cancel`}),(0,U.jsx)(X,{disabled:!a.data||a.loading||!!a.error||o.opening,onClick:()=>void o.open(a.data.path),className:`max-md:min-h-11`,children:o.opening?`Opening project…`:`Open this folder`})]})]})}function XQ({open:e,onClose:t,tab:n}){let r=uA(e,lA.help),[i,a]=(0,m.useState)(!1);return(0,U.jsx)(nA,{open:r,label:`Open project folder`,className:`max-md:max-h-[calc(100svh-2rem)] max-md:max-w-[calc(100vw-2rem)]`,onOpenChange:e=>{!e&&!i&&t()},dismissOnBackdrop:!i,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[role="combobox"][aria-label="Project"]`)?.focus()},children:e?(0,U.jsx)(YQ,{tab:n,close:t,busyChanged:a}):null})}function ZQ(){try{return{id:ue()}}catch(e){return{error:e.message}}}function QQ(e,t){if(e){if(t&&!e.projects.some(e=>e.id===t))return`Selected project is unknown or offline. Refresh or choose a running project.`;if(!e.projects.length)return`No authorized running projects found. Open a folder from the Project menu, or refresh.`}}function $Q(){let[e,t]=(0,m.useState)(),[n,r]=(0,m.useState)(),[i,a]=(0,m.useState)(!1),o=(0,m.useRef)(0);async function s(){let e=++o.current;a(!0),r(void 0);try{let n=await be(`projects.list`,{});he(n.projects),e===o.current&&t(n)}catch(t){e===o.current&&r(t.message)}finally{e===o.current&&a(!1)}}(0,m.useEffect)(()=>(s(),()=>{o.current++}),[]);let[c,l]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(!i)return l(!1);let e=setTimeout(()=>l(!0),300);return()=>clearTimeout(e)},[i]),{data:e,error:n,busy:i,slow:c,refresh:s}}function e$({data:e,error:t}){let n=ZQ();return n.error??t??QQ(e,n.id)}function t$({projects:e}){let t=e$(e);return t?(0,U.jsxs)(`p`,{role:`alert`,className:`notice flex min-w-0 items-start gap-2 pt-1 pb-0.5 text-xs break-words text-destructive`,children:[(0,U.jsx)(Ug,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,U.jsx)(`span`,{children:t})]}):null}function n$(e){let t=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0,n=e.key===`Home`?`first`:e.key===`End`?`last`:void 0;if(!t&&!n)return;let r=[...e.currentTarget.querySelectorAll(`[role='option']`)];if(r.length===0)return;e.preventDefault();let i=r.indexOf(document.activeElement);r[n===`first`?0:n===`last`?r.length-1:Math.max(0,Math.min(r.length-1,(i<0?t>0?-1:r.length:i)+t))]?.focus()}var r$=`bot-lobby:open-projects`;function i$({projects:e,tab:t,name:n,branch:r,look:i}){let a=i===`chip`,{data:o,busy:s,slow:c,refresh:l}=e,[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(!1),h=ZQ(),g=e$(e),_=h.error?`invalid`:h.id??o?.currentId??``;ij(`p`,()=>d(!0)),(0,m.useEffect)(()=>{let e=()=>d(!0);return window.addEventListener(r$,e),()=>window.removeEventListener(r$,e)},[]),ij(`r`,()=>void l(),{enabled:u,inDialog:!0});function v(e){d(!1),e!==_&&z(e,t)}return(0,U.jsxs)(`div`,{"aria-busy":s,className:`flex min-w-0 items-center gap-1`,children:[(0,U.jsxs)(DK,{open:u,onOpenChange:d,children:[(0,U.jsxs)(OK,{type:`button`,role:`combobox`,"aria-label":`Project`,"aria-description":`${n}${r?`, branch ${r}`:``}`,"aria-haspopup":`listbox`,"aria-expanded":u,"aria-keyshortcuts":`P ArrowDown`,onKeyDown:e=>{e.key!==`ArrowDown`||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),d(!0))},title:r?`${n} · ${r}`:n,className:J(`group flex min-w-0 items-center outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none`,a?`composer-chip h-7 gap-1.5 rounded-full px-2.5 text-xs font-medium text-foreground aria-expanded:bg-[var(--composer-chip-hover)]`:`h-10 gap-2 rounded-lg px-1.5 text-sm font-medium hover:bg-accent aria-expanded:bg-accent`),children:[a?(0,U.jsx)(rh,{"aria-hidden":`true`,className:J(`size-3.5 shrink-0`,g&&`text-destructive`)}):(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`project-mark`,"data-problem":g?!0:void 0,children:n.trim().charAt(0).toUpperCase()||`?`}),(0,U.jsx)(`span`,{className:`truncate`,children:n}),a?(0,U.jsx)(rm,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground transition-transform duration-150 group-aria-expanded:rotate-180 motion-reduce:transition-none`}):(0,U.jsx)(dm,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`})]}),(0,U.jsxs)(kK,{align:`start`,side:a?`top`:`bottom`,sideOffset:8,"aria-label":`Projects`,onKeyDown:n$,onOpenAutoFocus:e=>{let t=e.currentTarget?.querySelector(`[role='option'][aria-selected='true']`)??e.currentTarget?.querySelector(`[role='option']`);t&&(e.preventDefault(),t.focus())},className:`p-0 flex max-h-[calc(100svh-2rem)] w-[min(26rem,calc(100vw-1.5rem))] origin-(--radix-popover-content-transform-origin) flex-col overflow-hidden rounded-xl outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 max-md:w-[calc(100vw-2rem)]`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-2`,children:[(0,U.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Running projects`}),(0,U.jsxs)(`button`,{type:`button`,onClick:()=>void l(),disabled:s,"aria-label":`Refresh list`,"aria-keyshortcuts":`R`,className:`inline-flex h-7 items-center gap-1.5 rounded-lg px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:opacity-60 max-md:h-11`,children:[s?(0,U.jsx)(OA,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}):(0,U.jsx)(dg,{"aria-hidden":`true`,className:`size-3`}),`Refresh`,(0,U.jsx)(_k,{chord:`R`,className:`kbd-hint`})]})]}),(0,U.jsx)(`div`,{role:`listbox`,"aria-label":`Projects`,className:`flex max-h-72 flex-col overflow-y-auto overscroll-contain p-1 max-md:max-h-[calc(100svh-12rem)]`,children:o?.projects.map(e=>{let t=e.id===_;return(0,U.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>v(e.id),className:J(`flex min-h-10 w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11`,t&&`bg-accent`),children:[(0,U.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:t?(0,U.jsx)(tm,{"aria-hidden":`true`,className:`size-3.5 text-primary`}):null}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block whitespace-normal break-words text-sm font-medium`,children:e.name}),(0,U.jsxs)(`span`,{className:`block whitespace-normal break-all text-xs text-muted-foreground`,children:[e.cwd,` · :`,e.port]})]})]},e.id)})}),(0,U.jsxs)(`button`,{type:`button`,className:`flex min-h-11 items-center gap-2 border-t border-border px-3 py-3 text-sm font-medium outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:()=>{d(!1),p(!0)},children:[(0,U.jsx)(th,{"aria-hidden":`true`,className:`size-4`}),`Open folder…`]})]})]}),(0,U.jsx)(XQ,{open:f,onClose:()=>p(!1),tab:t}),c||g?(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Refresh projects`,disabled:s,onClick:()=>void l(),className:J(`inline-flex shrink-0 items-center justify-center text-muted-foreground outline-none transition-[background-color,color,scale] hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] disabled:opacity-60 motion-reduce:active:scale-100`,a?`composer-chip size-7 rounded-full`:`size-8 rounded-lg hover:bg-accent max-md:size-11`),children:s?(0,U.jsx)(OA,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5`}):(0,U.jsx)(dg,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,U.jsx)(BA,{side:a?`top`:`bottom`,children:`Refresh projects`})]}):null]})}var a$={id:`oracle`,pill:`Oracle`,label:`Message the oracle`,placeholder:`Message the oracle…`},o$=new Set([`lobby`,`tasks`,`plan`,`quickfix`,`knowledge`]);function s$(e){return e.kind===`tab`&&o$.has(e.tab)}function c$(e,t){if(e.kind!==`tab`)return[a$];if(e.tab===`knowledge`)return[{id:`knowledge`,pill:`Oracle`,label:`Ask the oracle about this project`,placeholder:`Ask about this project — the oracle searches the code and learns what is missing…`}];if(e.tab===`plan`)return[{id:`panel`,pill:`Panel`,label:`Message the panel`,placeholder:`Describe a task, or answer the panel…`},a$];if(e.tab===`quickfix`)return[{id:`quickfix`,pill:`Quick fix`,label:`Describe a quick fix`,placeholder:`Describe a small change…`},a$];let n=e.tab===`tasks`?CG(e.rest).id??t:void 0;return n?[{id:`comment`,pill:`Comment`,label:`Comment on ${n}`,placeholder:`Comment on ${n}'s plan…`,taskId:n},{id:`task`,pill:`Task's oracle`,label:`Message ${n}'s oracle`,placeholder:`Leave a message for ${n}'s oracle…`,taskId:n},a$]:[a$]}var l$=0,u$=`toolbar-button composer-tool relative inline-flex size-8 items-center justify-center rounded-full border text-foreground transition-[background-color,border-color,scale] duration-150 ease-snap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] motion-reduce:active:scale-100`,d$=`composer-chip inline-flex h-7 min-w-0 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`;function f$(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function p$({file:e,onRemove:t}){let n=(0,U.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,onClick:t,className:J(`btn-ghost flex shrink-0 items-center justify-center rounded-lg border text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,e.image?`absolute top-1 right-1 size-5 bg-background/80 text-foreground backdrop-blur-sm`:`size-7`),children:(0,U.jsx)(r_,{"aria-hidden":`true`,className:`size-3.5`})});return e.image?(0,U.jsxs)(Qf.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},title:`${e.name} · ${RQ(e.size)}`,className:`relative size-16 shrink-0 overflow-hidden rounded-lg border border-border bg-muted`,children:[(0,U.jsx)(`img`,{src:R(e.image),alt:e.name,className:`size-full object-cover`}),e.state===`uploading`?(0,U.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center bg-background/60`,children:(0,U.jsx)(OA,{className:`size-4`,"aria-hidden":`true`,role:`presentation`})}):null,n]}):(0,U.jsxs)(Qf.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},className:`flex h-9 min-w-0 items-center gap-2 rounded-lg border border-border bg-muted pr-1 pl-2.5`,children:[(0,U.jsxs)(`span`,{className:`relative flex shrink-0 items-center justify-center text-muted-foreground`,children:[(0,U.jsx)(Zm,{"aria-hidden":`true`,className:`size-4`}),e.state===`uploading`?(0,U.jsx)(OA,{className:`absolute -right-1 -bottom-1 size-2.5`,"aria-hidden":`true`,role:`presentation`}):null]}),(0,U.jsxs)(`span`,{className:`min-w-0 max-w-40`,children:[(0,U.jsx)(`span`,{className:`block truncate text-xs font-medium`,children:e.name}),(0,U.jsx)(`span`,{className:`block text-[0.65rem] leading-tight text-muted-foreground`,children:e.state===`uploading`?`uploading…`:RQ(e.size)})]}),n]})}function m$(e,t,n){let[r,i]=(0,m.useState)(!1),a=n.kind===`tab`?n.tab:n.kind;return(0,m.useEffect)(()=>i(!1),[a]),(0,m.useEffect)(()=>{if(!t)return;let n=0,r=t=>{e.current?.contains(t.target)||(n=performance.now())},a=t=>{[`PageDown`,`PageUp`,`ArrowDown`,`ArrowUp`,`Home`,`End`,` `].includes(t.key)&&!e.current?.contains(t.target)&&(n=performance.now())},o=t=>{let r=e.current;!r||performance.now()-n>400||r.contains(document.activeElement)||r.contains(t.target)||i(!0)};return document.addEventListener(`wheel`,r,{capture:!0,passive:!0}),document.addEventListener(`touchmove`,r,{capture:!0,passive:!0}),document.addEventListener(`keydown`,a,{capture:!0}),document.addEventListener(`scroll`,o,{capture:!0,passive:!0}),()=>{document.removeEventListener(`wheel`,r,{capture:!0}),document.removeEventListener(`touchmove`,r,{capture:!0}),document.removeEventListener(`keydown`,a,{capture:!0}),document.removeEventListener(`scroll`,o,{capture:!0})}},[t,e]),{shrunk:r,expand:(0,m.useCallback)(()=>i(!1),[])}}function h$({route:e,keys:t,projects:n,onHelp:r,dockNav:i}){let[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)([]),[l,u]=(0,m.useState)(!1),[d,f]=(0,m.useState)(!1),[p,h]=(0,m.useState)(!1),[g,_]=(0,m.useState)(),v=xk(`status`),y=xk(`lobby`),b=fA(),x=(v.data?.busy??!1)||!!y.data?.reply?.trim(),S=Ck(),C=Sk(`(max-width: 767.98px)`),{keyboardOpen:w,keyboardInset:T}=eA(),E=s$(e),D=(0,m.useRef)(E);D.current=E;let{taskId:O}=bX(),k=(0,m.useMemo)(()=>c$(e,O),[e,O]),A=k.map(e=>`${e.id}:${e.taskId??``}`).join(`|`),j=k.find(e=>e.id===g)??k[0];(0,m.useEffect)(()=>_(void 0),[A]);let M=(0,m.useRef)(null),{shrunk:N,expand:P}=m$(M,E&&!b,e),F=(0,m.useRef)(null),I=(0,m.useRef)(null),ee=(0,m.useRef)(s);ee.current=s;let te=(0,m.useRef)(void 0);(0,m.useLayoutEffect)(()=>{let e=te.current,t=F.current;e&&t&&(te.current=void 0,t.setSelectionRange(e.start,e.end))},[a]);let ne=(0,m.useCallback)(e=>{te.current={start:e.start,end:e.end},o(e.value)},[]);(0,m.useEffect)(()=>{let e=M.current;if(!e)return;let t=document.documentElement,n=()=>{let n=e.getBoundingClientRect();if(t.style.setProperty(`--composer-h`,b||!E?`0px`:`${Math.ceil(n.height+(C?T:0))}px`),!E||n.width===0){t.style.removeProperty(`--composer-x`),t.style.removeProperty(`--composer-w`);return}t.style.setProperty(`--composer-x`,`${Math.round(n.left)}px`),t.style.setProperty(`--composer-w`,`${Math.round(n.width)}px`)};n();let r=new ResizeObserver(n);return r.observe(e),window.addEventListener(`resize`,n),()=>{r.disconnect(),window.removeEventListener(`resize`,n),t.style.setProperty(`--composer-h`,`0px`),t.style.removeProperty(`--composer-x`),t.style.removeProperty(`--composer-w`)}},[b,T,w,C,E]);let re=(0,m.useCallback)(e=>{if(!D.current)return;let t=[...e],n=8-ee.current.length;t.length>n&&pp.warning(`At most 8 files go with one message.`);for(let e of t.slice(0,Math.max(0,n))){let t=`f${++l$}`,n=e.type.startsWith(`image/`)?URL.createObjectURL(e):void 0;c(r=>[...r,{key:t,name:e.name||(n?`image.png`:`file`),size:e.size,...n?{image:n}:{},state:`uploading`}]),zQ(e).then(e=>c(n=>n.map(n=>n.key===t?{...n,state:`ready`,info:e}:n))).catch(e=>{pp.error(e instanceof Error?e.message:`That file did not upload.`),c(e=>e.filter(e=>e.key!==t))})}},[]),ie=(0,m.useCallback)(e=>{c(t=>{let n=t.find(t=>t.key===e);return n?.image&&URL.revokeObjectURL(n.image),t.filter(t=>t.key!==e)})},[]),ae=s.some(e=>e.state===`uploading`),oe=s.flatMap(e=>e.info?[e.info.id]:[]),se=(a.trim().length>0||oe.length>0)&&!ae&&!d,L=(0,m.useCallback)(async()=>{if(!se||!D.current)return;f(!0);let t=oe.length>0?oe:void 0,n={text:a,...t?{attachments:t}:{}};try{let t=!0;if(j.id===`oracle`){let e=await be(`lobby.send`,n);e.notice&&pp(e.notice)}else j.id===`knowledge`?(t=await W(`knowledge.ask`,n)!==void 0,t&&e.kind===`tab`&&bA(UW(e.rest,!0))):t=j.id===`panel`?await W(`planner.send`,n)!==void 0:j.id===`quickfix`?await W(`quickfix.submit`,n)!==void 0:j.id===`task`?await W(`tasks.message`,{taskId:j.taskId,...n})!==void 0:await W(`tasks.comment`,{taskId:j.taskId,...n})!==void 0;if(t){o(``);for(let e of ee.current)e.image&&URL.revokeObjectURL(e.image);c([])}}catch(e){pp.error(e instanceof Error?e.message:`Could not send`)}finally{f(!1)}},[se,oe,j,a,e]),ce=(0,m.useCallback)(async()=>{try{await be(`lobby.abort`,{})}catch(e){pp.error(e instanceof Error?e.message:`Could not stop`)}},[]),le=e=>{if(e.key===`Escape`&&!e.nativeEvent.isComposing){e.preventDefault(),QA();return}let t=e.currentTarget,n=e.key.toLowerCase();if((e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey&&[`b`,`i`,`e`,`k`].includes(n)){e.preventDefault();let{selectionStart:r,selectionEnd:i,value:a}=t;ne(n===`k`?VQ(a,r,i):BQ(a,r,i,n===`b`?`**`:n===`i`?`_`:"`"));return}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&n===`p`){e.preventDefault(),u(e=>!e);return}if(e.key===`Enter`&&e.shiftKey&&!e.nativeEvent.isComposing&&t.selectionStart===t.selectionEnd){let n=UQ(t.value,t.selectionStart);n&&(e.preventDefault(),ne(n));return}if(e.key===`Backspace`&&t.value===``&&ee.current.length>0){e.preventDefault(),ie(ee.current.at(-1).key);return}(f$(e)||e.key===`Enter`&&(e.metaKey||e.ctrlKey))&&(e.preventDefault(),L())},ue=e=>{let t=[...e.clipboardData.files];t.length!==0&&(e.preventDefault(),re(t))},R=e=>{e.preventDefault(),h(!1),e.dataTransfer.files.length>0&&re(e.dataTransfer.files)},z=e.kind===`tab`&&e.tab===`knowledge`,de=!C&&!S,fe=S&&k.length>1?(0,U.jsxs)(NK,{value:j.id,onValueChange:e=>_(e),children:[(0,U.jsx)(FK,{"aria-label":`Send to`,className:`h-7 min-w-0 gap-1.5 px-2 text-xs`,children:(0,U.jsx)(PK,{})}),(0,U.jsx)(IK,{children:k.map(e=>(0,U.jsx)(LK,{value:e.id,children:e.pill},e.id))})]}):k.length>1?(0,U.jsx)(`div`,{role:`radiogroup`,"aria-label":`Send to`,className:J(`flex items-center gap-0.5 max-md:flex-wrap`,!de&&`rounded-lg bg-muted p-0.5 shadow-[inset_0_1px_2px_rgb(0_0_0/0.07)]`),children:k.map(e=>(0,U.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,role:`radio`,"data-compact":!0,"aria-checked":e.id===j.id,onClick:()=>_(e.id),className:J(de?d$:`h-6 rounded-md border border-transparent px-2.5 text-xs font-medium transition-[background-color,color,box-shadow] duration-150 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,de?e.id===j.id?`composer-chip-on`:`text-muted-foreground hover:text-foreground`:e.id===j.id?`btn-outline btn-soft bg-card text-foreground`:`btn-ghost text-muted-foreground hover:text-foreground`),children:e.pill},e.id))}):de?(0,U.jsxs)(`span`,{className:J(d$,`text-muted-foreground`),children:[(0,U.jsx)(Lh,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),`To the `,j.pill.toLowerCase()]}):(0,U.jsxs)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:[`To the `,j.pill.toLowerCase()]}),pe=v.data?.workspace.name??`bot-lobby`,me=v.data?.branch??v.data?.workspace.branch,he=de?(0,U.jsxs)(`div`,{className:`composer-tray pointer-events-auto mx-auto w-full max-w-3xl`,"aria-label":`Message context`,role:`group`,children:[(0,U.jsx)(i$,{look:`chip`,projects:n,tab:e.kind===`tab`?e.tab:e.kind,name:pe,branch:me}),z?null:fe,(0,U.jsxs)(`div`,{className:`@container ml-auto flex min-w-0 flex-1 items-center justify-end gap-3 overflow-hidden`,children:[e.kind===`tab`&&e.tab===`plan`?(0,U.jsx)(vk,{chord:t.savePlan??`Ctrl+S`,className:`hidden @[24rem]:inline-flex`,children:`save plan`}):null,(0,U.jsx)(vk,{chord:`Shift+Enter`,className:`hidden @[14rem]:inline-flex`,children:`new line`}),(0,U.jsxs)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"data-compact":!0,onClick:r,className:J(d$,`kbd-hint shrink-0 px-1.5 text-muted-foreground hover:text-foreground`),children:[(0,U.jsx)(_k,{chord:t.help??`Alt+H`,className:`kbd-hint`}),(0,U.jsx)(`span`,{className:`hidden @[8rem]:inline`,children:`shortcuts`})]})]}),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`a`,{href:`#/settings`,"aria-label":`Models and effort`,className:J(d$,`size-7 shrink-0 justify-center px-0 text-muted-foreground hover:text-foreground`),children:(0,U.jsx)(Tg,{"aria-hidden":`true`,className:`size-4`})})}),(0,U.jsx)(BA,{children:`Each agent's model and effort`})]})]}):null;return(0,U.jsxs)(`div`,{id:`app-dock`,ref:M,"data-shrunk":N||void 0,onFocus:P,style:C&&w?{bottom:`${T}px`}:void 0,className:J(`dock pointer-events-none absolute inset-x-0 bottom-0 z-30 px-6 pb-[max(1.25rem,env(safe-area-inset-bottom))] transition-opacity duration-200 ease-snap max-md:px-2`,C&&w?`max-md:pb-2`:`max-md:pb-[max(0.5rem,env(safe-area-inset-bottom))]`,b&&`opacity-0`),hidden:!E,"aria-hidden":!E||void 0,inert:b||!E,children:[i?(0,U.jsx)(`div`,{className:`pointer-events-auto mx-auto mb-1.5 w-full max-w-[46rem]`,children:i}):null,(0,U.jsxs)(`div`,{className:`composer-shell mx-auto w-full max-w-[46rem]`,children:[he,(0,U.jsx)(`div`,{className:`pointer-events-auto relative mx-auto w-full max-w-[46rem]`,onPointerDown:P,children:(0,U.jsxs)(`div`,{className:J(`group/composer composer-box relative rounded-[22px] border border-dock-border bg-dock shadow-dock transition-[border-color,box-shadow] duration-200 ease-snap focus-within:border-[color-mix(in_oklab,var(--ring)_28%,var(--dock-border))] focus-within:shadow-dock-focus`,S&&`min-[500px]:max-md:grid min-[500px]:max-md:grid-cols-[minmax(0,1fr)_auto] min-[500px]:max-md:min-w-0`,p&&`border-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--ring)_30%,transparent)]`),onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:R,children:[(0,U.jsx)(Nu,{initial:!1,children:s.length>0?(0,U.jsx)(Qf.ul,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:420,damping:36},"aria-label":`Attachments`,className:J(`composer-files flex flex-wrap items-end gap-2 overflow-hidden px-3 pt-3`,S&&`min-[500px]:max-md:col-span-full min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full`),children:s.map(e=>(0,U.jsx)(p$,{file:e,onRemove:()=>ie(e.key)},e.key))},`files`):null}),l?(0,U.jsx)(`div`,{"aria-label":`Markdown preview`,role:`region`,className:J(`max-h-48 overflow-y-auto border-b border-border px-4 py-3`,S&&`min-[500px]:max-md:col-span-full min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full`),children:a.trim()?(0,U.jsx)(uH,{text:a}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing to preview yet.`})}):null,(0,U.jsx)(`div`,{className:J(`composer-text flex px-4 pt-3.5 pb-1`,S&&`min-[500px]:max-md:col-start-1 min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full min-[500px]:max-md:pt-1 min-[500px]:max-md:pb-1`),children:(0,U.jsx)(`textarea`,{ref:F,id:`composer-text`,"aria-label":j.label,value:a,onChange:e=>o(e.target.value),onKeyDown:le,onPaste:ue,placeholder:x&&j.id===`oracle`?`The oracle is working. Enter steers it…`:j.placeholder,rows:1,className:J(`field-sizing-content max-h-[min(45vh,20rem)] min-h-[1.75rem] md:min-h-[2.75rem] w-full min-w-0 flex-1 resize-none bg-transparent text-base leading-relaxed caret-primary outline-none placeholder:text-muted-foreground md:text-[0.9375rem] md:leading-relaxed`,S&&`min-[500px]:max-md:max-h-[44px] min-[500px]:max-md:overflow-y-auto`)})}),(0,U.jsxs)(`div`,{className:J(`composer-tools flex flex-wrap items-center gap-x-2 gap-y-2 px-2 pt-1 pb-2`,S&&`min-[500px]:max-md:col-start-2 min-[500px]:max-md:min-w-0 min-[500px]:max-md:flex-nowrap min-[500px]:max-md:gap-y-0 min-[500px]:max-md:pt-1 min-[500px]:max-md:pb-1`),children:[(0,U.jsx)(`input`,{ref:I,type:`file`,multiple:!0,hidden:!0,tabIndex:-1,"aria-label":`Attach files`,onChange:e=>{re(e.target.files??[]),e.target.value=``}}),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-label":`Attach images, PDFs or files`,"data-compact":!0,onClick:()=>I.current?.click(),className:u$,children:(0,U.jsx)(lg,{"aria-hidden":`true`,className:`size-[1.125rem]`})})}),(0,U.jsx)(BA,{children:`Attach images, PDFs or files`})]}),(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Preview the Markdown`,"aria-pressed":l,"aria-keyshortcuts":`Alt+P`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>u(e=>!e),className:u$,children:(0,U.jsx)(Um,{"aria-hidden":`true`,className:`size-4`})})}),(0,U.jsxs)(BA,{children:[`Preview `,(0,U.jsx)(_k,{chord:`Alt+P`})]})]}),z||!de?(0,U.jsx)(`div`,{className:J(`contents`,C&&!S&&`max-md:block max-md:w-full max-md:order-last`),children:z?(0,U.jsx)(WQ,{rest:e.kind===`tab`?e.rest:[]}):fe}):null,(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsxs)(`div`,{className:`contents max-md:ml-auto max-md:flex max-md:items-center max-md:gap-2`,children:[x&&j.id===`oracle`?(0,U.jsx)(Hj,{label:`Stop`,icon:Ng,iconOnly:!0,compact:!0,title:`Stop the oracle?`,description:`The current response stops. Work already recorded is kept.`,confirmLabel:`Stop`,variant:`destructive`,onConfirm:()=>void ce()}):null,(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Send`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>void L(),disabled:!se,className:`relative inline-flex size-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-xs shadow-primary/24 inset-shadow-[0_1px_rgb(255_255_255/16%)] before:absolute before:-inset-1 before:content-[''] transition-[background-color,box-shadow,scale] duration-150 ease-snap outline-none hover:scale-105 hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background active:inset-shadow-[0_1px_rgb(0_0_0/8%)] active:shadow-none disabled:opacity-64 disabled:shadow-none disabled:hover:scale-100 motion-reduce:hover:scale-100`,children:d?(0,U.jsx)(OA,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5 text-primary-foreground`}):(0,U.jsx)(Vp,{"aria-hidden":`true`,className:`size-4`,strokeWidth:2.25})})}),(0,U.jsxs)(BA,{children:[`Send `,(0,U.jsx)(_k,{chord:`Enter`})]})]})]})]}),p?(0,U.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 flex items-center justify-center rounded-xl bg-card/90 text-sm font-medium text-primary backdrop-blur-[2px]`,children:`Drop to attach`}):null]})})]})]})}function g$({state:e}){return e===`live`?(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsx)(`span`,{role:`img`,"aria-label":`Connected`,className:`grid size-6 place-items-center`,children:(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-success`})})}),(0,U.jsx)(BA,{children:`Connected`})]}):e===`connecting`?(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-warning motion-safe:animate-status-pulse`}),`reconnecting…`]}):(0,U.jsx)(`span`,{className:`text-xs font-medium text-destructive`,children:`Connection lost`})}function _$(e){if(!e)return 0;let t=[...e.children].filter(e=>e instanceof HTMLElement&&e.offsetParent!==null&&getComputedStyle(e).position!==`absolute`);if(!t.length)return 0;let n=Math.min(...t.map(e=>e.getBoundingClientRect().left)),r=Math.max(...t.map(e=>e.getBoundingClientRect().right)),i=0;for(let t of e.querySelectorAll(`*`))t.clientWidth<=1||t.offsetParent===null||t.scrollWidth<=t.clientWidth+1||getComputedStyle(t).textOverflow===`ellipsis`&&(i+=t.scrollWidth-t.clientWidth);return r-n+i}var v$=24;function y$(){let e=(0,m.useRef)(null),[t,n]=(0,m.useState)(!1),r=(0,m.useRef)(()=>{});return r.current=()=>{let t=e.current;if(!t)return;let r=t.querySelector(`[role="tablist"]`),i=getComputedStyle(t),a=parseFloat(i.columnGap)||0,o=t.clientWidth-(parseFloat(i.paddingLeft)||0)-(parseFloat(i.paddingRight)||0),s=_$(t.querySelector(`.where`))+(r?.offsetWidth??0)+_$(t.querySelector(`.tools`))+a*2;n(s+v$<=o)},(0,m.useLayoutEffect)(()=>r.current()),(0,m.useLayoutEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>r.current());n.observe(t);for(let e of t.querySelectorAll(`[role="tablist"], .where, .tools`))n.observe(e);return()=>n.disconnect()},[]),{header:e,one:t}}function b$({connection:e,projects:t,lead:n,tabs:r,extra:i,tools:a}){let{header:o,one:s}=y$(),c=Sk(`(max-width: 767.98px)`);return(0,U.jsxs)(`header`,{ref:o,className:`app-header shrink-0`,"data-one-row":s||void 0,children:[(0,U.jsx)(`div`,{className:`where flex min-w-0 items-center gap-2`,children:n}),c?(0,U.jsx)(`div`,{className:`phone-status flex min-w-0 items-center justify-end gap-2`,children:(0,U.jsx)(g$,{state:e})}):null,(0,U.jsx)(`div`,{className:`tabs min-w-0`,children:r}),(0,U.jsxs)(`div`,{className:`tools flex min-w-0 items-center justify-end gap-2`,children:[i,c?null:(0,U.jsx)(g$,{state:e}),a,(0,U.jsx)(`span`,{id:`focused-action-help`,className:`sr-only`,children:`Focused buttons: Enter or Space. Links: Enter. Checkboxes: Space.`})]}),(0,U.jsx)(t$,{projects:t})]})}var x$=`group/item flex min-h-8 w-full min-w-0 items-center gap-2 rounded-lg px-2.5 text-sm text-sidebar-foreground outline-none transition-colors duration-150 hover:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:bg-sidebar-accent aria-[current=page]:bg-[var(--sidebar-selected)] aria-[current=page]:font-medium [&>svg]:text-[var(--sidebar-icon)] hover:[&>svg]:text-sidebar-foreground aria-[current=page]:[&>svg]:text-sidebar-foreground max-md:min-h-11`;function S$({route:e,keys:t,rail:n}){let r=t.settings??`Alt+S`,i=(0,U.jsxs)(`a`,{href:`#/settings`,"aria-label":`Settings`,"aria-current":e.kind===`settings`?`page`:void 0,"aria-keyshortcuts":r,className:n?w$:J(x$,`flex-1`),children:[(0,U.jsx)(Dg,{"aria-hidden":`true`,className:`size-4 shrink-0`}),n?null:(0,U.jsx)(`span`,{className:`flex-1`,children:`Settings`})]});return(0,U.jsx)(T$,{label:`Settings`,hint:r,side:n?`right`:`top`,children:i})}function C$({route:e,keys:t,onHelp:n,closer:r,phone:i=!1}){let a=J(w$,i?`size-11`:`size-8`);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`flex min-h-12 items-center justify-end px-1`,children:r}),(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsxs)(`div`,{className:`sidebar-foot flex items-center gap-1 px-1 py-2`,children:[(0,U.jsx)(S$,{route:e,keys:t}),i?null:(0,U.jsx)(jQ,{hint:t.help??`Alt+H`,onHelp:n,className:a}),(0,U.jsx)(NQ,{className:a}),(0,U.jsx)(MQ,{className:a})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 border-t border-[var(--glass-edge)] px-1 py-2`,children:[(0,U.jsx)(FQ,{className:a}),(0,U.jsx)(IQ,{className:a}),(0,U.jsx)(LQ,{className:a})]})]})}var w$=`inline-flex size-8 shrink-0 items-center justify-center rounded-lg text-[var(--sidebar-icon)] outline-none transition-[background-color,color,scale] duration-150 hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] aria-pressed:text-sidebar-foreground aria-[current=page]:bg-[var(--sidebar-selected)] aria-[current=page]:text-sidebar-foreground aria-[current=page]:shadow-control motion-reduce:active:scale-100`;function T$({label:e,hint:t,side:n=`right`,children:r}){return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:r}),(0,U.jsxs)(BA,{side:n,children:[e,` `,t?(0,U.jsx)(_k,{chord:t}):null]})]})}function E$({route:e,keys:t,onHelp:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(FQ,{className:w$,side:`right`}),(0,U.jsx)(IQ,{className:w$,side:`right`}),(0,U.jsx)(LQ,{className:w$,side:`right`}),(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsx)(jQ,{hint:t.help??`Alt+H`,onHelp:n,className:w$,side:`right`}),(0,U.jsx)(NQ,{className:w$,side:`right`}),(0,U.jsx)(MQ,{className:w$,side:`right`}),(0,U.jsx)(S$,{route:e,keys:t,rail:!0})]})}function D$(e){return(0,U.jsx)(`aside`,{id:`app-sidebar`,"aria-label":`Sidebar`,"data-folded":!0,className:`app-sidebar`,children:(0,U.jsx)(E$,{...e})})}function O$({open:e,onOpenChange:t,...n}){return(0,U.jsx)(uj,{open:e,onOpenChange:t,children:(0,U.jsxs)(mj,{side:`left`,showCloseButton:!1,"aria-describedby":`sidebar-sheet-description`,className:`app-sidebar-sheet gap-0 p-0 pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[(0,U.jsx)(gj,{className:`sr-only`,children:`Sidebar`}),(0,U.jsx)(_j,{id:`sidebar-sheet-description`,className:`sr-only`,children:`Settings and the app's switches.`}),(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-1`,onClick:e=>{e.target.closest(`a[href]`)&&t(!1)},children:(0,U.jsx)(C$,{...n,phone:!0,closer:(0,U.jsx)(dj,{"aria-label":`Close sidebar`,className:J(w$,`size-11`),children:(0,U.jsx)(r_,{"aria-hidden":`true`,className:`size-4`})})})})]})})}function k$({onOpen:e,expanded:t}){return(0,U.jsx)(`button`,{type:`button`,"aria-label":`Open sidebar`,"aria-haspopup":`dialog`,"aria-expanded":t,onClick:e,className:J(w$,`size-11 text-foreground`),children:(0,U.jsx)(jh,{"aria-hidden":`true`,className:`size-[1.15rem]`})})}function A$(e){let t=e.match(/[#&?]?token=([^&\s#]+)/i);if(t?.[1])return decodeURIComponent(t[1]);let n=e.trim();return n&&!n.includes(`/`)&&!n.includes(` `)?n:void 0}function j$(){let[e,t]=(0,m.useState)(``),[n,r]=(0,m.useState)(),[i,a]=(0,m.useState)(!1);async function o(e){a(!0),r(void 0),e&&(window.location.hash=`token=${encodeURIComponent(e)}`),await Se()?window.location.reload():(r(e?`That link did not sign in. Copy the link from Pi and try again.`:`Paste the link from Pi below.`),a(!1))}function s(t){t.preventDefault(),o(A$(e))}return(0,U.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-y-auto p-6 max-md:items-start max-md:p-4`,children:(0,U.jsxs)(`form`,{onSubmit:s,className:`glass flex min-h-0 w-full max-w-md flex-col gap-4 rounded-xl p-6 max-md:max-h-[calc(100svh-2rem)] max-md:max-w-[28rem] max-md:overflow-y-auto max-md:p-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(dh,{className:`size-5`,"aria-hidden":`true`}),(0,U.jsx)(`h1`,{className:`text-base font-medium`,children:`Sign in to bot-lobby`})]}),(0,U.jsxs)(`p`,{className:`break-words text-sm text-muted-foreground`,children:[`Pi printed a link when it started (or run `,(0,U.jsx)(`code`,{className:`rounded-lg bg-muted px-1.5 py-0.5 font-mono text-xs`,children:`/bot-lobby web`}),`to see it again). Paste it here.`]}),(0,U.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Lobby link or token`}),(0,U.jsx)(`input`,{value:e,onChange:e=>t(e.target.value),autoComplete:`off`,spellCheck:!1,placeholder:`http://127.0.0.1:7347/#token=…`,className:`h-8 min-w-0 rounded-lg border border-input bg-background px-3.5 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 max-md:h-11`})]}),n?(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:n}):null,(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,disabled:i,onClick:()=>void o(void 0),className:`max-md:min-h-11`,children:`Retry`}),(0,U.jsx)(X,{type:`submit`,disabled:i||!e.trim(),className:`max-md:min-h-11`,children:`Sign in`})]})]})})}var M$=.6;function N$(e,t,n={}){return{initial:e?void 0:!1,animate:t,transition:{duration:M$,...n}}}var P$=(e,t)=>[0,Math.max(e,.001),Math.min(Math.max(t,e+.01),.999),1];function F$(e,t=0,n=1){return N$(e,{pathLength:[0,0,1,1],strokeOpacity:[0,0,1,1]},{pathLength:{duration:M$,times:P$(t,n),ease:`easeInOut`},strokeOpacity:{duration:M$,times:P$(t,t+.02)}})}function I$(e,t){return N$(e,{scale:[0,0,1.3,1]},{times:P$(t,t+.18),ease:`easeOut`})}function L$(e,t,n=1.3){return N$(e,{scale:[1,1,n,1,1]},{times:[0,Math.max(t,.001),Math.min(t+.15,.9),Math.min(t+.35,.99),1],ease:`easeInOut`})}var R$=(e=.5,t=.5)=>({transformBox:`fill-box`,originX:e,originY:t});function z$({play:e}){return(0,U.jsxs)(Qf.g,{style:R$(.1,.9),...N$(e,{rotate:[0,-12,8,-4,0],scale:[1,1.12,.96,1.02,1]},{ease:`easeInOut`}),children:[(0,U.jsx)(`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}),[8,12,16].map((t,n)=>(0,U.jsx)(Qf.circle,{cx:t,cy:11,r:1.15,fill:`currentColor`,stroke:`none`,...N$(e,{fillOpacity:[0,0,1,1,0],y:[0,0,-1.5,0,0]},{times:[0,.12+n*.12,.24+n*.12,.72,1]})},t))]})}function B$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.path,{d:`M13 5h8`,...F$(e,.15,.45)}),(0,U.jsx)(Qf.path,{d:`M13 12h8`,...F$(e,.3,.6)}),(0,U.jsx)(Qf.path,{d:`M13 19h8`,...F$(e,.45,.75)}),(0,U.jsx)(Qf.path,{d:`m3 17 2 2 4-4`,...F$(e,.35,.7)}),(0,U.jsx)(Qf.path,{d:`m3 7 2 2 4-4`,...F$(e,0,.35)})]})}function V$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.circle,{cx:6,cy:19,r:3,style:R$(),...L$(e,0)}),(0,U.jsx)(Qf.path,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,...F$(e,.1,.7)}),(0,U.jsx)(Qf.circle,{cx:18,cy:5,r:3,style:R$(),...I$(e,.62)})]})}function H$({play:e}){return(0,U.jsx)(Qf.g,{style:R$(),...N$(e,{rotate:[0,-14,10,-6,0],scale:[1,1.18,.94,1.04,1]},{duration:.5,ease:`easeInOut`}),children:(0,U.jsx)(Qf.path,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,fill:`currentColor`,...N$(e,{fillOpacity:[0,.85,0]},{duration:.5,times:[0,.2,1]})})})}function U$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.circle,{cx:12,cy:12,r:10,style:R$(),...N$(e,{scale:[1,1,1.4],strokeOpacity:[0,.5,0]},{times:[0,.25,1],ease:`easeOut`})}),(0,U.jsx)(Qf.circle,{cx:12,cy:12,r:10,style:R$(),...N$(e,{scale:[1,.86,1.06,1]},{times:[0,.25,.55,1],ease:`easeInOut`})}),(0,U.jsx)(Qf.circle,{cx:12,cy:12,r:1,fill:`currentColor`,style:R$(),...N$(e,{scale:[1,2.4,.8,1]},{times:[0,.3,.6,1],ease:`easeInOut`})})]})}function W$({play:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qf.circle,{cx:6,cy:6,r:3,style:R$(),...L$(e,0)}),(0,U.jsx)(Qf.line,{x1:6,x2:6,y1:9,y2:21,...F$(e,.05,.45)}),(0,U.jsx)(Qf.path,{d:`M13 6h3a2 2 0 0 1 2 2v7`,...F$(e,.2,.62)}),(0,U.jsx)(Qf.circle,{cx:18,cy:18,r:3,style:R$(),...I$(e,.58)})]})}function G$({play:e}){return(0,U.jsxs)(Qf.g,{style:R$(),...N$(e,{scaleX:[1,.55,1.08,1],y:[0,-1,0,0]},{times:[0,.35,.65,1],ease:`easeInOut`}),children:[(0,U.jsx)(Qf.path,{d:`M12 5v16`,style:R$(),...N$(e,{scaleY:[1,1.12,1,1]},{times:[0,.35,.65,1]})}),(0,U.jsx)(`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`})]})}var K$={lobby:z$,tasks:B$,plan:V$,quickfix:H$,issues:U$,git:W$,knowledge:G$};function q$({id:e,play:t,className:n}){let r=K$[e];return r?(0,U.jsx)(`svg`,{"aria-hidden":`true`,"data-tab-icon":e,"data-play":t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,className:J(`overflow-visible`,n),children:(0,U.jsx)(r,{play:t})},t):null}function J$(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0||n<2)return e;let r=Math.floor(n/2),i=(r-.75)*t,a=(r+1.75)*t;return e<i?e+Math.ceil((i-e)/t)*t:e>a?e-Math.ceil((e-a)/t)*t:e}function Y$(e){return/(\d)$/.exec(e)?.[1]}function X$(e,t,n=5){return J$(e,t,n)}function Z$(e,t,n){let r=t.find(t=>t.id===e);if(r)return r.label;let i=n.replace(/^#\/?/,``).split(`/`)[0];return i===`settings`?`Settings`:i?i.charAt(0).toUpperCase()+i.slice(1):`Lobby`}var Q$=`phone-tab-card inline-flex h-11 min-w-11 shrink-0 items-center justify-center gap-1.5 rounded-lg border px-2.5 text-sm font-medium whitespace-nowrap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`;function $$(e){let t=Y$(e.key);return t?`${t}. ${e.label}`:e.label}function e1(e,t){let n=Y$(e.key);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(q$,{id:e.id,play:+!!t,className:`size-4 shrink-0`}),n?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`text-[0.7rem] font-semibold tabular-nums text-muted-foreground`,children:n}):null,t?(0,U.jsx)(`span`,{className:`max-w-[8.5rem] truncate`,children:e.label}):null]})}function t1(e){return e?{duration:0}:{type:`spring`,stiffness:520,damping:30,mass:.5}}function n1({tab:e,selected:t,reduced:n}){return(0,U.jsx)(Qf.span,{className:`inline-flex items-center gap-1.5`,animate:{scale:t?1.04:1},transition:t1(n),children:e1(e,t)})}function r1({tab:e,selected:t,canonical:n,reduced:r,onClick:i,roving:a}){let o=$$(e);return n?(0,U.jsx)(`button`,{type:`button`,role:`tab`,id:`tab-${e.id}`,"data-phone-tab-id":e.id,"aria-controls":`main`,"aria-label":o,"aria-keyshortcuts":e.key,"aria-selected":t,tabIndex:t||a?0:-1,onClick:i,className:Q$,children:(0,U.jsx)(n1,{tab:e,selected:t,reduced:r})}):(0,U.jsx)(`span`,{"data-phone-tab-id":e.id,"data-active":t?`true`:`false`,className:Q$,"aria-hidden":`true`,children:(0,U.jsx)(n1,{tab:e,selected:t,reduced:r})})}function i1({tabs:e,activeId:t,canonical:n,reduced:r,onClick:i,canonicalRef:a}){let o=t??e[0]?.id;return(0,U.jsx)(`div`,{ref:n?a:void 0,"data-phone-period":n?`canonical`:`copy`,"aria-hidden":!n||void 0,role:n?`tablist`:void 0,"aria-label":n?`Lobby tabs`:void 0,className:`phone-tabs-period`,children:e.map(e=>(0,U.jsx)(r1,{tab:e,selected:e.id===t,canonical:n,reduced:r,roving:e.id===o,onClick:t=>i(e.id,t)},e.id))})}function a1(e){return e<=0?0:e===1?1:5}function o1({tabs:e,activeId:t,reduced:n,onClick:r,canonicalRef:i}){let a=a1(e.length),o=Math.floor(a/2);return a?(0,U.jsx)(U.Fragment,{children:Array.from({length:a},(a,s)=>(0,U.jsx)(i1,{tabs:e,activeId:t,canonical:s===o,reduced:n,onClick:r,canonicalRef:s===o?i:void 0},s))}):null}function s1(e){e.current!==void 0&&window.clearTimeout(e.current),e.current=void 0}function c1(e){return e?.closest(`[data-phone-tab-id]`)?.dataset.phoneTabId}function l1(e){return c1(e.target instanceof Element?e.target:null)}function u1(e){return c1(document.elementFromPoint(e.clientX,e.clientY))??c1(e.target instanceof Element?e.target:null)}function d1(e,t){let n=e.dataset.phoneTabId;if(!n)return;let r=e.getBoundingClientRect();if(Number.isFinite(r.width))return{id:n,element:e,distance:Math.abs(r.left+r.width/2-t)}}function f1(e,t){return[...e.querySelectorAll(`[data-phone-tab-id]`)].map(e=>d1(e,t)).filter(e=>e!==void 0)}function p1(e){return e.reduce((e,t)=>!e||t.distance<e.distance?t:e,void 0)}function m1(e,t){return p1(f1(t,e.getBoundingClientRect().left+e.clientWidth/2))}function h1(e,t){if(e&&t)return[...e.querySelectorAll(`[data-phone-tab-id]`)].find(e=>e.dataset.phoneTabId===t)}function g1(e){let t=Number.parseFloat(getComputedStyle(e.parentElement??e).columnGap)||6;return e.offsetWidth+t}function _1(e,t,n){let r=Math.max(0,n.findIndex(e=>e.id===t));if(e===`Home`)return n[0]?.id;if(e===`End`)return n.at(-1)?.id;if(e===`ArrowRight`)return n[(r+1)%n.length]?.id;if(e===`ArrowLeft`)return n[(r-1+n.length)%n.length]?.id}function v1(e,t){return Math.abs(e-t)<=2}function y1(){let e=(0,m.useRef)(null),t=(0,m.useRef)(null),n=(0,m.useRef)(null),r=(0,m.useRef)(void 0),i=(0,m.useRef)(void 0),a=(0,m.useRef)(void 0),o=(0,m.useRef)(void 0),s=(0,m.useRef)(void 0),c=(0,m.useRef)(void 0),l=(0,m.useRef)(0),u=(0,m.useRef)(0),d=(0,m.useRef)(void 0);return(0,m.useMemo)(()=>({scroller:e,track:t,canonical:n,gesture:r,candidate:i,crossed:a,settleTimer:o,commitTimer:s,clickGuard:c,generation:l,scrollGeneration:u,programmatic:d}),[])}function b1(e){return{clearPending:(0,m.useCallback)(()=>{s1(e.settleTimer),s1(e.commitTimer),e.candidate.current=void 0,e.generation.current+=1},[e])}}function x1(e){let t=(0,m.useCallback)(t=>{let n=e.scroller.current;if(!n)return;let r=e.scrollGeneration.current+1;e.scrollGeneration.current=r;let i={value:Math.max(0,t),generation:r};e.programmatic.current=i,n.scrollLeft=i.value,i.value=n.scrollLeft},[e]),n=(0,m.useCallback)(n=>{let r=e.scroller.current;if(!r||!n||r.clientWidth<=0)return;let i=r.getBoundingClientRect(),a=n.getBoundingClientRect(),o=r.scrollLeft+a.left+a.width/2-(i.left+r.clientWidth/2);t(o)},[e,t]);return{centre:n,centreCanonical:(0,m.useCallback)(t=>{let r=h1(e.canonical.current,t);r&&(e.crossed.current=r),n(r)},[n,e]),rebase:(0,m.useCallback)((n,r)=>{let i=X$(n.scrollLeft,g1(r));if(v1(i,n.scrollLeft))return!1;let a=i-n.scrollLeft;return e.gesture.current&&(e.gesture.current.originScrollLeft+=a),t(i),!0},[e,t])}}function S1(e){let t=(0,m.useCallback)(()=>{e.clickGuard.current=void 0},[e]);return{clearGuard:t,guardClick:(0,m.useCallback)(n=>{t(),e.clickGuard.current={kind:n}},[t,e]),consumeGuard:(0,m.useCallback)(n=>!n||!e.clickGuard.current?!1:(t(),!0),[t,e])}}function C1(e){return(0,m.useCallback)(()=>{let t=e.scroller.current,n=e.track.current;if(!t||!n)return;let r=m1(t,n);return r&&r.element!==e.crossed.current&&(e.crossed.current=r.element,VG()),e.candidate.current=r,r},[e])}function w1(e,t,n,r,i){let a=(0,m.useCallback)((r,i)=>{r&&r.id!==e.activeId&&(s1(t.commitTimer),t.commitTimer.current=window.setTimeout(()=>{i!==t.generation.current||t.candidate.current?.element!==r.element||e.blocked||(n(),e.onSelect(r.id))},500))},[n,e,t]);return(0,m.useCallback)(()=>{s1(t.settleTimer),s1(t.commitTimer);let e=++t.generation.current;t.settleTimer.current=window.setTimeout(()=>{if(e!==t.generation.current||t.gesture.current)return;let n=r();n&&(i(n.element),a(n,e))},120)},[a,i,r,t])}function T1(e,t,n){return(0,m.useCallback)(r=>e.tabs.some(e=>e.id===r)?(t(),e.onSelect(r),n(r),!0):!1,[n,t,e])}function E1(e,t,n,r){return(0,m.useCallback)(()=>{let i=e.scroller.current,a=e.canonical.current;if(!i||!a)return;let o=e.programmatic.current;if(o&&o.generation===e.scrollGeneration.current&&v1(i.scrollLeft,o.value)){e.programmatic.current=void 0;return}if(e.programmatic.current=void 0,s1(e.commitTimer),s1(e.settleTimer),e.candidate.current=void 0,e.generation.current+=1,t(i,a)){e.gesture.current||r();return}n(),e.gesture.current||r()},[n,t,e,r])}function D1(e,t,n,r){let i=(0,m.useRef)({clearPending:t,settle:n});i.current={clearPending:t,settle:n},(0,m.useEffect)(()=>{let t=e.scroller.current;if(!r||!t)return;let n=n=>{let r=n.deltaX||(n.shiftKey?n.deltaY:0);r&&(n.preventDefault(),e.programmatic.current=void 0,i.current.clearPending(),t.scrollLeft+=r,i.current.settle())};return t.addEventListener(`wheel`,n,{passive:!1}),()=>t.removeEventListener(`wheel`,n)},[r,e])}function O1(e,t,n){return(0,m.useCallback)(r=>{t(),n(),e.programmatic.current=void 0,e.gesture.current={id:r.pointerId,x:r.clientX,y:r.clientY,moved:!1,originScrollLeft:r.currentTarget.scrollLeft,downTabId:l1(r)},r.currentTarget.setPointerCapture?.(r.pointerId)},[n,t,e])}function k1(e,t){return(0,m.useCallback)(n=>{let r=e.gesture.current;r&&r.id===n.pointerId&&(Math.hypot(n.clientX-r.x,n.clientY-r.y)<8||(r.moved=!0,t(),(n.pointerType===`mouse`||n.pointerType===`pen`)&&(n.currentTarget.scrollLeft=r.originScrollLeft+r.x-n.clientX,n.preventDefault())))},[t,e])}function A1(e,t,n,r){return(0,m.useCallback)(i=>{let a=e.gesture.current;if(!a||a.id!==i.pointerId)return;e.gesture.current=void 0;let o=u1(i),s=a.downTabId;if(s&&!a.moved&&(!o||o===s)){n.guardClick(`committed`),t(s);return}(a.moved||s&&o&&o!==s)&&n.guardClick(`drag`),a.moved&&r()},[t,n,e,r])}function j1(e,t,n){return(0,m.useCallback)(()=>{let r=e.gesture.current?.moved;e.gesture.current=void 0,r&&t.guardClick(`drag`),r&&n()},[t,e,n])}function M1(e,t,n,r,i){return{onPointerDown:O1(e,i,n.clearGuard),onPointerMove:k1(e,i),onPointerUp:A1(e,t,n,r),onPointerCancel:j1(e,n,r)}}function N1(e,t){return(0,m.useCallback)((n,r)=>{t.consumeGuard(r.detail!==0)||e(n)},[e,t])}function P1(e,t){return(0,m.useCallback)(n=>{if(t.consumeGuard(n.detail!==0))return;let r=n.target instanceof Element?n.target.closest(`[data-phone-tab-id]`):null;if(!r||r.closest(`button`))return;let i=r.dataset.phoneTabId;i&&e(i)},[e,t])}function F1(e,t,n){return(0,m.useCallback)(r=>{if(r.key===`ArrowDown`&&!r.altKey){ZA()&&r.preventDefault();return}if(!e.tabs.length)return;let i=r.target.closest(`[role='tab']`)?.dataset.phoneTabId??e.activeId??e.tabs[0].id,a=_1(r.key,i,e.tabs);a?(r.preventDefault(),$A.active=!0,$A.to=a,n(a),h1(t.canonical.current,a)?.focus({preventScroll:!0})):(r.key===`Enter`||r.key===` `)&&i&&(r.preventDefault(),n(i))},[n,e,t])}function I1(e){let[t,n]=(0,m.useState)(0),[r,i]=(0,m.useState)(!1);return{sidePad:t,peek:r,setPeek:i,updatePad:(0,m.useCallback)(()=>{let t=e.scroller.current;if(!t||t.clientWidth<=0)return;let r=Math.max(22,t.clientWidth/2);n(e=>Math.abs(e-r)<.5?e:r)},[e])}}function L1(e,t){return e.find(e=>e.id===t)?.id??e[0]?.id}function R1(e,t,n,r){let{activeId:i,keyboardOpen:a,tabs:o}=e;(0,m.useLayoutEffect)(()=>{n(),t(L1(o,i))},[i,t,a,o,n,r])}function z1(e,t,n,r,i){let{activeId:a,tabs:o}=e;(0,m.useEffect)(()=>{let e=t.scroller.current;if(!e||typeof ResizeObserver>`u`)return;let s=new ResizeObserver(()=>{e.clientWidth<=0||(n(),i(),r(L1(o,a)))});return s.observe(e),t.track.current&&s.observe(t.track.current),()=>s.disconnect()},[a,r,n,t,o,i])}function B1(e){(0,m.useEffect)(()=>{let t=()=>e();return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[e])}function V1(e,t,n,r){(0,m.useEffect)(()=>{n(),t.crossed.current=void 0},[n,e.activeId,e.blocked,e.keyboardOpen,t,r])}function H1(e,t,n){(0,m.useEffect)(()=>()=>{t(),n(),e.programmatic.current=void 0},[n,t,e])}function U1(e,t,n){(0,m.useEffect)(()=>{e.keyboardOpen||n(!1),t()},[t,e.blocked,e.keyboardOpen,n])}function W1(e){let t=y1(),{clearPending:n}=b1(t),r=x1(t),i=S1(t),a=I1(t),o=C1(t),s=w1(e,t,n,o,r.centre),c=T1(e,n,r.centreCanonical),l=E1(t,r.rebase,o,s),u=M1(t,c,i,s,n);D1(t,n,s,e.tabs.length>0);let d=F1(e,t,c),f=P1(c,i),p=N1(c,i),m=e.tabs.map(e=>e.id).join(`\0`);return R1(e,r.centreCanonical,a.updatePad,!e.keyboardOpen||a.peek),z1(e,t,n,r.centreCanonical,a.updatePad),V1(e,t,n,m),B1(n),H1(t,n,i.clearGuard),U1(e,n,a.setPeek),{scroller:t.scroller,track:t.track,canonical:t.canonical,sidePad:a.sidePad,periods:a1(e.tabs.length),peek:a.peek,setPeek:a.setPeek,onScroll:l,...u,onSurfaceClick:f,onCardClick:p,onKeyDown:d}}function G1(e,t){return Z$(e,t,window.location.hash)}function K1({tabs:e,activeId:t,onSelect:n}){let r=fA(),{keyboardOpen:i}=eA(),a=!!Of(),o=G1(t,e),s=W1({tabs:e,activeId:t,blocked:r,keyboardOpen:i,reduced:a,onSelect:n});if(!e.length)return null;let c=i&&!s.peek;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{"aria-hidden":c?`true`:void 0,inert:c,hidden:c,children:(0,U.jsx)(J1,{tabs:e,activeId:t,label:o,reduced:a,carousel:s,keyboardOpen:i})}),c?(0,U.jsx)(q1,{label:o,onOpen:()=>s.setPeek(!0)}):null]})}function q1({label:e,onOpen:t}){return(0,U.jsx)(`div`,{className:`phone-tabs phone-tabs-handle`,children:(0,U.jsxs)(`button`,{type:`button`,"data-phone-tabs-handle":!0,"aria-expanded":`false`,"aria-label":`Open tabs, current page ${e}`,onPointerDown:e=>e.preventDefault(),onClick:t,className:`phone-tabs-current inline-flex min-h-11 items-center gap-2 rounded-lg border px-4 text-sm font-medium focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[(0,U.jsx)(`span`,{className:`truncate`,children:e}),(0,U.jsx)(lm,{"aria-hidden":`true`,className:`size-4`})]})})}function J1({tabs:e,activeId:t,label:n,reduced:r,carousel:i,keyboardOpen:a}){return(0,U.jsxs)(`div`,{className:`phone-tabs`,"data-phone-tabs":!0,"data-periods":i.periods,children:[t&&!e.some(e=>e.id===t)?(0,U.jsx)(`span`,{"data-phone-page-handle":!0,className:`phone-tabs-page-handle`,children:n}):null,(0,U.jsx)(`div`,{ref:i.scroller,className:`phone-tabs-scroller`,onScroll:i.onScroll,onPointerDown:i.onPointerDown,onPointerMove:i.onPointerMove,onPointerUp:i.onPointerUp,onPointerCancel:i.onPointerCancel,onClick:i.onSurfaceClick,children:(0,U.jsx)(`div`,{ref:i.track,className:`phone-tabs-track`,style:{"--phone-period-pad":`${i.sidePad}px`},onKeyDown:i.onKeyDown,children:(0,U.jsx)(o1,{tabs:e,activeId:t,reduced:r,onClick:i.onCardClick,canonicalRef:i.canonical})})}),a&&i.peek?(0,U.jsx)(`button`,{type:`button`,"aria-label":`Close tabs`,onPointerDown:e=>e.preventDefault(),onClick:()=>i.setPeek(!1),className:`phone-tabs-close`,children:(0,U.jsx)(rm,{"aria-hidden":`true`,className:`size-4`})}):null]})}function Y1(e){return/(\d)$/.exec(e)?.[1]}var X1=160;function Z1(e){let t=Of(),[n,r]=(0,m.useState)(0),i=(0,m.useRef)(0),a=(0,m.useCallback)(()=>{t||performance.now()<i.current||(i.current=performance.now()+M$*1e3,r(e=>e+1))},[t]),o=(0,m.useRef)(e);return(0,m.useEffect)(()=>{let t=e&&!o.current;if(o.current=e,!t)return;let n=window.setTimeout(a,X1);return()=>window.clearTimeout(n)},[e,a]),{play:n,onPointerEnter:(0,m.useCallback)(e=>{e.pointerType!==`touch`&&a()},[a])}}var Q1=(0,m.forwardRef)(function({tab:e,active:t},n){let r=Y1(e.key),{play:i,onPointerEnter:a}=Z1(t);return(0,U.jsxs)(RA,{children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsxs)(`a`,{ref:n,role:`tab`,id:`tab-${e.id}`,href:`#/${e.id}`,"aria-selected":t,"aria-keyshortcuts":e.key,tabIndex:t?0:-1,onPointerEnter:a,className:J(`relative z-10 inline-flex h-7 shrink-0 items-center gap-1.5 rounded-lg border border-[var(--tab-outline)] px-2.5 text-[0.8125rem] leading-none font-medium whitespace-nowrap outline-none`,`transition-colors duration-200 ease-snap focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,t?`text-foreground`:`bg-[var(--tab-idle)] text-muted-foreground hover:bg-accent hover:text-foreground`),children:[(0,U.jsx)(q$,{id:e.id,play:i,className:J(`size-3.5 shrink-0 transition-colors duration-200`,t&&`text-primary`)}),r?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:J(`text-[0.72rem] font-semibold tabular-nums transition-colors duration-200`,t?`text-primary`:`text-muted-foreground/75`),children:r}):null,(0,U.jsx)(`span`,{children:e.label})]})}),(0,U.jsxs)(BA,{children:[e.label,` `,(0,U.jsx)(_k,{chord:e.key})]})]})}),$1=1.5;function e0(e,t,n=t?.left??0,r=t?.right??0,i=1){if(e){if(!t||r-n<.5){e.style.opacity=`0`;return}e.style.opacity=String(Math.min(1,(r-n)/14)),e.style.top=`${t.top}px`,e.style.height=`${t.height}px`,e.style.width=`${r-n}px`,e.style.transform=`translateX(${n}px)`,e.style.scale=i===1?``:`1 ${i}`}}function t0(e,t){let n=e.right-e.left,{height:r}=e,i=$1/2,a=Math.max(0,Math.min(e.radius-i,r/2-i,n/2-i)),o=r/2,s=e=>+(t===`left`?e:n-e).toFixed(2),c=+(t===`left`),l=1-c,u=i,d=n-i,f=r-i;return[`M${s(u)} ${o}L${s(u)} ${i+a}A${a} ${a} 0 0 ${c} ${s(u+a)} ${i}L${s(d-a)} ${i}A${a} ${a} 0 0 ${c} ${s(d)} ${i+a}L${s(d)} ${o}`,`M${s(u)} ${o}L${s(u)} ${f-a}A${a} ${a} 0 0 ${l} ${s(u+a)} ${f}L${s(d-a)} ${f}A${a} ${a} 0 0 ${l} ${s(d)} ${f-a}L${s(d)} ${o}`]}function n0(e,t,n,r){if(!e)return;if(!t||r<=.002){e.style.opacity=`0`;return}let i=t.right-t.left,a=`${i}x${t.height}r${t.radius}${n}`;e.dataset.shape!==a&&(e.dataset.shape=a,e.dataset.port=n,e.setAttribute(`viewBox`,`0 0 ${i} ${t.height}`),t0(t,n).forEach((t,n)=>e.children[n]?.setAttribute(`d`,t))),e.style.opacity=String(Math.min(1,r*12)),e.style.top=`${t.top}px`,e.style.height=`${t.height}px`,e.style.width=`${i}px`,e.style.transform=`translateX(${t.left}px)`;let o=`${Math.min(1,r)} 2`;for(let t of e.children)t.style.strokeDasharray=o}var r0={type:`spring`,visualDuration:.12,bounce:0},i0={type:`spring`,visualDuration:.17,bounce:.15,delay:.015},a0={type:`spring`,visualDuration:.17,bounce:.05,delay:.07},o0={type:`spring`,visualDuration:.22,bounce:.25},s0={type:`spring`,visualDuration:.2,bounce:0},c0={type:`spring`,stiffness:900,damping:18,velocity:45,restDelta:.02,restSpeed:1},l0=(()=>{let e=kr({keyframes:[0,1],visualDuration:o0.visualDuration,bounce:o0.bounce}),t=0;for(;t<1e3&&e.next(t).value<.97;)t+=4;return t/1e3})(),u0={type:`spring`,visualDuration:.28,bounce:.6};function d0(e,t){let n=(0,m.useRef)(null),r=(0,m.useRef)(null),i=(0,m.useRef)(null),a=(0,m.useRef)(null),o=(0,m.useRef)(null),s=(0,m.useRef)({}),c=(0,m.useRef)([]),l=(0,m.useRef)(void 0),u=(0,m.useRef)([]),d=(0,m.useRef)(1),f=(0,m.useRef)(1),p=(0,m.useCallback)(e=>{let t=e?s.current[e]:void 0;if(!t)return;let n=parseFloat(getComputedStyle(t).borderTopLeftRadius)||0;return{left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,height:t.offsetHeight,radius:n}},[]),h=(0,m.useCallback)(()=>{for(let e of u.current)e.stop();u.current=[];for(let e of Object.values(s.current))e?.style.translate&&(e.style.translate=``)},[]),g=(0,m.useCallback)(e=>{h(),l.current=e,d.current=1,f.current=1;let t=p(e);e0(r.current,t),e0(i.current,void 0),n0(a.current,t,`left`,1),n0(o.current,void 0,`left`,0);for(let e of c.current)e&&(e.style.width=`0px`);QV()},[p,h]),_=(0,m.useCallback)((e,t)=>{let n=p(e),m=p(t);if(!n||!m)return g(t);h(),ZV(),l.current=t;let _=m.left>n.left?1:-1,v=_>0?n.right:n.left,y=_>0?m.left:m.right,b=Math.abs(y-v),x=_>0?`right`:`left`,S=_>0?`left`:`right`,C=c.current.map(e=>{let t=e?.parentElement;return t?{liquid:e,from:t.offsetLeft,to:t.offsetLeft+t.offsetWidth}:void 0}),w=b>4?1-4/b:0,T={drained:1-Math.min(1,d.current),unrung:1-Math.min(1,f.current),head:0,tail:0,filled:0,rung:0,squash:1,budge:0},E=s.current[t];d.current=0,f.current=0;let D=()=>{let e=(n.right-n.left)*Math.min(1,T.drained);e0(i.current,n,_>0?n.left+e:n.left,_>0?n.right:n.right-e),n0(o.current,n,x,1-T.unrung);let t=v+_*b*T.head,s=v+_*b*T.tail,c=Math.min(t,s),l=Math.max(t,s);for(let e of C){if(!e?.liquid)continue;let t=Math.max(c,e.from),n=Math.min(l,e.to);e.liquid.style.width=`${Math.max(0,n-t)}px`,e.liquid.style.transform=`translateX(${Math.max(0,t-e.from)}px)`}let u=_*T.budge,d=u?{...m,left:m.left+u,right:m.right+u}:m;E&&(E.style.translate=Math.abs(u)>.01?`${u.toFixed(2)}px`:``);let f=(d.right-d.left)*Math.min(1,Math.max(0,T.filled));e0(r.current,d,_>0?d.left:d.right-f,_>0?d.left+f:d.right,Math.min(1,T.squash)),n0(a.current,d,S,T.rung)},O=(e,t,n,r,i=1)=>{let a=Zf(t,i,{...n,onUpdate:t=>{T[e]=t,r?.(t),D()}});return u.current.push(a),a},k=!1,A=()=>{if(k)return;k=!0;let e=O(`filled`,0,o0,e=>{d.current=e});e.then(()=>{l.current===t&&QV()}),O(`squash`,.8,u0),O(`rung`,0,s0,e=>{f.current=e}),O(`budge`,0,{...c0,delay:l0},void 0,0),Promise.all([e,...u.current]).then(()=>{l.current===t&&u.current.includes(e)&&g(t)})};O(`drained`,T.drained,r0),O(`unrung`,T.unrung,r0),O(`head`,0,i0,e=>{e>=w&&A()}),O(`tail`,0,a0),D()},[p,g,h]);(0,m.useLayoutEffect)(()=>{let t=l.current,n=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;!t||!e||t===e||n?g(e):_(t,e)},[e,t,_,g]);let v=(0,m.useRef)(e);return v.current=e,(0,m.useEffect)(()=>{let e=n.current;if(!e||typeof ResizeObserver>`u`)return;let t=!0,r=new ResizeObserver(()=>{if(t){t=!1;return}g(v.current)});return r.observe(e),()=>{r.disconnect(),h()}},[g,h]),{track:n,fill:r,drain:i,ring:a,unring:o,cells:s,liquids:c}}var f0=(0,m.forwardRef)(function({which:e},t){return(0,U.jsxs)(`svg`,{ref:t,"aria-hidden":`true`,[`data-tab-${e}`]:``,className:`pointer-events-none absolute left-0 z-20 overflow-visible opacity-0 will-change-transform`,fill:`none`,children:[(0,U.jsx)(`path`,{pathLength:1,strokeWidth:$1,strokeLinecap:`round`,className:`stroke-tab-rim`}),(0,U.jsx)(`path`,{pathLength:1,strokeWidth:$1,strokeLinecap:`round`,className:`stroke-tab-rim`})]})});function p0(e){if(e.left||e.right)return`linear-gradient(to right, ${e.left?`transparent 0, black 28px`:`black 0`}, ${e.right?`black calc(100% - 28px), transparent 100%`:`black 100%`})`}function m0({tabs:e,activeId:t,onSelect:n}){let r=Sk(`(max-width: 767.98px)`),{track:i,fill:a,drain:o,ring:s,unring:c,cells:l,liquids:u}=d0(t,e.length),d=(0,m.useRef)(null),[f,p]=(0,m.useState)({left:!1,right:!1}),h=(0,m.useCallback)(()=>{let e=d.current;if(!e)return;let t=e.scrollLeft>2,n=e.scrollLeft+e.clientWidth<e.scrollWidth-2;p(e=>e.left===t&&e.right===n?e:{left:t,right:n})},[]);(0,m.useEffect)(()=>{let e=d.current;if(!e||typeof ResizeObserver>`u`)return;h();let t=new ResizeObserver(h);return t.observe(e),e.firstElementChild&&t.observe(e.firstElementChild),()=>t.disconnect()},[h,e.length]),(0,m.useEffect)(()=>{let e=d.current,n=t?l.current[t]:void 0;e&&n&&(n.offsetLeft<e.scrollLeft?e.scrollLeft=n.offsetLeft-8:n.offsetLeft+n.offsetWidth>e.scrollLeft+e.clientWidth&&(e.scrollLeft=n.offsetLeft+n.offsetWidth-e.clientWidth+8))},[t,l]);function g(r){if(r.key===`ArrowDown`&&!r.altKey){ZA()&&r.preventDefault();return}let i=r.key===`ArrowRight`?1:r.key===`ArrowLeft`?-1:0;if(!i||e.length===0)return;r.preventDefault();let a=r.target.closest(`[role='tab']`)?.id.replace(/^tab-/,``)??t,o=e[(Math.max(0,e.findIndex(e=>e.id===a))+i+e.length)%e.length];$A.active=!0,$A.to=o.id,window.setTimeout(()=>{$A.active=!1,$A.to=void 0},3e3),n(o.id),l.current[o.id]?.focus({preventScroll:!0})}return r?(0,U.jsx)(K1,{tabs:e,activeId:t,onSelect:n}):(0,U.jsx)(`div`,{ref:d,onScroll:h,style:{maskImage:p0(f),WebkitMaskImage:p0(f)},className:`min-w-0 max-w-full overflow-x-auto [scrollbar-width:none] pointer-coarse:-my-1.5 pointer-coarse:py-1.5 [&::-webkit-scrollbar]:hidden`,children:(0,U.jsxs)(`div`,{ref:i,role:`tablist`,"aria-label":`Lobby tabs`,onKeyDown:g,className:`relative mx-auto flex w-max items-center py-0.5`,children:[(0,U.jsx)(`span`,{ref:o,"aria-hidden":`true`,"data-tab-drain":!0,className:`pointer-events-none absolute left-0 z-0 rounded-lg bg-tab-fill opacity-0 will-change-transform`}),(0,U.jsx)(`span`,{ref:a,"aria-hidden":`true`,"data-tab-fill":!0,className:`pointer-events-none absolute left-0 z-0 rounded-lg bg-tab-fill opacity-0 will-change-transform`}),(0,U.jsx)(f0,{ref:c,which:`unring`}),(0,U.jsx)(f0,{ref:s,which:`ring`}),e.map((e,n)=>(0,U.jsxs)(m.Fragment,{children:[n>0?(0,U.jsxs)(`span`,{"aria-hidden":`true`,"data-tab-link":!0,className:`relative h-[2px] w-3.5 shrink-0 sm:w-4`,children:[(0,U.jsx)(`span`,{className:`absolute inset-0 border-t-2 border-dotted border-input`}),(0,U.jsx)(`span`,{ref:e=>{u.current[n-1]=e},"data-tab-liquid":!0,className:`absolute top-0 left-0 h-[2px] w-0 rounded-full bg-tab-liquid shadow-[0_0_6px_var(--tab-liquid)] will-change-transform`})]}):null,(0,U.jsx)(Q1,{ref:t=>{l.current[e.id]=t},tab:e,active:e.id===t})]},e.id))]})})}function h0({oracleBusy:e,runs:t,activity:n,background:r}){let i=new Set;e&&i.add(`Oracle`);for(let e of t)e.status===`running`&&i.add(QU(nW(e)));for(let e of n)e.pending&&e.source!==`LOBBY`&&i.add(e.source===`MASTER`?`Oracle`:QU(e.source));let a=r.filter(e=>e.alive&&e.busy).length;return a&&i.add(a===1?`1 in the background`:`${a} in the background`),[...i]}function g0(e){return e.length<=2?e.join(`, `):`${e.slice(0,2).join(`, `)} +${e.length-2}`}function _0(...e){let t=e.filter(e=>!!e);if(!t.length)return;let n=Math.max(...t.map(e=>e.left)),r=Math.max(...t.map(e=>e.top)),i=Math.min(...t.map(e=>e.left+e.width)),a=Math.min(...t.map(e=>e.top+e.height));return i>n&&a>r?{left:n,top:r,width:i-n,height:a-r}:void 0}function v0(e,t){return _0(e,{left:e.left,top:e.top,width:e.width,height:Math.max(0,t-e.top)})}var y0=6,b0=`bot-lobby.orb`,x0=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=1;function S0(e,t,n,r){let i=e=>e+y0,a=(e,t)=>Math.max(e+y0,e+t-r-y0);return{x:Math.min(a(n.left,n.width),Math.max(i(n.left),e)),y:Math.min(a(n.top,n.height),Math.max(i(n.top),t))}}function C0(e,t,n,r){let i=e=>Math.max(1,e-r),a=S0(e,t,n,r);return{fx:Math.min(1,Math.max(0,(a.x-n.left)/i(n.width))),fy:Math.min(1,Math.max(0,(a.y-n.top)/i(n.height)))}}function w0(e,t,n){return S0(t.left+e.fx*Math.max(0,t.width-n),t.top+e.fy*Math.max(0,t.height-n),t,n)}function T0(e){if(e)try{let t=JSON.parse(e);return x0(t.fx)&&x0(t.fy)?{fx:t.fx,fy:t.fy}:void 0}catch{return}}function E0(){try{return T0(localStorage.getItem(b0))}catch{return}}function D0(e){try{localStorage.setItem(b0,JSON.stringify(e))}catch{}}var O0=5,k0=16,A0={fx:1,fy:1};function j0(e){return{left:e.left,top:e.top,width:e.width,height:e.height}}function M0(e){let t=document.getElementById(`main`)?.getBoundingClientRect();if(!t)return;if(!e)return j0(t);let n=window.visualViewport,r=j0({left:n?.offsetLeft??0,top:n?.offsetTop??0,width:n?.width??window.innerWidth,height:n?.height??window.innerHeight}),i=_0(j0(t),r);if(!i)return;let a=document.getElementById(`app-dock`)?.getBoundingClientRect().top;return a===void 0?i:v0(i,a)}function N0(e,t){return!e||!t?e===t:e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function P0(e){let[t,n]=(0,m.useState)(()=>M0(e));return(0,m.useEffect)(()=>{let t=()=>{let t=M0(e);n(e=>N0(e,t)?e:t)},r=document.getElementById(`main`),i=document.getElementById(`app-dock`),a=typeof ResizeObserver>`u`?void 0:new ResizeObserver(t);r&&a?.observe(r),i&&a?.observe(i);let o=window.visualViewport;return window.addEventListener(`resize`,t),window.addEventListener(`orientationchange`,t),o?.addEventListener(`resize`,t),o?.addEventListener(`scroll`,t),t(),()=>{a?.disconnect(),window.removeEventListener(`resize`,t),window.removeEventListener(`orientationchange`,t),o?.removeEventListener(`resize`,t),o?.removeEventListener(`scroll`,t)}},[e]),t}var F0=(0,m.forwardRef)(function({spotlight:e,thinking:t,busy:n=[],tone:r,expanded:i,hidden:a,shortcut:o,onOpen:s},c){let l=Sk(`(max-width: 767.98px)`),u=P0(l),[d,f]=(0,m.useState)(E0),[p,h]=(0,m.useState)(),[g,_]=(0,m.useState)(!1),v=(0,m.useRef)(void 0),y=(0,m.useRef)(!1),b=(0,m.useRef)(44),x=d??(l?A0:void 0),S=p??(x&&u?w0(x,u,b.current):void 0),C=(0,m.useCallback)((e,t)=>{let n=M0(l);if(!n)return;let r=C0(e,t,n,b.current);f(r),D0(r)},[l]);(0,m.useEffect)(()=>{u&&h(e=>e&&S0(e.x,e.y,u,b.current))},[u]);function w(e){if(e.button!==0)return;let t=e.currentTarget.getBoundingClientRect();b.current=t.width,v.current={id:e.pointerId,sx:e.clientX,sy:e.clientY,ox:t.left,oy:t.top,moved:!1},e.currentTarget.setPointerCapture?.(e.pointerId)}function T(e){let t=v.current;if(!t||t.id!==e.pointerId)return;let n=e.clientX-t.sx,r=e.clientY-t.sy;if(!t.moved&&Math.hypot(n,r)<O0)return;t.moved=!0;let i=M0(l);i&&h(S0(t.ox+n,t.oy+r,i,b.current))}function E(e){let t=v.current;v.current=void 0,t?.moved&&(y.current=!0,C(t.ox+e.clientX-t.sx,t.oy+e.clientY-t.sy),h(void 0))}function D(e){let t=e.shiftKey?64:k0,n={ArrowLeft:[-t,0],ArrowRight:[t,0],ArrowUp:[0,-t],ArrowDown:[0,t]}[e.key];if(!n||e.altKey||e.ctrlKey||e.metaKey)return;e.preventDefault();let r=e.currentTarget.getBoundingClientRect();b.current=r.width,C(r.left+n[0],r.top+n[1])}let O=!e&&n.length>0,k=e?QU(e):O?g0(n):void 0,A=e?`${t.map(QU).join(`, `)} thinking. `:O?`${n.join(`, `)} at work. `:``,j=S&&u?S.x-u.left<140:!1,M={"--orb":r,...S?{left:S.x,top:S.y,right:`auto`,bottom:`auto`}:{}};return(0,U.jsxs)(RA,{open:g&&!p,onOpenChange:_,children:[(0,U.jsx)(zA,{asChild:!0,children:(0,U.jsxs)(`button`,{ref:c,type:`button`,"aria-label":`Open Thinking`,"aria-description":`${A}Drag, or use the arrow keys, to move it.`,"aria-haspopup":`dialog`,"aria-expanded":i,"aria-keyshortcuts":o?`${o} Enter Space`:`Enter Space`,onClick:e=>{if(y.current){y.current=!1,e.preventDefault();return}s()},onPointerDown:w,onPointerMove:T,onPointerUp:E,onPointerCancel:()=>{v.current=void 0,h(void 0)},onKeyDown:D,style:M,"data-thinking":e?``:void 0,"data-busy":O?``:void 0,"data-dragging":p?``:void 0,"data-placed":S?``:void 0,"data-flip":j||void 0,className:J(`thinking-bubble fixed z-20 touch-none rounded-full outline-none select-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,a&&`invisible`),children:[(0,U.jsx)(Nu,{initial:!1,children:k?(0,U.jsx)(Qf.span,{className:`orb-label`,initial:{opacity:0,x:j?-8:8,scale:.9},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:j?-8:8,scale:.9},transition:{type:`spring`,visualDuration:.3,bounce:.35},children:(0,U.jsx)(Nu,{mode:`popLayout`,initial:!1,children:(0,U.jsx)(Qf.span,{className:`inline-flex items-center gap-1`,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{type:`spring`,visualDuration:.28,bounce:.3},children:k},k)})},`label`):null}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`orb orb-float`,children:(0,U.jsx)(`span`,{className:`orb-icon`,children:(0,U.jsx)(XU,{source:e,strokeWidth:2.25,className:`size-3.5`})})})]})}),(0,U.jsxs)(BA,{side:`top`,children:[`Thinking `,!l&&o?(0,U.jsx)(_k,{chord:o}):null,(0,U.jsx)(`span`,{className:`text-background/70`,children:` · drag to move`})]})]})}),I0=/^\s*(?:#{1,6}\s+(.+?)\s*#*|\*\*([^*\n]{2,90}?):?\*\*:?|__([^_\n]{2,90}?):?__:?)\s*$/,L0=260,R0=200,z0=/^\s*(?:[-*+]\s|\d+[.)]\s|>|```|~~~|\|)/m;function B0(e){let t=[],n=[],r=!1;for(let i of e){if(/^\s*(```|~~~)/.test(i)&&(r=!r),!r&&!i.trim()){n.length&&t.push(n.join(`
|
|
105
105
|
`).trim()),n=[];continue}n.push(i)}return n.length&&t.push(n.join(`
|
|
106
|
-
`).trim()),t.filter(Boolean)}function
|
|
106
|
+
`).trim()),t.filter(Boolean)}function V0(e){let t=e.split(/(?<=[.!?…])\s+(?=[A-Z"'“‘`(\[])/),n=[];for(let e of t){let t=n.at(-1);t!==void 0&&(t.split("`").length-1)%2==1?n[n.length-1]=`${t} ${e}`:n.push(e)}return n}function H0(e){if(e.length<=L0||z0.test(e))return[e];let t=[],n=``;for(let r of V0(e.replace(/\s*\n\s*/g,` `)))n&&n.length+r.length+1>R0?(t.push(n),n=r):n=n?`${n} ${r}`:r;return n&&t.push(n),t}function U0(e){let t=e.replace(/\r\n?/g,`
|
|
107
107
|
`).trim().split(`
|
|
108
|
-
`),n=[{lines:[]}],r=!1;for(let e of t){/^\s*(```|~~~)/.test(e)&&(r=!r);let t=r?null:
|
|
108
|
+
`),n=[{lines:[]}],r=!1;for(let e of t){/^\s*(```|~~~)/.test(e)&&(r=!r);let t=r?null:I0.exec(e),i=t?(t[1]??t[2]??t[3])?.trim():void 0;i?n.push({title:i,lines:[]}):n.at(-1).lines.push(e)}let i=[];for(let e of n){let t=B0(e.lines);if(e.title)i.push({title:e.title,text:t.join(`
|
|
109
109
|
|
|
110
|
-
`)});else for(let e of t)for(let t of
|
|
110
|
+
`)});else for(let e of t)for(let t of H0(e))i.push({text:t})}return i}var W0=4,G0=1800,K0=e=>({"--orb":e});function q0(e){let[t,n]=(0,m.useState)(0),r=e.join(`|`);return(0,m.useEffect)(()=>{if(n(0),e.length<2)return;let t=window.setInterval(()=>n(e=>e+1),G0);return()=>window.clearInterval(t)},[r,e.length]),e.length?e[t%e.length]:void 0}function J0({thought:e}){let t=(0,m.useMemo)(()=>U0(e.text),[e.text]),[n,r]=(0,m.useState)(!1),i=n?0:Math.max(0,t.length-W0),a=t.slice(i),o=QU(e.source);return(0,U.jsxs)(`li`,{className:`thought`,style:K0(tW(e.source)),"data-live":e.live||void 0,"aria-label":`${o}${e.live?`, thinking`:``}`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsxs)(`span`,{className:`thought-label`,children:[(0,U.jsx)(XU,{source:e.source,strokeWidth:2.25,className:`size-3.5`}),o]}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.live?(0,U.jsxs)(`span`,{className:`thought-live`,children:[`thinking`,(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`thought-ellipsis`})]}):jj(Date.now()-e.at)}),t.length>1?(0,U.jsxs)(`span`,{className:`ml-auto text-xs text-muted-foreground tabular-nums`,children:[t.length,` steps`]}):null]}),i?(0,U.jsxs)(`button`,{type:`button`,"data-compact":!0,className:`thought-more`,onClick:()=>r(!0),children:[i,` earlier `,i===1?`step`:`steps`]}):null,(0,U.jsx)(`ol`,{className:`thought-steps`,"data-single":a.length===1||void 0,children:a.map((t,n)=>(0,U.jsxs)(`li`,{"data-current":e.live&&n===a.length-1||void 0,children:[t.title?(0,U.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:t.title}):null,t.text?(0,U.jsx)(uH,{text:t.text,className:`thought-text`}):null]},i+n))})]})}function Y0(e,t,n){(0,m.useEffect)(()=>{if(!e||!t)return;let r=e=>{e.defaultPrevented||e.isComposing||!dQ(e,t)||e.target?.closest(`input, textarea, [contenteditable='true']`)||(e.preventDefault(),n())};return window.addEventListener(`keydown`,r),()=>window.removeEventListener(`keydown`,r)},[e,t,n])}function X0(e){return[...e].sort((e,t)=>Number(t.live)-Number(e.live)||t.at-e.at||t.id-e.id)}function Z0({thoughts:e,collapsed:t,onToggle:n,shortcut:r,busy:i=[]}){let a=X0(iW(e)),o=a.filter(e=>e.live).map(e=>e.source),s=q0(o),c=s?tW(s):i.length?`var(--primary)`:`var(--orb-idle)`,l=s?`thinking`:i.length?`busy`:void 0,u=(0,m.useRef)(null),d=(0,m.useRef)(null),f=(0,m.useRef)(t);f.current=t,(0,m.useEffect)(()=>()=>{f.current||n()},[n]);let p=uA(!t,lA.sheet),h=fA();Y0(p,r,n);let g=a.length>0||i.length>0;return(0,U.jsxs)(U.Fragment,{children:[g&&(0,uy.createPortal)((0,U.jsx)(F0,{ref:u,spotlight:s,thinking:o,busy:i,tone:c,expanded:!t,hidden:h,shortcut:r,onOpen:n}),document.body),(0,U.jsxs)(nA,{open:p,onOpenChange:e=>{!e&&!t&&n()},label:`Thinking`,className:J(`thought-pane max-w-xl`,l&&`thought-pane-live`),style:K0(c),onCloseAutoFocus:e=>{e.preventDefault(),requestAnimationFrame(()=>{document.querySelector(`[role='dialog']`)||u.current?.focus()})},children:[(0,U.jsx)(`div`,{"aria-hidden":`true`,className:`thought-aura`,"data-working":l}),(0,U.jsx)(`div`,{ref:d,className:`relative min-h-0 overflow-y-auto p-3 outline-none md:p-4`,role:`log`,"aria-label":`Latest thoughts`,tabIndex:0,children:a.length?(0,U.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:a.map(e=>(0,U.jsx)(J0,{thought:e},e.id))}):(0,U.jsx)(`p`,{className:`px-2 py-6 text-center text-sm text-muted-foreground`,children:`Thoughts from the oracle and every agent appear here, and only here.`})}),(0,U.jsx)(zv,{target:d})]})]})}var Q0=`(max-width: 767.98px)`,$0=32;function e2(e){e.style.removeProperty(`max-height`),e.removeAttribute(`data-phone-fit`);let t=e.querySelector(`[role='log'][data-phone-fit]`);t&&(t.style.removeProperty(`min-height`),t.style.removeProperty(`overflow-y`),t.removeAttribute(`data-phone-fit`))}function t2(){let e=document.querySelector(`.thought-pane`);if(!e)return;if(!window.matchMedia(Q0).matches){e2(e);return}let t=window.visualViewport,n=t?.offsetTop??0,r=n+(t?.height??window.innerHeight),i=document.getElementById(`app-dock`)?.getBoundingClientRect().top??r;e.style.maxHeight=`${Math.max(0,Math.min(r,i)-n-$0)}px`,e.dataset.phoneFit=``;let a=e.querySelector(`[role='log']`);a&&(a.style.minHeight=`0`,a.style.overflowY=`auto`,a.dataset.phoneFit=``)}function n2(e){(0,m.useEffect)(()=>{if(!e)return;let t=()=>t2(),n=typeof MutationObserver>`u`?void 0:new MutationObserver(t);n?.observe(document.body,{childList:!0,subtree:!0});let r=document.getElementById(`app-dock`),i=typeof ResizeObserver>`u`?void 0:new ResizeObserver(t);r&&i?.observe(r);let a=window.visualViewport;return window.addEventListener(`resize`,t),window.addEventListener(`orientationchange`,t),a?.addEventListener(`resize`,t),t(),()=>{n?.disconnect(),i?.disconnect(),window.removeEventListener(`resize`,t),window.removeEventListener(`orientationchange`,t),a?.removeEventListener(`resize`,t),document.querySelectorAll(`.thought-pane[data-phone-fit]`).forEach(e2)}},[e])}function r2({status:e,lobby:t}){n2(!!(e&&e.panels?.thinking!==!1));let[n,r]=vW(`lobby.thinking`),i=IA(`sessions.list`,{},[`sessions`]);if(!e||e.panels?.thinking===!1)return null;let a=h0({oracleBusy:e.busy,runs:rW(t),activity:t?.activity??[],background:i.data?.background??[]}),o=e.keys.find(e=>e.action===`thinking`)?.label;return(0,U.jsx)(Z0,{thoughts:t?.thoughts??[],collapsed:n,onToggle:r,shortcut:o,busy:a})}var i2=//g;function a2(e){let t=[],n=e=>{if(e.nodeType===Node.TEXT_NODE)return(e.textContent??``).replace(i2,``);if(!(e instanceof HTMLElement))return``;let t=[...e.childNodes].map(n).join(``),i=e.tagName;return i===`BR`?`
|
|
111
111
|
`:t.trim()?i===`B`||i===`STRONG`?`**${t}**`:i===`I`||i===`EM`?`_${t}_`:i===`CODE`?`\`${t}\``:i===`UL`||i===`OL`?`\n${r(e)}\n`:i===`DIV`||i===`P`||i===`LI`?`\n${t}\n`:t:t},r=e=>[...e.children].filter(e=>e.tagName===`LI`).map((t,r)=>`${e.tagName===`OL`?`${r+1}.`:`-`} ${[...t.childNodes].map(n).join(``).trim()}`).join(`
|
|
112
112
|
`);return t.push([...e.childNodes].map(n).join(``)),t.join(``).replace(/\n{3,}/g,`
|
|
113
113
|
|
|
114
|
-
`).trim()}function a2(e){let t=window.getSelection();if(!t||t.rangeCount===0||!t.isCollapsed)return!1;let n=document.createRange();return n.selectNodeContents(e),n.setEnd(t.getRangeAt(0).startContainer,t.getRangeAt(0).startOffset),n.toString().replace(r2,``)===``}function o2(e){let t=window.getSelection()?.anchorNode,n=t instanceof HTMLElement?t:t?.parentElement;return!!(n?.closest(`li`)&&e.contains(n))}function s2(e){return e.replace(/[&<>"]/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`})[e]??e)}function c2(e){if(e!==`code`){document.execCommand(e);return}let t=window.getSelection()?.toString()??``;document.execCommand(`insertHTML`,!1,t?`<code>${s2(t)}</code>`:`<code></code>`)}var l2=[{format:`bold`,label:`Bold`,keys:`Ctrl+B`,icon:qp},{format:`italic`,label:`Italic`,keys:`Ctrl+I`,icon:lh},{format:`code`,label:`Code`,keys:`Ctrl+E`,icon:Nm},{format:`insertUnorderedList`,label:`Bulleted list`,icon:Ch},{format:`insertOrderedList`,label:`Numbered list`,icon:xh}],u2=(0,m.forwardRef)(function({html:e,placeholder:t,label:n,landed:r,onChange:i,onFocusChange:a,onSubmit:o,onUp:s},c){let l=(0,m.useRef)(null),[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(!e),[h,g]=(0,m.useState)({});(0,m.useImperativeHandle)(c,()=>({element:l.current}),[]),(0,m.useEffect)(()=>{let t=l.current;t&&(e===``&&t.innerHTML!==``?(t.innerHTML=``,p(!0)):e&&t.innerHTML===``&&(t.innerHTML=e,p(!1)))},[e]);let _=(0,m.useCallback)(()=>{let e=l.current;if(!e)return;let t=i2(e);p(t===``&&!e.querySelector(`li`)),i(t,t?e.innerHTML:``)},[i]);(0,m.useEffect)(()=>{if(!u)return;let e=()=>g(Object.fromEntries(l2.filter(e=>e.format!==`code`).map(e=>[e.format,document.queryCommandState(e.format)])));return document.addEventListener(`selectionchange`,e),e(),()=>document.removeEventListener(`selectionchange`,e)},[u]);function v(e){l.current?.focus(),c2(e),_()}function y(e){let t=l.current;if(!t)return;let n=e.ctrlKey||e.metaKey;if(n&&!e.altKey&&[`b`,`i`,`e`].includes(e.key.toLowerCase())){e.preventDefault(),e.stopPropagation(),v(e.key.toLowerCase()===`b`?`bold`:e.key.toLowerCase()===`i`?`italic`:`code`);return}if(e.key===`Enter`&&!e.shiftKey&&!n&&!e.nativeEvent.isComposing){if(o2(t))return;e.preventDefault(),o();return}e.key===`ArrowUp`&&a2(t)&&(e.preventDefault(),s())}return(0,U.jsxs)(`div`,{"data-own":``,"data-open":u||!f||void 0,"data-landed":r||void 0,className:`q-own group/own relative flex w-full min-w-0 flex-col overflow-hidden border`,children:[(0,U.jsx)(`div`,{ref:l,role:`textbox`,"aria-multiline":`true`,"aria-label":n,"aria-placeholder":t,contentEditable:!0,suppressContentEditableWarning:!0,"data-nav":``,"data-empty":f||void 0,"data-placeholder":t,tabIndex:0,onInput:_,onKeyDown:y,onPaste:e=>{e.preventDefault(),document.execCommand(`insertText`,!1,e.clipboardData.getData(`text/plain`))},onFocus:()=>{d(!0),a(!0)},onBlur:()=>{d(!1),a(!1)},className:`q-own-text min-h-9 w-full min-w-0 px-4 py-2 text-sm break-words outline-none max-md:min-h-11 [&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:font-mono [&_code]:text-[0.8125rem] [&_ol]:list-decimal [&_ol]:ps-5 [&_ul]:list-disc [&_ul]:ps-5`}),(0,U.jsxs)(`div`,{role:`toolbar`,"aria-label":`Formatting`,"aria-hidden":!u,className:J(`q-own-bar flex items-center gap-0.5 px-2 pb-1.5`,!u&&`pointer-events-none`),children:[l2.map(({format:e,label:t,keys:n,icon:r})=>(0,U.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":t,"aria-pressed":h[e]??!1,title:n?`${t} · ${n}`:t,onMouseDown:e=>e.preventDefault(),onClick:()=>v(e),className:`inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground aria-pressed:bg-primary/12 aria-pressed:text-primary`,children:(0,U.jsx)(r,{"aria-hidden":`true`,className:`size-3.5`})},e)),(0,U.jsx)(`span`,{className:`ms-auto pe-1 text-2xs text-muted-foreground max-md:hidden`,children:`Enter answers · Shift+Enter new line`})]})]})});function d2(e){return e?e.options.some(VJ)?`xl`:e.question.length+e.options.reduce((e,t)=>e+t.label.length+(t.description?.length??0),0)>700||e.options.length>6?`lg`:`md`:`md`}var f2=/\s*\(recommended\)\s*$/i,p2=1200,m2=`Type something.`,h2=`(max-width: 767.98px)`,g2=`max-md:hidden`;function _2(e){return{text:e.replace(f2,``),recommended:f2.test(e)}}function v2({label:e}){let{text:t,recommended:n}=_2(e);return(0,U.jsxs)(`span`,{className:`leading-snug break-words`,children:[t,n?(0,U.jsx)(`span`,{className:`ms-1 font-medium text-primary`,children:`(Recommended)`}):null]})}function y2({multi:e,on:t}){return(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:J(`relative mt-0.5 flex size-4 shrink-0 items-center justify-center border`,e?`rounded-lg`:`rounded-full`,t?`border-primary bg-primary text-primary-foreground`:`border-input`),children:[t?(0,U.jsx)(tm,{className:J(e?`size-3`:`hidden`)}):null,t&&!e?(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-primary-foreground`}):null]})}function b2({option:e,index:t,multi:n,name:r,selected:i,onToggle:a,onFocusOption:o}){return(0,U.jsxs)(`div`,{className:`grid gap-1`,children:[(0,U.jsxs)(`label`,{className:J(`flex min-h-9 cursor-pointer items-start gap-2.5 rounded-lg border px-3 py-2 text-start text-sm transition-[background-color,border-color,transform] duration-150 ease-snap active:scale-[0.99] max-md:min-h-11`,i?`border-primary/50 bg-accent`:`border-input bg-background hover:bg-accent/60`,`has-[:focus-visible]:border-ring has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/30`),children:[(0,U.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,"data-nav":``,"data-option":t,className:`sr-only`,checked:i,onChange:a,onFocus:o}),(0,U.jsx)(y2,{multi:n,on:i}),(0,U.jsx)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:(0,U.jsxs)(`span`,{className:`flex gap-1.5`,children:[(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,U.jsx)(v2,{label:e.label})]})})]}),e.description?(0,U.jsx)(uH,{text:e.description,className:`px-3 text-muted-foreground`}):null]})}function x2({option:e,onExpand:t}){let n=Sk(h2);return!e||!VJ(e)?null:(0,U.jsxs)(`div`,{className:`card-flat flex min-w-0 max-w-full flex-col gap-2 rounded-lg border p-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsxs)(`p`,{className:`min-w-0 truncate text-xs font-medium text-muted-foreground`,children:[`Preview · `,_2(e.label).text]}),(0,U.jsxs)(X,{type:`button`,variant:`ghost`,size:`xs`,onClick:t,"aria-keyshortcuts":`E`,title:n?`Expand mockup`:`Expand · E`,className:`-my-1 shrink-0 max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:[(0,U.jsx)(Dh,{"aria-hidden":`true`}),`Expand`]})]}),e.image?(0,U.jsx)(`img`,{src:R(e.image),alt:``,loading:`lazy`,className:`max-h-64 w-full rounded-lg border object-contain`}):null,e.htmlPreview?(0,U.jsx)(FJ,{preview:e.htmlPreview,label:_2(e.label).text,frameWidth:p2,onOpen:t,className:`h-auto aspect-[3/2]`}):null,e.preview?(0,U.jsx)(uH,{text:e.preview,className:`text-xs`}):null]})}function S2({option:e,index:t,multi:n,name:r,selected:i,active:a,onToggle:o,onFocusOption:s}){let{text:c,recommended:l}=_2(e.label),u=l?`${c} (Recommended)`:c;return(0,U.jsxs)(`label`,{"data-active":a||void 0,"data-picked":i||void 0,className:`q-dot group relative flex h-11 w-full shrink-0 cursor-pointer items-center justify-center outline-none`,children:[(0,U.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,"data-nav":``,"data-option":t,"aria-label":u,className:`sr-only`,checked:i,onChange:o,onFocus:s}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:J(`q-dot-mark relative z-10 flex size-5 items-center justify-center rounded-full text-[0.625rem] font-semibold tabular-nums transition-[background-color,color,scale] duration-200 ease-snap group-hover:scale-110`,l&&`q-dot-star`),children:t+1}),(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:`q-dot-tag pointer-events-none absolute top-1/2 left-[calc(100%+0.5rem)] z-30 -translate-y-1/2 rounded-full px-2.5 py-1 text-xs font-medium whitespace-nowrap opacity-0 transition-[opacity,translate] duration-150 ease-snap group-hover:opacity-100 group-has-[:focus-visible]:opacity-100 group-data-[active]:!opacity-0`,children:[t+1,`. `,u]})]})}var C2={type:`spring`,visualDuration:.2,bounce:.12},w2={type:`spring`,visualDuration:.2,bounce:.04,delay:.06},T2={type:`spring`,visualDuration:.28,bounce:.55},E2={type:`spring`,visualDuration:.2,bounce:0},D2={type:`spring`,stiffness:900,damping:18,velocity:50,restDelta:.02,restSpeed:1},O2=-1;function k2(e,t,n,r,i,a){let o=(0,m.useRef)(null),s=(0,m.useRef)(null),c=(0,m.useRef)(null),l=(0,m.useRef)(null),u=(0,m.useRef)(void 0),d=(0,m.useRef)([]),f=(0,m.useRef)(a);f.current=a;let p=(0,m.useCallback)(t=>{if(t===O2){let t=n.current?.element,r=e.current;return t&&r?t.getBoundingClientRect().top-r.getBoundingClientRect().top+6:void 0}let r=e.current?.querySelectorAll(`.q-dot`)[t];return r?r.offsetTop+r.offsetHeight/2:void 0},[e,n]),h=(0,m.useCallback)(()=>{let t=o.current,n=e.current?.querySelectorAll(`.q-dot`);if(!t||!n||n.length===0)return;let r=n[0],i=n[n.length-1],a=r.offsetTop+r.offsetHeight/2;t.style.top=`${a}px`,t.style.height=`${Math.max(0,i.offsetTop+i.offsetHeight/2-a)}px`},[e]),g=(0,m.useCallback)((e,t=1,n=1)=>{let r=s.current,i=c.current;if(r&&i){if(e===void 0){r.style.opacity=`0`,i.style.opacity=`0`;return}r.style.opacity=String(Math.min(1,t*3)),r.style.transform=`translate(-50%, ${e}px) translateY(-50%) scale(${Math.max(0,t)})`,i.style.opacity=n>.02?`1`:`0`,i.style.transform=`translateY(${e}px) scaleX(${Math.max(0,Math.min(1,n))})`}},[]),_=(0,m.useRef)(i);return(0,m.useLayoutEffect)(()=>{_.current!==i&&(_.current=i,u.current=void 0),h();for(let e of d.current)e.stop();d.current=[],t.current&&(t.current.style.translate=``);let e=u.current;u.current=r;let n=p(r),a=e===void 0?void 0:p(e),o=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,s=l.current;if(s&&(s.style.opacity=`0`),n===void 0||a===void 0||e===r||o||!s){g(r===O2?void 0:n),r===O2&&e!==r&&e!==void 0&&f.current();return}let c=n>a?1:-1,m={head:0,tail:0},v=!1,y=(e,t,n,r)=>{let i=Zf(e,t,{...n,onUpdate:r});return d.current.push(i),i},b=()=>{let e=a+(n-a)*m.head,t=a+(n-a)*m.tail;s.style.opacity=Math.abs(e-t)>1?`1`:`0`,s.style.transform=`translateY(${Math.min(e,t)}px)`,s.style.height=`${Math.abs(e-t)}px`},x=()=>{if(v)return;if(v=!0,r===O2){g(void 0),f.current();return}let e={open:0,reach:0};y(0,1,T2,t=>{e.open=t,g(n,e.open,e.reach)}),y(0,1,{...E2,delay:.05},t=>{e.reach=t,g(n,e.open,e.reach)});let i=t.current;i&&y(0,0,{...D2,delay:.1},e=>{i.style.translate=Math.abs(e)>.01?`0 ${(c*e).toFixed(2)}px`:``})};return y(1,0,{type:`spring`,visualDuration:.12,bounce:0},t=>{v||g(e===O2?void 0:a,t,t)}),y(0,1,C2,e=>{m.head=e,b(),e>.85&&x()}),y(0,1,w2,e=>{m.tail=e,b()}),()=>{for(let e of d.current)e.stop()}},[r,i,p,t,g,h]),(0,m.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>{h(),(d.current.length===0||d.current.every(e=>e.state===`finished`))&&g(u.current===O2?void 0:p(u.current??0))});return n.observe(t),()=>n.disconnect()},[e,p,g,h]),{track:o,ring:s,line:c,drop:l}}function A2({option:e,position:t,onExpand:n,panel:r,dim:i}){if(!e)return null;let{text:a,recommended:o}=_2(e.label),s=VJ(e);return(0,U.jsx)(`div`,{ref:r,"data-dim":i||void 0,className:`q-panel min-w-0 rounded-2xl p-4 transition-opacity duration-300 data-[dim]:opacity-55 max-md:p-3`,children:(0,U.jsxs)(`div`,{"aria-live":`polite`,className:J(`q-panel-body grid min-w-0 gap-4`,s?`md:grid-cols-[minmax(0,1fr)_minmax(0,1.25fr)]`:``),children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2 py-1`,children:[(0,U.jsxs)(`p`,{className:`text-center text-sm font-medium break-words`,children:[a,o?(0,U.jsx)(`span`,{className:`ms-1 text-primary`,children:`(Recommended)`}):null]}),e.description?(0,U.jsx)(uH,{text:e.description,className:`min-w-0 text-muted-foreground`}):(0,U.jsx)(`span`,{className:`text-center text-sm text-muted-foreground`,children:`No further detail.`})]}),s?(0,U.jsx)(x2,{option:e,onExpand:n}):null]},t)})}function j2({primary:e,primaryLabel:t,disabled:n,submitting:r,onCancel:i}){return(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,onClick:i,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Cancel`}),(0,U.jsx)(X,{type:e,disabled:n||r,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:r?`Sending…`:t})]})}function M2(e,t,n,r){let i=e[r];if(!i)return;let a=n[r]?.trim();if(a)return{questionIndex:r,question:i.question,kind:`custom`,answer:a};let o=(t[r]??[]).map(e=>i.options[e]?.label).filter(e=>!!e);if(o.length!==0)return i.multiSelect?{questionIndex:r,question:i.question,kind:`multi`,answer:o.join(`, `),selected:o}:{questionIndex:r,question:i.question,kind:`option`,answer:o[0]??null}}function N2({questions:e,picks:t,own:n,index:r,onGo:i}){return e.length===1?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e[0]?.header}):(0,U.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:e.map((e,a)=>{let o=!!n[a]?.trim()||(t[a]?.length??0)>0;return(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-description":`When focused, press Enter or Space to open this question.`,type:`button`,onClick:()=>i(a),"aria-current":a===r,className:J(`inline-flex min-h-8 min-w-0 items-center gap-1 rounded-lg border px-3 text-xs font-medium transition-colors max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,a===r?`border-primary bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[(0,U.jsxs)(`span`,{className:`min-w-0 break-words text-start`,children:[a+1,` `,e.header]}),o?(0,U.jsx)(tm,{className:`size-3 shrink-0`,"aria-hidden":`true`}):null]},a)})})}function P2({questions:e,submitting:t,onAnswer:n,onCancel:r,expanded:i,onExpand:a,onSize:o}){let[s,c]=(0,m.useState)(0),[l,u]=(0,m.useState)(!1),d=i??l,f=e=>a?a(e):u(e),[p,h]=(0,m.useState)(0),g=(0,m.useRef)(0),_=(0,m.useRef)(!1),[v,y]=(0,m.useState)({}),[b,x]=(0,m.useState)({}),[S,C]=(0,m.useState)({}),[w,T]=(0,m.useState)(!1),[E,D]=(0,m.useState)(!1),O=(0,m.useRef)(null),[k,A]=(0,m.useState)({}),j=(0,m.useRef)(null),M=(0,m.useRef)(null),N=(0,m.useRef)(null),P=e[s],F=v[s]??[],I=b[s]??``,ee=P?.options[k[s]??F[0]??0],te=M2(e,v,b,s),ne=P?.multiSelect===!0,re=Math.max(0,P?.options.indexOf(ee)??0),ie=w||I.trim()!==``,ae=ie?O2:re,oe=k2(M,N,O,ae,`${s}:${d}`,()=>D(!0));if((0,m.useEffect)(()=>{if(!E)return;let e=window.setTimeout(()=>D(!1),700);return()=>window.clearTimeout(e)},[E]),(0,m.useEffect)(()=>o?.(d2(P)),[P,o]),(0,m.useEffect)(()=>{let e=j.current;e&&(e.querySelector(`[data-option="${v[s]?.[0]??0}"]`)??e.querySelector(`[data-nav]`))?.focus()},[s]),(0,m.useEffect)(()=>{let e=_.current&&!d;_.current=d,e&&(A(e=>({...e,[s]:g.current})),j.current?.querySelector(`[data-option="${g.current}"]`)?.focus())},[d]),!P)return null;let se=P.options.some(VJ);function L(e){h(Math.max(0,e)),g.current=Math.max(0,e),f(!0)}function ce(e){g.current=e,f(!1)}if(d&&se)return(0,U.jsx)(UJ,{options:P.options,start:p,title:P.header||P.question,picked:F,multi:ne,onChoose:e=>{le(e),ne||ce(e)},onClose:ce,onIndex:e=>{g.current=e}},s);function le(e){let t=ne?F.includes(e)?F.filter(t=>t!==e):[...F,e]:[e];y({...v,[s]:t}),ne||(x({...b,[s]:``}),C({...S,[s]:``})),A({...k,[s]:e})}function ue(e){let t=e instanceof HTMLInputElement&&e.dataset.option!==void 0?Number(e.dataset.option):-1;t>=0&&!ne&&le(t)}function R(t,r){if(M2(e,t,r,s)){if(s<e.length-1){c(s+1);return}n({answers:e.map((n,i)=>M2(e,t,r,i)).filter(e=>!!e),cancelled:!1})}}function z(e){e.preventDefault(),t||R(v,b)}function de(t){t>=0&&t<e.length&&c(t)}function fe(e){let n=e.target,r=j.current;if(!r||e.altKey)return;if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)){e.preventDefault(),t||R(v,b);return}if(UA(n))return;let i=WA(e.key);if(i||e.key===`Home`||e.key===`End`){e.preventDefault(),HA(r,n,i||(e.key===`Home`?`first`:`last`)),ue(document.activeElement);return}let a=GA(e.key);if(a&&!(n instanceof HTMLButtonElement)){e.preventDefault(),de(s+a);return}let o=n instanceof HTMLInputElement&&n.dataset.option!==void 0?Number(n.dataset.option):-1;if(e.key===`Enter`&&o>=0){if(e.preventDefault(),ne)F.length>0&&F.includes(o)?R(v,b):le(o);else{let e={...v,[s]:[o]},t={...b,[s]:``};y(e),x(t),C({...S,[s]:``}),R(e,t)}return}if(e.key===` `&&o>=0){e.preventDefault(),le(o);return}let c=Number(e.key);if(Number.isInteger(c)&&c>=1&&c<=P.options.length){e.preventDefault(),le(c-1),r.querySelector(`[data-option="${c-1}"]`)?.focus();return}e.key.toLowerCase()===`e`&&se&&!e.ctrlKey&&!e.metaKey&&(e.preventDefault(),L(o>=0?o:k[s]??F[0]??0))}return(0,U.jsxs)(`form`,{ref:j,className:`flex min-w-0 flex-col gap-3`,onSubmit:z,onKeyDown:fe,children:[(0,U.jsx)(N2,{questions:e,picks:v,own:b,index:s,onGo:c}),(0,U.jsxs)(`div`,{className:`text-center`,children:[(0,U.jsx)(`p`,{className:`text-2xs font-medium tracking-wide text-muted-foreground uppercase`,children:e.length>1?`Question ${s+1} of ${e.length}`:`Question`}),(0,U.jsx)(uH,{text:P.question,className:`mt-1 text-base font-medium`})]}),(0,U.jsxs)(`div`,{className:`relative grid min-w-0 grid-cols-[2.25rem_minmax(0,1fr)] gap-x-3`,children:[(0,U.jsxs)(`div`,{ref:M,role:ne?`group`:`radiogroup`,"aria-label":`Options`,className:`q-rail relative flex min-w-0 flex-col justify-evenly py-2`,children:[(0,U.jsx)(`span`,{ref:oe.track,"aria-hidden":`true`,className:`q-rail-line pointer-events-none absolute top-0 left-1/2 h-0 -translate-x-1/2`}),(0,U.jsx)(`span`,{ref:oe.drop,"aria-hidden":`true`,className:`q-drop pointer-events-none absolute top-0 left-1/2 w-[3px] -translate-x-1/2 rounded-full opacity-0`}),(0,U.jsx)(`span`,{ref:oe.ring,"aria-hidden":`true`,className:`q-ring pointer-events-none absolute top-0 left-1/2 z-20 size-7 rounded-full opacity-0`}),(0,U.jsx)(`span`,{ref:oe.line,"aria-hidden":`true`,className:`q-line pointer-events-none absolute top-0 left-[calc(50%+0.875rem)] z-10 h-px w-[calc(50%-0.875rem+0.75rem)] origin-left opacity-0`}),P.options.map((e,t)=>(0,U.jsx)(S2,{option:e,index:t,multi:ne,name:`question-${s}`,selected:F.includes(t),active:ae===t,onToggle:()=>le(t),onFocusOption:()=>A({...k,[s]:t})},t))]}),(0,U.jsx)(A2,{panel:N,option:ee,position:re,dim:ie,onExpand:()=>L(re)})]}),(0,U.jsx)(`div`,{className:`q-own-wrap mx-auto w-full`,children:(0,U.jsx)(u2,{ref:O,html:S[s]??``,placeholder:`Type something else…`,label:`Your own answer`,landed:E,onChange:(e,t)=>{x(t=>({...t,[s]:e})),C(e=>({...e,[s]:t})),e&&y(e=>({...e,[s]:[]}))},onFocusChange:T,onSubmit:()=>{t||R(v,b)},onUp:()=>{let e=j.current;e&&HA(e,O.current?.element??null,-1)}},s)}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:ne?`Pick several`:`Pick one`}),(0,U.jsx)(vk,{chord:`↑↓`,className:g2,children:`move`}),(0,U.jsx)(vk,{chord:ne?`Space`:`Enter`,className:g2,children:ne?`pick`:`choose`}),ne?(0,U.jsx)(vk,{chord:`Enter`,className:g2,children:`next`}):null,e.length>1?(0,U.jsx)(vk,{chord:`←→`,className:g2,children:`question`}):null,se?(0,U.jsx)(vk,{chord:`E`,className:g2,children:`expand mockups`}):null,(0,U.jsx)(vk,{chord:`Esc`,className:g2,children:`later`})]}),(0,U.jsx)(j2,{primary:`submit`,primaryLabel:s<e.length-1?`Next`:`Answer`,disabled:!te,submitting:t,onCancel:r})]})}function F2(e,t,n){let r=e.currentTarget,i=e.target;if(e.altKey||UA(i))return;let a=WA(e.key);if(a){e.preventDefault(),HA(r,i,a);return}let o=i instanceof HTMLInputElement&&i.dataset.option!==void 0?Number(i.dataset.option):-1;if((e.key===`Enter`||e.key===` `)&&o>=0){e.preventDefault(),n(o,e.key===`Enter`);return}let s=Number(e.key);Number.isInteger(s)&&s>=1&&s<=t&&(e.preventDefault(),n(s-1,!1),r.querySelector(`[data-option="${s-1}"]`)?.focus())}function I2({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``),o=(0,m.useRef)(null);return(0,m.useEffect)(()=>{o.current?.querySelector(`[data-nav]`)?.focus()},[]),(0,U.jsxs)(`form`,{ref:o,className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i&&n(i)},onKeyDown:r=>F2(r,e.options.length,(r,i)=>{let o=e.options[r];o!==void 0&&(a(o),i&&!t&&n(o))}),children:[(0,U.jsx)(uH,{text:e.title,className:`text-base`}),(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.options.map((e,t)=>(0,U.jsx)(b2,{option:{label:e},index:t,multi:!1,name:`choice`,selected:i===e,onToggle:()=>a(e)},e))}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`↑↓`,className:g2,children:`move`}),(0,U.jsx)(vk,{chord:`Enter`,className:g2,children:`choose`}),(0,U.jsx)(vk,{chord:`Esc`,className:g2,children:`later`})]}),(0,U.jsx)(j2,{primary:`submit`,primaryLabel:`Choose`,disabled:!i,submitting:t,onCancel:r})]})}function L2({view:e,submitting:t,onAnswer:n}){let r=(0,m.useRef)(null);(0,m.useEffect)(()=>r.current?.focus(),[]);function i(e){if(e.altKey||e.ctrlKey||e.metaKey||t)return;let r=e.key.toLowerCase();r===`y`?n(!0):r===`n`&&n(!1)}return(0,U.jsxs)(`div`,{ref:r,tabIndex:-1,"data-autofocus":``,onKeyDown:i,className:`flex min-w-0 flex-col gap-3 outline-none`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(uH,{text:e.question,className:`text-base`}),e.detail?(0,U.jsx)(uH,{text:e.detail,className:`mt-1 text-muted-foreground`}):null]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`Y`,className:g2,children:`yes`}),(0,U.jsx)(vk,{chord:`N`,className:g2,children:`no`}),(0,U.jsx)(vk,{chord:`Esc`,className:g2,children:`later`})]}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n(!1),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`No`}),(0,U.jsx)(X,{type:`button`,disabled:t,onClick:()=>n(!0),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Yes`})]})]})]})}function R2({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``);return(0,U.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i.trim()&&n(i.trim())},children:[(0,U.jsx)(uH,{text:e.question,className:`text-base`}),(0,U.jsx)(Dj,{autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},value:i,onChange:e=>a(e.target.value),placeholder:e.placeholder??m2,"aria-label":e.question,rows:3,className:`min-h-9 resize-none text-sm md:text-sm max-md:min-h-11`}),(0,U.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`Enter`,className:g2,children:`answer`}),(0,U.jsx)(vk,{chord:`Shift+Enter`,className:g2,children:`new line`}),(0,U.jsx)(vk,{chord:`Esc`,className:g2,children:`later`})]}),(0,U.jsx)(j2,{primary:`submit`,primaryLabel:`Answer`,disabled:!i.trim(),submitting:t,onCancel:r})]})}function z2({dialog:e,submitting:t,onAnswer:n}){let[r,i]=(0,m.useState)(e.method===`editor`?e.prefill??``:``),[a,o]=(0,m.useState)(``),s=e.options??[],c=e.method===`select`?a!==``:r.trim()!==``,l=(0,m.useRef)(null);(0,m.useEffect)(()=>{l.current?.querySelector(`[data-nav], textarea`)?.focus()},[]);function u(t){t.preventDefault(),e.method===`select`?n({value:a}):e.method===`confirm`?n({confirmed:!0}):(e.method===`input`||e.method===`editor`)&&n({value:r.trim()})}return(0,U.jsxs)(`form`,{ref:l,className:`flex min-w-0 flex-col gap-3`,onSubmit:u,onKeyDown:r=>{e.method===`select`&&F2(r,s.length,(e,r)=>{let i=s[e];i!==void 0&&(o(i),r&&!t&&n({value:i}))})},children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.title}),e.message?(0,U.jsx)(uH,{text:e.message,className:`mt-1 text-base`}):null]}),e.method===`select`?(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>(0,U.jsx)(b2,{option:{label:e},index:t,multi:!1,name:`dialog`,selected:a===e,onToggle:()=>o(e)},e))}):null,e.method===`input`||e.method===`editor`?(0,U.jsx)(Dj,{value:r,onChange:e=>i(e.target.value),placeholder:e.placeholder??m2,"aria-label":e.title,rows:e.method===`editor`?4:2,className:`min-h-9 resize-none text-sm md:text-sm max-md:min-h-11`}):null,(0,U.jsxs)(`div`,{className:`flex items-center justify-end gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({cancelled:!0}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Cancel`}),e.method===`confirm`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({confirmed:!1}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`No`}),(0,U.jsx)(X,{type:`button`,disabled:t,onClick:()=>n({confirmed:!0}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Yes`})]}):(0,U.jsx)(X,{type:`submit`,disabled:!c||t,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Answer`})]})]})}function B2(e){let{view:t}=e;return t.kind===`questionnaire`?(0,U.jsx)(P2,{questions:t.questions,submitting:e.submitting,onAnswer:e.onAnswer,onCancel:e.onCancel,onSize:e.onSize,...e.onExpand?{expanded:e.expanded??!1,onExpand:e.onExpand}:{}}):t.kind===`choose`?(0,U.jsx)(I2,{...e,view:t}):t.kind===`confirm`?(0,U.jsx)(L2,{...e,view:t}):t.kind===`text`?(0,U.jsx)(R2,{...e,view:t}):(0,U.jsx)(z2,{...e,dialog:t.dialog})}function V2(e){return typeof e==`object`&&e?e:{}}function H2(e){return typeof e==`string`?e.trim():``}function U2(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function W2(e){let t=V2(e),n=H2(t.label);if(!n)return;let r=H2(t.description),i=H2(t.preview),a=H2(t.image),o=AJ(t.htmlPreview);return{label:n,...r?{description:r}:{},...i?{preview:i}:{},...a?{image:a}:{},...o?{htmlPreview:o}:{}}}function G2(e){let t=V2(e),n=H2(t.question);if(!n)return;let r=(Array.isArray(t.options)?t.options:[]).map(W2).filter(e=>!!e);return{question:n,header:H2(t.header)||`Question`,options:r,...t.multiSelect===!0?{multiSelect:!0}:{}}}function K2(e){let t=V2(e),n=H2(t.method);if(n!==`select`&&n!==`confirm`&&n!==`input`&&n!==`editor`)return;let r=H2(t.message),i=U2(t.options),a=H2(t.placeholder),o=H2(t.prefill);return{id:H2(t.id),method:n,title:H2(t.title)||`Answer`,...r?{message:r}:{},...i.length>0?{options:i}:{},...a?{placeholder:a}:{},...o?{prefill:o}:{}}}function q2(e){let t=(Array.isArray(e.questions)?e.questions:[]).map(G2).filter(e=>!!e);return t.length>0?{kind:`questionnaire`,questions:t}:void 0}function J2(e){return{kind:`choose`,title:H2(e.title)||`Choose an option`,options:U2(e.options)}}function Y2(e){let t=H2(e.question)||H2(e.title)||`Continue?`,n=H2(e.detail)||H2(e.message);return{kind:`confirm`,question:t,...n?{detail:n}:{}}}function X2(e){let t=H2(e.question)||H2(e.title)||`Type an answer`,n=H2(e.placeholder);return{kind:`text`,question:t,...n?{placeholder:n}:{}}}function Z2(e){let t=V2(e.payload);if(e.kind===`questionnaire`)return q2(t);if(e.kind===`choose`)return J2(t);if(e.kind===`confirm`)return Y2(t);if(e.kind===`text`)return X2(t);let n=K2(t.dialog);return n?{kind:`sessionDialog`,dialog:n}:void 0}var Q2=`(max-width: 767.98px)`,$2={md:`max-w-3xl`,lg:`max-w-4xl max-h-[min(88svh,52rem)]`,xl:`max-w-5xl max-h-[min(90svh,58rem)]`};function e4({submitting:e,onKeep:t,onLeave:n}){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,role:`alert`,children:[(0,U.jsx)(`p`,{className:`text-sm`,children:`Leave without answering? The oracle will not guess for you.`}),(0,U.jsxs)(`div`,{className:`flex items-center justify-end gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,onClick:t,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Keep answering`}),(0,U.jsx)(X,{type:`button`,disabled:e,onClick:n,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:e?`Leaving…`:`Leave`})]})]})}function t4({count:e,onOpen:t}){return(0,U.jsxs)(X,{type:`button`,variant:`soft`,onClick:t,"aria-label":`${e} question${e===1?``:`s`} waiting — open`,className:`gap-1.5 text-warning max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:[(0,U.jsx)(ym,{"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`tabular-nums`,children:e}),(0,U.jsx)(`span`,{className:`hidden md:inline`,children:`waiting`})]})}function n4({prompts:e,answer:t,dismiss:n,minimized:r,onMinimize:i}){let[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(!1),[l,u]=(0,m.useState)(!1),d=(0,m.useRef)(null),[f,p]=(0,m.useState)(`md`),h=Sk(Q2),{keyboardOpen:g,keyboardInset:_}=eA(),v=e.length,y=e[0],b=y?Z2(y):void 0,x=v>0&&!r,S=uA(x,lA.question);(0,m.useEffect)(()=>{v===0&&(o(!1),i(!1))},[v,i]);let C=y?.id;(0,m.useEffect)(()=>u(!1),[C]);async function w(e,t){c(!0);try{await e,o(!1)}catch(e){e instanceof ve&&e.code===`question_withdrawn`?pp(mA):pp.error(e instanceof Error?e.message:t)}finally{c(!1)}}let T=y?.from?`${y.from} asks`:`A question`;return(0,U.jsx)(nA,{open:x&&S&&!!y,label:`Question from the lobby`,dismissOnBackdrop:!1,onOpenChange:e=>{e||(l?u(!1):a?o(!1):i(!0))},style:h&&g?{maxHeight:`calc(100vh - ${_}px - 1.5rem)`}:void 0,className:J(`transition-[max-width] duration-300 ease-snap`,l?`h-[min(92svh,60rem)] max-h-[min(92svh,60rem)] max-w-7xl`:$2[b?.kind===`questionnaire`?f:`md`],`max-md:w-[calc(100vw-2rem)] max-md:max-w-[calc(100vw-2rem)] max-md:max-h-[calc(100svh-1.5rem)]`,l&&`max-md:h-[calc(100svh-1.5rem)]`),children:y?(0,U.jsxs)(`section`,{"aria-label":`Question from the lobby`,className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,U.jsxs)(`header`,{className:J(`flex items-center gap-3 px-4 pt-4 pb-2 max-md:px-3 max-md:pt-3`,l&&`hidden`),children:[(0,U.jsxs)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-muted-foreground first-letter:uppercase`,children:[T,v>1?` · 1 of ${v}`:``]}),(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Later: put the question away`,title:h?`Later`:`Later · Esc`,onClick:()=>i(!0),className:`max-md:size-11`,children:(0,U.jsx)(r_,{"aria-hidden":`true`})})]}),(0,U.jsx)(`div`,{ref:d,className:l?`flex min-h-0 min-w-0 flex-1 flex-col`:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-4 max-md:px-3 max-md:pb-3`,children:b?a?(0,U.jsx)(e4,{submitting:s,onKeep:()=>o(!1),onLeave:()=>void w(n(y.id),`Could not leave the question`)}):(0,U.jsx)(B2,{view:b,submitting:s,onAnswer:e=>void w(t(y.id,e),`Could not send the answer`),onCancel:()=>o(!0),expanded:l,onExpand:u,onSize:p},y.id):(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(`p`,{className:`max-md:min-w-0 max-md:flex-1 text-sm text-muted-foreground`,children:`This question cannot be shown here.`}),(0,U.jsx)(X,{type:`button`,disabled:s,onClick:()=>void w(n(y.id),`Could not dismiss the question`),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Dismiss`})]})}),l?null:(0,U.jsx)(zv,{target:d})]}):null})}var r4=2;function i4(e){let t=globalThis.EventSource;if(!t)throw Error(`EventSource is not available in this environment`);return new t(e)}function a4(e){try{return JSON.parse(e)}catch{return}}function o4(e,t){switch(e.type){case`hello`:t.onHello?.(e.versions);return;case`changed`:t.onChanged?.(e.topic,e.version);return;case`feed`:t.onFeed?.({activity:e.activity,thoughts:e.thoughts,chat:e.chat});return;case`reply`:t.onReply?.(e.text);return;case`notice`:t.onNotice?.(e.text,e.level)}}function s4(e,t=i4){let n=t(R(`/api/events`));return e.onConnection?.(`connecting`),n.onopen=()=>e.onConnection?.(`live`),n.onerror=()=>e.onConnection?.(n.readyState===r4?`offline`:`connecting`),n.onmessage=t=>{let n=a4(t.data);n&&o4(n,e)},()=>n.close()}var c4=2e3,l4=()=>be(`projects.list`,{});async function u4(){let e;try{e=ue()}catch{return}if(e&&!ge(e))try{he((await l4()).projects)}catch{}}function d4(){let e=(0,m.useRef)(void 0),t=(0,m.useRef)(void 0),n=(0,m.useCallback)(()=>{clearTimeout(t.current),e.current?.();try{ue()}catch{L.onStatus({connection:`offline`});return}e.current=s4({onHello:e=>{L.onHello(e),u4()},onChanged:(e,t)=>L.onChanged(e,t),onFeed:e=>L.onFeedDelta(e),onReply:e=>L.onReplyDelta(e),onNotice:(e,t)=>pp[t](e),onConnection:e=>{L.onStatus({connection:e}),e===`offline`&&(clearTimeout(t.current),t.current=setTimeout(()=>{_e(l4).catch(()=>!1).finally(n)},c4))}})},[]);return(0,m.useEffect)(()=>(n(),()=>{clearTimeout(t.current),e.current?.()}),[n]),n}var f4=`bot-lobby.recoveredAt`,p4;function m4(e,t=h4()){try{p4===void 0&&(p4=Number(t?.getItem(f4)??0))}catch{p4??=0}if(p4!==void 0&&e<=p4)return!1;p4=e;try{t?.setItem(f4,String(e))}catch{}return!0}function h4(){try{return globalThis.sessionStorage}catch{return}}function g4(e){let t=e?.recovered?.at,n=e?.recovered?.text;(0,m.useEffect)(()=>{t!==void 0&&n&&m4(t)&&pp.success(n)},[t,n])}function _4(){let e=xk(`prompts`),t=(0,m.useCallback)(async(e,t)=>{await be(`prompts.answer`,{id:e,answer:t})},[]),n=(0,m.useCallback)(async e=>{await be(`prompts.dismiss`,{id:e})},[]);return{prompts:e.data?.prompts??[],loading:e.loading,error:e.error,answer:t,dismiss:n}}function v4(e,t,n,r,i){e===`search`?(document.querySelector(`#main input[type='search']`)??document.getElementById(`composer-text`))?.focus():e===`help`?n():e===`settings`?bA(`#/settings`):e===`thinking`?_W(`lobby.thinking`):e===`sidebar`?i():e===`activity`?t.kind===`tab`&&t.tab===`lobby`?_W(bW):bA(yA(`lobby`)):e===`nextTab`?r(1):e===`prevTab`?r(-1):e===`savePlan`&&t.kind===`tab`&&t.tab===`plan`&&W(`planner.save`,{})}var y4=`toolbar-button inline-flex size-8 shrink-0 items-center justify-center rounded-lg border text-foreground transition-[background-color,border-color,scale] duration-150 ease-snap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] motion-reduce:active:scale-100`,b4=2500;function x4(e){let[t,n]=(0,m.useState)(!1),r=(0,m.useRef)(!1);return e===`live`&&(r.current=!0),(0,m.useEffect)(()=>{if(e!==`connecting`||!r.current)return n(!1);let t=setTimeout(()=>n(!0),b4);return()=>clearTimeout(t)},[e]),e===`offline`||e===`connecting`&&t}function S4({connection:e,onRetry:t}){return x4(e)?(0,U.jsx)(FA,{onRetry:t}):null}var C4={tick:0,route:0,focus:0};window.addEventListener(`hashchange`,()=>{C4.route=++C4.tick}),document.addEventListener(`focusin`,()=>{C4.focus=++C4.tick});var w4=()=>C4.focus>C4.route;function T4(e){return e.kind===`tab`?e.tab:e.kind}function E4(){let e=xA(),t=xk(`status`),n=xk(`lobby`),{prompts:r,answer:i,dismiss:a}=_4(),{connection:o,signedOut:s}=bk(),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=(0,m.useRef)(null),p=d4();sK();let h=t.data;g4(h);let g=!!h&&!s;(0,m.useEffect)(()=>{g&&Ie()},[g]);let _=h?.tabs??[],v=h?.keys??[],y=e.kind===`tab`?e.tab:void 0,b=(0,m.useCallback)(e=>bA(yA(e)),[]),x=(0,U.jsx)(p0,{tabs:_,activeId:y,onSelect:b}),S=Sk(`(max-width: 767.98px)`),C=(0,m.useCallback)(e=>{if(_.length===0)return;let t=Math.max(0,_.findIndex(e=>e.id===y)),n=_[(t+e+_.length)%_.length];n&&bA(yA(n.id))},[_,y]),w=(0,m.useCallback)(()=>l(e=>!e),[]),T=QQ(),[E,D]=(0,m.useState)(!1),O=(0,m.useCallback)(()=>{S&&D(e=>!e)},[S]),k=(0,m.useCallback)(t=>{(t!==`thinking`&&t!==`activity`||h?.panels?.[t]!==!1)&&v4(t,vA(window.location.hash)??e,w,C,O)},[e,w,C,O,h?.panels]),A=(0,m.useCallback)(()=>{let e=document.activeElement;return!e||e===document.body||f.current?.contains(e)===!0||e.closest(`.thinking-bubble`)?!0:e.closest(`[data-state='closed']`)!==null},[]);_Q({enabled:!!h,keys:v,tabs:_,insideApp:A,onAction:k,onTab:b});let j=(0,m.useCallback)(()=>L.onHello({}),[]),M=e.kind===`tab`?e.tab:e.kind,N=!!h;(0,m.useEffect)(()=>{if(!N)return;let e=$A.active&&$A.to===M;if($A.active=!1,$A.to=void 0,e)return;let t=requestAnimationFrame(()=>{if(w4()||document.querySelector(`[role='dialog']:not([data-state='closed'])`))return;let e=document.getElementById(`composer-text`),t=window.matchMedia(`(max-width: 767.98px)`).matches,n=window.matchMedia(`(pointer: coarse)`).matches;!t&&!n&&e&&!e.disabled&&!e.closest(`[inert]`)?e.focus({preventScroll:!0}):document.activeElement?.id!==`composer-text`&&document.getElementById(`main`)?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(t)},[M,N]);let P=Object.fromEntries(v.map(e=>[e.action,e.label])),F=!!h&&!s,I=h?.workspace.name??`bot-lobby`,ee=S?F?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(O$,{expanded:E,onOpen:()=>D(!0)}),(0,U.jsx)(r$,{look:`bar`,projects:T,tab:M,name:I,branch:h?.branch??h?.workspace.branch})]}):(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`project-mark`,children:I.charAt(0).toUpperCase()}),(0,U.jsx)(`span`,{className:`truncate`,children:I})]}):null,te=(0,U.jsx)(y$,{connection:o,projects:T,lead:ee,tabs:S?null:x,extra:u&&r.length>0?(0,U.jsx)(t4,{count:r.length,onOpen:()=>d(!1)}):null,tools:F?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(MQ,{className:y4,side:`bottom`}),(0,U.jsx)(jQ,{className:y4,side:`bottom`})]})});if(s||!h)return(0,U.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex flex-col`,children:[te,(0,U.jsx)(`main`,{className:`surface flex min-h-0 flex-1 flex-col overflow-y-auto`,children:s?(0,U.jsx)(A$,{}):t.error?(0,U.jsx)(PA,{message:t.error,onRetry:j}):(0,U.jsx)(NA,{})})]});let ne={route:e,keys:P,onHelp:w},re=o$(e);return(0,U.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex`,children:[S?null:(0,U.jsx)(E$,{...ne}),(0,U.jsxs)(`div`,{className:`relative flex min-w-0 flex-1 flex-col`,children:[te,(0,U.jsx)(S4,{connection:o,onRetry:p}),(0,U.jsx)(`main`,{id:`main`,tabIndex:-1,onKeyDown:e=>{e.key!==`Escape`||e.defaultPrevented||UA(e.target)||e.target.closest(`[role='dialog'], [role='menu'], [role='listbox']`)||QA()&&e.preventDefault()},role:y?`tabpanel`:void 0,"aria-labelledby":y?`tab-${y}`:void 0,className:`surface flex min-h-0 flex-1 flex-col overflow-y-auto outline-none`,children:(0,U.jsx)(Qf.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.18,ease:[.2,.8,.2,1]},className:`flex min-h-0 flex-1 flex-col`,children:iQ(e)},T4(e))}),S&&!re?(0,U.jsx)(`div`,{className:`shrink-0 px-2 pt-1.5 pb-[max(0.5rem,env(safe-area-inset-bottom))]`,children:x}):null,(0,U.jsx)(m$,{route:e,keys:P,projects:T,onHelp:w,dockNav:S&&re?x:null})]}),S?(0,U.jsx)(D$,{...ne,open:E,onOpenChange:D}):null,(0,U.jsx)(n2,{status:h,lobby:n.data}),(0,U.jsx)(n4,{prompts:r,answer:i,dismiss:a,minimized:u,onMinimize:d}),(0,U.jsx)(OQ,{open:c,onOpenChange:l,keys:v,tabs:_})]})}async function D4(e){switch(e){case`status`:return be(`status.get`,{});case`lobby`:return be(`lobby.snapshot`,{});case`prompts`:return be(`prompts.list`,{});default:return}}var O4=[`status`,`lobby`,`prompts`];function k4(){let[e,t]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let e=!0;return(async()=>{await Se(),e&&(L.markUsed(O4,D4),t(!0))})(),()=>{e=!1}},[]),e}function A4(){return k4()?(0,U.jsx)(E4,{}):(0,U.jsx)(`div`,{className:`fixed inset-0 flex`,children:(0,U.jsx)(NA,{})})}var j4={info:sh,success:hm,warning:Ug,error:Tm},M4={info:`Note:`,success:`Done:`,warning:`Warning:`,error:`Error:`},N4={info:`text-info`,success:`text-success`,warning:`text-warning`,error:`text-destructive`};function P4(){let{item:e,waiting:t}=hp(),n=fA(),r=e&&!n;return(0,m.useEffect)(()=>{if(!e||n)return;let r=window.setTimeout(()=>fp(e.id),t>0?Math.min(e.duration,1600):e.duration);return()=>window.clearTimeout(r)},[e,n,t]),(0,U.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`pointer-events-none fixed z-40 flex justify-center px-4`,style:{bottom:`calc(var(--composer-h, 0px) + 0.25rem)`,left:`var(--composer-x, 0px)`,width:`var(--composer-w, 100%)`},children:(0,U.jsx)(Nu,{mode:`wait`,children:r?(0,U.jsxs)(Qf.div,{initial:{opacity:0,scale:.55,y:18},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.92,y:6,transition:{duration:.14,ease:`easeIn`}},transition:{type:`spring`,stiffness:560,damping:15,mass:.8},className:`pointer-events-auto flex max-w-[min(32rem,100%)] items-center gap-2.5 glass-toast rounded-lg px-3.5 py-2.5 text-sm`,children:[(0,U.jsx)(F4,{kind:e.kind}),(0,U.jsxs)(`span`,{className:`min-w-0 break-words`,children:[(0,U.jsxs)(`span`,{className:`sr-only`,children:[M4[e.kind],` `]}),e.message]}),e.action?(0,U.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,className:`btn-outline -my-1.5 -mr-1 h-7 shrink-0 rounded-lg border px-2.5 text-xs font-medium text-foreground transition-[box-shadow,scale] active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,onClick:()=>{e.action?.onClick(),fp(e.id)},children:e.action.label}):null]},e.id):null})})}function F4({kind:e}){let t=j4[e];return(0,U.jsx)(t,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,N4[e])})}(0,ip.createRoot)(document.getElementById(`root`)).render((0,U.jsx)(m.StrictMode,{children:(0,U.jsx)($K,{children:(0,U.jsx)(Bu,{reducedMotion:`user`,children:(0,U.jsxs)(LA,{children:[(0,U.jsx)(A4,{}),(0,U.jsx)(P4,{})]})})})})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`,{updateViaCache:`none`}).catch(()=>void 0)});
|
|
114
|
+
`).trim()}function o2(e){let t=window.getSelection();if(!t||t.rangeCount===0||!t.isCollapsed)return!1;let n=document.createRange();return n.selectNodeContents(e),n.setEnd(t.getRangeAt(0).startContainer,t.getRangeAt(0).startOffset),n.toString().replace(i2,``)===``}function s2(e){let t=window.getSelection()?.anchorNode,n=t instanceof HTMLElement?t:t?.parentElement;return!!(n?.closest(`li`)&&e.contains(n))}function c2(e){return e.replace(/[&<>"]/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`})[e]??e)}function l2(e){if(e!==`code`){document.execCommand(e);return}let t=window.getSelection()?.toString()??``;document.execCommand(`insertHTML`,!1,t?`<code>${c2(t)}</code>`:`<code></code>`)}var u2=[{format:`bold`,label:`Bold`,keys:`Ctrl+B`,icon:qp},{format:`italic`,label:`Italic`,keys:`Ctrl+I`,icon:lh},{format:`code`,label:`Code`,keys:`Ctrl+E`,icon:Nm},{format:`insertUnorderedList`,label:`Bulleted list`,icon:Ch},{format:`insertOrderedList`,label:`Numbered list`,icon:xh}],d2=(0,m.forwardRef)(function({html:e,placeholder:t,label:n,landed:r,onChange:i,onFocusChange:a,onSubmit:o,onUp:s},c){let l=(0,m.useRef)(null),[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(!e),[h,g]=(0,m.useState)({});(0,m.useImperativeHandle)(c,()=>({element:l.current}),[]),(0,m.useEffect)(()=>{let t=l.current;t&&(e===``&&t.innerHTML!==``?(t.innerHTML=``,p(!0)):e&&t.innerHTML===``&&(t.innerHTML=e,p(!1)))},[e]);let _=(0,m.useCallback)(()=>{let e=l.current;if(!e)return;let t=a2(e);p(t===``&&!e.querySelector(`li`)),i(t,t?e.innerHTML:``)},[i]);(0,m.useEffect)(()=>{if(!u)return;let e=()=>g(Object.fromEntries(u2.filter(e=>e.format!==`code`).map(e=>[e.format,document.queryCommandState(e.format)])));return document.addEventListener(`selectionchange`,e),e(),()=>document.removeEventListener(`selectionchange`,e)},[u]);function v(e){l.current?.focus(),l2(e),_()}function y(e){let t=l.current;if(!t)return;let n=e.ctrlKey||e.metaKey;if(n&&!e.altKey&&[`b`,`i`,`e`].includes(e.key.toLowerCase())){e.preventDefault(),e.stopPropagation(),v(e.key.toLowerCase()===`b`?`bold`:e.key.toLowerCase()===`i`?`italic`:`code`);return}if(e.key===`Enter`&&!e.shiftKey&&!n&&!e.nativeEvent.isComposing){if(s2(t))return;e.preventDefault(),o();return}e.key===`ArrowUp`&&o2(t)&&(e.preventDefault(),s())}return(0,U.jsxs)(`div`,{"data-own":``,"data-open":u||!f||void 0,"data-landed":r||void 0,className:`q-own group/own relative flex w-full min-w-0 flex-col overflow-hidden border`,children:[(0,U.jsx)(`div`,{ref:l,role:`textbox`,"aria-multiline":`true`,"aria-label":n,"aria-placeholder":t,contentEditable:!0,suppressContentEditableWarning:!0,"data-nav":``,"data-empty":f||void 0,"data-placeholder":t,tabIndex:0,onInput:_,onKeyDown:y,onPaste:e=>{e.preventDefault(),document.execCommand(`insertText`,!1,e.clipboardData.getData(`text/plain`))},onFocus:()=>{d(!0),a(!0)},onBlur:()=>{d(!1),a(!1)},className:`q-own-text min-h-9 w-full min-w-0 px-4 py-2 text-sm break-words outline-none max-md:min-h-11 [&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:font-mono [&_code]:text-[0.8125rem] [&_ol]:list-decimal [&_ol]:ps-5 [&_ul]:list-disc [&_ul]:ps-5`}),(0,U.jsxs)(`div`,{role:`toolbar`,"aria-label":`Formatting`,"aria-hidden":!u,className:J(`q-own-bar flex items-center gap-0.5 px-2 pb-1.5`,!u&&`pointer-events-none`),children:[u2.map(({format:e,label:t,keys:n,icon:r})=>(0,U.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":t,"aria-pressed":h[e]??!1,title:n?`${t} · ${n}`:t,onMouseDown:e=>e.preventDefault(),onClick:()=>v(e),className:`inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground aria-pressed:bg-primary/12 aria-pressed:text-primary`,children:(0,U.jsx)(r,{"aria-hidden":`true`,className:`size-3.5`})},e)),(0,U.jsx)(`span`,{className:`ms-auto pe-1 text-2xs text-muted-foreground max-md:hidden`,children:`Enter answers · Shift+Enter new line`})]})]})});function f2(e){return e?e.options.some(VJ)?`xl`:e.question.length+e.options.reduce((e,t)=>e+t.label.length+(t.description?.length??0),0)>700||e.options.length>6?`lg`:`md`:`md`}var p2=/\s*\(recommended\)\s*$/i,m2=1200,h2=`Type something.`,g2=`(max-width: 767.98px)`,_2=`max-md:hidden`;function v2(e){return{text:e.replace(p2,``),recommended:p2.test(e)}}function y2({label:e}){let{text:t,recommended:n}=v2(e);return(0,U.jsxs)(`span`,{className:`leading-snug break-words`,children:[t,n?(0,U.jsx)(`span`,{className:`ms-1 font-medium text-primary`,children:`(Recommended)`}):null]})}function b2({multi:e,on:t}){return(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:J(`relative mt-0.5 flex size-4 shrink-0 items-center justify-center border`,e?`rounded-lg`:`rounded-full`,t?`border-primary bg-primary text-primary-foreground`:`border-input`),children:[t?(0,U.jsx)(tm,{className:J(e?`size-3`:`hidden`)}):null,t&&!e?(0,U.jsx)(`span`,{className:`size-2 rounded-full bg-primary-foreground`}):null]})}function x2({option:e,index:t,multi:n,name:r,selected:i,onToggle:a,onFocusOption:o}){return(0,U.jsxs)(`div`,{className:`grid gap-1`,children:[(0,U.jsxs)(`label`,{className:J(`flex min-h-9 cursor-pointer items-start gap-2.5 rounded-lg border px-3 py-2 text-start text-sm transition-[background-color,border-color,transform] duration-150 ease-snap active:scale-[0.99] max-md:min-h-11`,i?`border-primary/50 bg-accent`:`border-input bg-background hover:bg-accent/60`,`has-[:focus-visible]:border-ring has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/30`),children:[(0,U.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,"data-nav":``,"data-option":t,className:`sr-only`,checked:i,onChange:a,onFocus:o}),(0,U.jsx)(b2,{multi:n,on:i}),(0,U.jsx)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:(0,U.jsxs)(`span`,{className:`flex gap-1.5`,children:[(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,U.jsx)(y2,{label:e.label})]})})]}),e.description?(0,U.jsx)(uH,{text:e.description,className:`px-3 text-muted-foreground`}):null]})}function S2({option:e,onExpand:t}){let n=Sk(g2);return!e||!VJ(e)?null:(0,U.jsxs)(`div`,{className:`card-flat flex min-w-0 max-w-full flex-col gap-2 rounded-lg border p-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsxs)(`p`,{className:`min-w-0 truncate text-xs font-medium text-muted-foreground`,children:[`Preview · `,v2(e.label).text]}),(0,U.jsxs)(X,{type:`button`,variant:`ghost`,size:`xs`,onClick:t,"aria-keyshortcuts":`E`,title:n?`Expand mockup`:`Expand · E`,className:`-my-1 shrink-0 max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:[(0,U.jsx)(Dh,{"aria-hidden":`true`}),`Expand`]})]}),e.image?(0,U.jsx)(`img`,{src:R(e.image),alt:``,loading:`lazy`,className:`max-h-64 w-full rounded-lg border object-contain`}):null,e.htmlPreview?(0,U.jsx)(FJ,{preview:e.htmlPreview,label:v2(e.label).text,frameWidth:m2,onOpen:t,className:`h-auto aspect-[3/2]`}):null,e.preview?(0,U.jsx)(uH,{text:e.preview,className:`text-xs`}):null]})}function C2({option:e,index:t,multi:n,name:r,selected:i,active:a,onToggle:o,onFocusOption:s}){let{text:c,recommended:l}=v2(e.label),u=l?`${c} (Recommended)`:c;return(0,U.jsxs)(`label`,{"data-active":a||void 0,"data-picked":i||void 0,className:`q-dot group relative flex h-11 w-full shrink-0 cursor-pointer items-center justify-center outline-none`,children:[(0,U.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,"data-nav":``,"data-option":t,"aria-label":u,className:`sr-only`,checked:i,onChange:o,onFocus:s}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:J(`q-dot-mark relative z-10 flex size-5 items-center justify-center rounded-full text-[0.625rem] font-semibold tabular-nums transition-[background-color,color,scale] duration-200 ease-snap group-hover:scale-110`,l&&`q-dot-star`),children:t+1}),(0,U.jsxs)(`span`,{"aria-hidden":`true`,className:`q-dot-tag pointer-events-none absolute top-1/2 left-[calc(100%+0.5rem)] z-30 -translate-y-1/2 rounded-full px-2.5 py-1 text-xs font-medium whitespace-nowrap opacity-0 transition-[opacity,translate] duration-150 ease-snap group-hover:opacity-100 group-has-[:focus-visible]:opacity-100 group-data-[active]:!opacity-0`,children:[t+1,`. `,u]})]})}var w2={type:`spring`,visualDuration:.2,bounce:.12},T2={type:`spring`,visualDuration:.2,bounce:.04,delay:.06},E2={type:`spring`,visualDuration:.28,bounce:.55},D2={type:`spring`,visualDuration:.2,bounce:0},O2={type:`spring`,stiffness:900,damping:18,velocity:50,restDelta:.02,restSpeed:1},k2=-1;function A2(e,t,n,r,i,a){let o=(0,m.useRef)(null),s=(0,m.useRef)(null),c=(0,m.useRef)(null),l=(0,m.useRef)(null),u=(0,m.useRef)(void 0),d=(0,m.useRef)([]),f=(0,m.useRef)(a);f.current=a;let p=(0,m.useCallback)(t=>{if(t===k2){let t=n.current?.element,r=e.current;return t&&r?t.getBoundingClientRect().top-r.getBoundingClientRect().top+6:void 0}let r=e.current?.querySelectorAll(`.q-dot`)[t];return r?r.offsetTop+r.offsetHeight/2:void 0},[e,n]),h=(0,m.useCallback)(()=>{let t=o.current,n=e.current?.querySelectorAll(`.q-dot`);if(!t||!n||n.length===0)return;let r=n[0],i=n[n.length-1],a=r.offsetTop+r.offsetHeight/2;t.style.top=`${a}px`,t.style.height=`${Math.max(0,i.offsetTop+i.offsetHeight/2-a)}px`},[e]),g=(0,m.useCallback)((e,t=1,n=1)=>{let r=s.current,i=c.current;if(r&&i){if(e===void 0){r.style.opacity=`0`,i.style.opacity=`0`;return}r.style.opacity=String(Math.min(1,t*3)),r.style.transform=`translate(-50%, ${e}px) translateY(-50%) scale(${Math.max(0,t)})`,i.style.opacity=n>.02?`1`:`0`,i.style.transform=`translateY(${e}px) scaleX(${Math.max(0,Math.min(1,n))})`}},[]),_=(0,m.useRef)(i);return(0,m.useLayoutEffect)(()=>{_.current!==i&&(_.current=i,u.current=void 0),h();for(let e of d.current)e.stop();d.current=[],t.current&&(t.current.style.translate=``);let e=u.current;u.current=r;let n=p(r),a=e===void 0?void 0:p(e),o=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,s=l.current;if(s&&(s.style.opacity=`0`),n===void 0||a===void 0||e===r||o||!s){g(r===k2?void 0:n),r===k2&&e!==r&&e!==void 0&&f.current();return}let c=n>a?1:-1,m={head:0,tail:0},v=!1,y=(e,t,n,r)=>{let i=Zf(e,t,{...n,onUpdate:r});return d.current.push(i),i},b=()=>{let e=a+(n-a)*m.head,t=a+(n-a)*m.tail;s.style.opacity=Math.abs(e-t)>1?`1`:`0`,s.style.transform=`translateY(${Math.min(e,t)}px)`,s.style.height=`${Math.abs(e-t)}px`},x=()=>{if(v)return;if(v=!0,r===k2){g(void 0),f.current();return}let e={open:0,reach:0},i=()=>p(r)??n;y(0,1,E2,t=>{e.open=t,g(i(),e.open,e.reach)}),y(0,1,{...D2,delay:.05},t=>{e.reach=t,g(i(),e.open,e.reach)});let a=t.current;a&&y(0,0,{...O2,delay:.1},e=>{a.style.translate=Math.abs(e)>.01?`0 ${(c*e).toFixed(2)}px`:``})};return y(1,0,{type:`spring`,visualDuration:.12,bounce:0},t=>{v||g(e===k2?void 0:a,t,t)}),y(0,1,w2,e=>{m.head=e,b(),e>.85&&x()}),y(0,1,T2,e=>{m.tail=e,b()}),()=>{for(let e of d.current)e.stop()}},[r,i,p,t,g,h]),(0,m.useEffect)(()=>{let r=e.current;if(!r||typeof ResizeObserver>`u`)return;let i=0,a=()=>{i=0,h(),d.current.some(e=>e.state===`running`)||g(u.current===k2?void 0:p(u.current??0))},o=new ResizeObserver(()=>{i||=requestAnimationFrame(a)});o.observe(r),t.current&&o.observe(t.current);let s=n.current?.element;return s&&o.observe(s),()=>{cancelAnimationFrame(i),o.disconnect()}},[e,t,n,p,g,h]),{track:o,ring:s,line:c,drop:l}}function j2({option:e,position:t,count:n,chosen:r,onExpand:i,panel:a,dim:o}){if(!e)return null;let{text:s,recommended:c}=v2(e.label),l=VJ(e);return(0,U.jsx)(`div`,{ref:a,"data-dim":o||void 0,"data-chosen":r||void 0,className:`q-panel min-w-0 rounded-2xl p-4 transition-opacity duration-300 data-[dim]:opacity-55 max-md:p-3`,children:(0,U.jsxs)(`div`,{"aria-live":`polite`,className:J(`q-panel-body grid min-w-0 gap-4`,l?`md:grid-cols-[minmax(0,1fr)_minmax(0,1.25fr)]`:``),children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2.5 py-0.5`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`q-panel-number mt-px flex size-6 shrink-0 items-center justify-center rounded-md text-xs font-semibold tabular-nums`,children:t+1}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,U.jsxs)(`p`,{className:`text-2xs font-medium tracking-wide text-muted-foreground uppercase`,children:[`Option `,t+1,` of `,n]}),(0,U.jsxs)(`p`,{className:`text-base font-semibold break-words`,children:[s,c?(0,U.jsx)(`span`,{className:`q-recommended ms-2 inline-flex translate-y-[-1px] items-center rounded-md px-1.5 py-0.5 align-middle text-2xs font-medium`,children:`Recommended`}):null]})]}),r?(0,U.jsxs)(`span`,{className:`q-chosen inline-flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium`,children:[(0,U.jsx)(tm,{"aria-hidden":`true`,className:`size-3.5`}),`Chosen`]}):null]}),e.description?(0,U.jsx)(uH,{text:e.description,className:`q-panel-text min-w-0 text-sm leading-relaxed`}):(0,U.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No further detail.`})]}),l?(0,U.jsx)(S2,{option:e,onExpand:i}):null]},t)})}function M2({primary:e,primaryLabel:t,disabled:n,submitting:r,onCancel:i,intent:a}){return(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(X,{type:`button`,variant:`ghost`,onClick:i,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Cancel`}),a?(0,U.jsx)(`p`,{role:`status`,"aria-live":`polite`,"data-empty":a.empty||void 0,className:`q-intent flex min-w-0 flex-1 items-center justify-end gap-1.5 text-sm max-md:order-first max-md:basis-full max-md:justify-start`,children:(0,U.jsxs)(`span`,{className:`q-intent-text flex min-w-0 items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:a.lead}),a.empty?null:(0,U.jsx)(`span`,{className:`truncate font-medium`,children:a.text})]},`${a.lead}${a.text}`)}):null,(0,U.jsx)(X,{type:e,disabled:n||r,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:r?`Sending…`:t})]})}function N2(e){if(!e?.answer)return{lead:`Nothing chosen yet`,text:``,empty:!0};if(e.kind===`custom`){let t=e.answer.replace(/[*_`#>]/g,``).replace(/\s+/g,` `).trim();return{lead:`You answer:`,text:`“${t.length>80?`${t.slice(0,79)}…`:t}”`}}return{lead:`You choose:`,text:(e.selected??[e.answer]).map(e=>v2(e).text).join(`, `)}}function P2(e,t,n,r){let i=e[r];if(!i)return;let a=n[r]?.trim();if(a)return{questionIndex:r,question:i.question,kind:`custom`,answer:a};let o=(t[r]??[]).map(e=>i.options[e]?.label).filter(e=>!!e);if(o.length!==0)return i.multiSelect?{questionIndex:r,question:i.question,kind:`multi`,answer:o.join(`, `),selected:o}:{questionIndex:r,question:i.question,kind:`option`,answer:o[0]??null}}function F2({questions:e,picks:t,own:n,index:r,onGo:i}){return e.length===1?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e[0]?.header}):(0,U.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:e.map((e,a)=>{let o=!!n[a]?.trim()||(t[a]?.length??0)>0;return(0,U.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-description":`When focused, press Enter or Space to open this question.`,type:`button`,onClick:()=>i(a),"aria-current":a===r,className:J(`inline-flex min-h-8 min-w-0 items-center gap-1 rounded-lg border px-3 text-xs font-medium transition-colors max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,a===r?`border-primary bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[(0,U.jsxs)(`span`,{className:`min-w-0 break-words text-start`,children:[a+1,` `,e.header]}),o?(0,U.jsx)(tm,{className:`size-3 shrink-0`,"aria-hidden":`true`}):null]},a)})})}function I2({questions:e,submitting:t,onAnswer:n,onCancel:r,expanded:i,onExpand:a,onSize:o}){let[s,c]=(0,m.useState)(0),[l,u]=(0,m.useState)(!1),d=i??l,f=e=>a?a(e):u(e),[p,h]=(0,m.useState)(0),g=(0,m.useRef)(0),_=(0,m.useRef)(!1),[v,y]=(0,m.useState)({}),[b,x]=(0,m.useState)({}),[S,C]=(0,m.useState)({}),[w,T]=(0,m.useState)(!1),[E,D]=(0,m.useState)(!1),O=(0,m.useRef)(null),[k,A]=(0,m.useState)({}),j=(0,m.useRef)(null),M=(0,m.useRef)(null),N=(0,m.useRef)(null),P=e[s],F=v[s]??[],I=b[s]??``,ee=P?.options[k[s]??F[0]??0],te=P2(e,v,b,s),ne=P?.multiSelect===!0,re=Math.max(0,P?.options.indexOf(ee)??0),ie=w||I.trim()!==``,ae=ie?k2:re,oe=A2(M,N,O,ae,`${s}:${d}`,()=>D(!0));if((0,m.useEffect)(()=>{if(!E)return;let e=window.setTimeout(()=>D(!1),700);return()=>window.clearTimeout(e)},[E]),(0,m.useEffect)(()=>o?.(f2(P)),[P,o]),(0,m.useEffect)(()=>{let e=j.current;e&&(e.querySelector(`[data-option="${v[s]?.[0]??0}"]`)??e.querySelector(`[data-nav]`))?.focus()},[s]),(0,m.useEffect)(()=>{let e=_.current&&!d;_.current=d,e&&(A(e=>({...e,[s]:g.current})),j.current?.querySelector(`[data-option="${g.current}"]`)?.focus())},[d]),!P)return null;let se=P.options.some(VJ);function L(e){h(Math.max(0,e)),g.current=Math.max(0,e),f(!0)}function ce(e){g.current=e,f(!1)}if(d&&se)return(0,U.jsx)(UJ,{options:P.options,start:p,title:P.header||P.question,picked:F,multi:ne,onChoose:e=>{le(e),ne||ce(e)},onClose:ce,onIndex:e=>{g.current=e}},s);function le(e){let t=ne?F.includes(e)?F.filter(t=>t!==e):[...F,e]:[e];y({...v,[s]:t}),ne||(x({...b,[s]:``}),C({...S,[s]:``})),A({...k,[s]:e})}function ue(e){let t=e instanceof HTMLInputElement&&e.dataset.option!==void 0?Number(e.dataset.option):-1;t>=0&&!ne&&le(t)}function R(t,r){if(P2(e,t,r,s)){if(s<e.length-1){c(s+1);return}n({answers:e.map((n,i)=>P2(e,t,r,i)).filter(e=>!!e),cancelled:!1})}}function z(e){e.preventDefault(),t||R(v,b)}function de(t){t>=0&&t<e.length&&c(t)}function fe(e){let n=e.target,r=j.current;if(!r||e.altKey)return;if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)){e.preventDefault(),t||R(v,b);return}if(UA(n))return;let i=WA(e.key);if(i||e.key===`Home`||e.key===`End`){e.preventDefault(),HA(r,n,i||(e.key===`Home`?`first`:`last`)),ue(document.activeElement);return}let a=GA(e.key);if(a&&!(n instanceof HTMLButtonElement)){e.preventDefault(),de(s+a);return}let o=n instanceof HTMLInputElement&&n.dataset.option!==void 0?Number(n.dataset.option):-1;if(e.key===`Enter`&&o>=0){if(e.preventDefault(),ne)F.length>0&&F.includes(o)?R(v,b):le(o);else{let e={...v,[s]:[o]},t={...b,[s]:``};y(e),x(t),C({...S,[s]:``}),R(e,t)}return}if(e.key===` `&&o>=0){e.preventDefault(),le(o);return}let c=Number(e.key);if(Number.isInteger(c)&&c>=1&&c<=P.options.length){e.preventDefault(),le(c-1),r.querySelector(`[data-option="${c-1}"]`)?.focus();return}e.key.toLowerCase()===`e`&&se&&!e.ctrlKey&&!e.metaKey&&(e.preventDefault(),L(o>=0?o:k[s]??F[0]??0))}return(0,U.jsxs)(`form`,{ref:j,className:`flex min-w-0 flex-col gap-3`,onSubmit:z,onKeyDown:fe,children:[(0,U.jsx)(F2,{questions:e,picks:v,own:b,index:s,onGo:c}),(0,U.jsxs)(`div`,{className:`text-center`,children:[(0,U.jsx)(`p`,{className:`text-2xs font-medium tracking-wide text-muted-foreground uppercase`,children:e.length>1?`Question ${s+1} of ${e.length}`:`Question`}),(0,U.jsx)(uH,{text:P.question,className:`mt-1 text-base font-medium`})]}),(0,U.jsxs)(`div`,{className:`relative grid min-w-0 grid-cols-[2.25rem_minmax(0,1fr)] gap-x-3`,children:[(0,U.jsxs)(`div`,{ref:M,role:ne?`group`:`radiogroup`,"aria-label":`Options`,className:`q-rail relative flex min-w-0 flex-col justify-evenly py-2`,children:[(0,U.jsx)(`span`,{ref:oe.track,"aria-hidden":`true`,className:`q-rail-line pointer-events-none absolute top-0 left-1/2 h-0 -translate-x-1/2`}),(0,U.jsx)(`span`,{ref:oe.drop,"aria-hidden":`true`,className:`q-drop pointer-events-none absolute top-0 left-1/2 w-[3px] -translate-x-1/2 rounded-full opacity-0`}),(0,U.jsx)(`span`,{ref:oe.ring,"aria-hidden":`true`,className:`q-ring pointer-events-none absolute top-0 left-1/2 z-20 size-7 rounded-full opacity-0`}),(0,U.jsx)(`span`,{ref:oe.line,"aria-hidden":`true`,className:`q-line pointer-events-none absolute top-0 left-[calc(50%+0.875rem)] z-10 h-px w-[calc(50%-0.875rem+0.75rem)] origin-left opacity-0`}),P.options.map((e,t)=>(0,U.jsx)(C2,{option:e,index:t,multi:ne,name:`question-${s}`,selected:F.includes(t),active:ae===t,onToggle:()=>le(t),onFocusOption:()=>A({...k,[s]:t})},t))]}),(0,U.jsx)(j2,{panel:N,option:ee,position:re,count:P.options.length,chosen:!ie&&F.includes(re),dim:ie,onExpand:()=>L(re)})]}),(0,U.jsx)(`div`,{className:`q-own-wrap mx-auto w-full`,children:(0,U.jsx)(d2,{ref:O,html:S[s]??``,placeholder:`Type something else…`,label:`Your own answer`,landed:E,onChange:(e,t)=>{x(t=>({...t,[s]:e})),C(e=>({...e,[s]:t})),e&&y(e=>({...e,[s]:[]}))},onFocusChange:T,onSubmit:()=>{t||R(v,b)},onUp:()=>{let e=j.current;e&&HA(e,O.current?.element??null,-1)}},s)}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:ne?`Pick several`:`Pick one`}),(0,U.jsx)(vk,{chord:`↑↓`,className:_2,children:`move`}),(0,U.jsx)(vk,{chord:ne?`Space`:`Enter`,className:_2,children:ne?`pick`:`choose`}),ne?(0,U.jsx)(vk,{chord:`Enter`,className:_2,children:`next`}):null,e.length>1?(0,U.jsx)(vk,{chord:`←→`,className:_2,children:`question`}):null,se?(0,U.jsx)(vk,{chord:`E`,className:_2,children:`expand mockups`}):null,(0,U.jsx)(vk,{chord:`Esc`,className:_2,children:`later`})]}),(0,U.jsx)(M2,{primary:`submit`,primaryLabel:s<e.length-1?`Next`:`Answer`,disabled:!te,submitting:t,onCancel:r,intent:N2(te)})]})}function L2(e,t,n){let r=e.currentTarget,i=e.target;if(e.altKey||UA(i))return;let a=WA(e.key);if(a){e.preventDefault(),HA(r,i,a);return}let o=i instanceof HTMLInputElement&&i.dataset.option!==void 0?Number(i.dataset.option):-1;if((e.key===`Enter`||e.key===` `)&&o>=0){e.preventDefault(),n(o,e.key===`Enter`);return}let s=Number(e.key);Number.isInteger(s)&&s>=1&&s<=t&&(e.preventDefault(),n(s-1,!1),r.querySelector(`[data-option="${s-1}"]`)?.focus())}function R2({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``),o=(0,m.useRef)(null);return(0,m.useEffect)(()=>{o.current?.querySelector(`[data-nav]`)?.focus()},[]),(0,U.jsxs)(`form`,{ref:o,className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i&&n(i)},onKeyDown:r=>L2(r,e.options.length,(r,i)=>{let o=e.options[r];o!==void 0&&(a(o),i&&!t&&n(o))}),children:[(0,U.jsx)(uH,{text:e.title,className:`text-base`}),(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.options.map((e,t)=>(0,U.jsx)(x2,{option:{label:e},index:t,multi:!1,name:`choice`,selected:i===e,onToggle:()=>a(e)},e))}),(0,U.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`↑↓`,className:_2,children:`move`}),(0,U.jsx)(vk,{chord:`Enter`,className:_2,children:`choose`}),(0,U.jsx)(vk,{chord:`Esc`,className:_2,children:`later`})]}),(0,U.jsx)(M2,{primary:`submit`,primaryLabel:`Choose`,disabled:!i,submitting:t,onCancel:r})]})}function z2({view:e,submitting:t,onAnswer:n}){let r=(0,m.useRef)(null);(0,m.useEffect)(()=>r.current?.focus(),[]);function i(e){if(e.altKey||e.ctrlKey||e.metaKey||t)return;let r=e.key.toLowerCase();r===`y`?n(!0):r===`n`&&n(!1)}return(0,U.jsxs)(`div`,{ref:r,tabIndex:-1,"data-autofocus":``,onKeyDown:i,className:`flex min-w-0 flex-col gap-3 outline-none`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(uH,{text:e.question,className:`text-base`}),e.detail?(0,U.jsx)(uH,{text:e.detail,className:`mt-1 text-muted-foreground`}):null]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`Y`,className:_2,children:`yes`}),(0,U.jsx)(vk,{chord:`N`,className:_2,children:`no`}),(0,U.jsx)(vk,{chord:`Esc`,className:_2,children:`later`})]}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n(!1),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`No`}),(0,U.jsx)(X,{type:`button`,disabled:t,onClick:()=>n(!0),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Yes`})]})]})]})}function B2({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``);return(0,U.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i.trim()&&n(i.trim())},children:[(0,U.jsx)(uH,{text:e.question,className:`text-base`}),(0,U.jsx)(Dj,{autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},value:i,onChange:e=>a(e.target.value),placeholder:e.placeholder??h2,"aria-label":e.question,rows:3,className:`min-h-9 resize-none text-sm md:text-sm max-md:min-h-11`}),(0,U.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,U.jsx)(vk,{chord:`Enter`,className:_2,children:`answer`}),(0,U.jsx)(vk,{chord:`Shift+Enter`,className:_2,children:`new line`}),(0,U.jsx)(vk,{chord:`Esc`,className:_2,children:`later`})]}),(0,U.jsx)(M2,{primary:`submit`,primaryLabel:`Answer`,disabled:!i.trim(),submitting:t,onCancel:r})]})}function V2({dialog:e,submitting:t,onAnswer:n}){let[r,i]=(0,m.useState)(e.method===`editor`?e.prefill??``:``),[a,o]=(0,m.useState)(``),s=e.options??[],c=e.method===`select`?a!==``:r.trim()!==``,l=(0,m.useRef)(null);(0,m.useEffect)(()=>{l.current?.querySelector(`[data-nav], textarea`)?.focus()},[]);function u(t){t.preventDefault(),e.method===`select`?n({value:a}):e.method===`confirm`?n({confirmed:!0}):(e.method===`input`||e.method===`editor`)&&n({value:r.trim()})}return(0,U.jsxs)(`form`,{ref:l,className:`flex min-w-0 flex-col gap-3`,onSubmit:u,onKeyDown:r=>{e.method===`select`&&L2(r,s.length,(e,r)=>{let i=s[e];i!==void 0&&(o(i),r&&!t&&n({value:i}))})},children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.title}),e.message?(0,U.jsx)(uH,{text:e.message,className:`mt-1 text-base`}):null]}),e.method===`select`?(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>(0,U.jsx)(x2,{option:{label:e},index:t,multi:!1,name:`dialog`,selected:a===e,onToggle:()=>o(e)},e))}):null,e.method===`input`||e.method===`editor`?(0,U.jsx)(Dj,{value:r,onChange:e=>i(e.target.value),placeholder:e.placeholder??h2,"aria-label":e.title,rows:e.method===`editor`?4:2,className:`min-h-9 resize-none text-sm md:text-sm max-md:min-h-11`}):null,(0,U.jsxs)(`div`,{className:`flex items-center justify-end gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({cancelled:!0}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Cancel`}),e.method===`confirm`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({confirmed:!1}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`No`}),(0,U.jsx)(X,{type:`button`,disabled:t,onClick:()=>n({confirmed:!0}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Yes`})]}):(0,U.jsx)(X,{type:`submit`,disabled:!c||t,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Answer`})]})]})}function H2(e){let{view:t}=e;return t.kind===`questionnaire`?(0,U.jsx)(I2,{questions:t.questions,submitting:e.submitting,onAnswer:e.onAnswer,onCancel:e.onCancel,onSize:e.onSize,...e.onExpand?{expanded:e.expanded??!1,onExpand:e.onExpand}:{}}):t.kind===`choose`?(0,U.jsx)(R2,{...e,view:t}):t.kind===`confirm`?(0,U.jsx)(z2,{...e,view:t}):t.kind===`text`?(0,U.jsx)(B2,{...e,view:t}):(0,U.jsx)(V2,{...e,dialog:t.dialog})}function U2(e){return typeof e==`object`&&e?e:{}}function W2(e){return typeof e==`string`?e.trim():``}function G2(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function K2(e){let t=U2(e),n=W2(t.label);if(!n)return;let r=W2(t.description),i=W2(t.preview),a=W2(t.image),o=AJ(t.htmlPreview);return{label:n,...r?{description:r}:{},...i?{preview:i}:{},...a?{image:a}:{},...o?{htmlPreview:o}:{}}}function q2(e){let t=U2(e),n=W2(t.question);if(!n)return;let r=(Array.isArray(t.options)?t.options:[]).map(K2).filter(e=>!!e);return{question:n,header:W2(t.header)||`Question`,options:r,...t.multiSelect===!0?{multiSelect:!0}:{}}}function J2(e){let t=U2(e),n=W2(t.method);if(n!==`select`&&n!==`confirm`&&n!==`input`&&n!==`editor`)return;let r=W2(t.message),i=G2(t.options),a=W2(t.placeholder),o=W2(t.prefill);return{id:W2(t.id),method:n,title:W2(t.title)||`Answer`,...r?{message:r}:{},...i.length>0?{options:i}:{},...a?{placeholder:a}:{},...o?{prefill:o}:{}}}function Y2(e){let t=(Array.isArray(e.questions)?e.questions:[]).map(q2).filter(e=>!!e);return t.length>0?{kind:`questionnaire`,questions:t}:void 0}function X2(e){return{kind:`choose`,title:W2(e.title)||`Choose an option`,options:G2(e.options)}}function Z2(e){let t=W2(e.question)||W2(e.title)||`Continue?`,n=W2(e.detail)||W2(e.message);return{kind:`confirm`,question:t,...n?{detail:n}:{}}}function Q2(e){let t=W2(e.question)||W2(e.title)||`Type an answer`,n=W2(e.placeholder);return{kind:`text`,question:t,...n?{placeholder:n}:{}}}function $2(e){let t=U2(e.payload);if(e.kind===`questionnaire`)return Y2(t);if(e.kind===`choose`)return X2(t);if(e.kind===`confirm`)return Z2(t);if(e.kind===`text`)return Q2(t);let n=J2(t.dialog);return n?{kind:`sessionDialog`,dialog:n}:void 0}var e4=`(max-width: 767.98px)`,t4={md:`max-w-3xl`,lg:`max-w-4xl max-h-[min(88svh,52rem)]`,xl:`max-w-5xl max-h-[min(90svh,58rem)]`};function n4({submitting:e,onKeep:t,onLeave:n}){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,role:`alert`,children:[(0,U.jsx)(`p`,{className:`text-sm`,children:`Leave without answering? The oracle will not guess for you.`}),(0,U.jsxs)(`div`,{className:`flex items-center justify-end gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(X,{type:`button`,variant:`outline`,onClick:t,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Keep answering`}),(0,U.jsx)(X,{type:`button`,disabled:e,onClick:n,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:e?`Leaving…`:`Leave`})]})]})}function r4({count:e,onOpen:t}){return(0,U.jsxs)(X,{type:`button`,variant:`soft`,onClick:t,"aria-label":`${e} question${e===1?``:`s`} waiting — open`,className:`gap-1.5 text-warning max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:[(0,U.jsx)(ym,{"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`tabular-nums`,children:e}),(0,U.jsx)(`span`,{className:`hidden md:inline`,children:`waiting`})]})}function i4({prompts:e,answer:t,dismiss:n,minimized:r,onMinimize:i}){let[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(!1),[l,u]=(0,m.useState)(!1),d=(0,m.useRef)(null),[f,p]=(0,m.useState)(`md`),h=Sk(e4),{keyboardOpen:g,keyboardInset:_}=eA(),v=e.length,y=e[0],b=y?$2(y):void 0,x=v>0&&!r,S=uA(x,lA.question);(0,m.useEffect)(()=>{v===0&&(o(!1),i(!1))},[v,i]);let C=y?.id;(0,m.useEffect)(()=>u(!1),[C]);async function w(e,t){c(!0);try{await e,o(!1)}catch(e){e instanceof ve&&e.code===`question_withdrawn`?pp(mA):pp.error(e instanceof Error?e.message:t)}finally{c(!1)}}let T=y?.from?`${y.from} asks`:`A question`;return(0,U.jsx)(nA,{open:x&&S&&!!y,label:`Question from the lobby`,dismissOnBackdrop:!1,onOpenChange:e=>{e||(l?u(!1):a?o(!1):i(!0))},style:h&&g?{maxHeight:`calc(100vh - ${_}px - 1.5rem)`}:void 0,className:J(`transition-[max-width] duration-300 ease-snap`,l?`h-[min(92svh,60rem)] max-h-[min(92svh,60rem)] max-w-7xl`:t4[b?.kind===`questionnaire`?f:`md`],`max-md:w-[calc(100vw-2rem)] max-md:max-w-[calc(100vw-2rem)] max-md:max-h-[calc(100svh-1.5rem)]`,l&&`max-md:h-[calc(100svh-1.5rem)]`),children:y?(0,U.jsxs)(`section`,{"aria-label":`Question from the lobby`,className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,U.jsxs)(`header`,{className:J(`flex items-center gap-3 px-4 pt-4 pb-2 max-md:px-3 max-md:pt-3`,l&&`hidden`),children:[(0,U.jsxs)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-muted-foreground first-letter:uppercase`,children:[T,v>1?` · 1 of ${v}`:``]}),(0,U.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Later: put the question away`,title:h?`Later`:`Later · Esc`,onClick:()=>i(!0),className:`max-md:size-11`,children:(0,U.jsx)(r_,{"aria-hidden":`true`})})]}),(0,U.jsx)(`div`,{ref:d,className:l?`flex min-h-0 min-w-0 flex-1 flex-col`:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-4 max-md:px-3 max-md:pb-3`,children:b?a?(0,U.jsx)(n4,{submitting:s,onKeep:()=>o(!1),onLeave:()=>void w(n(y.id),`Could not leave the question`)}):(0,U.jsx)(H2,{view:b,submitting:s,onAnswer:e=>void w(t(y.id,e),`Could not send the answer`),onCancel:()=>o(!0),expanded:l,onExpand:u,onSize:p},y.id):(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3 max-md:flex-wrap max-md:justify-start`,children:[(0,U.jsx)(`p`,{className:`max-md:min-w-0 max-md:flex-1 text-sm text-muted-foreground`,children:`This question cannot be shown here.`}),(0,U.jsx)(X,{type:`button`,disabled:s,onClick:()=>void w(n(y.id),`Could not dismiss the question`),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Dismiss`})]})}),l?null:(0,U.jsx)(zv,{target:d})]}):null})}var a4=2;function o4(e){let t=globalThis.EventSource;if(!t)throw Error(`EventSource is not available in this environment`);return new t(e)}function s4(e){try{return JSON.parse(e)}catch{return}}function c4(e,t){switch(e.type){case`hello`:t.onHello?.(e.versions);return;case`changed`:t.onChanged?.(e.topic,e.version);return;case`feed`:t.onFeed?.({activity:e.activity,thoughts:e.thoughts,chat:e.chat});return;case`reply`:t.onReply?.(e.text);return;case`notice`:t.onNotice?.(e.text,e.level)}}function l4(e,t=o4){let n=t(R(`/api/events`));return e.onConnection?.(`connecting`),n.onopen=()=>e.onConnection?.(`live`),n.onerror=()=>e.onConnection?.(n.readyState===a4?`offline`:`connecting`),n.onmessage=t=>{let n=s4(t.data);n&&c4(n,e)},()=>n.close()}var u4=2e3,d4=()=>be(`projects.list`,{});async function f4(){let e;try{e=ue()}catch{return}if(e&&!ge(e))try{he((await d4()).projects)}catch{}}function p4(){let e=(0,m.useRef)(void 0),t=(0,m.useRef)(void 0),n=(0,m.useCallback)(()=>{clearTimeout(t.current),e.current?.();try{ue()}catch{L.onStatus({connection:`offline`});return}e.current=l4({onHello:e=>{L.onHello(e),f4()},onChanged:(e,t)=>L.onChanged(e,t),onFeed:e=>L.onFeedDelta(e),onReply:e=>L.onReplyDelta(e),onNotice:(e,t)=>pp[t](e),onConnection:e=>{L.onStatus({connection:e}),e===`offline`&&(clearTimeout(t.current),t.current=setTimeout(()=>{_e(d4).catch(()=>!1).finally(n)},u4))}})},[]);return(0,m.useEffect)(()=>(n(),()=>{clearTimeout(t.current),e.current?.()}),[n]),n}var m4=`bot-lobby.recoveredAt`,h4;function g4(e,t=_4()){try{h4===void 0&&(h4=Number(t?.getItem(m4)??0))}catch{h4??=0}if(h4!==void 0&&e<=h4)return!1;h4=e;try{t?.setItem(m4,String(e))}catch{}return!0}function _4(){try{return globalThis.sessionStorage}catch{return}}function v4(e){let t=e?.recovered?.at,n=e?.recovered?.text;(0,m.useEffect)(()=>{t!==void 0&&n&&g4(t)&&pp.success(n)},[t,n])}function y4(){let e=xk(`prompts`),t=(0,m.useCallback)(async(e,t)=>{await be(`prompts.answer`,{id:e,answer:t})},[]),n=(0,m.useCallback)(async e=>{await be(`prompts.dismiss`,{id:e})},[]);return{prompts:e.data?.prompts??[],loading:e.loading,error:e.error,answer:t,dismiss:n}}function b4(e,t,n,r,i){e===`search`?(document.querySelector(`#main input[type='search']`)??document.getElementById(`composer-text`))?.focus():e===`help`?n():e===`settings`?bA(`#/settings`):e===`thinking`?_W(`lobby.thinking`):e===`sidebar`?i():e===`activity`?t.kind===`tab`&&t.tab===`lobby`?_W(bW):bA(yA(`lobby`)):e===`nextTab`?r(1):e===`prevTab`?r(-1):e===`savePlan`&&t.kind===`tab`&&t.tab===`plan`&&W(`planner.save`,{})}var x4=`toolbar-button inline-flex size-8 shrink-0 items-center justify-center rounded-lg border text-foreground transition-[background-color,border-color,scale] duration-150 ease-snap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] motion-reduce:active:scale-100`,S4=2500;function C4(e){let[t,n]=(0,m.useState)(!1),r=(0,m.useRef)(!1);return e===`live`&&(r.current=!0),(0,m.useEffect)(()=>{if(e!==`connecting`||!r.current)return n(!1);let t=setTimeout(()=>n(!0),S4);return()=>clearTimeout(t)},[e]),e===`offline`||e===`connecting`&&t}function w4({connection:e,onRetry:t}){return C4(e)?(0,U.jsx)(FA,{onRetry:t}):null}var T4={tick:0,route:0,focus:0};window.addEventListener(`hashchange`,()=>{T4.route=++T4.tick}),document.addEventListener(`focusin`,()=>{T4.focus=++T4.tick});var E4=()=>T4.focus>T4.route;function D4(e){return e.kind===`tab`?e.tab:e.kind}function O4(){let e=xA(),t=xk(`status`),n=xk(`lobby`),{prompts:r,answer:i,dismiss:a}=y4(),{connection:o,signedOut:s}=bk(),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=(0,m.useRef)(null),p=p4();sK();let h=t.data;v4(h);let g=!!h&&!s;(0,m.useEffect)(()=>{g&&Ie()},[g]);let _=h?.tabs??[],v=h?.keys??[],y=e.kind===`tab`?e.tab:void 0,b=(0,m.useCallback)(e=>bA(yA(e)),[]),x=(0,U.jsx)(m0,{tabs:_,activeId:y,onSelect:b}),S=Sk(`(max-width: 767.98px)`),C=(0,m.useCallback)(e=>{if(_.length===0)return;let t=Math.max(0,_.findIndex(e=>e.id===y)),n=_[(t+e+_.length)%_.length];n&&bA(yA(n.id))},[_,y]),w=(0,m.useCallback)(()=>l(e=>!e),[]),T=$Q(),[E,D]=(0,m.useState)(!1),O=(0,m.useCallback)(()=>{S&&D(e=>!e)},[S]),k=(0,m.useCallback)(t=>{(t!==`thinking`&&t!==`activity`||h?.panels?.[t]!==!1)&&b4(t,vA(window.location.hash)??e,w,C,O)},[e,w,C,O,h?.panels]),A=(0,m.useCallback)(()=>{let e=document.activeElement;return!e||e===document.body||f.current?.contains(e)===!0||e.closest(`.thinking-bubble`)?!0:e.closest(`[data-state='closed']`)!==null},[]);vQ({enabled:!!h,keys:v,tabs:_,insideApp:A,onAction:k,onTab:b});let j=(0,m.useCallback)(()=>L.onHello({}),[]),M=e.kind===`tab`?e.tab:e.kind,N=!!h;(0,m.useEffect)(()=>{if(!N)return;let e=$A.active&&$A.to===M;if($A.active=!1,$A.to=void 0,e)return;let t=requestAnimationFrame(()=>{if(E4()||document.querySelector(`[role='dialog']:not([data-state='closed'])`))return;let e=document.getElementById(`composer-text`),t=window.matchMedia(`(max-width: 767.98px)`).matches,n=window.matchMedia(`(pointer: coarse)`).matches;!t&&!n&&e&&!e.disabled&&!e.closest(`[inert]`)?e.focus({preventScroll:!0}):document.activeElement?.id!==`composer-text`&&document.getElementById(`main`)?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(t)},[M,N]);let P=Object.fromEntries(v.map(e=>[e.action,e.label])),F=!!h&&!s,I=h?.workspace.name??`bot-lobby`,ee=S?F?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(k$,{expanded:E,onOpen:()=>D(!0)}),(0,U.jsx)(i$,{look:`bar`,projects:T,tab:M,name:I,branch:h?.branch??h?.workspace.branch})]}):(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`project-mark`,children:I.charAt(0).toUpperCase()}),(0,U.jsx)(`span`,{className:`truncate`,children:I})]}):null,te=(0,U.jsx)(b$,{connection:o,projects:T,lead:ee,tabs:S?null:x,extra:u&&r.length>0?(0,U.jsx)(r4,{count:r.length,onOpen:()=>d(!1)}):null,tools:F?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(NQ,{className:x4,side:`bottom`}),(0,U.jsx)(MQ,{className:x4,side:`bottom`})]})});if(s||!h)return(0,U.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex flex-col`,children:[te,(0,U.jsx)(`main`,{className:`surface flex min-h-0 flex-1 flex-col overflow-y-auto`,children:s?(0,U.jsx)(j$,{}):t.error?(0,U.jsx)(PA,{message:t.error,onRetry:j}):(0,U.jsx)(NA,{})})]});let ne={route:e,keys:P,onHelp:w},re=s$(e);return(0,U.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex`,children:[S?null:(0,U.jsx)(D$,{...ne}),(0,U.jsxs)(`div`,{className:`relative flex min-w-0 flex-1 flex-col`,children:[te,(0,U.jsx)(w4,{connection:o,onRetry:p}),(0,U.jsx)(`main`,{id:`main`,tabIndex:-1,onKeyDown:e=>{e.key!==`Escape`||e.defaultPrevented||UA(e.target)||e.target.closest(`[role='dialog'], [role='menu'], [role='listbox']`)||QA()&&e.preventDefault()},role:y?`tabpanel`:void 0,"aria-labelledby":y?`tab-${y}`:void 0,className:`surface flex min-h-0 flex-1 flex-col overflow-y-auto outline-none`,children:(0,U.jsx)(Qf.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.18,ease:[.2,.8,.2,1]},className:`flex min-h-0 flex-1 flex-col`,children:aQ(e)},D4(e))}),S&&!re?(0,U.jsx)(`div`,{className:`shrink-0 px-2 pt-1.5 pb-[max(0.5rem,env(safe-area-inset-bottom))]`,children:x}):null,(0,U.jsx)(h$,{route:e,keys:P,projects:T,onHelp:w,dockNav:S&&re?x:null})]}),S?(0,U.jsx)(O$,{...ne,open:E,onOpenChange:D}):null,(0,U.jsx)(r2,{status:h,lobby:n.data}),(0,U.jsx)(i4,{prompts:r,answer:i,dismiss:a,minimized:u,onMinimize:d}),(0,U.jsx)(kQ,{open:c,onOpenChange:l,keys:v,tabs:_})]})}async function k4(e){switch(e){case`status`:return be(`status.get`,{});case`lobby`:return be(`lobby.snapshot`,{});case`prompts`:return be(`prompts.list`,{});default:return}}var A4=[`status`,`lobby`,`prompts`];function j4(){let[e,t]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let e=!0;return(async()=>{await Se(),e&&(L.markUsed(A4,k4),t(!0))})(),()=>{e=!1}},[]),e}function M4(){return j4()?(0,U.jsx)(O4,{}):(0,U.jsx)(`div`,{className:`fixed inset-0 flex`,children:(0,U.jsx)(NA,{})})}var N4={info:sh,success:hm,warning:Ug,error:Tm},P4={info:`Note:`,success:`Done:`,warning:`Warning:`,error:`Error:`},F4={info:`text-info`,success:`text-success`,warning:`text-warning`,error:`text-destructive`};function I4(){let{item:e,waiting:t}=hp(),n=fA(),r=e&&!n;return(0,m.useEffect)(()=>{if(!e||n)return;let r=window.setTimeout(()=>fp(e.id),t>0?Math.min(e.duration,1600):e.duration);return()=>window.clearTimeout(r)},[e,n,t]),(0,U.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`pointer-events-none fixed z-40 flex justify-center px-4`,style:{bottom:`calc(var(--composer-h, 0px) + 0.25rem)`,left:`var(--composer-x, 0px)`,width:`var(--composer-w, 100%)`},children:(0,U.jsx)(Nu,{mode:`wait`,children:r?(0,U.jsxs)(Qf.div,{initial:{opacity:0,scale:.55,y:18},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.92,y:6,transition:{duration:.14,ease:`easeIn`}},transition:{type:`spring`,stiffness:560,damping:15,mass:.8},className:`pointer-events-auto flex max-w-[min(32rem,100%)] items-center gap-2.5 glass-toast rounded-lg px-3.5 py-2.5 text-sm`,children:[(0,U.jsx)(L4,{kind:e.kind}),(0,U.jsxs)(`span`,{className:`min-w-0 break-words`,children:[(0,U.jsxs)(`span`,{className:`sr-only`,children:[P4[e.kind],` `]}),e.message]}),e.action?(0,U.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,className:`btn-outline -my-1.5 -mr-1 h-7 shrink-0 rounded-lg border px-2.5 text-xs font-medium text-foreground transition-[box-shadow,scale] active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,onClick:()=>{e.action?.onClick(),fp(e.id)},children:e.action.label}):null]},e.id):null})})}function L4({kind:e}){let t=N4[e];return(0,U.jsx)(t,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,F4[e])})}(0,ip.createRoot)(document.getElementById(`root`)).render((0,U.jsx)(m.StrictMode,{children:(0,U.jsx)($K,{children:(0,U.jsx)(Bu,{reducedMotion:`user`,children:(0,U.jsxs)(LA,{children:[(0,U.jsx)(M4,{}),(0,U.jsx)(I4,{})]})})})})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`,{updateViaCache:`none`}).catch(()=>void 0)});
|