@a-t-h-i/bot-lobby 0.6.13 → 0.6.14
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/webui/dist/assets/index-CMn1bsps.css +2 -0
- package/webui/dist/assets/index-Dj1XZA3O.js +80 -0
- package/webui/dist/build.json +65 -61
- package/webui/dist/index.html +4 -3
- package/webui/dist/assets/index-Bk-lpAGm.css +0 -2
- package/webui/dist/assets/index-E6MPcbdC.js +0 -80
|
@@ -1,80 +0,0 @@
|
|
|
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 ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(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 te(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,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),te(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(A,`$&/`)+`/`)+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+j(a,u),c+=te(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+j(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(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 ne=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 re(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,ne)}catch(e){ne(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ie(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 re(ie.bind(null,e))}var ae={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(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=ae,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=ie,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:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=re,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,_())}}}var b=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),x=o(((e,t)=>{t.exports=b()})),S=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),C=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=S()})),w=o((e=>{var t=x(),n=p(),r=C();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function S(e,t,n){return e===n||e===t&&(y=e,!0)}function w(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),ee=Symbol.for(`react.portal`),A=Symbol.for(`react.fragment`),j=Symbol.for(`react.strict_mode`),M=Symbol.for(`react.profiler`),te=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),P=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),re=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),ae=Symbol.for(`react.lazy`),oe=Symbol.for(`react.activity`),se=Symbol.for(`react.legacy_hidden`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.for(`react.view_transition`),ue=Symbol.for(`react.recoverable`),de=Symbol.iterator;function fe(e){return typeof e!=`object`||!e?null:(e=de&&e[de]||e[`@@iterator`],typeof e==`function`?e:null)}var pe=Symbol.for(`react.client.reference`);function me(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case A:return`Fragment`;case M:return`Profiler`;case j:return`StrictMode`;case ne:return`Suspense`;case re:return`SuspenseList`;case oe:return`Activity`;case le:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ee:return`Portal`;case N:return e.displayName||`Context`;case te:return(e._context.displayName||`Context`)+`.Consumer`;case P:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?me(e.type)||`Memo`:t;case ae:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var he=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e={pending:!1,data:null,method:null,action:null},ve=[],ye=-1;function be(e){return{current:e}}function xe(e){0>ye||(e.current=ve[ye],ve[ye]=null,ye--)}function Se(e,t){ye++,ve[ye]=e.current,e.current=t}var Ce=be(null),we=be(null),Te=be(null),Ee=be(null);function De(e,t){switch(Se(Te,t),Se(we,e),Se(Ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hp(t),e=gp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}xe(Ce),Se(Ce,e)}function Oe(){xe(Ce),xe(we),xe(Te)}function ke(e){var t=e.memoizedState;t!==null&&(uh._currentValue=t.memoizedState,Se(Ee,e)),t=Ce.current;var n=gp(t,e.type);t!==n&&(Se(we,e),Se(Ce,n))}function Ae(e){we.current===e&&(xe(Ce),xe(we)),Ee.current===e&&(xe(Ee),uh._currentValue=_e)}var je,Me;function Ne(e){if(je===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);je=t&&t[1]||``,Me=-1<e.stack.indexOf(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+je+e+Me}var Pe=!1;function Fe(e,t){if(!e||Pe)return``;Pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
-
`),l=s.split(`
|
|
5
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ne(n):``}function Ie(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne(`Lazy`);case 13:return e.child!==t&&t!==null?Ne(`Suspense Fallback`):Ne(`Suspense`);case 19:return Ne(`SuspenseList`);case 0:case 15:return Fe(e.type,!1);case 11:return Fe(e.type.render,!1);case 1:return Fe(e.type,!0);case 31:return Ne(`Activity`);case 30:return Ne(`ViewTransition`);default:return``}}function Le(e){try{var t=``,n=null;do t+=Ie(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}}var Re=Object.prototype.hasOwnProperty,ze=t.unstable_scheduleCallback,Be=t.unstable_cancelCallback,Ve=t.unstable_shouldYield,He=t.unstable_requestPaint,Ue=t.unstable_now,We=t.unstable_getCurrentPriorityLevel,Ge=t.unstable_ImmediatePriority,Ke=t.unstable_UserBlockingPriority,qe=t.unstable_NormalPriority,Je=t.unstable_LowPriority,Ye=t.unstable_IdlePriority,Xe=t.log,Ze=t.unstable_setDisableYieldValue,Qe=null,$e=null;function et(e){if(typeof Xe==`function`&&Ze(e),$e&&typeof $e.setStrictMode==`function`)try{$e.setStrictMode(Qe,e)}catch{}}var tt=Math.clz32?Math.clz32:it,nt=Math.log,rt=Math.LN2;function it(e){return e>>>=0,e===0?32:31-(nt(e)/rt|0)|0}var at=256,ot=262144,st=4194304;function ct(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 lt(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=ct(n))):i=ct(o):i=ct(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ct(n))):i=ct(o)):i=ct(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 ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dt(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-tt(n),i=1<<r;t|=e[r],n&=~i}return t}function ft(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 pt(){var e=st;return st<<=1,!(st&62914560)&&(st=4194304),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ht(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(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-tt(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&&_t(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function _t(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-tt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function I(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function vt(e,t){var n=t&-t;return n=n&42?1:yt(n),(n&(e.suspendedLanes|t))===0?n:0}function yt(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 bt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function xt(){var e=ge.p;return e===0?(e=window.event,e===void 0?32:Eh(e.type)):e}function St(e,t){var n=ge.p;try{return ge.p=e,t()}finally{ge.p=n}}var Ct=Math.random().toString(36).slice(2),wt=`__reactFiber$`+Ct,Tt=`__reactProps$`+Ct,Et=`__reactContainer$`+Ct,Dt=`__reactEvents$`+Ct,Ot=`__reactListeners$`+Ct,L=`__reactHandles$`+Ct,kt=`__reactResources$`+Ct,At=`__reactMarker$`+Ct,jt=`__reactLoad$`+Ct;function Mt(e){delete e[wt],delete e[Tt],delete e[Ot],delete e[L]}function Nt(e){var t;if(t=e[wt])return t;for(var n=e.parentNode;n;){if(t=n[Et]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_m(e);e!==null;){if(n=e[wt])return n;e=_m(e)}return t}e=n,n=e.parentNode}return null}function Pt(e){if(e=e[wt]||e[Et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function R(e){var t=e[kt];return t||=e[kt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function It(e){e[At]=!0}function Lt(e){e[jt]=void 0}var Rt=new Set,zt={};function Bt(e,t){Vt(e,t),Vt(e+`Capture`,t)}function Vt(e,t){for(zt[e]=t,e=0;e<t.length;e++)Rt.add(t[e])}var Ht=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]*$`),Ut={},Wt={};function Gt(e){return Re.call(Wt,e)?!0:Re.call(Ut,e)?!1:Ht.test(e)?Wt[e]=!0:(Ut[e]=!0,!1)}var Kt=!1;function qt(){var e=Kt;return Kt=!1,e}function Jt(e,t,n){if(Gt(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 Yt(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 Xt(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 Zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Qt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function $t(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 z(e){if(!e._valueTracker){var t=Qt(e)?`checked`:`value`;e._valueTracker=$t(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Qt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var B=/[\n"\\]/g;function tn(e){return e.replace(B,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function nn(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=``+Zt(t)):e.value!==``+Zt(t)&&(e.value=``+Zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):an(e,Zt(n)):o===`number`&&e.value==t?an(e,Zt(e.value)):an(e,Zt(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=``+Zt(s):e.removeAttribute(`name`)}function rn(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)){z(e);return}n=n==null?``:``+Zt(n),t=t==null?n:``+Zt(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),z(e)}function an(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function on(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=``+Zt(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 sn(e,t,n){if(t!=null&&(t=``+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Zt(n)}function cn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(he(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),z(e)}function ln(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un=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 dn(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||un.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function fn(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]=``,Kt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(dn(e,a,r),Kt=!0)}else for(var o in t)t.hasOwnProperty(o)&&dn(e,o,t[o])}function pn(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 mn=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`]]),hn=/^[\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 gn(e){return hn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function _n(){}var vn=null;function yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,xn=null;function Sn(e){var t=Pt(e);if(t&&(e=t.stateNode)){var n=e[Tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(nn(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="`+tn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Tt]||null;if(!a)throw Error(i(90));nn(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&&en(r)}break a;case`textarea`:sn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&on(e,!!n.multiple,t,!1)}}}var Cn=!1;function wn(e,t,n){if(Cn)return e(t,n);Cn=!0;try{return e(t)}finally{if(Cn=!1,(bn!==null||xn!==null)&&(Ud(),bn&&(t=bn,e=xn,xn=bn=null,Sn(t),e)))for(t=0;t<e.length;t++)Sn(e[t])}}function Tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Tt]||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 En=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Dn=!1;if(En)try{var On={};Object.defineProperty(On,"passive",{get:function(){Dn=!0}}),window.addEventListener(`test`,On,On),window.removeEventListener(`test`,On,On)}catch{Dn=!1}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.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 jn=i.slice(e,1<r?1-r:void 0)}function Nn(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 Pn(){return!0}function Fn(){return!1}function In(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)?Pn:Fn,this.isPropagationStopped=Fn,this}return D(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=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=D({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=D({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(D({},Wn,{dataTransfer:0})),qn=In(D({},zn,{relatedTarget:0})),Jn=In(D({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(D({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(D({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={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`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(D({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(D({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),V=In(D({},Ln,{submitter:0})),ir=In(D({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),ar=In(D({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=In(D({},Wn,{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})),sr=In(D({},Ln,{newState:0,oldState:0,source:0})),cr=[9,13,27,32],lr=En&&`CompositionEvent`in window,ur=null;En&&`documentMode`in document&&(ur=document.documentMode);var dr=En&&`TextEvent`in window&&!ur,fr=En&&(!lr||ur&&8<ur&&11>=ur),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return cr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function vr(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function yr(e,t){if(_r)return e===`compositionend`||!lr&&hr(e,t)?(e=Mn(),jn=An=kn=null,_r=!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 fr&&t.locale!==`ko`?null:t.data;default:return null}}var br={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 xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!br[e.type]:t===`textarea`}function Sr(e,t,n,r){bn?xn?xn.push(r):xn=[r]:bn=r,t=Qf(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Cr=null,wr=null;function Tr(e){Gf(e,0)}function Er(e){if(en(Ft(e)))return e}function Dr(e,t){if(e===`change`)return t}var Or=!1;if(En){var kr;if(En){var Ar=`oninput`in document;if(!Ar){var jr=document.createElement(`div`);jr.setAttribute(`oninput`,`return;`),Ar=typeof jr.oninput==`function`}kr=Ar}else kr=!1;Or=kr&&(!document.documentMode||9<document.documentMode)}function Mr(){Cr&&(Cr.detachEvent(`onpropertychange`,Nr),wr=Cr=null)}function Nr(e){if(e.propertyName===`value`&&Er(wr)){var t=[];Sr(t,wr,e,yn(e)),wn(Tr,t)}}function Pr(e,t,n){e===`focusin`?(Mr(),Cr=t,wr=n,Cr.attachEvent(`onpropertychange`,Nr)):e===`focusout`&&Mr()}function Fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Er(wr)}function Ir(e,t){if(e===`click`)return Er(t)}function Lr(e,t){if(e===`input`||e===`change`)return Er(t)}function Rr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var zr=typeof Object.is==`function`?Object.is:Rr;function Br(e,t){if(zr(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(!Re.call(t,i)||!zr(e[i],t[i]))return!1}return!0}function Vr(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 Hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ur(e,t){var n=Hr(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=Hr(n)}}function Wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vr(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=Vr(e.document)}return t}function Kr(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 qr=En&&`documentMode`in document&&11>=document.documentMode,Jr=null,Yr=null,Xr=null,Zr=!1;function Qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||Jr==null||Jr!==Vr(r)||(r=Jr,`selectionStart`in r&&Kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&Br(Xr,r)||(Xr=r,r=Qf(Yr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Jr)))}function $r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ei={animationend:$r(`Animation`,`AnimationEnd`),animationiteration:$r(`Animation`,`AnimationIteration`),animationstart:$r(`Animation`,`AnimationStart`),transitionrun:$r(`Transition`,`TransitionRun`),transitionstart:$r(`Transition`,`TransitionStart`),transitioncancel:$r(`Transition`,`TransitionCancel`),transitionend:$r(`Transition`,`TransitionEnd`)},ti={},ni={};En&&(ni=document.createElement(`div`).style,`AnimationEvent`in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),`TransitionEvent`in window||delete ei.transitionend.transition);function ri(e){if(ti[e])return ti[e];if(!ei[e])return e;var t=ei[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ni)return ti[e]=t[n];return e}var ii=ri(`animationend`),ai=ri(`animationiteration`),oi=ri(`animationstart`),si=ri(`transitionrun`),ci=ri(`transitionstart`),li=ri(`transitioncancel`),ui=ri(`transitionend`),di=new Map,fi=`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(` `);fi.push(`scrollEnd`);function pi(e,t){di.set(e,t),Bt(t,[e])}var mi=0;function hi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=wd.identifierPrefix;var n=mi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function gi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Md;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 _i(e,t){return e=gi(e),t=gi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var vi=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)},yi=[],bi=0,xi=0;function Si(){for(var e=bi,t=xi=bi=0;t<e;){var n=yi[t];yi[t++]=null;var r=yi[t];yi[t++]=null;var i=yi[t];yi[t++]=null;var a=yi[t];if(yi[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&&Ei(n,i,a)}}function Ci(e,t,n,r){yi[bi++]=e,yi[bi++]=t,yi[bi++]=n,yi[bi++]=r,xi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function wi(e,t,n,r){return Ci(e,t,n,r),Di(e)}function Ti(e,t){return Ci(e,null,null,t),Di(e)}function Ei(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-tt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Di(e){if(50<Nd)throw Nd=0,Pd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oi={};function ki(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 Ai(e,t,n,r){return new ki(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mi(e,t){var n=e.alternate;return n===null?(n=Ai(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 Ni(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 Pi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)ji(r)&&(s=1);else if(typeof r==`string`)s=Xm(e,n,Ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case oe:return e=Ai(31,n,t,a),e.elementType=oe,e.lanes=o,e;case A:return Fi(n.children,a,o,t);case j:s=8,a|=24;break;case M:return e=Ai(12,n,t,a|2),e.elementType=M,e.lanes=o,e;case ne:return e=Ai(13,n,t,a),e.elementType=ne,e.lanes=o,e;case re:return e=Ai(19,n,t,a),e.elementType=re,e.lanes=o,e;case se:case le:return e=a|32,e=Ai(30,n,t,e),e.elementType=le,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 te:s=9;break a;case P:s=11;break a;case ie:s=14;break a;case ae:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Fi(e,t,n,r){return e=Ai(7,e,r,t),e.lanes=n,e}function Ii(e,t,n){return e=Ai(6,e,null,t),e.lanes=n,e}function Li(e){var t=Ai(18,null,null,0);return t.stateNode=e,t}function Ri(e,t,n){return t=Ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zi=new WeakMap;function Bi(e,t){if(typeof e==`object`&&e){var n=zi.get(e);return n===void 0?(t={value:e,source:t,stack:Le(t)},zi.set(e,t),t):n}return{value:e,source:t,stack:Le(t)}}var Vi=[],Hi=0,Ui=null,Wi=0,Gi=[],Ki=0,qi=null,Ji=1,Yi=``;function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Ui,Ui=e,Wi=t}function Zi(e,t,n){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,qi=e;var r=Ji;e=Yi;var i=32-tt(r)-1;r&=~(1<<i),n+=1;var a=32-tt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ji=1<<32-tt(t)+i|n<<i|r,Yi=a+e}else Ji=1<<a|n<<i|r,Yi=e}function Qi(e){e.return!==null&&(Xi(e,1),Zi(e,1,0))}function $i(e){for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null;for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Yi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null}function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,Ji=t.id,Yi=t.overflow,qi=e}var ta=null,na=null,H=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw fa(Bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[wt]=e,t[Tt]=r,n){case`dialog`:J(`cancel`,t),J(`close`,t);break;case`iframe`:case`object`:case`embed`:J(`load`,t);break;case`video`:case`audio`:for(n=0;n<Uf.length;n++)J(Uf[n],t);break;case`source`:J(`error`,t);break;case`img`:case`image`:case`link`:J(`error`,t),J(`load`,t);break;case`details`:J(`toggle`,t);break;case`input`:J(`invalid`,t),rn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:J(`invalid`,t);break;case`textarea`:J(`invalid`,t),cn(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||ip(t.textContent,n)?(r.popover!=null&&(J(`beforetoggle`,t),J(`toggle`,t)),r.onScroll!=null&&J(`scroll`,t),r.onScrollEnd!=null&&J(`scrollend`,t),r.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ta=e.return;ta;)switch(ta.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ta=ta.return}}function la(e){if(e!==ta)return!1;if(!H)return ca(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||vp(e.type,e.memoizedProps)),n=!n),n&&na&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=gm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=gm(e)}else t===27?(t=na,Dp(e.type)?(e=hm,hm=null,na=e):na=t):na=ta?mm(e.stateNode.nextSibling):null;return!0}function ua(){na=ta=null,H=!1}function da(){var e=ra;return e!==null&&(gd===null?gd=e:gd.push.apply(gd,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=be(null),ma=null,ha=null;function ga(e,t,n){Se(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,xe(pa)}function va(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 ya(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),va(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),va(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),va(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 ba(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;zr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ee.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[uh]:e.push(uh))}a=a.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!zr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(i(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Da=t.unstable_scheduleCallback,Oa=t.unstable_NormalPriority,ka={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new Ea,data:new Map,refCount:0}}function ja(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function Ma(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 Na=null;function Pa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Fa=null,Ia=0,La=0,Ra=null;function za(e,t){if(Fa===null){var n=Fa=[];Ia=0,La=Rf(),Ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ia++,t.then(Ba,Ba),t}function Ba(){if(--Ia===0&&(Na=null,Fa!==null)){Ra!==null&&(Ra.status=`fulfilled`);var e=Fa;Fa=null,La=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Va(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 Ha=F.S;F.S=function(e,t){if(yd=Ue(),typeof t==`object`&&t&&typeof t.then==`function`&&za(e,t),Na!==null)for(var n=Tf;n!==null;)Ma(n,Na),n=n.next;if(n=e.types,n!==null){for(var r=Tf;r!==null;)Ma(r,n),r=r.next;if(La!==0){r=Na,r===null&&(r=Na=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ha!==null&&Ha(e,t)};var Ua=be(null);function Wa(){var e=Ua.current;return e===null?nd.pooledCache:e}function Ga(e,t){t===null?Se(Ua,Ua.current):Se(Ua,t.pool)}function Ka(){var e=Wa();return e===null?null:{parent:ka._currentValue,pool:e}}var qa=Error(i(460)),Ja=Error(i(474)),Ya=Error(i(542)),Xa={then:function(){}};function Za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Qa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(_n,_n);else{if(e=nd,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,no(e),e}throw eo=t,qa}}function $a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(eo=e,qa):e}}var eo=null;function to(){if(eo===null)throw Error(i(459));var e=eo;return eo=null,e}function no(e){if(e===qa||e===Ya)throw Error(i(483))}var ro=null,io=0;function ao(e){var t=io;return io+=1,ro===null&&(ro=[]),Qa(ro,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(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=Mi(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=Ii(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===A?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ae&&$a(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Pi(n.type,n.key,n.props,null,e.mode,r),oo(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=Ri(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=Fi(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=Ii(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Pi(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case ee:return t=Ri(t,e.mode,n),t.return=e,t;case ae:return t=$a(t),f(e,t,n)}if(he(t)||fe(t))return t=Fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===N)return f(e,wa(e,t),n);so(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 k:return n.key===i?l(e,t,n,r):null;case ee:return n.key===i?u(e,t,n,r):null;case ae:return n=$a(n),p(e,t,n,r)}if(he(n)||fe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===N)return p(e,t,wa(e,n),r);so(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 k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ee:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ae:return r=$a(r),m(e,t,n,r,i)}if(he(r)||fe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===N)return m(e,t,n,wa(t,r),i);so(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Xi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return H&&Xi(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)}),H&&Xi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),H&&Xi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Xi(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)}),H&&Xi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===A&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===A){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ae&&$a(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===A?(c=Fi(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Pi(o.type,o.key,o.props,null,e.mode,c),oo(c,o),c.return=e,e=c)}return s(e);case ee: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=Ri(o,e.mode,c),c.return=e,e=c}return s(e);case ae:return o=$a(o),_(e,r,o,c)}if(he(o))return h(e,r,o,c);if(fe(o)){if(l=fe(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,ao(o),c);if(o.$$typeof===N)return _(e,r,wa(e,o),c);so(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=Ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{io=0;var i=_(e,t,n,r);return ro=null,i}catch(t){if(t===qa||t===Ya)throw t;var a=Ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(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 ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,td&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Di(e),Ei(e,null,n),t}return Ci(e,r,t,n),Di(e)}function _o(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,I(e,n)}}function vo(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 yo=!1;function bo(){if(yo){var e=Ra;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!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?(K&f)===f:(r&f)===f){f!==0&&f===La&&(yo=!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=D({},d,f);break a;case 2:fo=!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),ud|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=be(null),To=be(0);function Eo(e,t){e=cd,Se(To,e),Se(wo,t),cd=e|t.baseLanes}function Do(){Se(To,cd),Se(wo,wo.current)}function Oo(){cd=To.current,xe(wo),xe(To)}var ko=be(null),Ao=null;function jo(e){var t=e.alternate;Se(Io,Io.current&1),Se(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){Se(Io,Io.current),Se(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(Se(Io,Io.current),Se(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){Se(Io,Io.current),Se(ko,ko.current)}function Fo(e){xe(ko),Ao===e&&(Ao=null),xe(Io)}var Io=be(0);function Lo(e,t){Se(ko,ko.current),Se(Io,t)}function Ro(e){xe(Io),xe(ko),Ao===e&&(Ao=null)}function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||dm(n)||fm(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 Bo=0,U=null,Vo=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(i(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Bo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){F.H=mc;var t=Vo!==null&&Vo.next!==null;if(Bo=0,Ho=Vo=U=null,Uo=!1,qo=0,Jo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&xa(e)&&(Nc=!0))}function es(e,t,n,r){U=e;var a=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Ho=Vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(Vo===null?null:Vo.memoizedState)!==e&&(U.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Bo=0,Ho=Vo=U=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(Vo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=Vo.next;var t=Ho===null?U.memoizedState:Ho.next;if(t!==null)Ho=t,Vo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));Vo=e,e={memoizedState:Vo.memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=Qa(Jo,e,t),t=U,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===ue)return;if(e.$$typeof===N)return Ca(e)}throw Error(i(438,String(e)))}function us(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.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=ss(),U.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]=ce;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),Vo,e)}function ps(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?(Bo&f)===f:(K&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===La&&(d=!0);else if((Bo&p)===p){u=u.next,p===La&&(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,U.lanes|=p,ud|=p;f=u.action,Go&&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,U.lanes|=f,ud|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!zr(o,e.memoizedState)&&(Nc=!0,d&&(n=Ra,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=os(),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);zr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=U,a=os(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!zr((Vo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Bs(vs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,a,n,t),null),e){if(r.flags|=2048,nd===null)throw Error(i(349));o||Bo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=ss(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zr(e,n)}catch{return!0}}function bs(e){var t=Ti(e,2);t!==null&&Rd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){et(!0);try{n()}finally{et(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,Vo,typeof r==`function`?r:ds)}function Cs(e,t,n,r,a){if(dc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};o.types=a===null?null:a.types,F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(H){var n=nd.formState;if(n!==null){a:{var r=U;if(H){if(na){b:{for(var i=na,a=ia;i.nodeType!==8;){if(!a){i=null;break b}if(i=mm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){na=mm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,U,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,U,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),Vo,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===qa?Ya:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=Vo;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=ss(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();U.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;Vo!==null&&r!==null&&Zo(r,Vo.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(U.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=ss(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(td&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(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 Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Bo&1073741824&&!(K&261930)?e.memoizedState=t:(e.memoizedState=n,e=Id(),U.lanes|=e,ud|=e,n)}function Zs(e,t,n,r){return zr(n,t)?n:wo.current===null?!(Bo&106)||Bo&1073741824&&!(K&261930)?(Nc=!0,e.memoizedState=n):(e=Id(),U.lanes|=e,ud|=e,t):(e=Xs(e,n,r),zr(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=ge.p;ge.p=a!==0&&8>a?a:8;var o=F.T,s={};s.types=o===null?null:o.types,F.T=s,uc(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Va(c,r),Fd(e)):lc(e,t,r,Fd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},Fd())}finally{ge.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=tc(e).queue;Qs(e,a,t,_e,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_e,baseState:_e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:_e},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},Fd())}function rc(){return Ca(uh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Fd();e=ho(n);var r=go(t,e,n);r!==null&&(Rd(r,t,n),_o(r,t,n)),t={cache:Aa()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=Fd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=wi(e,t,n,r),n!==null&&(Rd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,Fd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(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,zr(s,o))return Ci(e,t,i,0),nd===null&&Si(),!1}catch{}if(n=wi(e,t,i,r),n!==null)return Rd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Rf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(i(479))}else t=wi(e,n,r,2),t!==null&&Rd(t,e,2)}function dc(e){var t=e.alternate;return e===U||t!==null&&t===U}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,I(e,n)}}var mc={readContext:Ca,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:Ca,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){et(!0);try{n(t)}finally{et(!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=sc.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,U,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=as();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),nd===null)throw Error(i(349));K&127||gs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=nd.identifierPrefix;if(H){var n=Yi,r=Ji;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,U)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(td&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),Vo.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return Vo===null?Xs(n,e,t):Zs(n,Vo.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return Vo===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Rd(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Rd(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Rd(t,e,n),_o(t,e,n))}};function bc(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?!Br(n,r)||!Br(i,a):!0}function xc(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&&yc.enqueueReplaceState(t,t.state,null)}function Sc(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=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Cc(e){vi(e)}function wc(e){console.error(e)}function Tc(e){vi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(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 Oc(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=ho(e),e.tag=3,e}function Ac(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(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(Sd===null?Sd=new Set([this]):Sd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Xd():n.alternate===null&&ld===0&&(ld=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),yf(e,r,a)),!1;case 22:return n.flags|=65536,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),yf(e,r,a)),!1}throw Error(i(435,n.tag))}return yf(e,r,a),Xd(),!1}if(H)return t=ko.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),fa(Bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Bi(r,n),a=Oc(e.stateNode,r,a),vo(e,a),ld!==4&&(ld=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),fa(Bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Bi(o,n),hd===null?hd=[o]:hd.push(o),ld!==4&&(ld=2),t===null)return!0;r=Bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),vo(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`&&(Sd===null||!Sd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Fc(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 Sa(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(H&&s&&Qi(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ji(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Br:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Br(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(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 Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ga(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ga(t,null),Do(),Po()):(Ga(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Wa();return a=a===null?null:{parent:ka._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ga(t,null),Do(),No(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return lo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Fo(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(Mo(t),(e=na)?(e=um(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||ba(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(wo.current===null){if(r=nd,r!==null&&(s=vt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ti(e,s),Rd(r,e,s),Mc;Xd()}t=Hc(e,t,n)}else e=o.treeContext,na=mm(s.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(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 Gc(e,t,n,r,i){return Sa(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(H&&r&&Qi(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(H&&r&&Qi(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Oi,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(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&&yc.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),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=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Oi,typeof u==`object`&&u&&(o=Ca(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)&&xc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=fo||bc(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,mo(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Oi,typeof l==`object`&&l&&(c=Ca(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)&&xc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=fo||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(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,Wc(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=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return ua(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ka()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=pd),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Io.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(H){if(i?jo(t):Po(),(e=na)?(e=um(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=fm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Fi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(jo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Mi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Fi(i,a,n,null),i.flags|=2):i=Mi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ka():(s=ka._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=Mi(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 $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Ai(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return lo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Fi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),fm(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,fa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(wo.current!==null)return tl(e,t,c);if(r=nd,r!==null&&(a=vt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ti(e,a),Rd(r,e,a),Mc;return dm(o)||Xd(),tl(e,t,c)}return dm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,na=mm(o.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&zo(n)===null&&(t=e),e=e.sibling}return t}function al(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 ol(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 sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Io.current;if(t.flags&128)return Lo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Lo(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=H?Wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(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=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(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&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ud|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(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=Mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function dl(e,t,n){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),ga(t,ka,e.memoizedState.cache),ua();break;case 27:case 5:ke(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(jo(t),e=ll(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Lo(t,Io.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ga(t,ka,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,H&&t.flags&1048576&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=$a(t.elementType),t.type=e,typeof e==`function`)ji(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===P){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===ie){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=me(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Sc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,ka,r),r!==o.cache&&ya(t,[ka],n,!0),bo(),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=Jc(e,t,r,n);break a}if(r!==a){a=Bi(Error(i(424)),t),fa(a),t=Jc(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(na=mm(e.firstChild),ta=t,H=!0,ra=null,ia=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Rm(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(t.stateNode=_p(t.type,t.pendingProps,Te.current,t)):t.memoizedState=Rm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ke(t),e===null&&H&&(r=t.stateNode=bm(t.type,t.pendingProps,Te.current),ta=t,ia=!0,a=na,Dp(t.type)?(hm=a,na=mm(r.firstChild)):na=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=na)&&(r=cm(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ta=t,na=mm(r.firstChild),ia=!1,a=!0)),a||oa(t)),ke(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,vp(a,o)?r=null:s!==null&&vp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Qo(e,t,ts,null,null,n),uh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=na)&&(n=lm(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ta=t,na=null,e=!0)),e||oa(t)),null;case 13:return Qc(e,t,n);case 4:return De(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Sa(t),a=Ca(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(ka),e===null?(a=Wa(),a===null&&(a=nd,o=Aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),ga(t,ka,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ga(t,ka,r),r!==a.cache&&ya(t,[ka],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ga(t,ka,r))),Pc(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:H&&Qi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Zm(t,r):Zm(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(qd())e.flags|=8192;else throw eo=Xa,Ja}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qm(t)){if(qd())e.flags|=8192;else throw eo=Xa,Ja}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:pt(),e.lanes|=t,md|=t)}function _l(e,t){if(!H)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 vl(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 yl(e,t,n){var r=t.pendingProps;switch($i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(ka),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(Ae(t),n=Te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=Ce.current,la(t)?sa(t,e):(e=bm(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ae(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=Ce.current,la(t))sa(t,o);else{var s=mp(Te.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[wt]=t,o[Tt]=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(sp(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&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Te.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ta,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[wt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ip(e.nodeValue,n)),e||oa(t,!0)}else e=mp(e).createTextNode(r),e[wt]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(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[wt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fo(t),t):(Fo(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(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[wt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Fo(t),t):(Fo(t),null)}return Fo(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),gl(t,t.updateQueue),vl(t),null);case 4:return Oe(),e===null&&Jf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return _a(t.type),vl(t),null;case 19:if(Ro(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(ld!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ni(n,e),n=n.sibling;return Lo(t,Io.current&1|2),H&&Xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ue()>bd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=zo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!H)return vl(t),null}else 2*Ue()-r.renderingStartTime>bd&&n!==536870912&&(t.flags|=128,a=!0,_l(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=Ue(),e.sibling=null,o=Io.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||H?Lo(t,o):(n=o,Se(ko,t),Se(Io,n),Ao===null&&(Ao=t)),H&&Xi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Fo(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(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&&xe(Ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(ka),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch($i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(ka),Oe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ae(t),null;case 31:if(t.memoizedState!==null){if(Fo(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ro(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 Oe(),null;case 10:return _a(t.type),null;case 22:case 23:return Fo(t),Oo(),e!==null&&xe(Ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(ka),null;case 25:return null;default:return null}}function xl(e,t){switch($i(t),t.tag){case 3:_a(ka),Oe();break;case 26:case 27:case 5:Ae(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&Fo(t);break;case 13:Fo(t);break;case 19:Ro(t);break;case 10:_a(t.type);break;case 22:case 23:Fo(t),Oo(),e!==null&&xe(Ua);break;case 24:_a(ka)}}function Sl(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){vf(t,t.return,e)}}function Cl(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){vf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){vf(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){vf(e,e.return,t)}}}function Tl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){vf(e,t,n)}}function El(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=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=zp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Bp(e);f(e.child,!1,rm,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){vf(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){vf(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){vf(e,t,n)}else n.current=null}}function Ol(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++)am(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&am(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&om(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(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){vf(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;lp(r,e.type,n,t),r[Tt]=t}catch(t){vf(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dp(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(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&&Dp(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 Ll(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=_n)),Ol(e,r),Kt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Dp(e.type)&&(n=e.stateNode,t=null)),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,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),Kt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Dp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);sp(t,r,n),t[wt]=e,t[Tt]=n}catch(t){vf(e,e.return,t)}}var W=!1,Bl=null;function Vl(e){(e.tag===30||e.subtreeFlags&33554432)&&(W=!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=Np(o);r.push(s),s.view&&(a=!0)}else a||Np(o).view&&(a=!0);W=!0,Ap(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?jp(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=_i(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=hi(r,n),a=_i(r.default,n.paired?r.share:r.enter);a===`none`?Jl(e):Gl(e,i,a,null,!1)?(Jl(e),n.paired||t||Ld(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=_i(n.default,n.share);if(a!==`none`&&(Gl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Ld(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=hi(t,e.stateNode),r=Bl===null?void 0:Bl.get(n),i=_i(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Gl(e,n,i,null,!1)?r===void 0?Ld(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Bl.delete(n),Ld(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=hi(t,e.stateNode);t=_i(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=Np(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&&Ap(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=hi(n,r),a=_i(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Pp)}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||Ld(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,fp=yh,e=Gr(e),Kr(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(pp={focusedElem:e,selectionRange:r},yh=!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=Sc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){vf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)sm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:sm(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=hi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=_i(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:Iu(e,n),r&4&&Sl(5,n);break;case 1:if(Iu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){vf(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){vf(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Iu(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{Co(e,t)}catch(e){vf(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Iu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Iu(e,n);break;case 31:Iu(e,n),r&4&&Tu(e,n);break;case 13:Iu(e,n),r&4&&Eu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Sf.bind(null,n),pm(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),Ru(e,n,r)):Iu(e,n),iu=t,au=i}break;case 30:Iu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Iu(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){vf(e,e.return,t)}yu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Kt=!0}catch(t){vf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?kp(s,!0):kp(e.stateNode,!1)}catch(t){vf(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&&Mt(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($e&&typeof $e.onCommitFiberUnmount==`function`)try{$e.onCommitFiberUnmount(Qe,n)}catch{}switch(n.tag){case 26:au||Dl(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||Dl(n,t),Al(n);var r=xu,i=Su;Dp(n.type)&&(xu=n.stateNode,Su=!1),Cu(e,t,n),xm(n.stateNode,n.type,n.memoizedProps),xu=r,Su=i;break;case 5:au||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(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),Kt=!0}catch(e){vf(n,t,e)}else try{xu.removeChild(n.stateNode),Kt=!0}catch(e){vf(n,t,e)}}break;case 18:xu!==null&&(Su?(e=xu,Op(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gh(e)):Op(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:Cl(2,n,t),au||Cl(4,n,t),Cu(e,t,n);break;case 1:au||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(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:Dl(n,t),Cu(e,t,n);break;case 7:au||Dl(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{Gh(e)}catch(e){vf(t,t.return,e)}}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gh(e)}catch(e){vf(t,t.return,e)}}function Du(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 Ou(e,t){var n=Du(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Cf.bind(null,e,t);t.then(r,r)}})}function ku(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(Dp(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;)ju(t,e,n),t=t.sibling}var Au=null;function ju(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}ku(t,e,n),Mu(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:ku(t,e,n),Mu(e),a&512&&(au||r===null||Dl(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=Au,ku(t,e,n),Mu(e),a&512&&(au||r===null||Dl(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=_p(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[At]||r[wt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),sp(r,t,n),r[wt]=e,It(r),t=r;break a;case`link`:if(o=Jm(`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),sp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Jm(`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),sp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[wt]=e,It(r),t=r}e.stateNode=t}}else iu||Ym(o,e.type,e.stateNode)}else e.stateNode=Y(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||au||t.parentNode.removeChild(t)):a.count--,n===null?iu||Ym(o,e.type,e.stateNode):Y(o,n,e.memoizedProps))}break;case 27:ku(t,e,n),Mu(e),a&512&&(au||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ou,ou=!1,ku(t,e,n),ou=o,Mu(e),a&512&&(au||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{ln(t,``),Kt=!0}catch(t){vf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(su=!0);break;case 6:if(ku(t,e,n),Mu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Kt=!0}catch(t){vf(e,e.return,t)}}break;case 3:if(Kt=!1,qm=null,o=Au,Au=Tm(t.containerInfo),ku(t,e,n),Au=o,Mu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Gh(t.containerInfo)}catch(t){vf(e,e.return,t)}su&&(su=!1,Nu(e)),Kt=!1;break;case 4:a=ou,ou=iu,r=qt(),o=Au,Au=Tm(e.stateNode.containerInfo),ku(t,e,n),Mu(e),Au=o,Kt&&du&&(fu=!0),Kt=r,ou=a;break;case 12:ku(t,e,n),Mu(e);break;case 31:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 13:ku(t,e,n),Mu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(vd=Ue()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(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,ku(t,e,n),au=l,ou=u,iu=c,Mu(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,Lu(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,Ou(e,n))));break;case 19:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 30:a&512&&(au||r===null||Dl(r,r.return)),a=qt(),o=du,s=(n&335544064)===n,c=e.memoizedProps,du=s&&_i(c.default,c.update)!==`none`,ku(t,e,n),Mu(e),s&&r!==null&&Kt&&(e.flags|=4),du=o,Kt=a;break;case 21:break;case 7:a&512&&(au||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:ku(t,e,n),Mu(e)}}function Mu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(ln(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){vf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,yh=!0,t.reset(),yh=!1),e=e.sibling}}function Pu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Fu(t,e),t=t.sibling;else ru(t,!1)}function Fu(e,t){var n=e.alternate;if(n===null)Yl(e,!1);else switch(e.tag){case 3:if(pu=uu=!1,Ul(),Pu(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];jp(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:Pu(t,e);break;case 4:r=uu,uu=!1,Pu(t,e),uu&&(fu=!0),uu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Pu(t,e):Yl(e,!1));break;case 30:r=uu,i=Ul(),uu=!1,Pu(t,e),uu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=hi(a,o),o=hi(n.memoizedProps,o);var s=_i(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?(Ld(e,e.memoizedProps.onUpdate),Hl=i):i!==null&&(i.push.apply(i,Hl),Hl=i),uu=e.flags&32?!0:r;break;default:Pu(t,e)}}function Iu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(e,t.alternate,t),t=t.sibling}function Lu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Lu(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Lu(n,r);break;case 27:r&2&&xm(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Lu(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||au||i.parentNode.removeChild(i),Lu(n,r);break;case 22:n.memoizedState===null&&Lu(n,r);break;case 30:Dl(n,n.return),Lu(n,r);break;case 7:Dl(n,n.return);default:Lu(n,r)}e=e.sibling}}function Ru(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:Ru(i,a,n),Sl(4,a);break;case 1:if(Ru(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){vf(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++)So(l[i],c)}catch(e){vf(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||iu||Ym(Tm(c.ownerDocument),a.type,c),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:Ru(i,a,n);break;case 31:Ru(i,a,n),s&&o&4&&Tu(i,a);break;case 13:Ru(i,a,n),s&&o&4&&Eu(i,a);break;case 22:a.memoizedState===null&&Ru(i,a,n),El(a,a.return);break;case 30:Ru(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:Ru(i,a,n)}t=t.sibling}}function zu(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&&ja(n))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ja(e))}function Vu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Hu(e,t,n,r),t=t.sibling;else i&&tu(t)}function Hu(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:Vu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:Vu(e,t,n,r);break;case 3:Vu(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&&ja(a)));break;case 12:if(a&2048){Vu(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){vf(t,t.return,e)}}else Vu(e,t,n,r);break;case 31:Vu(e,t,n,r);break;case 13:Vu(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?Vu(e,t,n,r):(o._visibility|=2,Uu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&eu(s),o._visibility&2?Vu(e,t,n,r):Wu(e,t)),a&2048&&zu(s,t);break;case 24:Vu(e,t,n,r),a&2048&&Bu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ql(a.child,!0),ql(t.child,!0))),Vu(e,t,n,r);break;default:Vu(e,t,n,r)}}function Uu(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:Uu(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Uu(a,o,s,c,i)):u._visibility&2?Uu(a,o,s,c,i):Wu(a,o),i&&l&2048&&zu(o.alternate,o);break;case 24:Uu(a,o,s,c,i),i&&l&2048&&Bu(o.alternate,o);break;default:Uu(a,o,s,c,i)}t=t.sibling}}function Wu(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:Wu(n,r),i&2048&&zu(r.alternate,r);break;case 24:Wu(n,r),i&2048&&Bu(r.alternate,r);break;default:Wu(n,r)}t=t.sibling}}var Gu=8192;function Ku(e,t,n){if(e.subtreeFlags&Gu)for(e=e.child;e!==null;)qu(e,t,n),e=e.sibling}function qu(e,t,n){switch(e.tag){case 26:Ku(e,t,n),e.flags&Gu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&eh(n,e)):th(n,Au,e.memoizedState,e.memoizedProps));break;case 5:Ku(e,t,n),e.flags&Gu&&(e=e.stateNode,(t&335544128)===t&&eh(n,e));break;case 3:case 4:var r=Au;Au=Tm(e.stateNode.containerInfo),Ku(e,t,n),Au=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Gu,Gu=16777216,Ku(e,t,n),Gu=r):Ku(e,t,n));break;case 30:if((e.flags&Gu)!==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)}Ku(e,t,n);break;default:Ku(e,t,n)}}function Ju(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 Yu(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,Qu(r,e)}Ju(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xu(e),e=e.sibling}function Xu(e){switch(e.tag){case 0:case 11:case 15:Yu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Yu(e);break;case 12:Yu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zu(e)):Yu(e);break;default:Yu(e)}}function Zu(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,Qu(r,e)}Ju(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),Zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zu(t));break;default:Zu(t)}e=e.sibling}}function Qu(e,t){for(;lu!==null;){var n=lu;switch(n.tag){case 0:case 11:case 15:Cl(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:ja(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 $u={getCacheForType:function(e){var t=Ca(ka),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(ka).controller.signal}},ed=typeof WeakMap==`function`?WeakMap:Map,td=0,nd=null,G=null,K=0,rd=0,id=null,ad=!1,od=!1,sd=!1,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=null,gd=null,_d=!1,vd=0,yd=0,bd=1/0,xd=null,Sd=null,Cd=0,wd=null,Td=null,Ed=0,Dd=0,Od=null,kd=null,Ad=null,jd=null,Md=null,Nd=0,Pd=null;function Fd(){return td&2&&K!==0?K&-K:F.T===null?xt():Rf()}function Id(){if(pd===0){if(!(K&536870912)||H){var e=ot;ot<<=1,!(ot&3932160)&&(ot=262144),pd=e}else pd=536870912}return e=ko.current,e!==null&&(e.flags|=32),pd}function Ld(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=zp(hi(e.memoizedProps,n))),jd===null&&(jd=[]),jd.push(t.bind(null,r))}}function Rd(e,t,n){(e===nd&&(rd===2||rd===9)||e.cancelPendingCommit!==null)&&(Gd(e,0),Hd(e,K,pd,!1)),ht(e,n),(!(td&2)||e!==nd)&&(e===nd&&(!(td&2)&&(dd|=n),ld===4&&Hd(e,K,pd,!1)),jf(e))}function zd(e,t,n){if(td&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ut(e,t),a=r?$d(e,t):Zd(e,t,!0),o=r;do{if(a===0){od&&!r&&Hd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Vd(n)){a=Zd(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=hd;var l=c.current.memoizedState.isDehydrated;if(l&&(Gd(c,s).flags|=256),s=Zd(c,s,!1),s!==2&&s!==6){if(sd&&!l){c.errorRecoveryDisabledLanes|=o,dd|=o,a=4;break a}o=gd,gd=a,o!==null&&(gd===null?gd=o:gd.push.apply(gd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Gd(e,0),Hd(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:Hd(r,t,pd,!ad);break a;case 2:gd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=vd+300-Ue(),10<a)){if(Hd(r,t,pd,!ad),lt(r,0,!0)!==0)break a;Ed=t,r.timeoutHandle=xp(Bd.bind(null,r,n,gd,xd,_d,t,pd,dd,md,ad,o,`Throttled`,-0,0),a);break a}Bd(r,n,gd,xd,_d,t,pd,dd,md,ad,o,null,-0,0)}break}while(1);jf(e)}function Bd(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:_n},Bl=null,qu(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=ah.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?vd-Ue():(a&4194048)===a?yd-Ue():0,m=rh(d,m),m!==null)){Ed=a,e.cancelPendingCommit=m(sf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Hd(e,a,o,!l);return}sf(e,t,a,n,r,i,o,s,c,l,u,d)}function Vd(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(!zr(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 Hd(e,t,n,r){t=dt(e,t),t&=~fd,t&=~dd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-tt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&_t(e,n,t)}function Ud(){return td&6?!0:(Mf(0,!1),!1)}function Wd(){if(G!==null){if(rd===0)var e=G.return;else e=G,ha=ma=null,is(e),ro=null,io=0,e=G;for(;e!==null;)xl(e.alternate,e),e=e.return;G=null}}function Gd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Sp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ed=0,Wd(),nd=e,G=n=Mi(e.current,null),K=t,rd=0,id=null,ad=!1,od=ut(e,t),sd=!1,md=pd=fd=dd=ud=ld=0,gd=hd=null,_d=!1,cd=dt(e,t),Si(),n}function Kd(e,t){U=null,F.H=mc,t===qa||t===Ya?(t=to(),rd=3):t===Ja?(t=to(),rd=4):rd=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,id=t,G===null&&(ld=1,Ec(e,Bi(t,e.current)))}function qd(){var e=ko.current;return e===null?!0:(K&4194048)===K?Ao===null:(K&62914560)===K||K&536870912?e===Ao:!1}function Jd(){var e=F.H;return F.H=mc,e===null?mc:e}function Yd(){var e=F.A;return F.A=$u,e}function Xd(){ld=4,ad||(K&4194048)!==K&&ko.current!==null||(od=!0),!(ud&134217727)&&!(dd&134217727)||nd===null||Hd(nd,K,pd,!1)}function Zd(e,t,n){var r=td;td|=2;var i=Jd(),a=Yd();(nd!==e||K!==t)&&(xd=null,Gd(e,t)),t=!1;var o=ld;a:do try{if(rd!==0&&G!==null){var s=G,c=id;switch(rd){case 8:Wd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=rd;if(rd=0,id=null,rf(e,s,c,l),n&&od){o=0;break a}break;default:l=rd,rd=0,id=null,rf(e,s,c,l)}}Qd(),o=ld;break}catch(t){Kd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,td=r,F.H=i,F.A=a,G===null&&(nd=null,K=0,Si()),o}function Qd(){for(;G!==null;)tf(G)}function $d(e,t){var n=td;td|=2;var r=Jd(),a=Yd();nd!==e||K!==t?(xd=null,bd=Ue()+500,Gd(e,t)):od=ut(e,t);a:do try{if(rd!==0&&G!==null){t=G;var o=id;b:switch(rd){case 1:rd=0,id=null,rf(e,t,o,1);break;case 2:case 9:if(Za(o)){rd=0,id=null,nf(t);break}t=function(){rd!==2&&rd!==9||nd!==e||(rd=7),jf(e)},o.then(t,t);break a;case 3:rd=7;break a;case 4:rd=5;break a;case 7:Za(o)?(rd=0,id=null,nf(t)):(rd=0,id=null,rf(e,t,o,7));break;case 5:var s=null;switch(G.tag){case 26:s=G.memoizedState;case 5:case 27:var c=G;if(s?Qm(s):c.stateNode.complete){rd=0,id=null;var l=c.sibling;if(l!==null)G=l;else{var u=c.return;u===null?G=null:(G=u,af(u))}break b}}rd=0,id=null,rf(e,t,o,5);break;case 6:rd=0,id=null,rf(e,t,o,6);break;case 8:Wd(),ld=6;break a;default:throw Error(i(462))}}ef();break}catch(t){Kd(e,t)}while(1);return ha=ma=null,F.H=r,F.A=a,td=n,G===null?(nd=null,K=0,Si(),ld):0}function ef(){for(;G!==null&&!Ve();)tf(G)}function tf(e){var t=fl(e.alternate,e,cd);e.memoizedProps=e.pendingProps,t===null?af(e):G=t}function nf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,K);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,K);break;case 5:is(t);var r=t;r===ta&&(H?(ca(r),r.tag===5&&r.stateNode!=null&&(na=r.stateNode)):(ca(r),H=!0));default:xl(n,t),t=G=Ni(t,cd),t=fl(n,t,cd)}e.memoizedProps=e.pendingProps,t===null?af(e):G=t}function rf(e,t,n,r){ha=ma=null,is(t),ro=null,io=0;var i=t.return;try{if(jc(e,i,t,n,K)){ld=1,Ec(e,Bi(n,e.current)),G=null;return}}catch(t){if(i!==null)throw G=i,t;ld=1,Ec(e,Bi(n,e.current)),G=null;return}t.flags&32768?(H||r===1?e=!0:od||K&536870912?e=!1:(ad=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),of(t,e)):af(t)}function af(e){var t=e;do{if(t.flags&32768){of(t,ad);return}e=t.return;var n=yl(t.alternate,t,cd);if(n!==null){G=n;return}if(t=t.sibling,t!==null){G=t;return}G=t=e}while(t!==null);ld===0&&(ld=5)}function of(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,G=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){G=e;return}G=e=n}while(e!==null);ld=6,G=null}function sf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do hf();while(Cd!==0);if(td&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===nd&&(G=nd=null,K=0),Td=t,wd=e,Ed=n,Od=a,kd=r,cf(e,t,n,s,c,l,f)}}function cf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Dd=s,s|=xi,gt(e,n,s,r,i,a),jd=null,(n&335544064)===n?(Md=Pa(e),r=10262):(Md=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,wf(qe,function(){return gf(),null})):(e.callbackNode=null,e.callbackPriority=0),W=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,i=ge.p,ge.p=2,a=td,td|=4;try{mu(e,t,n)}finally{td=a,ge.p=i,F.T=r}}Cd=1,W?Ad=Lp(o,e.containerInfo,Md,df,ff,uf,pf,gf,lf,null,null):(df(),ff(),pf())}function lf(e){if(Cd!==0){var t=wd.onRecoverableError;t(e,{componentStack:null})}}function uf(){Cd===3&&(Cd=0,Fu(Td,wd),Cd=4)}function df(){if(Cd===1){Cd=0;var e=wd,t=Td,n=Ed,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=F.T,F.T=null;var i=ge.p;ge.p=2;var a=td;td|=4;try{du=fu=!1,ju(t,e,n),n=pp;var o=Gr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Wr(s.ownerDocument.documentElement,s)){if(c!==null&&Kr(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 _=Ur(s,h),v=Ur(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}}yh=!!fp,pp=fp=null}finally{td=a,ge.p=i,F.T=r}}e.current=t,Cd=2}}function ff(){if(Cd===2){Cd=0;var e=wd,t=Td,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=ge.p;ge.p=2;var i=td;td|=4;try{gu(e,t.alternate,t)}finally{td=i,ge.p=r,F.T=n}}Cd=3}}function pf(){if(Cd===4||Cd===3){Cd=0;var e=Ad;Ad=null,He();var t=wd,n=Td,r=Ed,i=kd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Cd=5:(Cd=0,Td=wd=null,mf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Sd=null),bt(r),n=n.stateNode,$e&&typeof $e.onCommitFiberRoot==`function`)try{$e.onCommitFiberRoot(Qe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=F.T,a=ge.p,ge.p=2,F.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{F.T=n,ge.p=a}}if(i=jd,o=Md,Md=null,i!==null&&(jd=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);Ed&3&&hf(),jf(t),a=t.pendingLanes,r&261930&&a&42?t===Pd?Nd++:(Nd=0,Pd=t):(Nd=0,Pd=null),Mf(0,!1)}}function mf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ja(t)))}function hf(){return Ad!==null&&(Ad.skipTransition(),Ad=null),df(),ff(),pf(),gf()}function gf(){if(Cd!==5)return!1;var e=wd,t=Dd;Dd=0;var n=bt(Ed),r=F.T,a=ge.p;try{ge.p=32>n?32:n,F.T=null,n=Od,Od=null;var o=wd,s=Ed;if(Cd=0,Td=wd=null,Ed=0,td&6)throw Error(i(331));var c=td;if(td|=4,Xu(o.current),Hu(o,o.current,s,n),td=c,Mf(0,!1),$e&&typeof $e.onPostCommitFiberRoot==`function`)try{$e.onPostCommitFiberRoot(Qe,o)}catch{}return!0}finally{ge.p=a,F.T=r,mf(e,t)}}function _f(e,t,n){t=Bi(n,t),t=Oc(e.stateNode,t,2),e=go(e,t,2),e!==null&&(ht(e,2),jf(e))}function vf(e,t,n){if(e.tag===3)_f(e,e,n);else for(;t!==null;){if(t.tag===3){_f(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Sd===null||!Sd.has(r))){e=Bi(n,e),n=kc(2),r=go(t,n,2),r!==null&&(Ac(n,r,t,e),ht(r,2),jf(r));break}}t=t.return}}function yf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ed;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)||(sd=!0,i.add(n),e=bf.bind(null,e,t,n),t.then(e,e))}function bf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,nd===e&&(K&n)===n&&(ld===4||ld===3&&(K&62914560)===K&&300>Ue()-vd?td&2?fd|=n:Gd(e,0):fd|=n,md===K&&(md=0)),jf(e)}function xf(e,t){t===0&&(t=pt()),e=Ti(e,t),e!==null&&(ht(e,t),jf(e))}function Sf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xf(e,n)}function Cf(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),xf(e,n)}function wf(e,t){return ze(e,t)}var Tf=null,Ef=null,Df=!1,Of=!1,kf=!1,Af=0;function jf(e){e!==Ef&&e.next===null&&(Ef===null?Tf=Ef=e:Ef=Ef.next=e),Of=!0,Df||(Df=!0,Lf())}function Mf(e,t){if(!kf&&Of){kf=!0;do for(var n=!1,r=Tf;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-tt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,If(r,a))}else a=K,a=lt(r,r===nd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ut(r,a)||(n=!0,If(r,a))}r=r.next}while(n);kf=!1}}function Nf(){Pf()}function Pf(){Of=Df=!1;var e=0;Af!==0&&bp()&&(e=Af);for(var t=Ue(),n=null,r=Tf;r!==null;){var i=r.next,a=q(r,t);a===0?(r.next=null,n===null?Tf=i:n.next=i,i===null&&(Ef=n)):(n=r,(e!==0||a&3)&&(Of=!0)),r=i}Cd!==0&&Cd!==5||Mf(e,!1),Af!==0&&(Af=0)}function q(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-tt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ft(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=nd,n=K,n=lt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(rd===2||rd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ut(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Be(r),bt(n)){case 2:case 8:n=Ke;break;case 32:n=qe;break;case 268435456:n=Ye;break;default:n=qe}return r=Ff.bind(null,e),n=ze(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Be(r),e.callbackPriority=2,e.callbackNode=null,2}function Ff(e,t){if(Cd!==0&&Cd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hf()&&e.callbackNode!==n)return null;var r=K;return r=lt(e,e===nd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(zd(e,r,t),q(e,Ue()),e.callbackNode!=null&&e.callbackNode===n?Ff.bind(null,e):null)}function If(e,t){if(hf())return null;zd(e,t,!0)}function Lf(){Tp(function(){td&6?ze(Ge,Nf):Pf()})}function Rf(){if(Af===0){var e=La;e===0&&(e=at,at<<=1,!(at&261888)&&(at=256)),Af=e}return Af}function zf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:gn(e)}function Bf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=zf((i[Tt]||null).action),o=r.submitter;o&&(t=(t=o[Tt]||null)?zf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Rn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Af!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Vf=0;Vf<fi.length;Vf++){var Hf=fi[Vf];pi(Hf.toLowerCase(),`on`+(Hf[0].toUpperCase()+Hf.slice(1)))}pi(ii,`onAnimationEnd`),pi(ai,`onAnimationIteration`),pi(oi,`onAnimationStart`),pi(`dblclick`,`onDoubleClick`),pi(`focusin`,`onFocus`),pi(`focusout`,`onBlur`),pi(si,`onTransitionRun`),pi(ci,`onTransitionStart`),pi(li,`onTransitionCancel`),pi(ui,`onTransitionEnd`),Vt(`onMouseEnter`,[`mouseout`,`mouseover`]),Vt(`onMouseLeave`,[`mouseout`,`mouseover`]),Vt(`onPointerEnter`,[`pointerout`,`pointerover`]),Vt(`onPointerLeave`,[`pointerout`,`pointerover`]),Bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Uf=`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(` `),Wf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Uf));function Gf(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){vi(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){vi(e)}i.currentTarget=null,a=c}}}}function J(e,t){var n=t[Dt];n===void 0&&(n=t[Dt]=new Set);var r=e+`__bubble`;n.has(r)||(Yf(t,e,2,!1),n.add(r))}function Kf(e,t,n){var r=0;t&&(r|=4),Yf(n,e,r,t)}var qf=`_reactListening`+Math.random().toString(36).slice(2);function Jf(e){if(!e[qf]){e[qf]=!0,Rt.forEach(function(t){t!==`selectionchange`&&(Wf.has(t)||Kf(t,!1,e),Kf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qf]||(t[qf]=!0,Kf(`selectionchange`,!1,t))}}function Yf(e,t,n,r){switch(Eh(t)){case 2:var i=bh;break;case 8:i=xh;break;default:i=Sh}n=i.bind(null,t,n,e),i=void 0,!Dn||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 Xf(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=Nt(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}wn(function(){var r=a,i=yn(n),s=[];a:{var c=di.get(e);if(c!==void 0){var l=Rn,u=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;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=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ir;break;case ii:case ai:case oi:l=Jn;break;case ui:l=ar;break;case`scroll`:case`scrollend`:l=Bn;break;case`wheel`:l=or;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=V;break;case`toggle`:case`beforetoggle`:l=sr}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=Tn(m,p),g!=null&&d.push(Zf(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!==vn&&(u=n.relatedTarget||n.fromElement)&&(Nt(u)||u[Et]))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?Nt(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=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ft(c),h=l==null?u:Ft(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Nt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,$f):null,c!==null&&ep(s,u,c,d,!1),l!==null&&f!==null&&ep(s,f,l,d,!0)))}a:{if(c=r?Ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Dr;else if(xr(c)){if(Or)_=Lr;else{_=Fr;var v=Pr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&pn(r.elementType)&&(_=Dr):_=Ir;if(_&&=_(e,r)){Sr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ft(r):window,e){case`focusin`:(xr(v)||v.contentEditable===`true`)&&(Jr=v,Yr=r,Xr=null);break;case`focusout`:Xr=Yr=Jr=null;break;case`mousedown`:Zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Zr=!1,Qr(s,n,i);break;case`selectionchange`:if(qr)break;case`keydown`:case`keyup`:Qr(s,n,i)}var y;if(lr)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 _r?hr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(fr&&n.locale!==`ko`&&(_r||b!==`onCompositionStart`?b===`onCompositionEnd`&&_r&&(y=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,_r=!0)),v=Qf(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=gr(n),y!==null&&(b.data=y)))),(y=dr?vr(e,n):yr(e,n))&&(b=Qf(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Bf(s,e,r,n,i)}Gf(s,t)})}function Zf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qf(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=Tn(e,n),i!=null&&r.unshift(Zf(e,i,a)),i=Tn(e,t),i!=null&&r.push(Zf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function $f(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ep(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=Tn(n,a),l!=null&&o.unshift(Zf(n,l,c))):i||(l=Tn(n,a),l!=null&&o.push(Zf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var tp=/\r\n?/g,np=/\u0000|\uFFFD/g;function rp(e){return(typeof e==`string`?e:``+e).replace(tp,`
|
|
9
|
-
`).replace(np,``)}function ip(e,t){return t=rp(t),rp(e)===t}function ap(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Yt(e,`class`,r);break;case`tabIndex`:Yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Yt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Yt(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=gn(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`&&ap(e,t,`name`,a.name,a,null),ap(e,t,`formEncType`,a.formEncType,a,null),ap(e,t,`formMethod`,a.formMethod,a,null),ap(e,t,`formTarget`,a.formTarget,a,null)):(ap(e,t,`encType`,a.encType,a,null),ap(e,t,`method`,a.method,a,null),ap(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&J(`scroll`,e);return;case`onScrollEnd`:r!=null&&J(`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=gn(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`:J(`beforetoggle`,e),J(`toggle`,e),Jt(e,`popover`,r);break;case`xlinkActuate`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Jt(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=mn.get(n)||n,Jt(e,n,r);else return}Kt=!0}function op(e,t,n,r,a,o){switch(n){case`style`:fn(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`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&J(`scroll`,e);return;case`onScrollEnd`:r!=null&&J(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!zt.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[Tt]||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}Kt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Jt(e,n,r)}return}Kt=!0}function sp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:J(`error`,e),J(`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:ap(e,t,o,s,n,null)}}a&&ap(e,t,`srcSet`,n.srcSet,n,null),r&&ap(e,t,`src`,n.src,n,null);return;case`input`:J(`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:ap(e,t,r,d,n,null)}}rn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in J(`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:ap(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in J(`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:ap(e,t,s,c,n,null)}cn(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:ap(e,t,l,r,n,null)}return;case`dialog`:J(`beforetoggle`,e),J(`toggle`,e),J(`cancel`,e),J(`close`,e);break;case`iframe`:case`object`:J(`load`,e);break;case`video`:case`audio`:for(r=0;r<Uf.length;r++)J(Uf[r],e);break;case`image`:J(`error`,e),J(`load`,e);break;case`details`:J(`toggle`,e);break;case`embed`:case`source`:case`link`:J(`error`,e),J(`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:ap(e,t,u,r,n,null)}return;default:if(pn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&op(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ap(e,t,c,r,n,null))}var cp={};function lp(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)||ap(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&&(Kt=!0),o=m;break;case`name`:m!==f&&(Kt=!0),a=m;break;case`checked`:m!==f&&(Kt=!0),u=m;break;case`defaultChecked`:m!==f&&(Kt=!0),d=m;break;case`value`:m!==f&&(Kt=!0),s=m;break;case`defaultValue`:m!==f&&(Kt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ap(e,t,p,m,r,f)}}nn(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)||ap(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&&(Kt=!0),p=o;break;case`defaultValue`:o!==l&&(Kt=!0),c=o;break;case`multiple`:o!==l&&(Kt=!0),s=o;default:o!==l&&ap(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(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:ap(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&&(Kt=!0),p=a;break;case`defaultValue`:a!==o&&(Kt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ap(e,t,s,a,r,o)}sn(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:ap(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&&(Kt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ap(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)&&ap(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:ap(e,t,u,p,r,m)}return;default:if(pn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&op(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||op(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ap(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||ap(e,t,f,p,r,m)}function up(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function dp(){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&&up(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&&up(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 fp=null,pp=null;function mp(e){return e.nodeType===9?e:e.ownerDocument}function hp(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 gp(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 _p(e,t,n,r){return n=mp(n).createElement(e),n[wt]=r,n[Tt]=t,sp(n,e,t),It(n),n}function vp(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 yp=null;function bp(){var e=window.event;return e&&e.type===`popstate`?e!==yp&&(yp=e,!0):(yp=null,!1)}var xp=typeof setTimeout==`function`?setTimeout:void 0,Sp=typeof clearTimeout==`function`?clearTimeout:void 0,Cp=typeof Promise==`function`?Promise:void 0,wp=typeof requestAnimationFrame==`function`?requestAnimationFrame:xp,Tp=typeof queueMicrotask==`function`?queueMicrotask:Cp===void 0?xp:function(e){return Cp.resolve(null).then(e).catch(Ep)};function Ep(e){setTimeout(function(){throw e})}function Dp(e){return e===`head`}function Op(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),Gh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[At]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sm(e.ownerDocument.body)}n=i}while(n);Gh(t)}function kp(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 Ap(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 jp(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 Mp(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 Np(e){return Mp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Pp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Mp(t,n,e)}function Fp(e){return e.documentElement.clientHeight}function Ip(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Lp(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`&&(Fp(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+=$m(f),u>nh){s.length=o;break}f=new Promise(Ip.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 Rp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Rp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Rp.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},Rp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function zp(e){return{name:e,group:new Rp(`group`,e),imagePair:new Rp(`image-pair`,e),old:new Rp(`old`,e),new:new Rp(`new`,e)}}function Bp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Bp.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(Gp(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=Up(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Vp,e,s,r)}this._eventListeners=a}};function Vp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Bp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Gp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Up(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Hp,e,n,i),r.splice(t,1),a!==null&&a()}};function Hp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Up(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Wp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Gp(e,t,n,r){if(e.length===0)return-1;r=Wp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Wp(a.optionsOrUseCapture)===r)return i}return-1}Bp.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,Up(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,Up(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Bp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag!==6&&(e=v(e),vm(e,t))}Bp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,qp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Kp(t[n],e);n--);};function qp(e,t){return t.push(e),!1}Bp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=mp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Jp,e,void 0,void 0))};function Jp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Bp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Yp,e,void 0,void 0)};function Yp(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}Bp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Xp,e,void 0,void 0);for(var n=t=0;n<Zp.length;n++){var r=Zp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Zp[t++]=r}Zp.length=t}};function Xp(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var Zp=[],Qp=!1;function $p(e,t,n){Zp.push({fragmentInstance:e,observer:t,instance:n}),Qp||(Qp=!0,ym(function(){Qp=!1;var e=Zp;Zp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Bp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,em,e,void 0,void 0),e};function em(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}Bp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Bp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,qp,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||tm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function tm(e,t,n,r,i){var a=Nt(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=E(n,a,T),t===null?t=!1:(f(t,!0,S,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(f(t,!0,w,a,r),a=y,b=y=null,t=a!==null)),t):!1}function nm(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)}Bp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,qp,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),nm(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),nm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function rm(e,t){return e=v(e),im(e,t),!1}function im(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function am(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,Up(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Zp.length;i++){var a=Zp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Zp[r++]=a)}Zp.length=r,n.observe(e)}),im(e,t))}function om(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,Up(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?$p(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function sm(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`:sm(n),Mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function cm(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[At])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=mm(e.nextSibling),e===null)break}return null}function lm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=mm(e.nextSibling),e===null))return null;return e}function um(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=mm(e.nextSibling),e===null))return null;return e}function dm(e){return e.data===`$?`||e.data===`$~`}function fm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function pm(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 mm(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 hm=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return mm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function _m(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 vm(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 ym(e){wp(function(){wp(function(t){return e(t)})})}function bm(e,t,n){switch(t=mp(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 xm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ap(e,t,r,null,cp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===_n&&(e.onclick=null),Mt(e)}function Sm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mt(e)}var Cm=new Map,wm=new Set;function Tm(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 Em=ge.d;ge.d={f:Dm,r:Om,D:jm,C:Mm,L:Nm,m:Pm,X:Im,S:Fm,M:Lm};function Dm(){var e=Em.f(),t=Ud();return e||t}function Om(e){var t=Pt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):Em.r(e)}var km=typeof document>`u`?null:document;function Am(e,t,n){var r=km;if(r&&typeof t==`string`&&t){var i=tn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wm.has(i)||(wm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),sp(t,`link`,e),It(t),r.head.appendChild(t)))}}function jm(e){Em.D(e),Am(`dns-prefetch`,e,null)}function Mm(e,t){Em.C(e,t),Am(`preconnect`,e,t)}function Nm(e,t,n){Em.L(e,t,n);var r=km;if(r&&e&&t){var i=`link[rel="preload"][as="`+tn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+tn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+tn(n.imageSizes)+`"]`)):i+=`[href="`+tn(e)+`"]`;var a=i;switch(t){case`style`:a=zm(e);break;case`script`:a=Um(e)}if(!(Cm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bm(a))||t===`script`&&r.querySelector(Wm(a))))){var o=r.createElement(`link`);sp(o,`link`,e),t===`style`&&(o[jt]=!0,o.onload=o.onerror=function(){Lt(o)}),It(o),r.head.appendChild(o)}}}function Pm(e,t){Em.m(e,t);var n=km;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+tn(r)+`"][href="`+tn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Um(e)}if(!Cm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Cm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wm(a)))return}r=n.createElement(`link`),sp(r,`link`,e),It(r),n.head.appendChild(r)}}}function Fm(e,t,n){Em.S(e,t,n);var r=km;if(r&&e){var i=R(r).hoistableStyles,a=zm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cm.get(a))&&Km(e,n);var c=o=r.createElement(`link`);It(c),sp(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,Gm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Im(e,t){Em.X(e,t);var n=km;if(n&&e){var r=R(n).hoistableScripts,i=Um(e),a=r.get(i);a||(a=n.querySelector(Wm(i)),a||(e=D({src:e,async:!0},t),(t=Cm.get(i))&&X(e,t),a=n.createElement(`script`),It(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t){Em.M(e,t);var n=km;if(n&&e){var r=R(n).hoistableScripts,i=Um(e),a=r.get(i);a||(a=n.querySelector(Wm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Cm.get(i))&&X(e,t),a=n.createElement(`script`),It(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rm(e,t,n,r){var a=(a=Te.current)?Tm(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=zm(n.href),t=R(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=zm(n.href);var o=R(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(Bm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Cm.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},Cm.set(e,o)),Hm(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=Um(n),t=R(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 zm(e){return`href="`+tn(e)+`"`}function Bm(e){return`link[rel="stylesheet"][`+e+`]`}function Vm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Hm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[jt]){r.loading=1;return}}else t=e.createElement(`link`),t[jt]=!0,t.onload=t.onerror=Lt.bind(null,t),sp(t,`link`,n),It(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 Um(e){return`[src="`+tn(e)+`"]`}function Wm(e){return`script[async]`+e}function Y(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+tn(n.href)+`"]`);if(r)return t.instance=r,It(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),It(r),sp(r,`style`,a),Gm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zm(n.href);var o=e.querySelector(Bm(a));if(o)return t.state.loading|=4,t.instance=o,It(o),o;r=Vm(n),(a=Cm.get(a))&&Km(r,a),o=(e.ownerDocument||e).createElement(`link`),It(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),sp(o,`link`,r),t.state.loading|=4,Gm(o,n.precedence,e),t.instance=o;case`script`:return o=Um(n.src),(a=e.querySelector(Wm(o)))?(t.instance=a,It(a),a):(r=n,(a=Cm.get(o))&&(r=D({},n),X(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),It(a),sp(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,Gm(r,n.precedence,e));return t.instance}function Gm(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 Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function X(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qm=null;function Jm(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[At]||a[wt]||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 Ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xm(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 Zm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Qm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $m(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function eh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=$m(t),e.suspenseyImages.push(t)),e=oh.bind(e),t.decode().then(e,e))}function th(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=zm(r.href),a=t.querySelector(Bm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,It(a);return}a=t.ownerDocument||t,r=Vm(r),(i=Cm.get(i))&&Km(r,i),a=a.createElement(`link`),It(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),sp(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=ah.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var nh=0;function rh(e,t){return e.stylesheets&&e.count===0&&ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&nh===0&&(nh=62500*dp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>nh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ih(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ah(){this.count--,ih(this)}function oh(){this.imgCount--,ih(this)}var sh=null;function ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(lh,e),sh=null,ah.call(e))}function lh(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.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=ah.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 uh={$$typeof:N,Provider:null,Consumer:null,_currentValue:_e,_currentValue2:_e,_threadCount:0};function dh(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=mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.hiddenUpdates=mt(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 fh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ai(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function ph(e){return e?(e=Oi,e):Oi}function mh(e,t,n,r,i,a){i=ph(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Rd(n,e,t),_o(n,e,t))}function hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gh(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function _h(e){if(e.tag===13||e.tag===31){var t=Ti(e,67108864);t!==null&&Rd(t,e,67108864),gh(e,67108864)}}function vh(e){if(e.tag===13||e.tag===31){var t=Fd();t=yt(t);var n=Ti(e,t);n!==null&&Rd(n,e,t),gh(e,t)}}var yh=!0;function bh(e,t,n,r){var i=F.T;F.T=null;var a=ge.p;try{ge.p=2,Sh(e,t,n,r)}finally{ge.p=a,F.T=i}}function xh(e,t,n,r){var i=F.T;F.T=null;var a=ge.p;try{ge.p=8,Sh(e,t,n,r)}finally{ge.p=a,F.T=i}}function Sh(e,t,n,r){if(yh){var i=Ch(r);if(i===null)Xf(e,t,r,wh,n),Fh(e,r);else if(Lh(i,e,t,n,r))r.stopPropagation();else if(Fh(e,r),t&4&&-1<Ph.indexOf(e)){for(;i!==null;){var a=Pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ct(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-tt(o);s.entanglements[1]|=c,o&=~c}jf(a),!(td&6)&&(bd=Ue()+500,Mf(0,!1))}}break;case 31:case 13:s=Ti(a,2),s!==null&&Rd(s,a,2),Ud(),gh(a,2)}if(a=Ch(r),a===null&&Xf(e,t,r,wh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Xf(e,t,r,null,n)}}function Ch(e){return e=yn(e),Th(e)}var wh=null;function Th(e){if(wh=null,e=Nt(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 wh=e,null}function Eh(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(We()){case Ge:return 2;case Ke:return 8;case qe:case Je:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var Dh=!1,Oh=null,kh=null,Ah=null,jh=new Map,Mh=new Map,Nh=[],Ph=`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 Fh(e,t){switch(e){case`focusin`:case`focusout`:Oh=null;break;case`dragenter`:case`dragleave`:kh=null;break;case`mouseover`:case`mouseout`:Ah=null;break;case`pointerover`:case`pointerout`:jh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mh.delete(t.pointerId)}}function Ih(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=Pt(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lh(e,t,n,r,i){switch(t){case`focusin`:return Oh=Ih(Oh,e,t,n,r,i),!0;case`dragenter`:return kh=Ih(kh,e,t,n,r,i),!0;case`mouseover`:return Ah=Ih(Ah,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jh.set(a,Ih(jh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mh.set(a,Ih(Mh.get(a)||null,e,t,n,r,i)),!0}return!1}function Rh(e){var t=Nt(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,St(e.priority,function(){vh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,St(e.priority,function(){vh(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 zh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ch(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Pt(n),t!==null&&_h(t),e.blockedOn=n,!1;t.shift()}return!0}function Bh(e,t,n){zh(e)&&n.delete(t)}function Vh(){Dh=!1,Oh!==null&&zh(Oh)&&(Oh=null),kh!==null&&zh(kh)&&(kh=null),Ah!==null&&zh(Ah)&&(Ah=null),jh.forEach(Bh),Mh.forEach(Bh)}function Hh(e,n){e.blockedOn===n&&(e.blockedOn=null,Dh||(Dh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vh)))}var Uh=null;function Wh(e){Uh!==e&&(Uh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Uh===e&&(Uh=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(Th(r||n)===null)continue;break}var a=Pt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gh(e){function t(t){return Hh(t,e)}Oh!==null&&Hh(Oh,e),kh!==null&&Hh(kh,e),Ah!==null&&Hh(Ah,e),jh.forEach(t),Mh.forEach(t);for(var n=0;n<Nh.length;n++){var r=Nh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Nh.length&&(n=Nh[0],n.blockedOn===null);)Rh(n),n.blockedOn===null&&Nh.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[Tt]||null;if(typeof a==`function`)o||Wh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Tt]||null)s=o.formAction;else if(Th(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wh(n)}}}function Kh(){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}Jh.prototype.render=qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mh(n,Fd(),e,t,null,null)},Jh.prototype.unmount=qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mh(e.current,2,null,e,null,null),Ud(),t[Et]=null}};function Jh(e){this._internalRoot=e}Jh.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nh.length&&t!==0&&t<Nh[n].priority;n++);Nh.splice(n,0,e),n===0&&Rh(e)}};var Yh=n.version;if(Yh!==`19.3.0`)throw Error(i(527,Yh,`19.3.0`));ge.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 Xh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zh.isDisabled&&Zh.supportsFiber)try{Qe=Zh.inject(Xh),$e=Zh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;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=fh(e,1,!1,null,null,n,r,null,o,s,c,Kh),e[Et]=t.current,Jf(e),new qh(t)}})),T=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=w()}))(),E=l(C(),1);function D(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var O=e=>{switch(e){case`success`:return A;case`info`:return M;case`warning`:return j;case`error`:return te;default:return null}},k=Array(12).fill(0),ee=({visible:e,className:t})=>m.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},m.createElement(`div`,{className:`sonner-spinner`},k.map((e,t)=>m.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),A=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),j=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),M=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),te=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),N=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},m.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),m.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),P=()=>{let[e,t]=m.useState(document.hidden);return m.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},ne=1,re=100,ie=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:ne++,ae=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-re;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=ie(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],m.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(se(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=ie(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},oe=(e,t)=>ae.message(e,t),se=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ce=Object.assign(oe,{success:ae.success,info:ae.info,warning:ae.warning,error:ae.error,custom:ae.custom,message:ae.message,promise:ae.promise,dismiss:ae.dismiss,loading:ae.loading},{getHistory:()=>ae.toasts,getToasts:()=>ae.getActiveToasts()});D(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function le(e){return e.label!==void 0}var ue=3,de=`24px`,fe=`16px`,pe=4e3,me=356,he=14,F=45,ge=200;function _e(...e){return e.filter(Boolean).join(` `)}function ve(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ye=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:h,cancelButtonStyle:g,actionButtonStyle:_,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,k]=m.useState(null),[A,j]=m.useState(null),[M,te]=m.useState(!1),[ne,re]=m.useState(!1),[ie,ae]=m.useState(!1),[oe,se]=m.useState(!1),[ce,ue]=m.useState(!1),[de,fe]=m.useState(0),[me,he]=m.useState(0),ye=m.useRef(n.duration||b||pe),be=m.useRef(null),xe=m.useRef(null),Se=c===0,Ce=c+1<=o,we=n.type,Te=we??`default`,Ee=n.dismissible!==!1,De=n.className||``,Oe=n.descriptionClassName||``,ke=m.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Ae=m.useMemo(()=>n.closeButton??p,[n.closeButton,p]),je=m.useMemo(()=>n.duration||b||pe,[n.duration,b]),Me=m.useRef(0),Ne=m.useRef(0),Pe=m.useRef(0),Fe=m.useRef(null),[Ie,Le]=x.split(`-`),Re=m.useMemo(()=>s.reduce((e,t,n)=>n>=ke?e:e+t.height,0),[s,ke]),ze=P(),Be=m.useMemo(()=>e.swipeDirections??ve(x),[e.swipeDirections,x]),Ve=n.invert||t,He=we===`loading`;Ne.current=m.useMemo(()=>ke*S+Re,[ke,Re]),m.useEffect(()=>{ye.current=je},[je]),m.useEffect(()=>{te(!0)},[]),m.useEffect(()=>{let e=xe.current;if(e){let t=e.getBoundingClientRect().height;return he(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),m.useLayoutEffect(()=>{if(!M)return;let e=xe.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,he(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[M,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Ue=m.useCallback(()=>{re(!0),fe(Ne.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},ge)},[n,d,a,Ne]);m.useEffect(()=>{if(n.promise&&we===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ze?(()=>{if(Pe.current<Me.current){let e=new Date().getTime()-Me.current;ye.current-=e}Pe.current=new Date().getTime()})():ye.current!==1/0&&(Me.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Ue()},ye.current)),()=>clearTimeout(e)},[u,i,n,we,ze,Ue]),m.useEffect(()=>{n.delete&&(Ue(),n.onDismiss==null||n.onDismiss.call(n,n))},[Ue,n.delete]);function We(){return T?.loading?m.createElement(`div`,{className:_e(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":we===`loading`},T.loading):m.createElement(ee,{className:_e(w?.loader,n?.classNames?.loader),visible:we===`loading`})}let Ge=n.icon||T?.[we]||O(we);return m.createElement(`li`,{tabIndex:0,ref:xe,className:_e(v,De,w?.toast,n?.classNames?.toast,w?.[Te],n?.classNames?.[Te]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":M,"data-promise":!!n.promise,"data-swiped":ce,"data-removed":ne,"data-visible":Ce,"data-y-position":Ie,"data-x-position":Le,"data-index":c,"data-front":Se,"data-swiping":ie,"data-dismissible":Ee,"data-type":we,"data-invert":Ve,"data-swipe-out":oe,"data-swipe-direction":A,"data-expanded":!!(u||C&&M),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${ne?de:Ne.current}px`,"--initial-height":C?`auto`:`${me}px`,...h,...n.style},onDragEnd:()=>{ae(!1),k(null),Fe.current=null},onPointerDown:e=>{e.button!==2&&!He&&Ee&&(be.current=new Date,fe(Ne.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ae(!0),Fe.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(oe||!Ee)return;Fe.current=null;let e=Number(xe.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(xe.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-be.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?Be.includes(e>0?`right`:`left`):Be.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=F||a>.11)){fe(Ne.current),n.onDismiss==null||n.onDismiss.call(n,n),j(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Ue(),se(!0);return}var o,s;(o=xe.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=xe.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ue(!1),ae(!1),k(null)},onPointerMove:e=>{var t,n;if(!Fe.current||!Ee||window.getSelection()?.toString().length>0)return;let r=e.clientY-Fe.current.y,i=e.clientX-Fe.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&k(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(Be.includes(`top`)||Be.includes(`bottom`)){if(Be.includes(`top`)&&r<0||Be.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(Be.includes(`left`)||Be.includes(`right`))){if(Be.includes(`left`)&&i<0||Be.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ue(!0),(t=xe.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=xe.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},Ae&&!n.jsx&&we!==`loading`?m.createElement(`button`,{"aria-label":E,"data-disabled":He,"data-close-button":!0,onClick:He||!Ee?()=>{}:()=>{Ue(),n.onDismiss==null||n.onDismiss.call(n,n)},className:_e(w?.closeButton,n?.classNames?.closeButton)},T?.close??N):null,(we||n.icon||n.promise)&&n.icon!==null&&(T?.[we]!==null||n.icon)?m.createElement(`div`,{"data-icon":``,className:_e(w?.icon,n?.classNames?.icon)},we===`loading`?n.icon||We():n.promise?We():null,we===`loading`?null:Ge):null,m.createElement(`div`,{"data-content":``,className:_e(w?.content,n?.classNames?.content)},m.createElement(`div`,{"data-title":``,className:_e(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?m.createElement(`div`,{"data-description":``,className:_e(y,Oe,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),m.isValidElement(n.cancel)?n.cancel:n.cancel&&le(n.cancel)?m.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||g,onClick:e=>{le(n.cancel)&&Ee&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Ue())},className:_e(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,m.isValidElement(n.action)?n.action:n.action&&le(n.action)?m.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||_,onClick:e=>{le(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Ue())},className:_e(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function be(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function xe(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?fe:de;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Se=m.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:h,visibleToasts:g=ue,toastOptions:_,dir:v=be(),gap:y=he,icons:b,customAriaLabel:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=m.useState([]),T=m.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),D=m.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[O,k]=m.useState([]),[ee,A]=m.useState(!1),[j,M]=m.useState(!1),[te,N]=m.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=m.useRef(null),ne=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),re=m.useRef(null),ie=m.useRef(!1),oe=m.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||ae.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return m.useEffect(()=>ae.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{E.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),m.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),m.useEffect(()=>{C.length<=1&&A(!1)},[C]),m.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;A(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),m.useEffect(()=>{if(P.current)return()=>{re.current&&(re.current.focus({preventScroll:!0}),re.current=null,ie.current=!1)}},[P.current]),m.createElement(`section`,{ref:t,"aria-label":x??`${S} ${ne}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?m.createElement(`ol`,{key:t,dir:v===`auto`?be():v,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":te,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${O[0]?.height||0}px`,"--width":`${me}px`,"--gap":`${y}px`,...h,...xe(l,u)},onBlur:e=>{ie.current&&!e.currentTarget.contains(e.relatedTarget)&&(ie.current=!1,re.current&&=(re.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ie.current||(ie.current=!0,re.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>m.createElement(ye,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:f,duration:_?.duration??p,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:g,closeButton:_?.closeButton??s,interacting:j,position:t,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,closeButtonAriaLabel:_?.closeButtonAriaLabel,removeToast:oe,toasts:T.filter(e=>e.position==n.position),heights:O.filter(e=>e.position==n.position),setHeights:k,expandByDefault:o,gap:y,expanded:ee,swipeDirections:e.swipeDirections}))):null}))}),Ce=[`lobby`,`tasks`,`plan`,`quickfix`,`issues`,`metrics`,`git`,`knowledge`,`excalidraw`],we=`already answered in the terminal`,Te=`pi is asking in the terminal`,Ee=`the window is too narrow to show the lobby`;function De(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=De(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Oe(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=De(e))&&(r&&(r+=` `),r+=t);return r}var ke=(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},Ae=(e,t)=>({classGroupId:e,validator:t}),je=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Me=`-`,Ne=[],Pe=`arbitrary..`,Fe=e=>{let t=Re(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Le(e);let n=e.split(Me);return Ie(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ke(i,t):t:i||Ne}return n[e]||Ne}}},Ie=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ie(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Me):e.slice(t).join(Me),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Le=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?Pe+r:void 0})(),Re=e=>{let{theme:t,classGroups:n}=e;return ze(n,t)},ze=(e,t)=>{let n=je();for(let r in e){let i=e[r];Be(i,n,r,t)}return n},Be=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Ve(i,t,n,r)}},Ve=(e,t,n,r)=>{if(typeof e==`string`){He(e,t,n);return}if(typeof e==`function`){Ue(e,t,n,r);return}We(e,t,n,r)},He=(e,t,n)=>{let r=e===``?t:Ge(t,e);r.classGroupId=n},Ue=(e,t,n,r)=>{if(Ke(e)){Be(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ae(n,e))},We=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Be(o,Ge(t,a),n,r)}},Ge=(e,t)=>{let n=e,r=t.split(Me),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=je(),n.nextPart.set(t,i)),n=i}return n},Ke=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,qe=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)}}},Je=`!`,Ye=`:`,Xe=[],Ze=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Qe=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===Ye){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(Je)?(c=s.slice(0,-1),l=!0):s.startsWith(Je)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Ze(t,l,c,u)};if(t){let e=t+Ye,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ze(Xe,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},$e=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}},et=e=>({cache:qe(e.cacheSize),parseClassName:Qe(e),sortModifiers:$e(e),postfixLookupClassGroupIds:tt(e),...Fe(e)}),tt=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},nt=/\s+/,rt=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(nt),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?_+Je:_,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},it=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=at(n))&&(i&&(i+=` `),i+=r);return i},at=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=at(e[r]))&&(n&&(n+=` `),n+=t);return n},ot=(e,...t)=>{let n,r,i,a,o=o=>(n=et(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=rt(e,n);return i(e,a),a};return a=o,(...e)=>a(it(...e))},st=[],ct=e=>{let t=t=>t[e]||st;return t.isThemeGetter=!0,t.themeKey=e,t},lt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ut=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ft=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pt=/\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$/,mt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,ht=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_t=e=>dt.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),vt=e=>!!e&&Number.isInteger(Number(e)),yt=e=>e.endsWith(`%`)&&I(e.slice(0,-1)),bt=e=>ft.test(e),xt=()=>!0,St=e=>pt.test(e)&&!mt.test(e),Ct=()=>!1,wt=e=>ht.test(e),Tt=e=>gt.test(e),Et=e=>!L(e)&&!R(e),Dt=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)),Ot=e=>Ut(e,qt,Ct),L=e=>lt.test(e),kt=e=>Ut(e,Jt,St),At=e=>Ut(e,Yt,I),jt=e=>Ut(e,Zt,xt),Mt=e=>Ut(e,Xt,Ct),Nt=e=>Ut(e,Gt,Ct),Pt=e=>Ut(e,Kt,Tt),Ft=e=>Ut(e,Qt,wt),R=e=>ut.test(e),It=e=>Wt(e,Jt),Lt=e=>Wt(e,Xt),Rt=e=>Wt(e,Gt),zt=e=>Wt(e,qt),Bt=e=>Wt(e,Kt),Vt=e=>Wt(e,Qt,!0),Ht=e=>Wt(e,Zt,!0),Ut=(e,t,n)=>{let r=lt.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Wt=(e,t,n=!1)=>{let r=ut.exec(e);return r?r[1]?t(r[1]):n:!1},Gt=e=>e===`position`||e===`percentage`,Kt=e=>e===`image`||e===`url`,qt=e=>e===`length`||e===`size`||e===`bg-size`,Jt=e=>e===`length`,Yt=e=>e===`number`,Xt=e=>e===`family-name`,Zt=e=>e===`number`||e===`weight`,Qt=e=>e===`shadow`,$t=ot(()=>{let e=ct(`color`),t=ct(`font`),n=ct(`text`),r=ct(`font-weight`),i=ct(`tracking`),a=ct(`leading`),o=ct(`breakpoint`),s=ct(`container`),c=ct(`spacing`),l=ct(`radius`),u=ct(`shadow`),d=ct(`inset-shadow`),f=ct(`text-shadow`),p=ct(`drop-shadow`),m=ct(`blur`),h=ct(`perspective`),g=ct(`aspect`),_=ct(`ease`),v=ct(`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(),R,L],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[R,L,c],T=()=>[_t,`full`,`auto`,...w()],E=()=>[vt,`none`,`subgrid`,R,L],D=()=>[`auto`,{span:[`full`,vt,R,L]},vt,R,L],O=()=>[vt,`auto`,R,L],k=()=>[`auto`,`min`,`max`,`fr`,R,L],ee=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[_t,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],te=()=>[s,_t,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],N=()=>[_t,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,R,L],ne=()=>[...b(),Rt,Nt,{position:[R,L]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,zt,Ot,{size:[R,L]}],ae=()=>[yt,It,kt],oe=()=>[``,`none`,`full`,l,R,L],se=()=>[``,I,It,kt],ce=()=>[`solid`,`dashed`,`dotted`,`double`],le=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ue=()=>[I,yt,Rt,Nt],de=()=>[``,`none`,m,R,L],fe=()=>[`none`,I,R,L],pe=()=>[`none`,I,R,L],me=()=>[I,R,L],he=()=>[_t,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[bt],breakpoint:[bt],color:[xt],container:[bt],"drop-shadow":[bt],ease:[`in`,`out`,`in-out`],font:[Et],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[bt],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[bt],shadow:[bt],spacing:[`px`,I],text:[bt],"text-shadow":[bt],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,_t,L,R,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,R,L]}],"container-named":[Dt],columns:[{columns:[I,`auto`,L,R,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:[vt,`auto`,R,L]}],basis:[{basis:[_t,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[I,_t,`auto`,`initial`,`none`,L]}],grow:[{grow:[``,I,R,L]}],shrink:[{shrink:[``,I,R,L]}],order:[{order:[vt,`first`,`last`,`none`,R,L]}],"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:[...ee(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...ee()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],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:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...te()]}],"min-inline-size":[{"min-inline":[`auto`,...te()]}],"max-inline-size":[{"max-inline":[`none`,...te()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...M()]}],"font-size":[{text:[`base`,n,It,kt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ht,jt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,yt,L]}],"font-family":[{font:[Lt,Mt,t]}],"font-features":[{"font-features":[L]}],"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,R,L]}],"line-clamp":[{"line-clamp":[I,`none`,R,At]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,R,L]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,R,L]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ce(),`wavy`]}],"text-decoration-thickness":[{decoration:[I,`from-font`,`auto`,R,kt]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[I,`auto`,R,L]}],"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:[vt,R,L]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,R,L]}],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`,R,L]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},vt,R,L],radial:[``,R,L],conic:[``,vt,R,L]},Bt,Pt]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":se()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ce(),`hidden`,`none`]}],"divide-style":[{divide:[...ce(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ce(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[I,R,L]}],"outline-w":[{outline:[``,I,It,kt]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`inner`,`none`,u,Vt,Ft]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,Vt,Ft]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:se()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[I,kt]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,Vt,Ft]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[I,R,L]}],"mix-blend":[{"mix-blend":[...le(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":le()}],"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":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[R,L]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,R,L]}],filter:[{filter:[``,`none`,R,L]}],blur:[{blur:de()}],brightness:[{brightness:[I,R,L]}],contrast:[{contrast:[I,R,L]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Vt,Ft]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,I,R,L]}],"hue-rotate":[{"hue-rotate":[I,R,L]}],invert:[{invert:[``,I,R,L]}],saturate:[{saturate:[I,R,L]}],sepia:[{sepia:[``,I,R,L]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,R,L]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[I,R,L]}],"backdrop-contrast":[{"backdrop-contrast":[I,R,L]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,I,R,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,R,L]}],"backdrop-invert":[{"backdrop-invert":[``,I,R,L]}],"backdrop-opacity":[{"backdrop-opacity":[I,R,L]}],"backdrop-saturate":[{"backdrop-saturate":[I,R,L]}],"backdrop-sepia":[{"backdrop-sepia":[``,I,R,L]}],"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`,R,L]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[I,`initial`,R,L]}],ease:[{ease:[`linear`,`initial`,_,R,L]}],delay:[{delay:[I,R,L]}],animate:[{animate:[`none`,v,R,L]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,R,L]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":[`scale-3d`],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[R,L,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":[`translate-none`],zoom:[{zoom:[vt,R,L]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"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`,R,L]}],"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":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"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`,R,L]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[I,It,kt,At]}],stroke:[{stroke:[`none`,...P()]}],"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 z(...e){return $t(Oe(e))}var en=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})),B=o(((e,t)=>{t.exports=en()}))();function tn({className:e,...t}){return(0,B.jsx)(`kbd`,{"data-slot":`kbd`,className:z(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3`,e),...t})}var nn={activity:400,thoughts:40,chat:100};function rn(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 an=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:rn(t.activity,e.activity??[],nn.activity),thoughts:rn(t.thoughts,e.thoughts??[],nn.thoughts),chat:rn(t.chat,e.chat??[],nn.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 on(){return new an}var sn=on(),cn=Object.defineProperty,ln=(e,t)=>cn(e,`name`,{value:t,configurable:!0});function un(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ln(un,`setRef`);function dn(...e){return t=>{let n=!1,r=e.map(e=>{let r=un(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():un(e[t],null)}}}}ln(dn,`composeRefs`);function fn(...e){return m.useCallback(dn(...e),e)}ln(fn,`useComposedRefs`);var pn=Object.defineProperty,mn=(e,t)=>pn(e,`name`,{value:t,configurable:!0});function hn(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];wn(r)&&typeof On==`function`&&(r=On(r._payload)),m.Children.forEach(r,e=>{if(Sn(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;wn(n)&&typeof On==`function`&&(n=On(n._payload)),a=yn(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?xn(a):void 0,l=fn(n,c);if(!a){if(r||r===0)throw Error(o?Dn(e):En(e));return r}let u=bn(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}mn(hn,`createSlot`);var gn=hn(`Slot`),_n=Symbol.for(`radix.slottable`);function vn(e){let t=mn(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=_n,t}mn(vn,`createSlottable`);var yn=mn((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 bn(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}}mn(bn,`mergeProps`);function xn(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)}mn(xn,`getElementRef`);function Sn(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===_n}mn(Sn,`isSlottable`);var Cn=Symbol.for(`react.lazy`);function wn(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Cn&&`_payload`in e&&Tn(e._payload)}mn(wn,`isLazyComponent`);function Tn(e){return typeof e==`object`&&!!e&&`then`in e}mn(Tn,`isPromiseLike`);var En=mn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Dn=mn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),On=m.use,kn=Object.defineProperty,An=(e,t)=>kn(e,`name`,{value:t,configurable:!0}),jn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=hn(`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,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mn(e,t){e&&E.flushSync(()=>e.dispatchEvent(t))}An(Mn,`dispatchDiscreteCustomEvent`);var Nn=Object.defineProperty,Pn=(e,t)=>Nn(e,`name`,{value:t,configurable:!0}),Fn=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`}),In=m.forwardRef(Pn(function(e,t){return(0,B.jsx)(jn.span,{...e,ref:t,style:{...Fn,...e.style}})},`VisuallyHidden`)),Ln=Object.defineProperty,Rn=(e,t)=>Ln(e,`name`,{value:t,configurable:!0});function zn(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=Rn(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,B.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 Rn(i,`useContext`),[r,i]}Rn(zn,`createContext`);function Bn(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=Rn(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,B.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 Rn(s,`useContext`),[o,s]}Rn(r,`createContext`);let i=Rn(()=>{let t=n.map(e=>m.createContext(e));return Rn(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Vn(i,...t)]}Rn(Bn,`createContextScope`);function Vn(...e){let t=e[0];if(e.length===1)return t;let n=Rn(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Rn(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}Rn(Vn,`composeContextScopes`);var Hn=Object.defineProperty,Un=(e,t)=>Hn(e,`name`,{value:t,configurable:!0});function Wn(e){let t=e+`CollectionProvider`,[n,r]=Bn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Un(e=>{let{scope:t,children:n}=e,r=m.useRef(null),a=m.useRef(new Map).current;return(0,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=hn(s),l=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=fn(t,a(s,n).collectionRef);return(0,B.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=hn(u),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),s=fn(t,o),c=a(u,n);return m.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.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 Un(h,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},h,r]}Un(Wn,`createCollection`);var Gn=new WeakMap,Kn=class e extends Map{static{Un(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Gn.set(this,!0)}set(e,t){return Gn.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=Yn(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=qn(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=qn(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return qn(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 qn(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Jn(e,t);return n===-1?void 0:e[n]}Un(qn,`at`);function Jn(e,t){let n=e.length,r=Yn(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Un(Jn,`toSafeIndex`);function Yn(e){return e!==e||e===0?0:Math.trunc(e)}Un(Yn,`toSafeInteger`);function Xn(e){let t=e+`CollectionProvider`,[n,r]=Bn(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Kn,setItemMap:Un(()=>void 0,`setItemMap`)}),o=Un(({state:e,...t})=>e?(0,B.jsx)(c,{...t,state:e}):(0,B.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Un(e=>{let t=g();return(0,B.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Un(e=>{let{scope:t,children:n,state:r}=e,a=m.useRef(null),[o,s]=m.useState(null),c=fn(a,s),[l,u]=r;return m.useEffect(()=>{if(!o)return;let e=er(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,B.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=hn(l),d=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=fn(t,a(l,n).collectionRef);return(0,B.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=hn(f),h=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),[s,c]=m.useState(null),l=fn(t,o,c),{setItemMap:u}=a(f,n),d=m.useRef(i);Zn(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($n):(t.set(s,{...e,element:s}),t.toSorted($n)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Kn(e)))}},[s,h,u]),(0,B.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});h.displayName=f;function g(){return m.useState(new Kn)}Un(g,`useInitCollection`);function _(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Un(_,`useCollection`),[{Provider:o,Slot:d,ItemSlot:h},{createCollectionScope:r,useCollection:_,useInitCollection:g}]}Un(Xn,`createCollection`);function Zn(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}Un(Zn,`shallowEqual`);function Qn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Un(Qn,`isElementPreceding`);function $n(e,t){return!e[1].element||!t[1].element?0:Qn(e[1].element,t[1].element)?-1:1}Un($n,`sortByDocumentPosition`);function er(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Un(er,`getChildListObserver`);var tr=Object.defineProperty,nr=(e,t)=>tr(e,`name`,{value:t,configurable:!0}),rr=!!(typeof window<`u`&&window.document&&window.document.createElement);function V(e,t,{checkForDefaultPrevented:n=!0}={}){return nr(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}nr(V,`composeEventHandlers`);function ir(e){if(!rr)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}nr(ir,`getOwnerWindow`);function ar(e){if(!rr)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}nr(ar,`getOwnerDocument`);function or(e,t=!1){let{activeElement:n}=ar(e);if(!n?.nodeName)return null;if(sr(n)&&n.contentDocument)return or(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ar(n).getElementById(e);if(t)return t}}return n}nr(or,`getActiveElement`);function sr(e){return e.tagName===`IFRAME`}nr(sr,`isFrame`);var cr=globalThis?.document?m.useLayoutEffect:()=>{},lr=Object.defineProperty,ur=(e,t)=>lr(e,`name`,{value:t,configurable:!0}),dr=m.useEffectEvent,fr=m.useInsertionEffect;function pr(e){if(typeof dr==`function`)return dr(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof fr==`function`?fr(()=>{t.current=e}):cr(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}ur(pr,`useEffectEvent`);var mr=Object.defineProperty,hr=(e,t)=>mr(e,`name`,{value:t,configurable:!0}),gr=m.useInsertionEffect||cr;function _r({prop:e,defaultProp:t,onChange:n=hr(()=>{},`onChange`),caller:r}){let[i,a,o]=vr({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=yr(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}hr(_r,`useControllableState`);function vr({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return gr(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}hr(vr,`useUncontrolledState`);function yr(e){return typeof e==`function`}hr(yr,`isFunction`);var br=Symbol(`RADIX:SYNC_STATE`);function xr(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=pr(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===br)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:br,state:i})},[i,d.state,c]),[g,f]}hr(xr,`useControllableStateReducer`);var Sr=Object.defineProperty,Cr=(e,t)=>Sr(e,`name`,{value:t,configurable:!0});function wr(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}Cr(wr,`useStateMachine`);var Tr=Cr(e=>{let{present:t,children:n}=e,r=Er(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=Or(r.ref,Ar(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function Er(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]=wr(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??kr(r.current),o.current=void 0):a.current=`none`},[s]),cr(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=kr(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]),cr(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Cr(a=>{let o=kr(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=Cr(e=>{e.target===t&&(a.current=kr(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=kr(t)}else r.current=null;n(e)},[])}}Cr(Er,`usePresence`);function Dr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Cr(Dr,`setRef`);function Or(...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=Dr(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():Dr(n[e],null)}}},[])}Cr(Or,`useStableComposedRefs`);function kr(e){return e?.animationName||`none`}Cr(kr,`getAnimationName`);function Ar(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)}Cr(Ar,`getElementRef`);var jr=Object.defineProperty,Mr=(e,t)=>jr(e,`name`,{value:t,configurable:!0}),Nr=m.useId||(()=>void 0),Pr=0;function Fr(e){let[t,n]=m.useState(Nr());return cr(()=>{e||n(e=>e??String(Pr++))},[e]),e||(t?`radix-${t}`:``)}Mr(Fr,`useId`);var Ir=Object.defineProperty,Lr=(e,t)=>Ir(e,`name`,{value:t,configurable:!0}),Rr=m.createContext(void 0);function zr(e){let t=m.useContext(Rr);return e||t||`ltr`}Lr(zr,`useDirection`);var Br=Object.defineProperty,Vr=(e,t)=>Br(e,`name`,{value:t,configurable:!0});function Hr(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}Vr(Hr,`useCallbackRef`);var Ur=Object.defineProperty,Wr=(e,t)=>Ur(e,`name`,{value:t,configurable:!0}),Gr=`dismissableLayer.update`,Kr=`dismissableLayer.pointerDownOutside`,qr=`dismissableLayer.focusOutside`,Jr,Yr=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Xr=m.forwardRef(Wr(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(Yr),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=m.useState({}),g=fn(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=$r(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=ei(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=Hr(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&&(Jr=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ti(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Jr))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ti())},[d,u]),m.useEffect(()=>{let e=Wr(()=>h({}),`handleUpdate`);return document.addEventListener(Gr,e),()=>document.removeEventListener(Gr,e)},[]),(0,B.jsx)(jn.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:V(e.onFocusCapture,T.onFocusCapture),onBlurCapture:V(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Zr(){let e=m.useContext(Yr),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Wr(Zr,`useDismissableLayerSurface`);var Qr=Wr(()=>!0,`IS_TRUE`);function $r(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Qr}=t,s=Hr(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()}Wr(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Wr(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)}Wr(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Wr(p,`handleInteractionBubble`);let m=Wr(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||ni(Kr,s,p,{discrete:!0})};if(Wr(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:Wr(()=>c.current=!0,`onPointerDownCapture`)}}Wr($r,`usePointerDownOutside`);function ei(e,t=globalThis?.document){let n=Hr(e),r=m.useRef(!1);return m.useEffect(()=>{let e=Wr(e=>{e.target&&!r.current&&ni(qr,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Wr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Wr(()=>r.current=!1,`onBlurCapture`)}}Wr(ei,`useFocusOutside`);function ti(){let e=new CustomEvent(Gr);document.dispatchEvent(e)}Wr(ti,`dispatchUpdate`);function ni(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?Mn(i,a):i.dispatchEvent(a)}Wr(ni,`handleAndDispatchCustomEvent`);var ri=Object.defineProperty,ii=(e,t)=>ri(e,`name`,{value:t,configurable:!0}),ai=`focusScope.autoFocusOnMount`,oi=`focusScope.autoFocusOnUnmount`,si={bubbles:!1,cancelable:!0},ci=m.forwardRef(ii(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=Hr(i),u=Hr(a),d=m.useRef(null),f=fn(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:hi(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||hi(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&hi(s)};ii(e,`handleFocusIn`),ii(t,`handleFocusOut`),ii(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){gi.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ai,si);s.addEventListener(ai,l),s.dispatchEvent(t),t.defaultPrevented||(li(yi(di(s)),{select:!0}),document.activeElement===e&&hi(s))}return()=>{s.removeEventListener(ai,l),setTimeout(()=>{let t=new CustomEvent(oi,si);s.addEventListener(oi,u),s.dispatchEvent(t),t.defaultPrevented||hi(e??document.body,{select:!0}),s.removeEventListener(oi,u),gi.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]=ui(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&hi(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&hi(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,B.jsx)(jn.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})},`FocusScope`));function li(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(hi(r,{select:t}),document.activeElement!==n)return}ii(li,`focusFirst`);function ui(e){let t=di(e);return[fi(t,e),fi(t.reverse(),e)]}ii(ui,`getTabbableEdges`);function di(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ii(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}ii(di,`getTabbableCandidates`);function fi(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):pi(r,{upTo:t})))return r}ii(fi,`findVisible`);function pi(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}ii(pi,`isHidden`);function mi(e){return e instanceof HTMLInputElement&&`select`in e}ii(mi,`isSelectableInput`);function hi(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mi(e)&&t&&e.select()}}ii(hi,`focus`);var gi=_i();function _i(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=vi(e,t),e.unshift(t)},remove(t){e=vi(e,t),e[0]?.resume()}}}ii(_i,`createFocusScopesStack`);function vi(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}ii(vi,`arrayRemove`);function yi(e){return e.filter(e=>e.tagName!==`A`)}ii(yi,`removeLinks`);var bi=Object.defineProperty,xi=m.forwardRef(((e,t)=>bi(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);cr(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?E.createPortal((0,B.jsx)(jn.div,{...r,ref:t}),o):null},`Portal`)),Si=Object.defineProperty,Ci=(e,t)=>Si(e,`name`,{value:t,configurable:!0}),wi=0,Ti=null;function Ei(e){return Di(),e.children}Ci(Ei,`FocusGuards`);function Di(){m.useEffect(()=>{Ti||={start:Oi(),end:Oi()};let{start:e,end:t}=Ti;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),wi++,()=>{wi===1&&(Ti?.start.remove(),Ti?.end.remove(),Ti=null),wi=Math.max(0,wi-1)}},[])}Ci(Di,`useFocusGuards`);function Oi(){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}Ci(Oi,`createFocusGuard`);var ki=function(){return ki=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},ki.apply(this,arguments)};function Ai(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 ji(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 Mi=`right-scroll-bar-position`,Ni=`width-before-scroll-bar`,Pi=`with-scroll-bars-hidden`,Fi=`--removed-body-scroll-bar-size`;function Ii(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Li(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 Ri=typeof window<`u`?m.useLayoutEffect:m.useEffect,zi=new WeakMap;function Bi(e,t){var n=Li(t||null,function(t){return e.forEach(function(e){return Ii(e,t)})});return Ri(function(){var t=zi.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ii(e,null)}),i.forEach(function(e){r.has(e)||Ii(e,a)})}zi.set(n,e)},[e]),n}function Vi(e){return e}function Hi(e,t){t===void 0&&(t=Vi);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 Ui(e){e===void 0&&(e={});var t=Hi(null);return t.options=ki({async:!0,ssr:!1},e),t}var Wi=function(e){var t=e.sideCar,n=Ai(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,ki({},n))};Wi.isSideCarExport=!0;function Gi(e,t){return e.useMedium(t),Wi}var Ki=Ui(),qi=function(){},Ji=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:qi,onWheelCapture:qi,onTouchMoveCapture:qi}),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=Ai(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Bi([n,t]),w=ki(ki({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:Ki,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),ki(ki({},w),{ref:C})):m.createElement(y,ki({},w,{className:c,ref:C}),s))});Ji.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ji.classNames={fullWidth:Ni,zeroRight:Mi};var Yi=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Xi(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Yi();return t&&e.setAttribute(`nonce`,t),e}function Zi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qi(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var $i=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xi())&&(Zi(t,n),Qi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ea=function(){var e=$i();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ta=function(){var e=ea();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},na={left:0,top:0,right:0,gap:0},H=function(e){return parseInt(e||``,10)||0},ra=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[H(n),H(r),H(i)]},ia=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return na;var t=ra(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])}},aa=ta(),oa=`data-scroll-locked`,sa=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
10
|
-
.${Pi} {
|
|
11
|
-
overflow: hidden ${r};
|
|
12
|
-
padding-right: ${s}px ${r};
|
|
13
|
-
}
|
|
14
|
-
body[${oa}] {
|
|
15
|
-
overflow: hidden ${r};
|
|
16
|
-
overscroll-behavior: contain;
|
|
17
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
18
|
-
padding-left: ${i}px;
|
|
19
|
-
padding-top: ${a}px;
|
|
20
|
-
padding-right: ${o}px;
|
|
21
|
-
margin-left:0;
|
|
22
|
-
margin-top:0;
|
|
23
|
-
margin-right: ${s}px ${r};
|
|
24
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${Mi} {
|
|
28
|
-
right: ${s}px ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${Ni} {
|
|
32
|
-
margin-right: ${s}px ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.${Mi} .${Mi} {
|
|
36
|
-
right: 0 ${r};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.${Ni} .${Ni} {
|
|
40
|
-
margin-right: 0 ${r};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
body[${oa}] {
|
|
44
|
-
${Fi}: ${s}px;
|
|
45
|
-
}
|
|
46
|
-
`},ca=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},la=function(){m.useEffect(function(){return document.body.setAttribute(oa,(ca()+1).toString()),function(){var e=ca()-1;e<=0?document.body.removeAttribute(oa):document.body.setAttribute(oa,e.toString())}},[])},ua=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;la();var a=m.useMemo(function(){return ia(i)},[i]);return m.createElement(aa,{styles:sa(a,!t,i,n?``:`!important`)})},da=!1;if(typeof window<`u`)try{var fa=Object.defineProperty({},"passive",{get:function(){return da=!0,!0}});window.addEventListener(`test`,fa,fa),window.removeEventListener(`test`,fa,fa)}catch{da=!1}var pa=da?{passive:!1}:!1,ma=function(e){return e.tagName===`TEXTAREA`},ha=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ma(e)&&n[t]===`visible`)},ga=function(e){return ha(e,`overflowY`)},_a=function(e){return ha(e,`overflowX`)},va=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),xa(e,r)){var i=Sa(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ya=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ba=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},xa=function(e,t){return e===`v`?ga(t):_a(t)},Sa=function(e,t){return e===`v`?ya(t):ba(t)},Ca=function(e,t){return e===`h`&&t===`rtl`?-1:1},wa=function(e,t,n,r,i){var a=Ca(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Sa(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&xa(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ta=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ea=function(e){return[e.deltaX,e.deltaY]},Da=function(e){return e&&`current`in e?e.current:e},Oa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ka=function(e){return`
|
|
47
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
48
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
49
|
-
`},Aa=0,ja=[];function Ma(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(Aa++)[0],a=m.useState(ta)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ji([e.lockRef.current],(e.shards||[]).map(Da),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=m.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ta(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=va(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=va(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return wa(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(ja.length&&ja[ja.length-1]===a){var r=`deltaY`in n?Ea(n):Ta(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Oa(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Da).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=m.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Na(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=m.useCallback(function(e){n.current=Ta(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,Ea(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,Ta(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return ja.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,pa),document.addEventListener(`touchmove`,c,pa),document.addEventListener(`touchstart`,u,pa),function(){ja=ja.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,pa),document.removeEventListener(`touchmove`,c,pa),document.removeEventListener(`touchstart`,u,pa)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:ka(i)}):null,p?m.createElement(ua,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Na(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Pa=Gi(Ki,Ma),Fa=m.forwardRef(function(e,t){return m.createElement(Ji,ki({},e,{ref:t,sideCar:Pa}))});Fa.classNames=Ji.classNames;var Ia=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},La=new WeakMap,Ra=new WeakMap,za={},Ba=0,Va=function(e){return e&&(e.host||Va(e.parentNode))},Ha=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Va(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ua=function(e,t,n,r){var i=Ha(t,Array.isArray(e)?e:[e]);za[n]||(za[n]=new WeakMap);var a=za[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(La.get(e)||0)+1,l=(a.get(e)||0)+1;La.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ra.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ba++,function(){o.forEach(function(e){var t=La.get(e)-1,i=a.get(e)-1;La.set(e,t),a.set(e,i),t||(Ra.has(e)||e.removeAttribute(r),Ra.delete(e)),i||e.removeAttribute(n)}),Ba--,Ba||(La=new WeakMap,La=new WeakMap,Ra=new WeakMap,za={})}},Wa=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ia(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ua(r,i,n,`aria-hidden`)):function(){return null}},Ga=Object.defineProperty,Ka=(e,t)=>Ga(e,`name`,{value:t,configurable:!0}),qa=`Dialog`,[Ja,Ya]=Bn(qa),[Xa,Za]=Ja(qa),Qa=Ka(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=m.useRef(null),c=m.useRef(null),[l,u]=_r({prop:r,defaultProp:i??!1,onChange:a,caller:qa}),[d,f]=m.useState(0),[p,h]=m.useState(0);return(0,B.jsx)(Xa,{scope:t,triggerRef:s,contentRef:c,contentId:Fr(),titleId:Fr(),descriptionId:Fr(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:h,open:l,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),$a=`DialogTrigger`,eo=m.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za($a,n),a=fn(t,i.triggerRef);return(0,B.jsx)(jn.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":xo(i.open),...r,ref:a,onClick:V(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),to=`DialogPortal`,[no,ro]=Ja(to,{forceMount:void 0}),io=Ka(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Za(to,t);return(0,B.jsx)(no,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,B.jsx)(Tr,{present:n||a.open,children:(0,B.jsx)(xi,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),ao=`DialogOverlay`,oo=m.forwardRef(Ka(function(e,t){let n=ro(ao,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Za(ao,e.__scopeDialog);return a.modal?(0,B.jsx)(Tr,{present:r||a.open,children:(0,B.jsx)(co,{...i,ref:t})}):null},`DialogOverlay`)),so=hn(`DialogOverlay.RemoveScroll`),co=m.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(ao,n),a=fn(t,Zr());return(0,B.jsx)(Fa,{as:so,allowPinchZoom:!0,shards:[i.contentRef],children:(0,B.jsx)(jn.div,{"data-state":xo(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),lo=`DialogContent`,uo=m.forwardRef(Ka(function(e,t){let n=ro(lo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Za(lo,e.__scopeDialog);return(0,B.jsx)(Tr,{present:r||a.open,children:a.modal?(0,B.jsx)(fo,{...i,ref:t}):(0,B.jsx)(po,{...i,ref:t})})},`DialogContent`)),fo=m.forwardRef(Ka(function(e,t){let n=Za(lo,e.__scopeDialog),r=m.useRef(null),i=fn(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return Wa(e)},[]),(0,B.jsx)(mo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:V(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:V(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),po=m.forwardRef(Ka(function(e,t){let n=Za(lo,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,B.jsx)(mo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),mo=m.forwardRef(Ka(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Za(lo,n);return Di(),(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(ci,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(Xr,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":xo(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),ho=`DialogTitle`,go=m.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(ho,n),{setTitleCount:a}=i;return cr(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,B.jsx)(jn.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),_o=`DialogDescription`,vo=m.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(_o,n),{setDescriptionCount:a}=i;return cr(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,B.jsx)(jn.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),yo=`DialogClose`,bo=m.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(yo,n);return(0,B.jsx)(jn.button,{type:`button`,...r,ref:t,onClick:V(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function xo(e){return e?`open`:`closed`}Ka(xo,`getState`);var So=Object.defineProperty,Co=(e,t)=>So(e,`name`,{value:t,configurable:!0}),[wo,To]=Bn(`AlertDialog`,[Ya]),Eo=Ya(),Do=Co(e=>{let{__scopeAlertDialog:t,...n}=e,r=Eo(t);return(0,B.jsx)(Qa,{...r,...n,modal:!0})},`AlertDialog`),Oo=m.forwardRef(Co(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Eo(n);return(0,B.jsx)(eo,{...i,...r,ref:t})},`AlertDialogTrigger`)),ko=Co(e=>{let{__scopeAlertDialog:t,...n}=e,r=Eo(t);return(0,B.jsx)(io,{...r,...n})},`AlertDialogPortal`),Ao=m.forwardRef(Co(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Eo(n);return(0,B.jsx)(oo,{...i,...r,ref:t})},`AlertDialogOverlay`)),[jo,Mo]=wo(`AlertDialogContent`),No=m.forwardRef(Co(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=Eo(n),o=fn(t,m.useRef(null)),s=m.useRef(null);return(0,B.jsx)(jo,{scope:n,cancelRef:s,children:(0,B.jsx)(uo,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:V(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Po=m.forwardRef(Co(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Eo(n);return(0,B.jsx)(go,{...i,...r,ref:t})},`AlertDialogTitle`)),Fo=m.forwardRef(Co(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Eo(n);return(0,B.jsx)(vo,{...i,...r,ref:t})},`AlertDialogDescription`)),Io=m.forwardRef(Co(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Eo(n);return(0,B.jsx)(bo,{...i,...r,ref:t})},`AlertDialogAction`)),Lo=`AlertDialogCancel`,Ro=m.forwardRef(Co(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Mo(Lo,n),a=Eo(n),o=fn(t,i);return(0,B.jsx)(bo,{...a,...r,ref:o})},`AlertDialogCancel`)),zo=Do,Bo=Oo,U=ko,Vo=Ao,Ho=No,Uo=Io,Wo=Ro,Go=Po,Ko=Fo,qo=Object.defineProperty,Jo=(e,t)=>qo(e,`name`,{value:t,configurable:!0});function Yo(e){let[t,n]=m.useState(void 0);return cr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Jo(Yo,`useSize`);var Xo=[`top`,`right`,`bottom`,`left`],Zo=Math.min,Qo=Math.max,$o=Math.round,es=Math.floor,ts=e=>({x:e,y:e}),ns={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function rs(e,t,n){return Qo(e,Zo(t,n))}function is(e,t){return typeof e==`function`?e(t):e}function as(e){return e.split(`-`)[0]}function os(e){return e.split(`-`)[1]}function ss(e){return e===`x`?`y`:`x`}function cs(e){return e===`y`?`height`:`width`}function ls(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function us(e){return ss(ls(e))}function ds(e,t,n){n===void 0&&(n=!1);let r=os(e),i=us(e),a=cs(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=bs(o)),[o,bs(o)]}function fs(e){let t=bs(e);return[ps(e),t,ps(t)]}function ps(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ms=[`left`,`right`],hs=[`right`,`left`],gs=[`top`,`bottom`],_s=[`bottom`,`top`];function vs(e,t,n){switch(e){case`top`:case`bottom`:return n?t?hs:ms:t?ms:hs;case`left`:case`right`:return t?gs:_s;default:return[]}}function ys(e,t,n,r){let i=os(e),a=vs(as(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ps)))),a}function bs(e){let t=as(e);return ns[t]+e.slice(t.length)}function xs(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ss(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:xs(e)}function Cs(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ws(e,t,n){let{reference:r,floating:i}=e,a=ls(t),o=us(t),s=cs(o),c=as(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=os(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Ts(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=is(t,e),p=Ss(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Cs(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Cs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Es=50,Ds=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ts},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ws(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Es&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ws(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Os=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=is(e,t)||{};if(l==null)return{};let d=Ss(u),f={x:n,y:r},p=us(i),m=cs(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Zo(d[_],T),D=Zo(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=rs(E,k,O),A=!c.arrow&&os(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,j=A?k<E?k-E:k-O:0;return{[p]:f[p]+j,data:{[p]:ee,centerOffset:k-ee-j,...A&&{alignmentOffset:j}},reset:A}}}),ks=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=is(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=as(r),_=ls(o),v=as(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[bs(o)]:fs(o)),x=p!==`none`;!d&&x&&b.push(...ys(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ds(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ls(t)||T.every(e=>ls(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ls(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function As(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function js(e){return Xo.some(t=>e[t]>=0)}var Ms=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=is(e,t);switch(i){case`referenceHidden`:{let e=As(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:js(e)}}}case`escaped`:{let e=As(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:js(e)}}}default:return{}}}}},Ns=new Set([`left`,`top`]);async function Ps(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=as(n),s=os(n),c=ls(n)===`y`,l=Ns.has(o)?-1:1,u=a&&c?-1:1,d=is(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Fs=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ps(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Is=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=is(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ls(i),p=ss(f),m=u[p],h=u[f],g=(e,t)=>rs(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ls=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=is(e,t),u={x:n,y:r},d=ls(i),f=ss(d),p=u[f],m=u[d],h=is(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ns.has(as(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Rs=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=is(e,t),c=await i.detectOverflow(t,s),l=as(n),u=os(n),d=ls(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Zo(p-c[m],g),y=Zo(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Qo(c.left,c.right):S=p-2*Qo(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function zs(){return typeof window<`u`}function Bs(e){return Us(e)?(e.nodeName||``).toLowerCase():`#document`}function Vs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){return((Us(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Us(e){return zs()?e instanceof Node||e instanceof Vs(e).Node:!1}function Ws(e){return zs()?e instanceof Element||e instanceof Vs(e).Element:!1}function Gs(e){return zs()?e instanceof HTMLElement||e instanceof Vs(e).HTMLElement:!1}function Ks(e){return!zs()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Vs(e).ShadowRoot}function qs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ic(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Js(e){return/^(table|td|th)$/.test(Bs(e))}function Ys(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Xs=/transform|translate|scale|rotate|perspective|filter/,Zs=/paint|layout|strict|content/,Qs=e=>!!e&&e!==`none`,$s;function ec(e){let t=Ws(e)?ic(e):e;return Qs(t.transform)||Qs(t.translate)||Qs(t.scale)||Qs(t.rotate)||Qs(t.perspective)||!nc()&&(Qs(t.backdropFilter)||Qs(t.filter))||Xs.test(t.willChange||``)||Zs.test(t.contain||``)}function tc(e){let t=oc(e);for(;Gs(t)&&!rc(t);){if(ec(t))return t;if(Ys(t))return null;t=oc(t)}return null}function nc(){return $s??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),$s}function rc(e){return/^(html|body|#document)$/.test(Bs(e))}function ic(e){return Vs(e).getComputedStyle(e)}function ac(e){return Ws(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oc(e){if(Bs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ks(e)&&e.host||Hs(e);return Ks(t)?t.host:t}function sc(e){let t=oc(e);return rc(t)?(e.ownerDocument||e).body:Gs(t)&&qs(t)?t:sc(t)}function cc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=sc(e),i=r===e.ownerDocument?.body,a=Vs(r);if(i){let e=lc(a);return t.concat(a,a.visualViewport||[],qs(r)?r:[],e&&n?cc(e):[])}return t.concat(r,cc(r,[],n))}function lc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uc(e){let t=ic(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Gs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=$o(n)!==a||$o(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function dc(e){return Ws(e)?e:e.contextElement}function fc(e){let t=dc(e);if(!Gs(t))return ts(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=uc(t),o=(a?$o(n.width):n.width)/r,s=(a?$o(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var pc=ts(0);function mc(e){let t=Vs(e);return!nc()||!t.visualViewport?pc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Vs(e)}function gc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=dc(e),o=ts(1);t&&(r?Ws(r)&&(o=fc(r)):o=fc(e));let s=hc(a,n,r)?mc(a):ts(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Vs(a),t=Ws(r)?Vs(r):r,n=e,i=lc(n);for(;i&&t!==n;){let e=fc(i),t=i.getBoundingClientRect(),r=ic(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Vs(i),i=lc(n)}}return Cs({width:u,height:d,x:c,y:l})}function _c(e,t){let n=ac(e).scrollLeft;return t?t.left+n:gc(Hs(e)).left+n}function vc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_c(e,n),y:n.top+t.scrollTop}}function yc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Hs(r),s=t?Ys(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ts(1),u=ts(0),d=Gs(r);if((d||!a)&&((Bs(r)!==`body`||qs(o))&&(c=ac(r)),d)){let e=gc(r);l=fc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vc(o,c):ts(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function bc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function xc(e){let t=ac(e),n=e.ownerDocument.body,r=Qo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Qo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+_c(e),o=-t.scrollTop;return ic(n).direction===`rtl`&&(a+=Qo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Sc=25;function Cc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Vs(e),a=Hs(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!nc()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(_c(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Sc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function wc(e,t){let n=gc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Tc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Cc(e,n,t);else if(t===`document`)r=xc(Hs(e));else if(Ws(t))r=wc(t,n);else{let n=mc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cs(r)}function Ec(e,t){let n=t.get(e);if(n)return n;let r=cc(e,[],!1).filter(e=>Ws(e)&&Bs(e)!==`body`),i=null,a=ic(e).position===`fixed`,o=a?oc(e):e;for(;Ws(o)&&!rc(o);){let e=ic(o),t=ec(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=oc(o)}return t.set(e,r),r}function Dc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ys(t)?[]:Ec(t,this._c):[].concat(n),r],o=Tc(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Tc(t,a[e],i);s=Qo(n.top,s),c=Zo(n.right,c),l=Zo(n.bottom,l),u=Qo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Oc(e){let{width:t,height:n}=uc(e);return{width:t,height:n}}function kc(e,t,n){let r=Gs(t),i=Hs(t),a=n===`fixed`,o=gc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ts(0);if((r||!a)&&((Bs(t)!==`body`||qs(i))&&(s=ac(t)),r)){let e=gc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=_c(i));let l=i&&!r&&!a?vc(i,s):ts(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ac(e){return ic(e).position===`static`}function jc(e,t){if(!Gs(e)||ic(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Hs(e)===n&&(n=n.ownerDocument.body),n}function Mc(e,t){let n=Vs(e);if(Ys(e))return n;if(!Gs(e)){let t=oc(e);for(;t&&!rc(t);){if(Ws(t)&&!Ac(t))return t;t=oc(t)}return n}let r=jc(e,t);for(;r&&Js(r)&&Ac(r);)r=jc(r,t);return r&&rc(r)&&Ac(r)&&!ec(r)?n:r||tc(e)||n}var Nc=async function(e){let t=this.getOffsetParent||Mc,n=this.getDimensions,r=await n(e.floating);return{reference:kc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pc(e){return ic(e).direction===`rtl`}var Fc={convertOffsetParentRelativeRectToViewportRelativeRect:yc,getDocumentElement:Hs,getClippingRect:Dc,getOffsetParent:Mc,getElementRects:Nc,getClientRects:bc,getDimensions:Oc,getScale:fc,isElement:Ws,isRTL:Pc};function Ic(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lc(e,t,n){let r=null,i,a=Hs(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=es(d),h=es(a.clientWidth-(u+f)),g=es(a.clientHeight-(d+p)),_=es(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Qo(0,Zo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ic(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Vs(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Rc(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=dc(e),u=i||a?[...l?cc(l):[],...t?cc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Lc(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?gc(e):null;c&&g();function g(){let t=gc(e);h&&!Ic(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var zc=Fs,Bc=Is,Vc=ks,Hc=Rs,Uc=Ms,Wc=Os,Gc=Ls,Kc=(e,t,n)=>{let r=new Map,i=n??{},a={...Fc,...i.platform,_c:r};return Ds(e,t,{...i,platform:a})},qc=typeof document<`u`?m.useLayoutEffect:function(){};function Jc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Jc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Yc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xc(e,t){let n=Yc(e);return Math.round(t*n)/n}function Zc(e){let t=m.useRef(e);return qc(()=>{t.current=e}),t}function Qc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);Jc(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=m.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=m.useRef(null),w=m.useRef(null),T=m.useRef(u),D=c!=null,O=Zc(c),k=Zc(i),ee=Zc(l),A=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Kc(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};j.current&&!Jc(T.current,t)&&(T.current=t,E.flushSync(()=>{d(t)}))})},[f,t,n,k,ee]);qc(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=m.useRef(!1);qc(()=>(j.current=!0,()=>{j.current=!1}),[]),qc(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(O.current)return O.current(x,S,A);A()}},[x,S,A,O,D]);let M=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),te=m.useMemo(()=>({reference:x,floating:S}),[x,S]),N=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!te.floating)return e;let t=Xc(te.floating,u.x),r=Xc(te.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Yc(te.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,te.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:A,refs:M,elements:te,floatingStyles:N}),[u,A,M,te,N])}var $c=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Wc({element:r.current,padding:i}).fn(n):r?Wc({element:r,padding:i}).fn(n):{}}}},el=(e,t)=>{let n=zc(e);return{name:n.name,fn:n.fn,options:[e,t]}},tl=(e,t)=>{let n=Bc(e);return{name:n.name,fn:n.fn,options:[e,t]}},nl=(e,t)=>({fn:Gc(e).fn,options:[e,t]}),rl=(e,t)=>{let n=Vc(e);return{name:n.name,fn:n.fn,options:[e,t]}},il=(e,t)=>{let n=Hc(e);return{name:n.name,fn:n.fn,options:[e,t]}},al=(e,t)=>{let n=Uc(e);return{name:n.name,fn:n.fn,options:[e,t]}},ol=(e,t)=>{let n=$c(e);return{name:n.name,fn:n.fn,options:[e,t]}},sl=Object.defineProperty,cl=m.forwardRef(((e,t)=>sl(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,B.jsx)(jn.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,B.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),ll=Object.defineProperty,ul=(e,t)=>ll(e,`name`,{value:t,configurable:!0}),dl=`Popper`,[fl,pl]=Bn(dl),[ml,hl]=fl(dl),gl=ul(e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null),[a,o]=m.useState(void 0);return(0,B.jsx)(ml,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),_l=`PopperAnchor`,vl=m.forwardRef(ul(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=hl(_l,n),o=m.useRef(null),s=a.onAnchorChange,c=fn(t,m.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=m.useRef(null);m.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Ol(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,B.jsx)(jn.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),yl=`PopperContent`,[bl,xl]=fl(yl),Sl=m.forwardRef(ul(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:h,...g}=e,_=hl(yl,n),[v,y]=m.useState(null),b=fn(t,y),[x,S]=m.useState(null),C=Yo(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,ee={padding:D,boundary:O.filter(El),altBoundary:k},{refs:A,floatingStyles:j,placement:M,isPositioned:te,middlewareData:N}=Qc({strategy:`fixed`,placement:E,whileElementsMounted:ul((...e)=>Rc(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[el({mainAxis:i+T,alignmentAxis:o}),c&&tl({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?nl():void 0,...ee}),c&&rl({...ee}),il({...ee,apply:ul(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&ol({element:x,padding:s}),Dl({arrowWidth:w,arrowHeight:T}),f&&al({strategy:`referenceHidden`,...ee,boundary:k?ee.boundary:void 0})]}),P=_.setPlacementState;cr(()=>(P(M),()=>{P(void 0)}),[M,P]);let[ne,re]=Ol(M),ie=Hr(h);cr(()=>{te&&ie?.()},[te,ie]);let ae=N.arrow?.x,oe=N.arrow?.y,se=N.arrow?.centerOffset!==0,[ce,le]=m.useState();return cr(()=>{v&&le(window.getComputedStyle(v).zIndex)},[v]),(0,B.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:te?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ce,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(` `),...N.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,B.jsx)(bl,{scope:n,placedSide:ne,placedAlign:re,onArrowChange:S,arrowX:ae,arrowY:oe,shouldHideArrow:se,children:(0,B.jsx)(jn.div,{"data-side":ne,"data-align":re,...g,ref:b,style:{...g.style,animation:te?g.style?.animation:`none`}})})})},`PopperContent`)),Cl=`PopperArrow`,wl={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Tl=m.forwardRef(ul(function(e,t){let{__scopePopper:n,...r}=e,i=xl(Cl,n),a=wl[i.placedSide];return(0,B.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,B.jsx)(cl,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function El(e){return e!==null}ul(El,`isNotNull`);var Dl=ul(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Ol(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Ol(e){let[t,n=`center`]=e.split(`-`);return[t,n]}ul(Ol,`getSideAndAlignFromPlacement`);var kl=gl,Al=vl,jl=Sl,Ml=Tl,Nl=Object.defineProperty,Pl=(e,t)=>Nl(e,`name`,{value:t,configurable:!0});function Fl(e){let t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Pl(Fl,`usePrevious`);var Il=Object.defineProperty,Ll=(e,t)=>Il(e,`name`,{value:t,configurable:!0});function Rl(e,[t,n]){return Math.min(n,Math.max(t,e))}Ll(Rl,`clamp`);var zl=Object.defineProperty,W=(e,t)=>zl(e,`name`,{value:t,configurable:!0});function Bl(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}W(Bl,`useStateMachine`);var Vl=`ScrollArea`,[Hl,Ul]=Bn(Vl),[Wl,Gl]=Hl(Vl),Kl=m.forwardRef(W(function(e,t){let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=m.useState(null),[l,u]=m.useState(null),[d,f]=m.useState(null),[p,h]=m.useState(null),[g,_]=m.useState(null),[v,y]=m.useState(0),[b,x]=m.useState(0),[S,C]=m.useState(!1),[w,T]=m.useState(!1),E=fn(t,c),D=zr(i);return(0,B.jsx)(Wl,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:_,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:x,children:(0,B.jsx)(jn.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":v+`px`,"--radix-scroll-area-corner-height":b+`px`,...e.style}})})},`ScrollArea`)),ql=`ScrollAreaViewport`,Jl=m.forwardRef(W(function(e,t){let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=Gl(ql,n),s=fn(t,m.useRef(null),o.onViewportChange);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Yl,{nonce:i}),(0,B.jsx)(jn.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,B.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})},`ScrollAreaViewport`)),Yl=m.memo(W(function({nonce:e}){return(0,B.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:e})},`ScrollAreaViewportStyle`),(e,t)=>e.nonce===t.nonce),Xl=`ScrollAreaScrollbar`,Zl=m.forwardRef(W(function(e,t){let{forceMount:n,...r}=e,i=Gl(Xl,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return m.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,B.jsx)(Ql,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,B.jsx)($l,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,B.jsx)(eu,{...r,ref:t,forceMount:n}):i.type===`always`?(0,B.jsx)(tu,{...r,ref:t,"data-state":`visible`}):null},`ScrollAreaScrollbar`)),Ql=m.forwardRef(W(function(e,t){let{forceMount:n,...r}=e,i=Gl(Xl,e.__scopeScrollArea),[a,o]=m.useState(!1);return m.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=W(()=>{window.clearTimeout(t),o(!0)},`handlePointerEnter`),r=W(()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)},`handlePointerLeave`);return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,B.jsx)(Tr,{present:n||a,children:(0,B.jsx)(eu,{"data-state":a?`visible`:`hidden`,...r,ref:t})})},`ScrollAreaScrollbarHover`)),$l=m.forwardRef(W(function(e,t){let{forceMount:n,...r}=e,i=Gl(Xl,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=xu(()=>c(`SCROLL_END`),100),[s,c]=Bl(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return m.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),m.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=W(()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r},`handleScroll`);return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,B.jsx)(Tr,{present:n||s!==`hidden`,children:(0,B.jsx)(tu,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:V(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:V(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})},`ScrollAreaScrollbarScroll`)),eu=m.forwardRef(W(function(e,t){let n=Gl(Xl,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=m.useState(!1),s=e.orientation===`horizontal`,c=xu(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return Su(n.viewport,c),Su(n.content,c),(0,B.jsx)(Tr,{present:r||a,children:(0,B.jsx)(tu,{"data-state":a?`visible`:`hidden`,...i,ref:t})})},`ScrollAreaScrollbarAuto`)),tu=m.forwardRef(W(function(e,t){let{orientation:n=`vertical`,...r}=e,i=Gl(Xl,e.__scopeScrollArea),a=m.useRef(null),o=m.useRef(0),[s,c]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=mu(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:W(e=>a.current=e,`onThumbChange`),onThumbPointerUp:W(()=>o.current=0,`onThumbPointerUp`),onThumbPointerDown:W(e=>o.current=e,`onThumbPointerDown`)};function d(e,t){return gu(e,o.current,s,t)}return W(d,`getScrollPosition`),n===`horizontal`?(0,B.jsx)(nu,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=_u(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,B.jsx)(ru,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=_u(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null},`ScrollAreaScrollbarVisible`)),nu=m.forwardRef(W(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=Gl(Xl,e.__scopeScrollArea),[o,s]=m.useState(),c=m.useRef(null),l=fn(t,c,a.onScrollbarXChange);return m.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,B.jsx)(ou,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":hu(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),yu(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:pu(o.paddingLeft),paddingEnd:pu(o.paddingRight)}})}})},`ScrollAreaScrollbarX`)),ru=m.forwardRef(W(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=Gl(Xl,e.__scopeScrollArea),[o,s]=m.useState(),c=m.useRef(null),l=fn(t,c,a.onScrollbarYChange);return m.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,B.jsx)(ou,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":hu(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),yu(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:pu(o.paddingTop),paddingEnd:pu(o.paddingBottom)}})}})},`ScrollAreaScrollbarY`)),[iu,au]=Hl(Xl),ou=m.forwardRef(W(function(e,t){let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=Gl(Xl,n),[h,g]=m.useState(null),_=fn(t,g),v=m.useRef(null),y=m.useRef(``),b=p.viewport,x=r.content-r.viewport,S=Hr(u),C=Hr(c),w=xu(d,10);function T(e){if(v.current){let t=e.clientX-v.current.left,n=e.clientY-v.current.top;l({x:t,y:n})}}return W(T,`handleDragScroll`),m.useEffect(()=>{let e=W(e=>{let t=e.target;h?.contains(t)&&S(e,x)},`handleWheel`);return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[b,h,x,S]),m.useEffect(C,[r,C]),Su(h,w),Su(p.content,w),(0,B.jsx)(iu,{scope:n,scrollbar:h,hasThumb:i,onThumbChange:Hr(a),onThumbPointerUp:Hr(o),onThumbPositionChange:C,onThumbPointerDown:Hr(s),children:(0,B.jsx)(jn.div,{...f,ref:_,style:{position:`absolute`,...f.style},onPointerDown:V(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:V(e.onPointerMove,T),onPointerUp:V(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=``),v.current=null})})})},`ScrollAreaScrollbarImpl`)),su=`ScrollAreaThumb`,cu=m.forwardRef(W(function(e,t){let{forceMount:n,...r}=e,i=au(su,e.__scopeScrollArea);return(0,B.jsx)(Tr,{present:n||i.hasThumb,children:(0,B.jsx)(lu,{ref:t,...r})})},`ScrollAreaThumb`)),lu=m.forwardRef(W(function(e,t){let{__scopeScrollArea:n,style:r,...i}=e,a=Gl(su,n),o=au(su,n),{onThumbPositionChange:s}=o,c=fn(t,o.onThumbChange),l=m.useRef(void 0),u=xu(()=>{l.current&&=(l.current(),void 0)},100);return m.useEffect(()=>{let e=a.viewport;if(e){let t=W(()=>{if(u(),!l.current){let t=bu(e,s);l.current=t,s()}},`handleScroll`);return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,B.jsx)(jn.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:V(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:V(e.onPointerUp,o.onThumbPointerUp)})},`ScrollAreaThumbImpl`)),uu=`ScrollAreaCorner`,du=m.forwardRef(W(function(e,t){let n=Gl(uu,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,B.jsx)(fu,{...e,ref:t}):null},`ScrollAreaCorner`)),fu=m.forwardRef(W(function(e,t){let{__scopeScrollArea:n,...r}=e,i=Gl(uu,n),[a,o]=m.useState(0),[s,c]=m.useState(0),l=!!(a&&s),{onCornerWidthChange:u,onCornerHeightChange:d}=i;return Su(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),Su(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),m.useEffect(()=>()=>{u(0),d(0)},[u,d]),l?(0,B.jsx)(jn.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null},`ScrollAreaCornerImpl`));function pu(e){return e?parseInt(e,10):0}W(pu,`toInt`);function mu(e,t){let n=e/t;return isNaN(n)?0:n}W(mu,`getThumbRatio`);function hu(e){let t=mu(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}W(hu,`getThumbSize`);function gu(e,t,n,r=`ltr`){let i=hu(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return vu([c,l],d)(e)}W(gu,`getScrollPositionFromPointer`);function _u(e,t,n=`ltr`){let r=hu(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Rl(e,n===`ltr`?[0,o]:[o*-1,0]);return vu([0,o],[0,s])(c)}W(_u,`getThumbOffsetFromScroll`);function vu(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}W(vu,`linearScale`);function yu(e,t){return e>0&&e<t}W(yu,`isScrollingWithinScrollbarBounds`);var bu=W((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return W((function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)}),`loop`)(),()=>window.cancelAnimationFrame(r)},`addUnlinkedScrollListener`);function xu(e,t){let n=Hr(e),r=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),m.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}W(xu,`useDebounceCallback`);function Su(e,t){let n=Hr(t);cr(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}W(Su,`useResizeObserver`);var Cu=Kl,wu=Jl,Tu=du,Eu=Object.defineProperty,Du=(e,t)=>Eu(e,`name`,{value:t,configurable:!0}),Ou=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ku=[` `,`Enter`],Au=`Select`,[ju,Mu,Nu]=Wn(Au),[Pu,Fu]=Bn(Au,[Nu,pl]),Iu=pl(),[Lu,Ru]=Pu(Au),[zu,Bu]=Pu(Au);function Vu(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:h,internal_do_not_use_render:g}=e,_=Iu(t),[v,y]=m.useState(null),[b,x]=m.useState(null),[S,C]=m.useState(!1),w=zr(l),[T,E]=_r({prop:r,defaultProp:i??!1,onChange:a,caller:Au}),[D,O]=_r({prop:o,defaultProp:s,onChange:c,caller:Au}),k=m.useRef(null),ee=m.useRef(D);m.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=Du(()=>O(ee.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let A=!v||!!h||!!v.closest(`form`),[j,M]=m.useState(new Set),te=Fr(),N=Array.from(j).map(e=>e.props.value).join(`;`),P=m.useCallback(e=>{M(t=>new Set(t).add(e))},[]),ne=m.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),re={required:p,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:te,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:h,nativeOptions:j,nativeSelectKey:N,isFormControl:A};return(0,B.jsx)(kl,{..._,children:(0,B.jsx)(Lu,{scope:t,...re,children:(0,B.jsx)(ju.Provider,{scope:t,children:(0,B.jsx)(zu,{scope:t,onNativeOptionAdd:P,onNativeOptionRemove:ne,children:xd(g)?g(re):n})})})})}Du(Vu,`SelectProvider`);var Hu=Du(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,B.jsx)(Vu,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,B.jsxs)(B.Fragment,{children:[n,e?(0,B.jsx)(bd,{__scopeSelect:t}):null]})})},`Select`),Uu=`SelectTrigger`,Wu=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Iu(n),o=Ru(Uu,n),s=o.disabled||r,c=fn(t,o.onTriggerChange),l=Mu(n),u=m.useRef(`touch`),[d,f,p]=Cd(e=>{let t=l().filter(e=>!e.disabled),n=wd(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),h=Du(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,B.jsx)(Al,{asChild:!0,...a,children:(0,B.jsx)(jn.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Sd(o.value)?``:void 0,...i,ref:c,onClick:V(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&h(e)}),onPointerDown:V(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:V(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Ou.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),Gu=`SelectValue`,Ku=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Ru(Gu,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=fn(t,c.onValueNodeChange);cr(()=>{l(u)},[l,u]);let f=Sd(c.value);return(0,B.jsx)(jn.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,B.jsx)(m.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),qu=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,B.jsx)(jn.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Ju,Yu]=Pu(`SelectPortal`,{forceMount:void 0}),Xu=Du(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,B.jsx)(Ju,{scope:e.__scopeSelect,forceMount:n,children:(0,B.jsx)(xi,{asChild:!0,...r})})},`SelectPortal`),Zu=`SelectContent`,Qu=m.forwardRef(Du(function(e,t){let n=Yu(Zu,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Ru(Zu,e.__scopeSelect),[o,s]=m.useState();return cr(()=>{s(new DocumentFragment)},[]),(0,B.jsx)(Tr,{present:r||a.open,children:({present:e})=>e?(0,B.jsx)(K,{...i,ref:t}):(0,B.jsx)($u,{...i,fragment:o})})},`SelectContent`)),$u=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?E.createPortal((0,B.jsx)(td,{scope:n,children:(0,B.jsx)(ju.Slot,{scope:n,children:(0,B.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),ed=10,[td,nd]=Pu(Zu),G=hn(`SelectContent.RemoveScroll`),K=m.forwardRef(Du(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=Ru(Zu,n),[b,x]=m.useState(null),[S,C]=m.useState(null),w=fn(t,x),[T,E]=m.useState(null),[D,O]=m.useState(null),k=Mu(n),[ee,A]=m.useState(!1),j=m.useRef(!1);m.useEffect(()=>{if(b)return Wa(b)},[b]),Di();let M=m.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),te=m.useCallback(()=>M([T,b]),[M,T,b]);m.useEffect(()=>{ee&&te()},[ee,te]);let{onOpenChange:N,triggerPointerDownPosRef:P}=y;m.useEffect(()=>{if(b){let e={x:0,y:0},t=Du(t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},`handlePointerMove`),n=Du(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||N(!1),document.removeEventListener(`pointermove`,t),P.current=null},`handlePointerUp`);return P.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,N,P]),m.useEffect(()=>{let e=Du(()=>N(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[N]);let[ne,re]=Cd(e=>{let t=k().filter(e=>!e.disabled),n=wd(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ie=m.useCallback((e,t,n)=>{let r=!j.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(j.current=!0))},[y.value]),ae=m.useCallback(()=>b?.focus(),[b]),oe=m.useCallback((e,t,n)=>{let r=!j.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),se=r===`popper`?id:rd,ce=se===id?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,B.jsx)(td,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ie,selectedItem:T,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:te,selectedItemText:D,position:r,isPositioned:ee,searchRef:ne,children:(0,B.jsx)(Fa,{as:G,allowPinchZoom:!0,children:(0,B.jsx)(ci,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:V(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,B.jsx)(Xr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,B.jsx)(se,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...ce,onPlaced:()=>A(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:V(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),rd=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Ru(Zu,n),o=nd(Zu,n),[s,c]=m.useState(null),[l,u]=m.useState(null),d=fn(t,u),f=Mu(n),p=m.useRef(!1),h=m.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=m.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-ed,d=Rl(a,[ed,Math.max(ed,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-ed,d=Rl(a,[ed,Math.max(ed,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-ed*2,u=g.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+h+u+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-ed,D=c-E,O=_.offsetHeight/2,k=_.offsetTop+O,ee=m+h+k,A=x-ee;if(ee<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=ee+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+g.offsetTop+(e?w:0)+O)+A;s.style.height=t+`px`,g.scrollTop=ee-E+g.offsetTop}s.style.margin=`${ed}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,g,_,v,a.dir,r]);cr(()=>b(),[b]);let[x,S]=m.useState();cr(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=m.useCallback(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return(0,B.jsx)(ad,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,B.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,B.jsx)(jn.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),id=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=ed,...a}=e,o=Iu(n);return(0,B.jsx)(jl,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[ad,od]=Pu(Zu,{}),sd=`SelectViewport`,cd=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=nd(sd,n),o=od(sd,n),s=fn(t,a.onViewportChange),c=m.useRef(0);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,B.jsx)(ju.Slot,{scope:n,children:(0,B.jsx)(jn.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:V(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-ed*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[ld,ud]=Pu(`SelectGroup`),dd=`SelectItem`,[fd,pd]=Pu(dd),md=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Ru(dd,n),c=nd(dd,n),l=s.value===r,[u,d]=m.useState(a??``),[f,p]=m.useState(!1),h=fn(t,Hr(e=>c.itemRefCallback?.(e,r,i))),g=Fr(),_=m.useRef(`touch`),v=Du(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,B.jsx)(fd,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:m.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,B.jsx)(ju.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,B.jsx)(jn.div,{role:`option`,"aria-labelledby":g,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:V(o.onFocus,()=>p(!0)),onBlur:V(o.onBlur,()=>p(!1)),onClick:V(o.onClick,()=>{_.current!==`mouse`&&v()}),onPointerUp:V(o.onPointerUp,()=>{_.current===`mouse`&&v()}),onPointerDown:V(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:V(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:V(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(ku.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),hd=`SelectItemText`,gd=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Ru(hd,n),s=nd(hd,n),c=pd(hd,n),l=Bu(hd,n),[u,d]=m.useState(null),f=Hr(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=fn(t,d,c.onItemTextChange,f),h=u?.textContent,g=m.useMemo(()=>(0,B.jsx)(`option`,{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=l;return cr(()=>(_(g),()=>v(g)),[_,v,g]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(jn.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Sd(o.value)?E.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),_d=`SelectItemIndicator`,vd=m.forwardRef(Du(function(e,t){let{__scopeSelect:n,...r}=e;return pd(_d,n).isSelected?(0,B.jsx)(jn.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),yd=`SelectBubbleInput`,bd=m.forwardRef(Du(function({__scopeSelect:e,...t},n){let r=Ru(yd,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=m.useRef(null),h=fn(n,p),g=i??``,_=Fl(g),v=Array.from(d).some(e=>(e.props.value??``)===``);return m.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(_!==g&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[_,g]),(0,B.jsxs)(jn.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Fn,...t.style},ref:h,defaultValue:g,children:[Sd(i)&&!v?(0,B.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function xd(e){return typeof e==`function`}Du(xd,`isFunction`);function Sd(e){return e===``||e===void 0}Du(Sd,`shouldShowPlaceholder`);function Cd(e){let t=Hr(e),n=m.useRef(``),r=m.useRef(0),i=m.useCallback(e=>{let i=n.current+e;t(i),Du((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=m.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Du(Cd,`useTypeaheadSearch`);function wd(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Td(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Du(wd,`findNextItem`);function Td(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Du(Td,`wrapArray`);var Ed=Object.defineProperty,Dd=(e,t)=>Ed(e,`name`,{value:t,configurable:!0}),Od=`Switch`,[kd,Ad]=Bn(Od),[jd,Md]=kd(Od);function Nd(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=_r({prop:n,defaultProp:i??!1,onChange:c,caller:Od}),[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useRef(!1),[b,x]=m.useReducer(e=>e+1,0),S={checked:f,setChecked:p,disabled:a,control:h,setControl:g,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:y,userInteractionCount:b,onUserInteraction:x,required:l,defaultChecked:i,isFormControl:!h||!!o||!!h.closest(`form`),bubbleInput:_,setBubbleInput:v};return(0,B.jsx)(jd,{scope:t,...S,children:Vd(d)?d(S):r})}Dd(Nd,`SwitchProvider`);var Pd=`SwitchTrigger`,Fd=m.forwardRef(Dd(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:h,bubbleInput:g}=Md(Pd,e),_=fn(r,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=Dd(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,B.jsx)(jn.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":Hd(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:_,onClick:V(t,e=>{p(),d(e=>!e),g&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),Id=m.forwardRef(Dd(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,B.jsx)(Nd,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Fd,{...d,ref:t,__scopeSwitch:n}),e&&(0,B.jsx)(Bd,{__scopeSwitch:n})]})})},`Switch`)),Ld=`SwitchThumb`,Rd=m.forwardRef(Dd(function(e,t){let{__scopeSwitch:n,...r}=e,i=Md(Ld,n);return(0,B.jsx)(jn.span,{"data-state":Hd(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),zd=`SwitchBubbleInput`,Bd=m.forwardRef(Dd(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:g}=Md(zd,e),_=fn(r,g),v=Yo(i),y=m.useRef(!1),b=m.useRef(s),x=m.useRef(o);m.useEffect(()=>{let e=h;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=b.current!==s;b.current=s;let c=!(r&&a.current);if(i&&n){y.current=!r;let t=new Event(`click`,{bubbles:c});n.call(e,s),e.dispatchEvent(t),y.current=!1}},[h,s,a,o]);let S=m.useRef(s);return(0,B.jsx)(jn.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??S.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:_,onClick:V(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function Vd(e){return typeof e==`function`}Dd(Vd,`isFunction`);function Hd(e){return e?`checked`:`unchecked`}Dd(Hd,`getState`);var Ud=Object.defineProperty,Wd=(e,t)=>Ud(e,`name`,{value:t,configurable:!0}),[Gd,Kd]=Bn(`Tooltip`,[pl]),qd=pl(),Jd=`TooltipProvider`,Yd=700,Xd=`tooltip.open`,[Zd,Qd]=Gd(Jd),$d=Wd(e=>{let{__scopeTooltip:t,delayDuration:n=Yd,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=m.useRef(!0),s=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,B.jsx)(Zd,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:m.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),ef=`Tooltip`,[tf,nf]=Gd(ef),rf=Wd(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Qd(ef,e.__scopeTooltip),l=qd(t),[u,d]=m.useState(null),[f,p]=m.useState(void 0),h=Fr(),g=m.useRef(0),_=o??c.disableHoverableContent,v=s??c.delayDuration,y=m.useRef(!1),[b,x]=_r({prop:r,defaultProp:i??!1,onChange:Wd(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xd))):c.onClose(),a?.(e)},`onChange`),caller:ef}),S=m.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=m.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),w=m.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=m.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);m.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let E=f??h;return(0,B.jsx)(kl,{...l,children:(0,B.jsx)(tf,{scope:t,contentId:E,setContentId:p,open:b,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:m.useCallback(()=>{_?w():(window.clearTimeout(g.current),g.current=0)},[w,_]),onOpen:C,onClose:w,disableHoverableContent:_,children:n})})},`Tooltip`),af=`TooltipTrigger`,of=m.forwardRef(Wd(function(e,t){let{__scopeTooltip:n,...r}=e,i=nf(af,n),a=Qd(af,n),o=qd(n),s=fn(t,m.useRef(null),i.onTriggerChange),c=m.useRef(!1),l=m.useRef(!1),u=m.useCallback(()=>c.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,B.jsx)(Al,{asChild:!0,...o,children:(0,B.jsx)(jn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:V(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:V(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:V(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:V(e.onBlur,i.onClose),onClick:V(e.onClick,i.onClose)})})},`TooltipTrigger`)),sf=`TooltipPortal`,[cf,lf]=Gd(sf,{forceMount:void 0}),uf=Wd(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=nf(sf,t);return(0,B.jsx)(cf,{scope:t,forceMount:n,children:(0,B.jsx)(Tr,{present:n||a.open,children:(0,B.jsx)(xi,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),df=`TooltipContent`,ff=m.forwardRef(Wd(function(e,t){let n=lf(df,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=nf(df,e.__scopeTooltip);return(0,B.jsx)(Tr,{present:r||o.open,children:o.disableHoverableContent?(0,B.jsx)(hf,{side:i,...a,ref:t}):(0,B.jsx)(pf,{side:i,...a,ref:t})})},`TooltipContent`)),pf=m.forwardRef(Wd(function(e,t){let n=nf(df,e.__scopeTooltip),r=Qd(df,e.__scopeTooltip),i=m.useRef(null),a=fn(t,i),[o,s]=m.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=m.useCallback(()=>{s(null),d(!1)},[d]),p=m.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=vf(r,_f(r,n.getBoundingClientRect())),a=yf(t.getBoundingClientRect()),o=xf([...i,...a]);s(o),d(!0)},[d]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&u){let e=Wd(e=>p(e,u),`handleTriggerLeave`),t=Wd(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),m.useEffect(()=>{if(o){let e=Wd(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!bf(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,B.jsx)(hf,{...e,ref:a})},`TooltipContentHoverable`)),mf=vn(`TooltipContent`),hf=m.forwardRef(Wd(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=nf(df,n),u=qd(n),{onClose:d}=l;m.useEffect(()=>(document.addEventListener(Xd,d),()=>document.removeEventListener(Xd,d)),[d]),m.useEffect(()=>{if(l.trigger){let e=Wd(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return cr(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,B.jsx)(Xr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,B.jsxs)(jl,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,B.jsx)(mf,{children:r}),i?(0,B.jsx)(In,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),gf=m.forwardRef(Wd(function(e,t){let{__scopeTooltip:n,...r}=e,i=qd(n);return(0,B.jsx)(Ml,{...i,...r,ref:t})},`TooltipArrow`));function _f(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Wd(_f,`getExitSideFromRect`);function vf(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Wd(vf,`getPaddedExitPoints`);function yf(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Wd(yf,`getPointsFromRect`);function bf(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Wd(bf,`isPointInPolygon`);function xf(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Sf(t)}Wd(xf,`getHull`);function Sf(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Wd(Sf,`getHullPresorted`);var Cf=$d,wf=rf,Tf=of,Ef=uf,Df=ff,Of=gf;function kf({className:e,children:t,...n}){return(0,B.jsxs)(Cu,{"data-slot":`scroll-area`,className:z(`relative`,e),...n,children:[(0,B.jsx)(wu,{"data-slot":`scroll-area-viewport`,className:`size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`,children:t}),(0,B.jsx)(Af,{}),(0,B.jsx)(Tu,{})]})}function Af({className:e,orientation:t=`vertical`,...n}){return(0,B.jsx)(Zl,{"data-slot":`scroll-area-scrollbar`,"data-orientation":t,orientation:t,className:z(`flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,e),...n,children:(0,B.jsx)(cu,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}var jf=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Mf=Oe,Nf=(e,t)=>n=>{if(t?.variants==null)return Mf(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=jf(t)||jf(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 Mf(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)},Pf=Nf(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function q({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?gn:`button`;return(0,B.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:z(Pf({variant:t,size:n,className:e})),...i})}var Ff=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function If(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Ff(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Lf=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},Rf=e=>{let t=Lf(e);return t.charAt(0).toUpperCase()+t.slice(1)},zf=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Bf={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 Vf(e){return e!=null}function Hf(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Bf.width,a=e.size??e.height??Bf.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?zf(...c):zf(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Bf[`stroke-width`])*Number(e.size??e.width??Bf.width)/Number(t.size??t.width??Bf.width):t.strokeWidth??Bf[`stroke-width`];return[`svg`,{...Object.entries(Bf).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Vf(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Vf(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Vf(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 Uf(e,t={}){return Hf(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Wf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Gf=(0,m.createContext)({}),J=()=>(0,m.useContext)(Gf),Kf=(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=``}=J()??{},b=!!c||Wf(d),[x,S,C=[]]=Uf(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:zf(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 qf(e,t=[],n=[]){let r=typeof e==`string`?If(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(Kf,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Rf(r.name)),i}var Jf={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Jf.node;var Yf=qf(Jf),Xf={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Xf.node;var Zf=qf(Xf),Qf={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Qf.node;var $f=qf(Qf),ep={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};ep.node;var tp=qf(ep),np={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};np.node;var rp=qf(np),ip={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`]};ip.node;var ap=qf(ip),op={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};op.node;var sp=qf(op),cp={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};cp.node;var lp=qf(cp),up={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`}]]};up.node;var dp=qf(up),fp={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`}]]};fp.node;var pp=qf(fp),mp={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`}]]};mp.node;var hp=qf(mp),gp={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};gp.node;var _p=qf(gp),vp={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`}]]};vp.node;var yp=qf(vp),bp={name:`octagon-x`,size:24,node:[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-octagon`]};bp.node;var xp=qf(bp),Sp={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`}]]};Sp.node;var Cp=qf(Sp),wp={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`}]]};wp.node;var Tp=qf(wp),Ep={name:`send-horizontal`,size:24,node:[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]],aliases:[`send-horizonal`]};Ep.node;var Dp=qf(Ep),Op={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Op.node;var kp=qf(Op),Ap={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`]};Ap.node;var jp=qf(Ap),Mp={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`}]]};Mp.node;var Np=qf(Mp),Pp={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Pp.node;var Fp=qf(Pp);function Ip({...e}){return(0,B.jsx)(Qa,{"data-slot":`sheet`,...e})}function Lp({...e}){return(0,B.jsx)(bo,{"data-slot":`sheet-close`,...e})}function Rp({...e}){return(0,B.jsx)(io,{"data-slot":`sheet-portal`,...e})}function zp({className:e,...t}){return(0,B.jsx)(oo,{"data-slot":`sheet-overlay`,className:z(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Bp({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,B.jsxs)(Rp,{children:[(0,B.jsx)(zp,{}),(0,B.jsxs)(uo,{"data-slot":`sheet-content`,"data-side":n,className:z(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&(0,B.jsx)(bo,{"data-slot":`sheet-close`,asChild:!0,children:(0,B.jsxs)(q,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,B.jsx)(Fp,{}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function Vp({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`sheet-header`,className:z(`flex flex-col gap-0.5 p-4`,e),...t})}function Hp({className:e,...t}){return(0,B.jsx)(go,{"data-slot":`sheet-title`,className:z(`text-base font-medium text-foreground`,e),...t})}function Up({className:e,...t}){return(0,B.jsx)(vo,{"data-slot":`sheet-description`,className:z(`text-sm text-muted-foreground`,e),...t})}function Wp({info:e}){return(0,B.jsxs)(`div`,{className:`flex items-baseline gap-3 py-0.5`,children:[(0,B.jsx)(tn,{className:`min-w-16 justify-center`,children:e.label}),(0,B.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.help})]})}function Gp({title:e,keys:t}){return(0,B.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold tracking-tight`,children:e}),t.map(e=>(0,B.jsx)(Wp,{info:e},e.action))]})}function Kp(e){return e.map(e=>({action:`tab.${e.id}`,key:e.key,label:e.key,help:`jump to the ${e.label} tab`}))}function qp({open:e,onOpenChange:t,keys:n,tabs:r}){return(0,m.useEffect)(()=>{if(!e)return;let n=()=>t(!1);return window.addEventListener(`keydown`,n,!0),()=>window.removeEventListener(`keydown`,n,!0)},[e,t]),(0,B.jsx)(Ip,{open:e,onOpenChange:t,children:(0,B.jsxs)(Bp,{side:`bottom`,className:`h-[80svh] gap-0`,children:[(0,B.jsx)(Vp,{className:`border-b`,children:(0,B.jsx)(Hp,{children:`Keys`})}),(0,B.jsx)(kf,{className:`min-h-0 flex-1`,children:(0,B.jsxs)(`div`,{className:`grid gap-6 p-4 xl:grid-cols-2`,children:[(0,B.jsx)(`div`,{className:`flex flex-col gap-6`,children:(0,B.jsx)(Gp,{title:`Everywhere`,keys:n})}),(0,B.jsx)(Gp,{title:`Tabs`,keys:Kp(r)})]})})]})})}function Jp({className:e,...t}){return(0,B.jsx)(`textarea`,{"data-slot":`textarea`,className:z(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function Yp(){let[e,t]=(0,m.useReducer)(e=>e+1,0);return(0,m.useEffect)(()=>sn.subscribe(t),[]),e}function Xp(){return Yp(),sn.status()}function Zp(e){return Yp(),sn.get(e)}function Qp(e){let t=(0,m.useCallback)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),n=(0,m.useCallback)(()=>window.matchMedia(e).matches,[e]);return(0,m.useSyncExternalStore)(t,n)}var $p=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=t,this.status=n}},em={"Content-Type":`application/json`};async function tm(e,t={}){let n=await fetch(`/api/${e}`,{method:`POST`,headers:em,body:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new $p(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw r.code===`unauthorized`&&sn.onStatus({signedOut:!0}),new $p(r.error,r.code,n.status);return r.result}function nm(){return globalThis.location}async function rm(){let e=nm(),t=e?new URLSearchParams(e.hash.replace(/^#/,``)).get(`token`):null;if(!t||!(await fetch(`/api/auth.login`,{method:`POST`,headers:em,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),sn.onStatus({signedOut:!1}),!0}var im=`Type a request, or / for commands…`,am=`message the oracle · enter steers the running turn`;function om(){let[e,t]=(0,m.useState)(``),[n,r]=(0,m.useState)(!1),i=Zp(`status`),a=Zp(`lobby`),o=(i.data?.busy??!1)||!!a.data?.reply?.trim(),s=(0,m.useCallback)(async()=>{r(!0);try{let n=await tm(`lobby.send`,{text:e});n.notice?ce(n.notice):t(``)}catch(e){ce(e instanceof Error?e.message:`Could not send`)}finally{r(!1)}},[e]),c=(0,m.useCallback)(async()=>{try{await tm(`lobby.abort`,{})}catch(e){ce(e instanceof Error?e.message:`Could not stop`)}},[]),l=(0,m.useCallback)(e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),s())},[s]);return(0,B.jsx)(`div`,{className:`shrink-0 border-t bg-background px-4 py-3`,children:(0,B.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,B.jsx)(Jp,{"aria-label":`Message the oracle`,placeholder:o?am:im,value:e,onChange:e=>t(e.target.value),onKeyDown:l,rows:1,className:`min-h-11 flex-1 resize-none text-base md:text-base`}),o?(0,B.jsxs)(q,{type:`button`,size:`lg`,variant:`outline`,className:`h-11`,onClick:()=>void c(),children:[(0,B.jsx)(kp,{"aria-hidden":`true`}),`Stop`]}):null,(0,B.jsxs)(q,{type:`button`,size:`lg`,className:`h-11`,onClick:()=>void s(),disabled:n,children:[(0,B.jsx)(Dp,{"aria-hidden":`true`}),`Send`]})]})})}var sm=Nf(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function cm({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?gn:`span`;return(0,B.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:z(sm({variant:t}),e),...r})}function lm({state:e}){return e===`live`?(0,B.jsxs)(cm,{variant:`outline`,className:`gap-1 font-normal text-muted-foreground`,children:[(0,B.jsx)(lp,{className:`size-2 fill-current`,"aria-hidden":`true`}),`Connected`]}):e===`connecting`?(0,B.jsxs)(cm,{variant:`secondary`,className:`gap-1 font-normal`,children:[(0,B.jsx)(sp,{className:`size-3 animate-pulse`,"aria-hidden":`true`}),`Reconnecting…`]}):(0,B.jsxs)(cm,{variant:`destructive`,className:`gap-1 font-normal`,children:[(0,B.jsx)(Np,{className:`size-3`,"aria-hidden":`true`}),`Connection lost`]})}function um({status:e,task:t,connection:n}){let r=e?.workspace.name??`bot-lobby`,i=e?.branch??e?.workspace.branch,a=t?`${t.id} ${t.state}`:e?.sessionName??`no task in this session`;return(0,B.jsxs)(`header`,{className:`flex min-h-14 shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2`,children:[(0,B.jsxs)(`span`,{className:`text-sm font-semibold tracking-tight`,children:[`◆ `,r,i?(0,B.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[` (⎇ `,i,`)`]}):null]}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-muted-foreground`,children:a}),(0,B.jsxs)(cm,{variant:`outline`,className:`gap-1 font-normal`,children:[(0,B.jsx)(Tp,{className:`size-3`,"aria-hidden":`true`}),`AUTO`]}),(0,B.jsx)(lm,{state:n})]})}function dm(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 fm(){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 rm()?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(dm(e))}return(0,B.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-8`,children:(0,B.jsxs)(`form`,{onSubmit:s,className:`flex w-full max-w-md flex-col gap-4 rounded-xl border bg-card p-6`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(hp,{className:`size-5`,"aria-hidden":`true`}),(0,B.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Sign in to bot-lobby`})]}),(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Run `,(0,B.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-xs`,children:`/bot-lobby web`}),` in Pi for the link, then paste it here.`]}),(0,B.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,B.jsx)(`span`,{className:`font-medium`,children:`Lobby link or token`}),(0,B.jsx)(`input`,{value:e,onChange:e=>t(e.target.value),autoComplete:`off`,spellCheck:!1,placeholder:`http://127.0.0.1:7347/#token=…`,className:`h-10 rounded-lg border border-border bg-background px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`})]}),n?(0,B.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:n}):null,(0,B.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,B.jsx)(q,{type:`button`,variant:`ghost`,size:`lg`,className:`h-10`,disabled:i,onClick:()=>void o(void 0),children:`Retry`}),(0,B.jsx)(q,{type:`submit`,size:`lg`,className:`h-10`,disabled:i||!e.trim(),children:`Sign in`})]})]})})}function pm({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`empty`,className:z(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function mm({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`empty-header`,className:z(`flex max-w-sm flex-col items-center gap-2`,e),...t})}function hm({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`empty-title`,className:z(`text-sm font-medium tracking-tight`,e),...t})}function gm({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`empty-description`,className:z(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function _m({className:e,...t}){return(0,B.jsx)(_p,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:z(`size-4 animate-spin`,e),...t})}function vm({label:e=`Connecting…`}){return(0,B.jsxs)(`div`,{className:`flex min-h-svh items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(_m,{}),(0,B.jsx)(`span`,{children:e})]})}function ym({message:e,onRetry:t}){return(0,B.jsxs)(pm,{className:`m-4 flex-1 border border-destructive/40 bg-card`,children:[(0,B.jsxs)(mm,{children:[(0,B.jsxs)(hm,{className:`flex items-center gap-2`,children:[(0,B.jsx)(jp,{className:`size-4 text-destructive`,"aria-hidden":`true`}),`Could not load this view`]}),(0,B.jsx)(gm,{children:e??`The request failed. Try again.`})]}),t?(0,B.jsxs)(q,{variant:`outline`,size:`lg`,className:`h-10`,onClick:t,children:[(0,B.jsx)(Tp,{"aria-hidden":`true`}),`Try again`]}):null]})}function bm({onRetry:e}){return(0,B.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2 border-b bg-muted px-4 py-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(Np,{className:`size-4`,"aria-hidden":`true`}),(0,B.jsx)(`span`,{children:`Connection lost — retrying every 2 s.`}),e?(0,B.jsx)(q,{variant:`link`,className:`h-auto px-0`,onClick:e,children:`Retry now`}):null]})}function xm(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Sm(){return(0,B.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-8`,children:(0,B.jsx)(pm,{className:`max-w-md border border-border bg-card`,children:(0,B.jsxs)(mm,{children:[(0,B.jsx)(hm,{children:xm(Ee)}),(0,B.jsx)(gm,{children:`Open the lobby on a window at least 768 px wide.`})]})})})}function Cm({delayDuration:e=0,...t}){return(0,B.jsx)(Cf,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function wm({...e}){return(0,B.jsx)(wf,{"data-slot":`tooltip`,...e})}function Tm({...e}){return(0,B.jsx)(Tf,{"data-slot":`tooltip-trigger`,...e})}function Em({className:e,sideOffset:t=0,children:n,...r}){return(0,B.jsx)(Ef,{children:(0,B.jsxs)(Df,{"data-slot":`tooltip-content`,sideOffset:t,className:z(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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`,e),...r,children:[n,(0,B.jsx)(Of,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var Dm=z(`inline-flex h-11 shrink-0 items-center gap-1.5 rounded-lg border px-3 text-sm font-medium whitespace-nowrap outline-none transition-colors`,`focus-visible:ring-3 focus-visible:ring-ring/50`),Om=(0,m.forwardRef)(function({tab:e,active:t},n){return(0,B.jsxs)(wm,{children:[(0,B.jsx)(Tm,{asChild:!0,children:(0,B.jsx)(`a`,{ref:n,role:`tab`,id:`tab-${e.id}`,href:`#/${e.id}`,"aria-selected":t,"aria-keyshortcuts":e.key,tabIndex:t?0:-1,className:z(Dm,t?`border-primary bg-primary text-primary-foreground`:`border-border bg-background text-muted-foreground hover:bg-muted hover:text-foreground`),children:e.label})}),(0,B.jsxs)(Em,{children:[e.label,` · `,(0,B.jsx)(tn,{children:e.key})]})]})});function km({side:e,onClick:t}){let n=e===`left`?tp:rp;return(0,B.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-hidden":`true`,title:`More tabs`,onClick:t,className:z(`absolute top-0 z-10 flex h-12 w-10 items-center justify-center text-muted-foreground`,e===`left`?`left-0 bg-gradient-to-r from-background via-background/85 to-transparent`:`right-0 bg-gradient-to-l from-background via-background/85 to-transparent`),children:(0,B.jsx)(n,{className:`size-4`})})}function Am({tabs:e,activeId:t,questionCount:n=0,onSelect:r}){let i=(0,m.useRef)(null),a=(0,m.useRef)({}),[o,s]=(0,m.useState)({left:!1,right:!1}),c=(0,m.useCallback)(()=>{let e=i.current;e&&s({left:e.scrollLeft>1,right:e.scrollLeft+e.clientWidth<e.scrollWidth-1})},[]);(0,m.useEffect)(()=>{c();let e=i.current;if(!e)return;let t=new ResizeObserver(c);return t.observe(e),()=>t.disconnect()},[c,e.length]),(0,m.useEffect)(()=>{t&&a.current[t]?.scrollIntoView({block:`nearest`,inline:`nearest`}),c()},[t,c]);function l(n){let i=n.key===`ArrowRight`?1:n.key===`ArrowLeft`?-1:0;if(!i||e.length===0)return;n.preventDefault();let o=e[(Math.max(0,e.findIndex(e=>e.id===t))+i+e.length)%e.length];r(o.id),a.current[o.id]?.focus()}function u(e){i.current?.scrollBy({left:e*160,behavior:`smooth`})}return(0,B.jsxs)(`div`,{className:`relative shrink-0 border-b`,children:[o.left?(0,B.jsx)(km,{side:`left`,onClick:()=>u(-1)}):null,(0,B.jsx)(`div`,{ref:i,role:`tablist`,"aria-label":`Lobby tabs`,onScroll:c,onKeyDown:l,className:`flex h-12 items-center gap-1.5 overflow-x-auto px-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:e.map(e=>{let i=e.id===`lobby`?0:n;return(0,B.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,B.jsx)(Om,{ref:t=>{a.current[e.id]=t},tab:e,active:e.id===t}),i>0?(0,B.jsx)(cm,{asChild:!0,variant:`destructive`,className:`absolute -top-1 -right-1 z-10 h-6 min-w-6 justify-center px-1 text-[10px] tabular-nums`,children:(0,B.jsx)(`button`,{type:`button`,"aria-label":`${i} question${i===1?``:`s`} waiting — go to Lobby`,onClick:()=>r(`lobby`),className:`before:absolute before:-inset-2 before:content-['']`,children:i})}):null]},e.id)})}),o.right?(0,B.jsx)(km,{side:`right`,onClick:()=>u(1)}):null]})}function jm(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Mm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pm={};function Fm(e,t){return((t||Pm).jsx?Nm:Mm).test(e)}var Im=/[ \t\n\f\r]/g;function Lm(e){return typeof e==`object`?e.type===`text`&&Rm(e.value):Rm(e)}function Rm(e){return e.replace(Im,``)===``}var zm=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};zm.prototype.normal={},zm.prototype.property={},zm.prototype.space=void 0;function Bm(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new zm(n,r,t)}function Vm(e){return e.toLowerCase()}var Hm=class{constructor(e,t){this.attribute=t,this.property=e}};Hm.prototype.attribute=``,Hm.prototype.booleanish=!1,Hm.prototype.boolean=!1,Hm.prototype.commaOrSpaceSeparated=!1,Hm.prototype.commaSeparated=!1,Hm.prototype.defined=!1,Hm.prototype.mustUseProperty=!1,Hm.prototype.number=!1,Hm.prototype.overloadedBoolean=!1,Hm.prototype.property=``,Hm.prototype.spaceSeparated=!1,Hm.prototype.space=void 0;var Um=s({boolean:()=>Y,booleanish:()=>Gm,commaOrSpaceSeparated:()=>Ym,commaSeparated:()=>Jm,number:()=>X,overloadedBoolean:()=>Km,spaceSeparated:()=>qm}),Wm=0,Y=Xm(),Gm=Xm(),Km=Xm(),X=Xm(),qm=Xm(),Jm=Xm(),Ym=Xm();function Xm(){return 2**++Wm}var Zm=Object.keys(Um),Qm=class extends Hm{constructor(e,t,n,r){let i=-1;if(super(e,t),$m(this,`space`,r),typeof n==`number`)for(;++i<Zm.length;){let e=Zm[i];$m(this,Zm[i],(n&Um[e])===Um[e])}}};Qm.prototype.defined=!0;function $m(e,t,n){n&&(e[t]=n)}function eh(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Qm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Vm(r)]=r,n[Vm(a.attribute)]=r}return new zm(t,n,e.space)}var th=eh({properties:{ariaActiveDescendant:null,ariaAtomic:Gm,ariaAutoComplete:null,ariaBusy:Gm,ariaChecked:Gm,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:qm,ariaCurrent:null,ariaDescribedBy:qm,ariaDetails:null,ariaDisabled:Gm,ariaDropEffect:qm,ariaErrorMessage:null,ariaExpanded:Gm,ariaFlowTo:qm,ariaGrabbed:Gm,ariaHasPopup:null,ariaHidden:Gm,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qm,ariaLevel:X,ariaLive:null,ariaModal:Gm,ariaMultiLine:Gm,ariaMultiSelectable:Gm,ariaOrientation:null,ariaOwns:qm,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Gm,ariaReadOnly:Gm,ariaRelevant:null,ariaRequired:Gm,ariaRoleDescription:qm,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Gm,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function nh(e,t){return t in e?e[t]:t}function rh(e,t){return nh(e,t.toLowerCase())}var ih=eh({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Jm,acceptCharset:qm,accessKey:qm,action:null,allow:null,allowFullScreen:Y,allowPaymentRequest:Y,allowUserMedia:Y,alpha:Y,alt:null,as:null,async:Y,autoCapitalize:null,autoComplete:qm,autoFocus:Y,autoPlay:Y,blocking:qm,capture:null,charSet:null,checked:Y,cite:null,className:qm,closedBy:null,colorSpace:null,cols:X,colSpan:X,command:null,commandFor:null,content:null,contentEditable:Gm,controls:Y,controlsList:qm,coords:X|Jm,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Y,defer:Y,dir:null,dirName:null,disabled:Y,download:Km,draggable:Gm,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Y,formTarget:null,headers:qm,height:X,hidden:Km,high:X,href:null,hrefLang:null,htmlFor:qm,httpEquiv:qm,id:null,imageSizes:null,imageSrcSet:null,inert:Y,inputMode:null,integrity:null,is:null,isMap:Y,itemId:null,itemProp:qm,itemRef:qm,itemScope:Y,itemType:qm,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Y,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:Y,muted:Y,name:null,nonce:null,noModule:Y,noValidate:Y,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Y,optimum:X,pattern:null,ping:qm,placeholder:null,playsInline:Y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Y,referrerPolicy:null,rel:qm,required:Y,reversed:Y,rows:X,rowSpan:X,sandbox:qm,scope:null,scoped:Y,seamless:Y,selected:Y,shadowRootClonable:Y,shadowRootCustomElementRegistry:Y,shadowRootDelegatesFocus:Y,shadowRootMode:null,shadowRootSerializable:Y,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Gm,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:Y,useMap:null,value:Gm,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qm,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Y,declare:Y,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:Y,noHref:Y,noShade:Y,noWrap:Y,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Gm,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Y,disablePictureInPicture:Y,disableRemotePlayback:Y,exportParts:Jm,part:qm,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:rh}),ah=eh({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ym,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:qm,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:Y,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Jm,g2:Jm,glyphName:Jm,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:Ym,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qm,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ym,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ym,rev:Ym,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ym,requiredFeatures:Ym,requiredFonts:Ym,requiredFormats:Ym,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:Ym,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ym,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ym,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:nh}),oh=eh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),sh=eh({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:rh}),ch=eh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),lh={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},uh=/[A-Z]/g,dh=/-[a-z]/g,fh=/^data[-\w.:]+$/i;function ph(e,t){let n=Vm(t),r=t,i=Hm;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&fh.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(dh,hh);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!dh.test(e)){let n=e.replace(uh,mh);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Qm}return new i(r,t)}function mh(e){return`-`+e.toLowerCase()}function hh(e){return e.charAt(1).toUpperCase()}var gh=Bm([th,ih,oh,sh,ch],`html`),_h=Bm([th,ah,oh,sh,ch],`svg`);function vh(e){return e.join(` `).trim()}var yh=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
50
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),bh=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(yh());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),xh=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Sh=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(bh()),r=xh();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Ch=Th(`end`),wh=Th(`start`);function Th(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Eh(e){let t=wh(e),n=Ch(e);if(t&&n)return{start:t,end:n}}function Dh(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?kh(e.position):`start`in e||`end`in e?kh(e):`line`in e||`column`in e?Oh(e):``}function Oh(e){return Ah(e&&e.line)+`:`+Ah(e&&e.column)}function kh(e){return Oh(e&&e.start)+`-`+Oh(e&&e.end)}function Ah(e){return e&&typeof e==`number`?e:1}var jh=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Dh(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};jh.prototype.file=``,jh.prototype.name=``,jh.prototype.reason=``,jh.prototype.message=``,jh.prototype.stack=``,jh.prototype.column=void 0,jh.prototype.line=void 0,jh.prototype.ancestors=void 0,jh.prototype.cause=void 0,jh.prototype.fatal=void 0,jh.prototype.place=void 0,jh.prototype.ruleId=void 0,jh.prototype.source=void 0;var Mh=l(Sh(),1),Nh={}.hasOwnProperty,Ph=new Map,Fh=/[A-Z]/g,Ih=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Lh=new Set([`td`,`th`]),Rh=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function zh(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Xh(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Yh(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?_h:gh,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Bh(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Bh(e,t,n){if(t.type===`element`)return Vh(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Hh(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Wh(e,t,n);if(t.type===`mdxjsEsm`)return Uh(e,t);if(t.type===`root`)return Gh(e,t,n);if(t.type===`text`)return Kh(e,t)}function Vh(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=_h,e.schema=i),e.ancestors.push(t);let a=ng(e,t.tagName,!1),o=Zh(e,t),s=$h(e,t);return Ih.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Lm(e)})),qh(e,o,a,t),Jh(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Hh(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}rg(e,t.position)}function Uh(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rg(e,t.position)}function Wh(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=_h,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:ng(e,t.name,!0),o=Qh(e,t),s=$h(e,t);return qh(e,o,a,t),Jh(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Gh(e,t,n){let r={};return Jh(r,$h(e,t)),e.create(t,e.Fragment,r,n)}function Kh(e,t){return t.value}function qh(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Jh(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Yh(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Xh(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=wh(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Zh(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Nh.call(t.properties,i)){let a=eg(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Lh.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Qh(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else rg(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else rg(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function $h(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ph;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Bh(e,a,o);s!==void 0&&n.push(s)}return n}function eg(e,t,n){let r=ph(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jm(n):vh(n)),r.property===`style`){let t=typeof n==`object`?n:tg(e,String(n));return e.stylePropertyNameCase===`css`&&(t=ig(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?lh[r.property]||r.property:r.attribute,n]}}function tg(e,t){try{return(0,Mh.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new jh("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Rh+`#cannot-parse-style-attribute`,r}}function ng(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Fm(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Fm(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Nh.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);rg(e)}function rg(e,t){let n=new jh("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Rh+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function ig(e){let t={},n;for(n in e)Nh.call(e,n)&&(t[ag(n)]=e[n]);return t}function ag(e){let t=e.replace(Fh,og);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function og(e){return`-`+e.toLowerCase()}var sg={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},cg={};function lg(e,t){let n=t||cg;return ug(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function ug(e,t,n){if(fg(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return dg(e.children,t,n)}return Array.isArray(e)?dg(e,t,n):``}function dg(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ug(e[i],t,n);return r.join(``)}function fg(e){return!!(e&&typeof e==`object`)}var pg=document.createElement(`i`);function mg(e){let t=`&`+e+`;`;pg.innerHTML=t;let n=pg.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function hg(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function gg(e,t){return e.length>0?(hg(e,e.length,0,t),e):t}var _g={}.hasOwnProperty;function vg(e){let t={},n=-1;for(;++n<e.length;)yg(t,e[n]);return t}function yg(e,t){let n;for(n in t){let r=(_g.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){_g.call(r,a)||(r[a]=[]);let e=i[a];bg(r[a],Array.isArray(e)?e:e?[e]:[])}}}function bg(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);hg(e,0,0,r)}function xg(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Sg(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Cg=Ng(/[A-Za-z]/),wg=Ng(/[\dA-Za-z]/),Tg=Ng(/[#-'*+\--9=?A-Z^-~]/);function Eg(e){return e!==null&&(e<32||e===127)}var Dg=Ng(/\d/),Og=Ng(/[\dA-Fa-f]/),kg=Ng(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function Ag(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var jg=Ng(/\p{P}|\p{S}/u),Mg=Ng(/\s/);function Ng(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pg(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&wg(e.charCodeAt(n+1))&&wg(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Fg(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Ig(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Q(t)?(e.enter(r),c(t)):l(t)}function c(t){return Q(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Lg={tokenize:Rg};function Rg(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Fg(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Z(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var zg=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Bg(this,e,t,n,!1)}addBefore(e,t,n){Bg(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Bg(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Vg={tokenize:Ug},Hg={tokenize:Wg};function Ug(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new zg;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Hg,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Hg,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Z(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new zg;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Wg(e,t,n){return Fg(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Gg(e){if(e===null||Ag(e)||Mg(e))return 1;if(jg(e))return 2}function Kg(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var qg={name:`attention`,resolveAll:Jg,tokenize:Yg};function Jg(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Xg(o,-a),Xg(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=gg(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=gg(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=gg(r,Kg(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=gg(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=gg(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),hg(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Yg(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Gg(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Gg(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Xg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Zg={name:`autolink`,tokenize:Qg};function Qg(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Cg(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||wg(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||wg(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Eg(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Tg(t)?(e.consume(t),l):n(t)}function u(e){return wg(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||wg(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var $g={partial:!0,tokenize:e_};function e_(e,t,n){return r;function r(t){return Q(t)?Fg(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var t_={continuation:{tokenize:r_},exit:i_,name:`blockQuote`,tokenize:n_};function n_(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function r_(e,t,n){let r=this;return i;function i(t){return Q(t)?Fg(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(t_,t,n)(r)}}function i_(e){e.exit(`blockQuote`)}var a_={name:`characterEscape`,tokenize:o_};function o_(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return kg(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var s_={name:`characterReference`,tokenize:c_};function c_(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=wg,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Og,u):(e.enter(`characterReferenceValue`),a=7,o=Dg,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===wg&&!mg(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var l_={partial:!0,tokenize:u_};function u_(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var d_={concrete:!0,name:`codeFenced`,tokenize:f_};function f_(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?Fg(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(l_,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Fg(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Z(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?Fg(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(l_,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?Fg(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?Fg(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var p_={name:`codeIndented`,tokenize:h_},m_={partial:!0,tokenize:g_};function h_(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Ig(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Z(t)?e.attempt(m_,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function g_(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Z(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Ig(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Z(e)?i(e):n(e)}}var __={name:`codeText`,previous:y_,resolve:v_,tokenize:b_};function v_(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function y_(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function b_(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Z(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var x_=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&S_(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),S_(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),S_(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);S_(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);S_(this.left,t.reverse())}}}};function S_(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function C_(e){let t={},n=-1,r,i,a,o,s,c,l,u=new x_(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,w_(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return hg(e,0,1/0,u.slice(0)),!l}function w_(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var T_={resolve:D_,tokenize:O_},E_={partial:!0,tokenize:k_};function D_(e){return C_(e),e}function O_(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Z(t)?e.check(E_,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function k_(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Fg(e,a,`linePrefix`)}function a(i){if(i===null||Z(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function A_(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Eg(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Z(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ag(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Eg(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function j_(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Z(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Z(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function M_(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Fg(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Z(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function N_(e,t){let n;return r;function r(i){return Z(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?Fg(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var P_={name:`definition`,tokenize:I_},F_={partial:!0,tokenize:L_};function I_(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return j_.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Sg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ag(t)?N_(e,l)(t):l(t)}function l(t){return A_(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(F_,d,d)(t)}function d(t){return Q(t)?Fg(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Z(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function L_(e,t,n){return r;function r(t){return Ag(t)?N_(e,i)(t):n(t)}function i(t){return M_(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?Fg(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var R_={name:`hardBreakEscape`,tokenize:z_};function z_(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Z(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var B_={name:`headingAtx`,resolve:V_,tokenize:H_};function V_(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};hg(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function H_(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ag(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Z(n)?(e.exit(`atxHeading`),t(n)):Q(n)?Fg(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ag(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var U_=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),W_=[`pre`,`script`,`style`,`textarea`],G_={concrete:!0,name:`htmlFlow`,resolveTo:q_,tokenize:J_},K_={partial:!0,tokenize:Y_};function q_(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function J_(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):Cg(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Cg(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Cg(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ag(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&W_.includes(l)?(i=1,r.interrupt?t(s):O(s)):U_.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||wg(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Cg(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||wg(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Z(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ag(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Z(t)?O(t):Q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),ne):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),N):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(K_,re,k)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(l_,ee,re)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return t===null||Z(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),P):O(t)}function M(t){return t===47?(e.consume(t),o=``,te):O(t)}function te(t){if(t===62){let n=o.toLowerCase();return W_.includes(n)?(e.consume(t),ne):O(t)}return Cg(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function N(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),ne):t===45&&i===2?(e.consume(t),P):O(t)}function ne(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),re(t)):(e.consume(t),ne)}function re(n){return e.exit(`htmlFlow`),t(n)}}function Y_(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt($g,t,n)}}var X_={name:`htmlText`,tokenize:Z_};function Z_(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Cg(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Cg(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Z(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Z(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):Z(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return Cg(t)?(e.consume(t),S):n(t)}function S(t){return t===45||wg(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,M(t)):Q(t)?(e.consume(t),C):j(t)}function w(t){return t===45||wg(t)?(e.consume(t),w):t===47||t===62||Ag(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||Cg(t)?(e.consume(t),E):Z(t)?(o=T,M(t)):Q(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||wg(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Z(t)?(o=D,M(t)):Q(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Z(t)?(o=O,M(t)):Q(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,A):t===null?n(t):Z(t)?(o=k,M(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ag(t)?T(t):(e.consume(t),ee)}function A(e){return e===47||e===62||Ag(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return Q(t)?Fg(e,N,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):N(t)}function N(t){return e.enter(`htmlTextData`),o(t)}}var Q_={name:`labelEnd`,resolveAll:nv,resolveTo:rv,tokenize:iv},$_={tokenize:av},ev={tokenize:ov},tv={tokenize:sv};function nv(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&hg(e,0,e.length,n),e}function rv(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=gg(o,e.slice(i+1,i+r+3)),o=gg(o,[[`enter`,l,t]]),o=gg(o,Kg(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=gg(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=gg(o,e.slice(a+1)),o=gg(o,[[`exit`,s,t]]),hg(e,i,e.length,o),e}function iv(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Sg(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt($_,u,o?u:d)(t):t===91?e.attempt(ev,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(tv,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function av(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Ag(t)?N_(e,a)(t):a(t)}function a(t){return t===41?u(t):A_(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ag(t)?N_(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?M_(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ag(t)?N_(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ov(e,t,n){let r=this;return i;function i(t){return j_.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Sg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function sv(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var cv={name:`labelStartImage`,resolveAll:Q_.resolveAll,tokenize:lv};function lv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var uv={name:`labelStartLink`,resolveAll:Q_.resolveAll,tokenize:dv};function dv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var fv={name:`lineEnding`,tokenize:pv};function pv(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Fg(e,t,`linePrefix`)}}var mv={name:`thematicBreak`,tokenize:hv};function hv(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Z(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?Fg(e,s,`whitespace`)(t):s(t))}}var gv={continuation:{tokenize:bv},exit:Sv,name:`list`,tokenize:yv},_v={partial:!0,tokenize:Cv},vv={partial:!0,tokenize:xv};function yv(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Dg(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(mv,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Dg(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check($g,r.interrupt?n:u,e.attempt(_v,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function bv(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check($g,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Fg(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(vv,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Fg(e,e.attempt(gv,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function xv(e,t,n){let r=this;return Fg(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Sv(e){e.exit(this.containerState.type)}function Cv(e,t,n){let r=this;return Fg(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var wv={name:`setextUnderline`,resolveTo:Tv,tokenize:Ev};function Tv(e,t){let n=new zg,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Ev(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?Fg(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Dv={tokenize:Ov};function Ov(e){let t=this,n=e.attempt($g,r,e.attempt(this.parser.constructs.flowInitial,i,Fg(e,e.attempt(this.parser.constructs.flow,i,e.attempt(T_,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var kv={resolveAll:Nv()},Av=Mv(`string`),jv=Mv(`text`);function Mv(e){return{resolveAll:Nv(e===`text`?Pv:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Nv(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Pv(e,t){let n=new zg,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Fv=s({attentionMarkers:()=>Uv,contentInitial:()=>Lv,disable:()=>Wv,document:()=>Iv,flow:()=>zv,flowInitial:()=>Rv,insideSpan:()=>Hv,string:()=>Bv,text:()=>Vv}),Iv={42:gv,43:gv,45:gv,48:gv,49:gv,50:gv,51:gv,52:gv,53:gv,54:gv,55:gv,56:gv,57:gv,62:t_},Lv={91:P_},Rv={[-2]:p_,[-1]:p_,32:p_},zv={35:B_,42:mv,45:[wv,mv],60:G_,61:wv,95:mv,96:d_,126:d_},Bv={38:s_,92:a_},Vv={[-5]:fv,[-4]:fv,[-3]:fv,33:cv,38:s_,42:qg,60:[Zg,X_],91:uv,92:[R_,a_],93:Q_,95:qg,96:__},Hv={null:[qg,kv]},Uv={null:[42,95]},Wv={null:[]};function Gv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=gg(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Kg(a,l.events,l),l.events):[]}function f(e,t){return qv(p(e),t)}function p(e){return Kv(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Z(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&hg(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Kv(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function qv(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
51
|
-
`;break;case-3:o=`\r
|
|
52
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Jv(e){let t={constructs:vg([Fv,...(e||{}).extensions||[]]),content:n(Lg),defined:[],document:n(Vg),flow:n(Dv),lazy:{},string:n(Av),text:n(jv)};return t;function n(e){return n;function n(n){return Gv(t,e,n)}}}function Yv(e){for(;!C_(e););return e}var Xv=/[\0\t\n\r]/g;function Zv(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Xv.lastIndex=c;let n=Xv.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Qv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $v(e){return e.replace(Qv,ey)}function ey(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return xg(n.slice(t?2:1),t?16:10)}return mg(n)||e}var ty={}.hasOwnProperty;function ny(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ry(n)(Yv(Jv(n).document().write(Zv()(e,t,!0))))}function ry(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ye),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(F),blockQuote:a(de),characterEscape:T,characterReference:T,codeFenced:a(fe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(fe,o),codeText:a(pe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(me),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(he),hardBreakEscape:a(ge),hardBreakTrailing:a(ge),htmlFlow:a(_e,o),htmlFlowData:T,htmlText:a(_e,o),htmlTextData:T,image:a(ve),label:o,link:a(ye),listItem:a(xe),listItemValue:f,listOrdered:a(be,d),listUnordered:a(be),paragraph:a(Se),reference:ie,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(F),strong:a(Ce),thematicBreak:a(Te)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(A),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(ee),htmlTextData:E,image:c(M),label:N,labelText:te,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:P,resourceTitleString:ne,resource:re,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};ay(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];ty.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||sy).call(a,void 0,e[0])}for(r.position={start:iy(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:iy(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:iy(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||sy).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Dh({start:e.start,end:e.end})+`): it’s not open`);n.position.end=iy(e.end)}function u(){return lg(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Sg(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=we(),n.position={start:iy(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=iy(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=iy(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=$v(t),n.identifier=Sg(t).toLowerCase()}function N(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Sg(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=xg(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=mg(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=iy(e.end)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[]}}function fe(){return{type:`code`,lang:null,meta:null,value:``}}function pe(){return{type:`inlineCode`,value:``}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function he(){return{type:`emphasis`,children:[]}}function F(){return{type:`heading`,depth:0,children:[]}}function ge(){return{type:`break`}}function _e(){return{type:`html`,value:``}}function ve(){return{type:`image`,title:null,url:``,alt:null}}function ye(){return{type:`link`,title:null,url:``,children:[]}}function be(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function xe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Se(){return{type:`paragraph`,children:[]}}function Ce(){return{type:`strong`,children:[]}}function we(){return{type:`text`,value:``}}function Te(){return{type:`thematicBreak`}}}function iy(e){return{line:e.line,column:e.column,offset:e.offset}}function ay(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ay(e,r):oy(e,r)}}function oy(e,t){let n;for(n in t)if(ty.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function sy(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Dh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Dh({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Dh({start:t.start,end:t.end})+`) is still open`)}function cy(e){let t=this;t.parser=n;function n(n){return ny(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ly(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uy(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
53
|
-
`}]}function dy(e,t){let n=t.value?t.value+`
|
|
54
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function fy(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function py(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function my(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Pg(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function hy(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gy(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function _y(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function vy(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _y(e,t);let i={src:Pg(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function yy(e,t){let n={src:Pg(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function by(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function xy(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _y(e,t);let i={href:Pg(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Sy(e,t){let n={href:Pg(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Cy(e,t,n){let r=e.all(t),i=n?wy(n):Ty(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
55
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
56
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function wy(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Ty(n[r])}return t}function Ty(e){return e.spread??e.children.length>1}function Ey(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Dy(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oy(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ky(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ay(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=wh(t.children[1]),o=Ch(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function jy(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function My(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ny=9,Py=32;function Fy(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Iy(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Iy(t.slice(i),i>0,!1)),a.join(``)}function Iy(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ny||t===Py;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ny||t===Py;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Ly(e,t){let n={type:`text`,value:Fy(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ry(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var zy={blockquote:ly,break:uy,code:dy,delete:fy,emphasis:py,footnoteReference:my,heading:hy,html:gy,imageReference:vy,image:yy,inlineCode:by,linkReference:xy,link:Sy,listItem:Cy,list:Ey,paragraph:Dy,root:Oy,strong:ky,table:Ay,tableCell:My,tableRow:jy,text:Ly,thematicBreak:Ry,toml:By,yaml:By,definition:By,footnoteDefinition:By};function By(){}var{defineProperty:Vy}=Object,Hy=typeof self==`object`?self:globalThis,Uy=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Hy[e](t)},Wy=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Vy(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Hy[e]==`function`?Uy(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Uy(a,o),i)};return r},Gy=e=>Wy(new Map,e)(0),Ky=``,{toString:qy}={},{keys:Jy,is:Yy}=Object,Xy=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=qy.call(e).slice(8,-1);switch(n){case`Array`:return[1,Ky];case`Object`:return[2,Ky];case`Date`:return[3,Ky];case`RegExp`:return[4,Ky];case`Map`:return[5,Ky];case`Set`:return[6,Ky];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Zy=([e,t])=>e===0&&(t===`function`||t===`symbol`),Qy=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Xy(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Yy(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Jy(o))(e||!Zy(Xy(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Ky:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Zy(Xy(n))||Zy(Xy(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Zy(Xy(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},$y=(e,{json:t,lossy:n}={})=>{let r=[];return Qy(!(t||n),!!t,new Map,r)(e),r},eb=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Gy($y(e,t)):structuredClone(e):(e,t)=>Gy($y(e,t));function tb(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function nb(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function rb(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||tb,r=e.options.footnoteBackLabel||nb,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Pg(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...eb(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
57
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
58
|
-
`}]}}var ib=(function(e){if(e==null)return lb;if(typeof e==`function`)return cb(e);if(typeof e==`object`)return Array.isArray(e)?ab(e):ob(e);if(typeof e==`string`)return sb(e);throw Error(`Expected function, string, or object as test`)});function ab(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ib(e[n]);return cb(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ob(e){let t=e;return cb(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function sb(e){return cb(t);function t(t){return t&&t.type===e}}function cb(e){return t;function t(t,n,r){return!!(ub(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function lb(){return!0}function ub(e){return typeof e==`object`&&!!e&&`type`in e}function db(e){return e}var fb=[];function pb(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=ib(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+db(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=fb,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=mb(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function mb(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?fb:[e]}function hb(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),pb(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var gb={}.hasOwnProperty,_b={};function vb(e,t){let n=t||_b,r=new Map,i=new Map,a={all:s,applyData:bb,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...zy,...n.handlers},one:o,options:n,patch:yb,wrap:Sb};return hb(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(gb.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=eb(n);return r.children=a.all(e),r}return eb(e)}return(a.options.unknownHandler||xb)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Cb(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Cb(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function yb(e,t){e.position&&(t.position=Eh(e))}function bb(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,eb(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function xb(e,t){let n=t.data||{},r=`value`in t&&!(gb.call(n,`hProperties`)||gb.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Sb(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
59
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
60
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
61
|
-
`}),n}function Cb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function wb(e,t){let n=vb(e,t),r=n.one(e,void 0),i=rb(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
62
|
-
`},i)),a}function Tb(e,t){return e&&`run`in e?async function(n,r){let i=wb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return wb(n,{file:r,...e||t})}}function Eb(e){if(e)throw e}var Db=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ob(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function kb(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ab(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ab(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var jb={basename:Mb,dirname:Nb,extname:Pb,join:Fb,sep:`/`};function Mb(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Rb(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Nb(e){if(Rb(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Pb(e){Rb(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Fb(...e){let t=-1,n;for(;++t<e.length;)Rb(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Ib(n)}function Ib(e){Rb(e);let t=e.codePointAt(0)===47,n=Lb(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Lb(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Rb(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var zb={cwd:Bb};function Bb(){return`/`}function Vb(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Hb(e){if(typeof e==`string`)e=new URL(e);else if(!Vb(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Ub(e)}function Ub(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Wb=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Gb=class{constructor(e){let t;t=e?Vb(e)?{path:e}:typeof e==`string`||Yb(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:zb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Wb.length;){let e=Wb[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Wb.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?jb.basename(this.path):void 0}set basename(e){qb(e,`basename`),Kb(e,`basename`),this.path=jb.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?jb.dirname(this.path):void 0}set dirname(e){Jb(this.basename,`dirname`),this.path=jb.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?jb.extname(this.path):void 0}set extname(e){if(Kb(e,`extname`),Jb(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=jb.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Vb(e)&&(e=Hb(e)),qb(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?jb.basename(this.path,this.extname):void 0}set stem(e){qb(e,`stem`),Kb(e,`stem`),this.path=jb.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new jh(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Kb(e,t){if(e&&e.includes(jb.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+jb.sep+"`")}function qb(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Jb(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Yb(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Xb=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Zb=l(Db(),1),Qb={}.hasOwnProperty,$b=new class e extends Xb{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=kb()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Zb.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(nx(`data`,this.frozen),this.namespace[e]=t,this):Qb.call(this.namespace,e)&&this.namespace[e]||void 0:e?(nx(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=ax(e),n=this.parser||this.Parser;return ex(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),ex(`process`,this.parser||this.Parser),tx(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=ax(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);sx(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),ex(`processSync`,this.parser||this.Parser),tx(`processSync`,this.compiler||this.Compiler),this.process(e,r),ix(`processSync`,`process`,t),n;function r(e,r){t=!0,Eb(e),n=r}}run(e,t,n){rx(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=ax(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),ix(`runSync`,`run`,n),r;function i(e,t){Eb(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=ax(t),r=this.compiler||this.Compiler;return tx(`stringify`,r),rx(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(nx(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Zb.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ob(o)&&Ob(r)&&(r=(0,Zb.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function ex(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function tx(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function nx(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rx(e){if(!Ob(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ix(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function ax(e){return ox(e)?e:new Gb(e)}function ox(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function sx(e){return typeof e==`string`||cx(e)}function cx(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var lx=[],ux={allowDangerousHtml:!0},dx=/^(https?|ircs?|mailto|xmpp)$/i,fx=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function px(e){let t=mx(e),n=hx(e);return gx(t.runSync(t.parse(n),n),e)}function mx(e){let t=e.rehypePlugins||lx,n=e.remarkPlugins||lx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ux}:ux;return $b().use(cy).use(n).use(Tb,r).use(t)}function hx(e){let t=e.children||``,n=new Gb;return typeof t==`string`?n.value=t:``+t,n}function gx(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||_x;for(let e of fx)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return hb(e,l),zh(e,{Fragment:B.Fragment,components:i,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in sg)if(Object.hasOwn(sg,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=sg[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function _x(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||dx.test(e.slice(0,t))?e:``}function vx(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function yx(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function bx(e,t,n){let r=ib((n||{}).ignore||[]),i=xx(t),a=-1;for(;++a<i.length;)pb(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function xx(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Sx(e[0]),Cx(e[1])])}return t}function Sx(e){return typeof e==`string`?new RegExp(yx(e),`g`):e}function Cx(e){return typeof e==`function`?e:function(){return e}}var wx=`phrasing`,Tx=[`autolink`,`link`,`image`,`label`];function Ex(){return{transforms:[Px],enter:{literalAutolink:Ox,literalAutolinkEmail:kx,literalAutolinkHttp:kx,literalAutolinkWww:kx},exit:{literalAutolink:Nx,literalAutolinkEmail:Mx,literalAutolinkHttp:Ax,literalAutolinkWww:jx}}}function Dx(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:wx,notInConstruct:Tx},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:wx,notInConstruct:Tx},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:wx,notInConstruct:Tx}]}}function Ox(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function kx(e){this.config.enter.autolinkProtocol.call(this,e)}function Ax(e){this.config.exit.autolinkProtocol.call(this,e)}function jx(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Mx(e){this.config.exit.autolinkEmail.call(this,e)}function Nx(e){this.exit(e)}function Px(e){bx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Fx],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ix]],{ignore:[`link`,`linkReference`]})}function Fx(e,t,n,r,i){let a=``;if(!zx(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Lx(n)))return!1;let o=Rx(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Ix(e,t,n,r){return!zx(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Lx(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Rx(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=vx(e,`(`),a=vx(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function zx(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Mg(n)||jg(n))&&(!t||n!==47)}Yx.peek=Jx;function Bx(){this.buffer()}function Vx(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Hx(){this.buffer()}function Ux(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Wx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Sg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Gx(e){this.exit(e)}function Kx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Sg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qx(e){this.exit(e)}function Jx(){return`[`}function Yx(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Xx(){return{enter:{gfmFootnoteCallString:Bx,gfmFootnoteCall:Vx,gfmFootnoteDefinitionLabelString:Hx,gfmFootnoteDefinition:Ux},exit:{gfmFootnoteCallString:Wx,gfmFootnoteCall:Gx,gfmFootnoteDefinitionLabelString:Kx,gfmFootnoteDefinition:qx}}}function Zx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Yx},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
63
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?$x:Qx))),s(),o}}function Qx(e,t,n){return t===0?e:$x(e,t,n)}function $x(e,t,n){return(n?``:` `)+e}var eS=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];aS.attention=oS,aS.peek=sS;function tS(){return{canContainEols:[`delete`],enter:{strikethrough:rS},exit:{strikethrough:iS}}}function nS(){return{handlers:{delete:aS},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:eS}]}}function rS(e){this.enter({type:`delete`,children:[],position:void 0},e)}function iS(e){this.exit(e)}function aS(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function oS(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function sS(){return`~`}function cS(e){return e.length}function lS(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cS,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=uS(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=dS(r[d]);else{let e=dS(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
64
|
-
`)}function uS(e){return e==null?``:String(e)}function dS(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var fS=ib([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function pS(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),mS);return i(),o}function mS(e,t,n){return`>`+(n?``:` `)+e}function hS(e,t){return gS(e,t.inConstruct,!0)&&!gS(e,t.notInConstruct,!1)}function gS(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function _S(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
65
|
-
`&&!e.before&&!e.after&&hS(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
66
|
-
`}function vS(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function yS(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function bS(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function xS(e,t,n,r){let i=bS(n),a=e.value||``;if(yS(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,SS);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(vS(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
67
|
-
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
68
|
-
`),a&&(u+=o.move(a+`
|
|
69
|
-
`)),u+=o.move(s),c(),u}function SS(e,t,n){return(n?``:` `)+e}function CS(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wS(e,t,n,r){let i=CS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
70
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function TS(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}ES.attention=DS,ES.peek=OS;function ES(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function DS(e,t){return{construct:`emphasis`,markers:TS(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function OS(e,t,n){return n.options.emphasis||`*`}function kS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function AS(e,t){let n=!1;return hb(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&lg(e)&&(t.options.setext||n))}function jS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(AS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
71
|
-
`,after:`
|
|
72
|
-
`});return r(),t(),o+`
|
|
73
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
74
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
75
|
-
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=kS(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}MS.peek=NS;function MS(e){return e.value||``}function NS(){return`<`}PS.peek=FS;function PS(e,t,n,r){let i=CS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function FS(){return`!`}IS.peek=LS;function IS(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function LS(){return`!`}RS.peek=zS;function RS(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function zS(){return"`"}function BS(e,t){let n=lg(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}VS.peek=HS;function VS(e,t,n,r){let i=CS(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(BS(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function HS(e,t,n){return BS(e,n)?`<`:`[`}US.peek=WS;function US(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function WS(){return`[`}function GS(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function KS(e){let t=GS(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function qS(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function JS(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function YS(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?qS(n):GS(n),s=e.ordered?o===`.`?`)`:`.`:KS(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),JS(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function XS(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ZS(e,t,n,r){let i=XS(n),a=n.bulletCurrent||GS(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function QS(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function $S(e,t,n,r){if(!e.children.some(function(e){return fS(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function eC(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tC.attention=nC,tC.peek=rC;function tC(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function nC(e,t){return{construct:`strong`,markers:eC(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function rC(e,t,n){return n.options.strong||`*`}function iC(e,t,n,r){return n.safe(e.value,r)}function aC(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function oC(e,t,n){let r=(JS(n)+(n.options.ruleSpaces?` `:``)).repeat(aC(n));return n.options.ruleSpaces?r.slice(0,-1):r}var sC={blockquote:pS,break:_S,code:xS,definition:wS,emphasis:ES,hardBreak:_S,heading:jS,html:MS,image:PS,imageReference:IS,inlineCode:RS,link:VS,linkReference:US,list:YS,listItem:ZS,paragraph:QS,root:$S,strong:tC,text:iC,thematicBreak:oC};function cC(){return{enter:{table:lC,tableData:pC,tableHeader:pC,tableRow:dC},exit:{codeText:mC,table:uC,tableData:fC,tableHeader:fC,tableRow:fC}}}function lC(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function uC(e){this.exit(e),this.data.inTable=void 0}function dC(e){this.enter({type:`tableRow`,children:[]},e)}function fC(e){this.exit(e)}function pC(e){this.enter({type:`tableCell`,children:[]},e)}function mC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hC(e,t){return t===`|`?t:e}function gC(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
76
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
77
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return lS(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=sC.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function _C(){return{exit:{taskListCheckValueChecked:yC,taskListCheckValueUnchecked:yC,paragraph:bC}}}function vC(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:xC}}}function yC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function bC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function xC(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=sC.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function SC(){return[Ex(),Xx(),tS(),cC(),_C()]}function CC(e){return{extensions:[Dx(),Zx(e),nS(),gC(e),vC()]}}var wC={tokenize:RC,partial:!0},TC={tokenize:zC,partial:!0},EC={tokenize:BC,partial:!0},DC={tokenize:VC,partial:!0},OC={tokenize:HC,partial:!0},kC={name:`wwwAutolink`,tokenize:IC,previous:UC},AC={name:`protocolAutolink`,tokenize:LC,previous:WC},jC={name:`emailAutolink`,tokenize:FC,previous:GC},MC={};function NC(){return{text:MC}}for(var PC=48;PC<123;)MC[PC]=jC,PC++,PC===58?PC=65:PC===91&&(PC=97);MC[43]=jC,MC[45]=jC,MC[46]=jC,MC[95]=jC,MC[72]=[jC,AC],MC[104]=[jC,AC],MC[87]=[jC,kC],MC[119]=[jC,kC];function FC(e,t,n){let r=this,i,a;return o;function o(t){return!KC(t)||!GC.call(r,r.previous)||qC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return KC(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(OC,u,l)(t):t===45||t===95||wg(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Cg(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function IC(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!UC.call(r,r.previous)||qC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(wC,e.attempt(TC,e.attempt(EC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function LC(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&WC.call(r,r.previous)&&!qC(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Cg(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Eg(t)||Ag(t)||Mg(t)||jg(t)?n(t):e.attempt(TC,e.attempt(EC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function RC(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function zC(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(DC,c,s)(t):t===null||Ag(t)||Mg(t)||t!==45&&jg(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function BC(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(DC,t,a)(o):o===null||Ag(o)||Mg(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function VC(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ag(o)||Mg(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Ag(e)||Mg(e)?t(e):r(e)}function a(e){return Cg(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Cg(t)?(e.consume(t),o):n(t)}}function HC(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return wg(e)?n(e):t(e)}}function UC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ag(e)}function WC(e){return!Cg(e)}function GC(e){return!(e===47||KC(e))}function KC(e){return e===43||e===45||e===46||e===95||wg(e)}function qC(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var JC={tokenize:nw,partial:!0};function YC(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:$C,continuation:{tokenize:ew},exit:tw}},text:{91:{name:`gfmFootnoteCall`,tokenize:QC},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:XC,resolveTo:ZC}}}}function XC(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Sg(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function ZC(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function QC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ag(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Sg(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ag(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function $C(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ag(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Sg(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ag(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Fg(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function ew(e,t,n){return e.check($g,t,e.attempt(JC,t,n))}function tw(e){e.exit(`gfmFootnoteDefinition`)}function nw(e,t,n){let r=this;return Fg(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function rw(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&hg(o,o.length,0,Kg(s,e.slice(r+1,n),t)),hg(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),hg(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Gg(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Gg(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var iw=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){aw(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function aw(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function ow(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function sw(){return{flow:{null:{name:`table`,tokenize:cw,resolveAll:lw}}}}function cw(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?Fg(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ag(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?Fg(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?Fg(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Z(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?Fg(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Z(n)?(e.exit(`tableRow`),t(n)):Q(n)?Fg(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ag(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function lw(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new iw;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(dw(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=uw(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=uw(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=uw(f,t,o,i,n,d)):(o[0]=o[1],d=uw(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&dw(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=ow(t.events,n))}return e}function uw(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},fw(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=fw(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=fw(t.events,n[2]),a=fw(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},fw(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function dw(e,t,n,r,i){let a=[],o=fw(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function fw(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var pw={name:`tasklistCheck`,tokenize:hw};function mw(){return{text:{91:pw}}}function hw(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ag(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Z(r)?t(r):Q(r)?e.check({tokenize:gw},t,n)(r):n(r)}}function gw(e,t,n){return Fg(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function _w(e){return vg([NC(),YC(),rw(e),sw(),mw()])}var vw={};function yw(e){let t=this,n=e||vw,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(_w(n)),a.push(SC()),o.push(CC(n))}var bw=new Set([`http:`,`https:`,`mailto:`,`tel:`]);function xw(e){let t=(e??``).trim();if(t===``)return``;if(/^[#/.]/.test(t))return t;try{let e=new URL(t,`https://example.invalid`);return bw.has(e.protocol)?t:``}catch{return``}}function Sw(e){return e?e.type===`text`?e.value??``:(e.children??[]).map(e=>Sw(e)).join(``):``}function Cw({node:e,children:t}){let[n,r]=(0,m.useState)(!1),i=Sw(e),a=(0,m.useCallback)(()=>{navigator.clipboard?.writeText(i).then(()=>{r(!0),window.setTimeout(()=>r(!1),1500)}).catch(()=>void 0)},[i]);return(0,B.jsxs)(`div`,{className:`relative my-2`,children:[(0,B.jsxs)(q,{type:`button`,variant:`secondary`,size:`sm`,onClick:a,disabled:!i,className:`absolute top-2 right-2 z-10 h-10`,children:[n?(0,B.jsx)(Zf,{"aria-hidden":`true`}):(0,B.jsx)(dp,{"aria-hidden":`true`}),n?`Copied`:`Copy`]}),(0,B.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border bg-muted/50 p-3 pr-24 text-sm leading-relaxed`,children:t})]})}function ww({href:e,children:t}){return(0,B.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer nofollow`,children:t})}var Tw={pre:Cw,a:ww,table:({children:e})=>(0,B.jsx)(`div`,{className:`my-2 w-full overflow-x-auto`,children:(0,B.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:e})})},Ew=(0,m.memo)(function({text:e,className:t}){return(0,B.jsx)(`div`,{className:z(`md-body`,t),children:(0,B.jsx)(px,{remarkPlugins:[yw],urlTransform:xw,components:Tw,children:e})})}),Dw=/\s*\(recommended\)\s*$/i,Ow=`Type something.`;function kw(e){return{text:e.replace(Dw,``),recommended:Dw.test(e)}}function Aw({label:e}){let{text:t,recommended:n}=kw(e);return(0,B.jsxs)(`span`,{className:`leading-snug`,children:[t,n?(0,B.jsx)(`span`,{className:`ms-1 font-medium text-primary`,children:`(Recommended)`}):null]})}function jw({multi:e,on:t}){return(0,B.jsxs)(`span`,{"aria-hidden":`true`,className:z(`relative mt-0.5 flex size-4 shrink-0 items-center justify-center border`,e?`rounded-[4px]`:`rounded-full`,t?`border-primary bg-primary text-primary-foreground`:`border-input`),children:[t?(0,B.jsx)(Zf,{className:z(e?`size-3`:`hidden`)}):null,t&&!e?(0,B.jsx)(`span`,{className:`size-2 rounded-full bg-primary-foreground`}):null]})}function Mw({option:e,index:t,multi:n,name:r,selected:i,onToggle:a}){return(0,B.jsxs)(`label`,{className:z(`flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border px-3 py-2.5 text-start text-sm transition-colors`,i?`border-primary/40 bg-muted`:`border-input hover:bg-muted/50`,`has-[:focus-visible]:border-ring has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/50`),children:[(0,B.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,className:`sr-only`,checked:i,onChange:a}),(0,B.jsx)(jw,{multi:n,on:i}),(0,B.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,B.jsxs)(`span`,{className:`flex gap-1.5`,children:[(0,B.jsxs)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,B.jsx)(Aw,{label:e.label})]}),e.description?(0,B.jsx)(Ew,{text:e.description,className:`text-muted-foreground`}):null]})]})}function Nw({option:e}){return!e||!e.preview&&!e.image?null:(0,B.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border bg-muted/30 p-3`,children:[(0,B.jsxs)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:[`Preview · `,kw(e.label).text]}),e.image?(0,B.jsx)(`img`,{src:e.image,alt:``,loading:`lazy`,className:`max-h-64 w-full rounded-md border object-contain`}):null,e.preview?(0,B.jsx)(Ew,{text:e.preview,className:`text-xs`}):(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No preview for this one.`})]})}function Pw({primary:e,primaryLabel:t,disabled:n,submitting:r,onCancel:i}){return(0,B.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,B.jsx)(q,{type:`button`,variant:`ghost`,size:`lg`,className:`h-11`,onClick:i,children:`Cancel`}),(0,B.jsx)(q,{type:e,size:`lg`,className:`h-11`,disabled:n||r,children:r?`Sending…`:t})]})}function Fw(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 Iw({questions:e,picks:t,own:n,index:r,onGo:i}){return e.length===1?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e[0]?.header}):(0,B.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,B.jsxs)(`button`,{type:`button`,onClick:()=>i(a),"aria-current":a===r,className:z(`inline-flex min-h-9 items-center gap-1 rounded-full border px-3 text-xs font-medium`,a===r?`border-primary bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[a+1,` `,e.header,o?(0,B.jsx)(Zf,{className:`size-3`,"aria-hidden":`true`}):null]},a)})})}function Lw({questions:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(0),[o,s]=(0,m.useState)({}),[c,l]=(0,m.useState)({}),[u,d]=(0,m.useState)({}),f=e[i],p=o[i]??[],h=c[i]??``,g=f?.options[u[i]??p[0]??0],_=Fw(e,o,c,i),v=f?.multiSelect===!0;if(!f)return null;function y(e){let t=v?p.includes(e)?p.filter(t=>t!==e):[...p,e]:[e];s({...o,[i]:t}),v||l({...c,[i]:``}),d({...u,[i]:e})}function b(t){if(t.preventDefault(),_){if(i<e.length-1){a(i+1);return}n({answers:e.map((t,n)=>Fw(e,o,c,n)).filter(e=>!!e),cancelled:!1})}}function x(e){if(e.target instanceof HTMLTextAreaElement)return;let t=Number(e.key);Number.isInteger(t)&&t>=1&&t<=f.options.length&&(e.preventDefault(),y(t-1))}return(0,B.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:b,onKeyDown:x,children:[(0,B.jsx)(Iw,{questions:e,picks:o,own:c,index:i,onGo:a}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.length>1?`Question ${i+1} of ${e.length}`:`Question`}),(0,B.jsx)(Ew,{text:f.question,className:`mt-1 text-base`})]}),(0,B.jsxs)(`div`,{className:z(`grid min-w-0 gap-4`,g?.preview||g?.image?`lg:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)]`:``),children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[f.options.map((e,t)=>(0,B.jsx)(Mw,{option:e,index:t,multi:v,name:`question-${i}`,selected:p.includes(t),onToggle:()=>y(t)},t)),(0,B.jsxs)(`label`,{className:`flex min-h-11 flex-col gap-1 rounded-lg border border-input px-3 py-2 text-sm focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,children:[(0,B.jsxs)(`span`,{className:`text-muted-foreground`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`✎ `}),Ow]}),(0,B.jsx)(Jp,{value:h,onChange:e=>{l({...c,[i]:e.target.value}),e.target.value&&s({...o,[i]:[]})},placeholder:Ow,"aria-label":`Your own answer`,rows:2,className:`min-h-11 resize-none border-0 bg-transparent p-0 text-base shadow-none focus-visible:ring-0 md:text-base`})]})]}),(0,B.jsx)(Nw,{option:g})]}),(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[v?`space pick · enter next`:`↑↓ move · enter choose`,` · 1-`,f.options.length,` pick`,e.length>1?` · ←→ questions`:``,` · esc leave`]}),(0,B.jsx)(Pw,{primary:`submit`,primaryLabel:i<e.length-1?`Next`:`Answer`,disabled:!_,submitting:t,onCancel:r})]})}function Rw({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``);return(0,B.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i&&n(i)},children:[(0,B.jsx)(Ew,{text:e.title,className:`text-base`}),(0,B.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.options.map(t=>(0,B.jsx)(Mw,{option:{label:t},index:e.options.indexOf(t),multi:!1,selected:i===t,onToggle:()=>a(t)},t))}),(0,B.jsx)(Pw,{primary:`submit`,primaryLabel:`Choose`,disabled:!i,submitting:t,onCancel:r})]})}function zw({view:e,submitting:t,onAnswer:n}){return(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(Ew,{text:e.question,className:`text-base`}),e.detail?(0,B.jsx)(Ew,{text:e.detail,className:`mt-1 text-muted-foreground`}):null]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,B.jsx)(q,{type:`button`,variant:`outline`,size:`lg`,className:`h-11`,disabled:t,onClick:()=>n(!1),children:`No`}),(0,B.jsx)(q,{type:`button`,size:`lg`,className:`h-11`,disabled:t,onClick:()=>n(!0),children:t?`Sending…`:`Yes`})]})]})}function Bw({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``);return(0,B.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i.trim()&&n(i.trim())},children:[(0,B.jsx)(Ew,{text:e.question,className:`text-base`}),(0,B.jsx)(Jp,{value:i,onChange:e=>a(e.target.value),placeholder:e.placeholder??Ow,"aria-label":e.question,rows:3,className:`min-h-11 resize-none text-base md:text-base`}),(0,B.jsx)(Pw,{primary:`submit`,primaryLabel:`Answer`,disabled:!i.trim(),submitting:t,onCancel:r})]})}function Vw({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()!==``;function l(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,B.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:l,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.title}),e.message?(0,B.jsx)(Ew,{text:e.message,className:`mt-1 text-base`}):null]}),e.method===`select`?(0,B.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>(0,B.jsx)(Mw,{option:{label:e},index:t,multi:!1,selected:a===e,onToggle:()=>o(e)},e))}):null,e.method===`input`||e.method===`editor`?(0,B.jsx)(Jp,{value:r,onChange:e=>i(e.target.value),placeholder:e.placeholder??Ow,"aria-label":e.title,rows:e.method===`editor`?4:2,className:`min-h-11 resize-none text-base md:text-base`}):null,(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,B.jsx)(q,{type:`button`,variant:`outline`,size:`lg`,className:`h-11`,disabled:t,onClick:()=>n({cancelled:!0}),children:`Cancel`}),e.method===`confirm`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(q,{type:`button`,variant:`outline`,size:`lg`,className:`h-11`,disabled:t,onClick:()=>n({confirmed:!1}),children:`No`}),(0,B.jsx)(q,{type:`button`,size:`lg`,className:`h-11`,disabled:t,onClick:()=>n({confirmed:!0}),children:t?`Sending…`:`Yes`})]}):(0,B.jsx)(q,{type:`submit`,size:`lg`,className:`h-11`,disabled:!c||t,children:t?`Sending…`:`Answer`})]})]})}function Hw(e){let{view:t}=e;return t.kind===`questionnaire`?(0,B.jsx)(Lw,{questions:t.questions,submitting:e.submitting,onAnswer:e.onAnswer,onCancel:e.onCancel}):t.kind===`choose`?(0,B.jsx)(Rw,{...e,view:t}):t.kind===`confirm`?(0,B.jsx)(zw,{...e,view:t}):t.kind===`text`?(0,B.jsx)(Bw,{...e,view:t}):(0,B.jsx)(Vw,{...e,dialog:t.dialog})}function Uw(e){return typeof e==`object`&&e?e:{}}function Ww(e){return typeof e==`string`?e.trim():``}function Gw(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Kw(e){let t=Uw(e),n=Ww(t.label);if(!n)return;let r=Ww(t.description),i=Ww(t.preview),a=Ww(t.image);return{label:n,...r?{description:r}:{},...i?{preview:i}:{},...a?{image:a}:{}}}function qw(e){let t=Uw(e),n=Ww(t.question);if(!n)return;let r=(Array.isArray(t.options)?t.options:[]).map(Kw).filter(e=>!!e);return{question:n,header:Ww(t.header)||`Question`,options:r,...t.multiSelect===!0?{multiSelect:!0}:{}}}function Jw(e){let t=Uw(e),n=Ww(t.method);if(n!==`select`&&n!==`confirm`&&n!==`input`&&n!==`editor`)return;let r=Ww(t.message),i=Gw(t.options),a=Ww(t.placeholder),o=Ww(t.prefill);return{id:Ww(t.id),method:n,title:Ww(t.title)||`Answer`,...r?{message:r}:{},...i.length>0?{options:i}:{},...a?{placeholder:a}:{},...o?{prefill:o}:{}}}function Yw(e){let t=(Array.isArray(e.questions)?e.questions:[]).map(qw).filter(e=>!!e);return t.length>0?{kind:`questionnaire`,questions:t}:void 0}function Xw(e){return{kind:`choose`,title:Ww(e.title)||`Choose an option`,options:Gw(e.options)}}function Zw(e){let t=Ww(e.question)||Ww(e.title)||`Continue?`,n=Ww(e.detail)||Ww(e.message);return{kind:`confirm`,question:t,...n?{detail:n}:{}}}function Qw(e){let t=Ww(e.question)||Ww(e.title)||`Type an answer`,n=Ww(e.placeholder);return{kind:`text`,question:t,...n?{placeholder:n}:{}}}function $w(e){let t=Uw(e.payload);if(e.kind===`questionnaire`)return Yw(t);if(e.kind===`choose`)return Xw(t);if(e.kind===`confirm`)return Zw(t);if(e.kind===`text`)return Qw(t);let n=Jw(t.dialog);return n?{kind:`sessionDialog`,dialog:n}:void 0}function eT(e){switch(e.kind){case`questionnaire`:return e.questions[0]?.header??`Questionnaire`;case`choose`:return e.title;case`confirm`:return e.question;case`text`:return e.question;case`sessionDialog`:return e.dialog.title}}function tT({prompt:e,index:t,total:n}){let r=e.from?`${e.from} asks · `:``;return(0,B.jsxs)(`p`,{className:`min-w-0 flex-1 truncate text-xs font-medium text-muted-foreground`,children:[r,n>1?`${t+1} of ${n}`:`Question`]})}function nT({submitting:e,onKeep:t,onLeave:n}){return(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,role:`alert`,children:[(0,B.jsx)(`p`,{className:`text-sm`,children:`Leave without answering? The oracle will not guess for you.`}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,B.jsx)(q,{type:`button`,variant:`outline`,size:`lg`,className:`h-11`,onClick:t,children:`Keep answering`}),(0,B.jsx)(q,{type:`button`,size:`lg`,className:`h-11`,disabled:e,onClick:n,children:e?`Leaving…`:`Leave`})]})]})}function rT({prompts:e,answer:t,dismiss:n}){let[r,i]=(0,m.useState)(0),[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(!1),[l,u]=(0,m.useState)(!1),d=e.length,f=Math.min(r,Math.max(0,d-1)),p=e[f],h=p?$w(p):void 0;if((0,m.useEffect)(()=>{i(e=>Math.min(e,Math.max(0,d-1)))},[d]),(0,m.useEffect)(()=>{function e(e){e.key===`Escape`&&d!==0&&(s?c(!1):o(!0))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d,s]),!p)return null;async function g(e,t){u(!0);try{await e,c(!1)}catch(e){e instanceof $p&&e.code===`question_withdrawn`?ce(we):ce(e instanceof Error?e.message:t)}finally{u(!1)}}let _=p;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`section`,{"aria-label":`Question from the lobby`,className:z(`shrink-0 border-t bg-background`,a&&`hidden`),children:(0,B.jsxs)(`div`,{className:`flex max-h-[50svh] flex-col gap-3 overflow-y-auto px-4 py-3`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(tT,{prompt:_,index:f,total:d}),(0,B.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,className:`h-10`,onClick:()=>o(!0),children:`Minimise`})]}),h?s?(0,B.jsx)(nT,{submitting:l,onKeep:()=>c(!1),onLeave:()=>void g(n(_.id),`Could not leave the question`)}):(0,B.jsx)(Hw,{view:h,submitting:l,onAnswer:e=>void g(t(_.id,e),`Could not send the answer`),onCancel:()=>c(!0)},_.id):(0,B.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This question cannot be shown here.`}),(0,B.jsx)(q,{type:`button`,size:`lg`,className:`h-11`,disabled:l,onClick:()=>void g(n(_.id),`Could not dismiss the question`),children:`Dismiss`})]})]})}),a?(0,B.jsxs)(`div`,{className:`flex items-center gap-2 border-t bg-muted/50 px-4 py-2 text-xs`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`⧉`}),(0,B.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[d,` question`,d===1?``:`s`,` open`,d>1?` · ${f+1} of ${d}`:``,h?` · ${eT(h)}`:``]}),(0,B.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,className:`h-10`,onClick:()=>o(!1),children:`Reopen`})]}):null]})}var iT=2;function aT(e){let t=globalThis.EventSource;if(!t)throw Error(`EventSource is not available in this environment`);return new t(e)}function oT(e){try{return JSON.parse(e)}catch{return}}function sT(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)}}function cT(e,t=aT){let n=t(`/api/events`);return e.onConnection?.(`connecting`),n.onopen=()=>e.onConnection?.(`live`),n.onerror=()=>e.onConnection?.(n.readyState===iT?`offline`:`connecting`),n.onmessage=t=>{let n=oT(t.data);n&&sT(n,e)},()=>n.close()}function lT(){let e=(0,m.useRef)(void 0),t=(0,m.useCallback)(()=>{e.current?.(),e.current=cT({onHello:e=>sn.onHello(e),onChanged:(e,t)=>sn.onChanged(e,t),onFeed:e=>sn.onFeedDelta(e),onReply:e=>sn.onReplyDelta(e),onConnection:e=>sn.onStatus({connection:e})})},[]);return(0,m.useEffect)(()=>(t(),()=>e.current?.()),[t]),t}var uT={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 dT(e){return e.length===1&&/[a-z]/i.test(e)?`Key${e.toUpperCase()}`:e.length===1&&/[0-9]/.test(e)?`Digit${e}`:uT[e]}function fT(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=dT(n);if(!e)return;t.code=e}return t.code?t:void 0}function pT(e,t){return e.code===t.code&&e.altKey===t.alt&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift&&e.metaKey===t.meta}function mT(e,t){let n=fT(t);return n?pT(e,n):!1}function hT(e,t){for(let n of t)if(mT(e,n.key))return n.action}function gT(e,t){for(let n of t)if(mT(e,n.key))return n.id}function _T({enabled:e,keys:t,tabs:n,insideApp:r,onAction:i,onTab:a}){(0,m.useEffect)(()=>{if(!e)return;let o=e=>{let o=gT(e,n);if(o){e.preventDefault(),a(o);return}let s=hT(e,t);if(s){if(s===`search`||s===`savePlan`){if(!r())return;e.preventDefault()}i(s)}};return window.addEventListener(`keydown`,o),()=>window.removeEventListener(`keydown`,o)},[e,t,n,r,i,a])}var vT=`bot-lobby.notifications`,yT=`/icon-192.png`,bT=new Set;function xT(){for(let e of[...bT])e()}function ST(){try{return localStorage.getItem(vT)===`on`}catch{return!1}}function CT(e){return bT.add(e),()=>{bT.delete(e)}}function wT(e){try{localStorage.setItem(vT,e?`on`:`off`)}catch{}xT()}function TT(){return(0,m.useSyncExternalStore)(CT,ST,()=>!1)}async function ET(){return typeof Notification>`u`?`unsupported`:(Notification.permission==="default"&&await Notification.requestPermission().catch(()=>void 0),Notification.permission===`granted`?(wT(!0),`granted`):`denied`)}function DT(){wT(!1)}function OT(e){if(e===`completed`)return`finished`;if(e===`abandoned`)return`dropped`}function kT(){return typeof Notification<`u`&&Notification.permission===`granted`&&document.hidden}function AT(e){try{new Notification(`bot-lobby`,{body:e,icon:yT,tag:`bot-lobby`})}catch{}}function jT(){let e=TT();Yp();let t=sn.get(`prompts`).data,n=sn.get(`lobby`).data,r=t?.prompts?.length??0,i=n?.task?.state??``,a=n?.task?.title,o=(0,m.useRef)(void 0);(0,m.useEffect)(()=>{let n=o.current;if(o.current={count:r,state:i},!n||!e||!kT())return;if(n.count===0&&r>0){let e=t?.prompts?.some(e=>e.kind===`sessionDialog`);AT(e?`A background session is asking something.`:`A question is waiting in the lobby.`);return}let s=OT(i);s&&i!==n.state&&AT(`${a?`${a} `:`The task `}${s}.`)},[e,r,i,a,t])}function MT(){let e=Zp(`prompts`),t=(0,m.useCallback)(async(e,t)=>{await tm(`prompts.answer`,{id:e,answer:t})},[]),n=(0,m.useCallback)(async e=>{await tm(`prompts.dismiss`,{id:e})},[]);return{prompts:e.data?.prompts??[],loading:e.loading,error:e.error,answer:t,dismiss:n}}var NT=new Set(Ce);function PT(e){let t=e.replace(/^#\/?/,``).split(`/`).filter(Boolean),n=t[0];if(!n||n===`lobby`)return{kind:`tab`,tab:`lobby`,rest:t.slice(1)};if(n===`settings`)return{kind:`settings`};if(n===`sessions`)return{kind:`sessions`,...t[1]?{key:t[1]}:{}};if(NT.has(n))return{kind:`tab`,tab:n,rest:t.slice(1)}}function FT(e,...t){return`#/${e}${t.filter(Boolean).map(e=>`/${encodeURIComponent(e)}`).join(``)}`}function IT(e){window.location.hash!==e&&(window.location.hash=e)}function LT(){let[e,t]=(0,m.useState)(()=>PT(window.location.hash)??{kind:`tab`,tab:`lobby`,rest:[]});return(0,m.useEffect)(()=>{let e=()=>{let e=PT(window.location.hash);e?t(e):(window.history.replaceState(null,``,`#/lobby`),t({kind:`tab`,tab:`lobby`,rest:[]}))};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}function RT(e,t,n,r=!0){Yp();let[i,a]=(0,m.useState)({loading:!0}),[o,s]=(0,m.useState)(0),c=[sn.status().connection,...n.map(e=>sn.get(e).version)].join(`,`),l=JSON.stringify(t);(0,m.useEffect)(()=>{if(!r)return;let t=!0;return a(e=>({...e,loading:!0})),tm(e,JSON.parse(l)).then(e=>t&&a({data:e,loading:!1}),e=>t&&a(t=>({...t,error:e instanceof Error?e.message:String(e),loading:!1}))),()=>{t=!1}},[e,l,c,o,r]);let u=(0,m.useCallback)(()=>s(e=>e+1),[]);return{data:i.data,error:i.error,loading:i.loading,reload:u}}function zT(e){return e instanceof Error?e.message:`That did not work. Try again.`}async function $(e,t,n={}){try{let r=await tm(e,t),i=r.notice;return i&&ce(i,n.undo?{action:{label:`Undo`,onClick:n.undo}}:void 0),r}catch(e){ce.error(zT(e));return}}function BT(){return Qp(`(min-width: 1024px)`)}function VT({className:e,...t}){return(0,B.jsx)(`section`,{className:z(`min-h-0 min-w-0 rounded-xl bg-card text-card-foreground ring-1 ring-foreground/10`,e),...t})}function HT({open:e,onClose:t,describe:n,children:r}){return(0,B.jsx)(Ip,{open:e,onOpenChange:e=>!e&&t(),children:(0,B.jsxs)(Bp,{showCloseButton:!1,className:`gap-0 data-[side=right]:w-[90%] data-[side=right]:sm:max-w-3xl`,children:[(0,B.jsxs)(Vp,{className:`flex-row items-center justify-between border-b py-2`,children:[(0,B.jsx)(Hp,{children:`Detail`}),(0,B.jsx)(Up,{className:`sr-only`,children:n}),(0,B.jsx)(Lp,{asChild:!0,children:(0,B.jsx)(q,{variant:`ghost`,className:`size-10`,"aria-label":`Close detail`,children:(0,B.jsx)(Fp,{"aria-hidden":`true`})})})]}),(0,B.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-4`,children:r})]})})}function UT({wide:e,list:t,detail:n,open:r,onClose:i,hint:a,describe:o}){return e?(0,B.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[minmax(0,36fr)_minmax(0,64fr)] gap-3 p-4`,children:[(0,B.jsx)(VT,{className:`overflow-y-auto`,children:t}),(0,B.jsx)(VT,{className:`overflow-y-auto p-4`,children:n??(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a})})]}):(0,B.jsxs)(`div`,{className:`flex flex-col p-4`,children:[(0,B.jsx)(VT,{children:t}),(0,B.jsx)(HT,{open:r&&n!==null,onClose:i,describe:o,children:n})]})}function WT({title:e,count:t,children:n}){return(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-b px-3 py-2`,children:[(0,B.jsx)(`h2`,{className:`text-base font-medium`,children:e}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t?(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:t}):null,n]})]})}function GT(){return(0,B.jsx)(`div`,{className:`flex flex-col gap-2 p-3`,role:`status`,"aria-label":`Loading`,children:[0,1,2,3].map(e=>(0,B.jsx)(`div`,{className:`h-11 rounded-lg bg-muted motion-safe:animate-pulse`},e))})}function KT(e){return e<10?`0${e}`:String(e)}function qT(e){if(!Number.isFinite(e))return`0`;let t=new Date(e);return`${KT(t.getHours())}:${KT(t.getMinutes())}`}function JT(e){if(!Number.isFinite(e)||e<0)return`0s`;let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m`:`${Math.floor(n/60)}h ${KT(n%60)}m`}function YT(e){if(!Number.isFinite(e)||e<5e3)return`now`;let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<48?`${r}h`:`${Math.floor(r/24)}d`}function XT(e){let t=YT(e);return t===`now`?`just now`:`${t} ago`}function ZT({...e}){return(0,B.jsx)(zo,{"data-slot":`alert-dialog`,...e})}function QT({...e}){return(0,B.jsx)(Bo,{"data-slot":`alert-dialog-trigger`,...e})}function $T({...e}){return(0,B.jsx)(U,{"data-slot":`alert-dialog-portal`,...e})}function eE({className:e,...t}){return(0,B.jsx)(Vo,{"data-slot":`alert-dialog-overlay`,className:z(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function tE({className:e,...t}){return(0,B.jsxs)($T,{children:[(0,B.jsx)(eE,{}),(0,B.jsx)(Ho,{"data-slot":`alert-dialog-content`,className:z(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md 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`,e),...t})]})}function nE({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:z(`flex flex-col gap-1.5`,e),...t})}function rE({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:z(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function iE({className:e,...t}){return(0,B.jsx)(Go,{"data-slot":`alert-dialog-title`,className:z(`text-base font-medium text-foreground`,e),...t})}function aE({className:e,...t}){return(0,B.jsx)(Ko,{"data-slot":`alert-dialog-description`,className:z(`text-sm text-muted-foreground`,e),...t})}function oE({className:e,variant:t=`default`,...n}){return(0,B.jsx)(q,{variant:t,className:z(`h-10`,e),asChild:!0,children:(0,B.jsx)(Uo,{"data-slot":`alert-dialog-action`,...n})})}function sE({className:e,...t}){return(0,B.jsx)(q,{variant:`outline`,className:z(`h-10`,e),asChild:!0,children:(0,B.jsx)(Wo,{"data-slot":`alert-dialog-cancel`,...t})})}function cE({label:e,title:t,description:n,confirmLabel:r,onConfirm:i,icon:a,disabled:o,variant:s=`outline`}){return(0,B.jsxs)(ZT,{children:[(0,B.jsx)(QT,{asChild:!0,children:(0,B.jsxs)(q,{variant:`outline`,className:s===`destructive`?`h-10 border-destructive/40 text-destructive`:`h-10`,disabled:o,children:[a,e]})}),(0,B.jsxs)(tE,{children:[(0,B.jsxs)(nE,{children:[(0,B.jsx)(iE,{children:t}),(0,B.jsx)(aE,{children:n})]}),(0,B.jsxs)(rE,{children:[(0,B.jsx)(sE,{children:`Keep it`}),(0,B.jsx)(oE,{variant:s===`destructive`?`destructive`:`default`,onClick:i,children:r})]})]})]})}function lE({title:e,right:t,children:n}){return(0,B.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,B.jsxs)(`h3`,{className:`flex items-center justify-between border-b pb-1 text-sm font-medium`,children:[(0,B.jsx)(`span`,{children:e}),t?(0,B.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:t}):null]}),n]})}var uE=`Pull requests`,dE=`v reviews it with an agent · f with a focus you type · t is Jev's quick read`,fE=`nothing is posted to GitHub`,pE=`Press r to load open pull requests with the GitHub CLI (gh).`,mE=`No open pull requests.`,hE=`loading pull requests from GitHub…`,gE=`reading the diff…`,_E=`the pull request has new commits since this review — v reviews it again`,vE=`(no description)`,yE=`Review with a focus (optional)`,bE=`Leave it empty for a full review.`;function xE(e){return e===`passing`?`✓`:e===`failing`?`✗`:e===`pending`?`●`:``}function SE(e){return e===`passing`?`text-primary`:e===`failing`?`text-destructive`:`text-foreground`}function CE(e,t){return`+${e} −${t}`}function wE(e){return e===`APPROVED`?`approved`:e===`CHANGES_REQUESTED`?`changes requested`:e===`REVIEW_REQUIRED`?`review required`:``}function TE(e){return e?e.status===`running`?`reviewing`:e.status!==`done`||!e.verdict?``:e.verdict===`approve`?`✓ reviewed`:e.verdict===`changes`?`✗ reviewed`:`◆ reviewed`:``}function EE(e){return e===`approve`?`approve`:e===`changes`?`request changes`:e===`comment`?`comment`:``}function DE(e,t){if(e.status===`running`)return OE(e,t);if(e.status===`cancelled`)return`stopped`;let n=e.status===`done`?OE(e,t):e.status;return[EE(e.verdict),n].filter(Boolean).join(` · `)}function OE(e,t){let n=Math.max(0,Math.round(((e.finishedAt??t)-e.startedAt)/1e3));return n<60?`${n}s`:`${Math.floor(n/60)}m ${String(n%60).padStart(2,`0`)}s`}function kE(e,t){return[e.state?e.draft?`draft`:e.state.toLowerCase():e.draft?`draft`:``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${XT(t-Date.parse(e.updatedAt))}`:``].filter(Boolean).join(` · `)}function AE(e){let t=`${e.changedFiles} file${e.changedFiles===1?``:`s`}`;return`⎇ ${e.headRef||`?`} → ${e.baseRef||`?`} · ${CE(e.additions,e.deletions)} · ${t}`}function jE(e){let t=e.mergeable===`CONFLICTING`?`conflicts`:e.mergeable===`MERGEABLE`?`mergeable`:``;return[e.checks?`checks ${e.checks} (${e.checkCount})`:``,wE(e.decision),t,e.labels.join(`, `)].filter(Boolean).join(` · `)}function ME(e){return[`${e.changedFiles} file${e.changedFiles===1?``:`s`}`,e.labels.join(`, `),e.review?.stale?`stale`:``].filter(Boolean).join(` · `)}function NE(e){return e.read?`${e.read.model} · ${e.read.ms} ms`:``}function PE(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 FE({pull:e,now:t}){return(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`h2`,{className:`text-base font-medium break-words`,children:[`#`,e.number,` `,e.title]}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:kE(e,t)}),(0,B.jsx)(`p`,{className:`text-sm tabular-nums`,children:AE(e)}),jE(e)?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:jE(e)}):null,e.url?(0,B.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer nofollow`,className:`text-xs break-all text-primary underline underline-offset-4`,children:e.url}):null]})}function IE({read:e}){return(0,B.jsxs)(lE,{title:`Jev's read`,right:NE(e),children:[e.status===`running`?(0,B.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(_m,{className:`size-3.5`}),gE]}):null,e.status===`failed`?(0,B.jsx)(`p`,{className:`text-sm text-foreground`,children:e.error??`Jev could not read it`}):null,e.status===`done`&&e.line?(0,B.jsx)(Ew,{text:e.line}):null]})}function LE({review:e,now:t}){return(0,B.jsxs)(B.Fragment,{children:[e.model?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:[e.model,e.thinking].filter(Boolean).join(` · `)}):null,e.focus?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`focus: `,e.focus]}):null,e.saved?(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`kept from `,XT(t-e.startedAt)]}):null,e.stale?(0,B.jsx)(`p`,{className:`text-sm text-foreground`,children:_E}):null,e.status===`running`?(0,B.jsx)(RE,{steps:e.steps}):null,e.status===`cancelled`?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`stopped`}):null,e.status===`failed`||e.status===`timeout`?(0,B.jsxs)(`p`,{className:`text-sm text-destructive`,children:[`✗ `,e.error??e.status]}):null,e.text?(0,B.jsx)(Ew,{text:e.text}):null]})}function RE({steps:e}){return(0,B.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.slice(-6).map((e,t)=>(0,B.jsxs)(`li`,{className:`break-words`,children:[`· `,e]},t))})}function zE({number:e,running:t,onChanged:n}){let[r,i]=(0,m.useState)(``),a=async()=>{let t=r.trim();i(``),await $(`git.review`,{number:e,...t?{focus:t}:{}}),n()},o=async()=>{await $(`git.jev`,{number:e}),n()},s=async()=>{await $(`git.cancelReview`,{number:e}),n()};return(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`label`,{htmlFor:`focus-${e}`,className:`text-sm font-medium text-foreground`,children:yE}),(0,B.jsx)(Jp,{id:`focus-${e}`,value:r,rows:2,maxLength:2e3,onChange:e=>i(e.target.value)}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:bE}),(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,B.jsx)(q,{className:`h-10`,disabled:t,onClick:()=>void a(),children:`Review`}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,disabled:t,onClick:()=>void o(),children:`Jev's read`}),t?(0,B.jsx)(cE,{label:`Stop`,title:`Stop this review?`,description:`The agent stops reading the pull request. Nothing is posted to GitHub.`,confirmLabel:`Stop review`,variant:`destructive`,onConfirm:()=>void s()}):null]})]})}function BE({number:e,review:t,now:n,onChanged:r}){return(0,B.jsxs)(lE,{title:`Review`,right:t?DE(t,n):void 0,children:[t?(0,B.jsx)(LE,{review:t,now:n}):null,(0,B.jsx)(zE,{number:e,running:t?.status===`running`,onChanged:r}),(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`A read-only agent reviews it — `,fE,`.`]})]})}function VE({files:e}){return(0,B.jsx)(lE,{title:`Files`,right:String(e.length),children:(0,B.jsx)(`div`,{className:`overflow-x-auto rounded-lg border`,children:(0,B.jsx)(`table`,{className:`w-full border-collapse text-sm tabular-nums`,children:(0,B.jsx)(`tbody`,{children:e.map(e=>(0,B.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,B.jsx)(`td`,{className:`max-w-0 px-3 py-1.5 break-all`,children:e.path}),(0,B.jsx)(`td`,{className:`px-3 py-1.5 text-right text-xs whitespace-nowrap text-muted-foreground`,children:CE(e.additions,e.deletions)})]},e.path))})})})})}function HE({note:e,now:t}){let n=[e.state&&e.state!==`COMMENTED`?e.state.toLowerCase().replace(/_/g,` `):``,e.at?XT(t-Date.parse(e.at)):``].filter(Boolean).join(` · `);return(0,B.jsxs)(`article`,{className:`flex flex-col gap-1 border-b pb-2 last:border-0 last:pb-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,B.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),n?(0,B.jsx)(`span`,{children:n}):null]}),e.body.trim()?(0,B.jsx)(Ew,{text:e.body.trim()}):null]})}function UE({notes:e,now:t}){return e.length===0?null:(0,B.jsx)(lE,{title:`Discussion`,right:String(e.length),children:(0,B.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,B.jsx)(HE,{note:e,now:t},n))})})}function WE({number:e,error:t}){return t?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t]}):(0,B.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(_m,{className:`size-3.5`}),`loading #`,e,`…`]})}function GE({number:e,onChanged:t}){let n=RT(`git.pull`,{number:e},[`git`]),r=PE(n.data?.review?.status===`running`);if(!n.data)return(0,B.jsx)(WE,{number:e,error:n.error});let{pull:i,review:a,read:o}=n.data;return(0,B.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Pull request #${e}`,children:[(0,B.jsx)(FE,{pull:i,now:r}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:dE}),o?(0,B.jsx)(IE,{read:o}):null,(0,B.jsx)(BE,{number:e,review:a,now:r,onChanged:()=>{n.reload(),t?.()}}),i.files.length>0?(0,B.jsx)(VE,{files:i.files}):null,(0,B.jsx)(lE,{title:`Description`,children:i.body.trim()?(0,B.jsx)(Ew,{text:i.body.trim()}):(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:vE})}),(0,B.jsx)(UE,{notes:i.notes,now:r})]})}function KE({checks:e}){let t=xE(e);return t?(0,B.jsx)(`span`,{className:z(`w-3 shrink-0`,SE(e)),"aria-hidden":`true`,children:t}):(0,B.jsx)(`span`,{className:`w-3 shrink-0`,"aria-hidden":`true`})}function qE({pull:e,selected:t,onSelect:n}){let r=TE(e.review);return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.number),className:`flex min-h-11 w-full flex-col gap-0.5 rounded-lg px-3 py-2 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=true]:bg-muted aria-[current=true]:ring-2 aria-[current=true]:ring-inset aria-[current=true]:ring-ring`,children:[(0,B.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,B.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,B.jsx)(KE,{checks:e.checks}),e.draft?(0,B.jsx)(cm,{variant:`secondary`,children:`draft`}):null,(0,B.jsx)(`span`,{className:z(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),r?(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:r}):null,(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:CE(e.additions,e.deletions)})]}),(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:ME(e)})]})})}function JE({pulls:e,selectedId:t,onSelect:n}){return(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5 p-1`,children:e.map(e=>(0,B.jsx)(qE,{pull:e,selected:e.number===t,onSelect:n},e.number))})}var YE=()=>IT(FT(`git`)),XE=e=>IT(FT(`git`,String(e)));function ZE(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function QE({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?mE:e?hE:pE;return(0,B.jsxs)(pm,{className:`m-4 flex-1 border border-border bg-card`,children:[(0,B.jsx)(mm,{children:(0,B.jsx)(gm,{className:n?`text-destructive`:void 0,children:i})}),n?(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:r,children:`Retry`}):null]})}function $E({rest:e}){let t=BT(),n=RT(`git.pulls`,{},[`git`]),r=ZE(e),i=n.data?.pulls??[],a=(0,m.useCallback)(()=>{$(`git.pulls`,{refresh:!0}).then(()=>n.reload())},[n]);if(!n.data&&n.error)return(0,B.jsx)(ym,{message:`Could not load pull requests. ${n.error}`,onRetry:n.reload});if(n.data&&i.length===0)return(0,B.jsx)(QE,{loading:n.data.loading,loaded:n.data.loaded,error:n.data.error,onRetry:n.reload});let o=n.loading||!!n.data?.loading,s=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(WT,{title:uE,count:n.data?`${i.length} open`:void 0,children:(0,B.jsxs)(q,{variant:`outline`,className:`h-10`,disabled:o,onClick:a,children:[o?(0,B.jsx)(_m,{className:`size-3.5`}):null,`Refresh`]})}),n.data?.error?(0,B.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,n.data.error]}):null,n.data?(0,B.jsx)(JE,{pulls:i,selectedId:r,onSelect:XE}):(0,B.jsx)(GT,{})]}),c=r===void 0?null:(0,B.jsx)(GE,{number:r,onChanged:n.reload},r);return(0,B.jsx)(UT,{wide:t,list:s,detail:c,open:r!==void 0,onClose:YE,hint:`Select a pull request to see its detail.`,describe:`Pull request detail`})}function eD(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function tD({label:e,hint:t,buttonLabel:n=`Send`,onSend:r}){let i=(0,m.useId)(),[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)(!1),l=async()=>{a.trim()&&!s&&(c(!0),await r(a)&&o(``),c(!1))};return(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`label`,{htmlFor:i,className:`text-sm font-medium text-foreground`,children:e}),(0,B.jsx)(Jp,{id:i,value:a,rows:2,"aria-describedby":t?`${i}-hint`:void 0,onChange:e=>o(e.target.value),onKeyDown:e=>{eD(e)&&(e.preventDefault(),l())}}),t?(0,B.jsx)(`p`,{id:`${i}-hint`,className:`text-xs text-muted-foreground`,children:t}):null,(0,B.jsxs)(q,{className:`h-10 self-end`,onClick:()=>void l(),disabled:!a.trim()||s,children:[s?(0,B.jsx)(_m,{}):null,n]})]})}var nD=`Issues`,rD=`Issue`,iD=`p plans it with the planning panel, then save it as a task`,aD=`Press r to load open issues with the GitHub CLI (gh).`,oD=`No open issues. Press n to file one.`,sD=`loading issues from GitHub…`,cD=`issues are off (lobby.issues)`,lD=`(no description)`;function uD(e,t){return[e.state?e.state.toLowerCase():``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${XT(t-Date.parse(e.updatedAt))}`:``,e.labels.join(`, `)].filter(Boolean).join(` · `)}function dD(e,t){return[e.author?`by ${e.author}`:``,e.updatedAt?XT(t-Date.parse(e.updatedAt)):``].filter(Boolean).join(` · `)}function fD(e){return e.length>0?`[${e.slice(0,2).join(`, `)}]`:``}function pD({issue:e,now:t}){return(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`h2`,{className:`text-base font-medium break-words`,children:[`#`,e.number,` `,e.title]}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:uD(e,t)}),e.url?(0,B.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer nofollow`,className:`text-xs break-all text-primary underline underline-offset-4`,children:e.url}):null]})}function mD({comment:e,now:t}){return(0,B.jsxs)(`article`,{className:`flex flex-col gap-1 border-b pb-2 last:border-0 last:pb-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,B.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),e.createdAt?(0,B.jsx)(`span`,{children:XT(t-Date.parse(e.createdAt))}):null]}),(0,B.jsx)(Ew,{text:e.body.trim()})]})}function hD({comments:e,now:t}){return e.length===0?null:(0,B.jsx)(lE,{title:`Comments`,right:String(e.length),children:(0,B.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,B.jsx)(mD,{comment:e,now:t},n))})})}function gD({number:e}){let t=RT(`issues.get`,{number:e},[`issues`]),n=Date.now();if(!t.data)return t.error?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t.error]}):(0,B.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(_m,{className:`size-3.5`}),`loading #`,e,`…`]});let r=t.data.issue;return(0,B.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${rD} #${e}`,children:[(0,B.jsx)(pD,{issue:r,now:n}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:iD}),(0,B.jsx)(lE,{title:`Description`,children:r.body.trim()?(0,B.jsx)(Ew,{text:r.body.trim()}):(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:lD})}),(0,B.jsx)(hD,{comments:r.comments,now:n})]})}function _D({issue:e,selected:t,now:n,onSelect:r}){let i=fD(e.labels);return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>r(e.number),className:`flex min-h-11 w-full flex-col gap-0.5 rounded-lg px-3 py-2 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=true]:bg-muted aria-[current=true]:ring-2 aria-[current=true]:ring-inset aria-[current=true]:ring-ring`,children:[(0,B.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,B.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,B.jsx)(`span`,{className:z(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),i?(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:i}):null]}),(0,B.jsx)(`span`,{className:`pl-9 text-xs text-muted-foreground`,children:dD(e,n)})]})})}function vD({issues:e,selectedId:t,now:n,onSelect:r}){return(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5 p-1`,children:e.map(e=>(0,B.jsx)(_D,{issue:e,selected:e.number===t,now:n,onSelect:r},e.number))})}var yD=()=>IT(FT(`issues`)),bD=e=>IT(FT(`issues`,String(e)));function xD(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function SD(){return(0,B.jsx)(pm,{className:`m-4 flex-1 border border-border bg-card`,children:(0,B.jsxs)(mm,{children:[(0,B.jsx)(hm,{children:`Issues are off`}),(0,B.jsx)(gm,{className:`font-mono`,children:cD})]})})}function CD({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?oD:e?sD:aD;return(0,B.jsxs)(pm,{className:`m-4 flex-1 border border-border bg-card`,children:[(0,B.jsx)(mm,{children:(0,B.jsx)(gm,{className:n?`text-destructive`:void 0,children:i})}),n?(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:r,children:`Retry`}):null]})}function wD({onCreate:e}){return(0,B.jsx)(VT,{className:`mx-4 mb-4 shrink-0 p-3`,children:(0,B.jsx)(tD,{label:`New issue`,hint:`The first line becomes the title; the rest is the body. Enter files it.`,buttonLabel:`File issue`,onSend:e})})}function TD({rest:e}){let t=BT(),n=Zp(`status`).data?.issuesEnabled??!0,r=RT(`issues.list`,{},[`issues`],n),i=xD(e),a=r.data?.issues??[],o=Date.now(),s=(0,m.useCallback)(()=>{$(`issues.list`,{refresh:!0}).then(()=>r.reload())},[r]),c=async e=>await $(`issues.create`,{text:e})?(r.reload(),!0):!1;if(!n)return(0,B.jsx)(SD,{});if(!r.data&&r.error)return r.error.includes(`issues are off`)?(0,B.jsx)(SD,{}):(0,B.jsx)(ym,{message:`Could not load issues. ${r.error}`,onRetry:r.reload});let l=r.loading||!!r.data?.loading,u=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(WT,{title:nD,count:r.data?`${a.length} open`:void 0,children:(0,B.jsxs)(q,{variant:`outline`,className:`h-10`,disabled:l,onClick:s,children:[l?(0,B.jsx)(_m,{className:`size-3.5`}):null,`Refresh`]})}),r.data?.error?(0,B.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,r.data.error]}):null,r.data?(0,B.jsx)(vD,{issues:a,selectedId:i,now:o,onSelect:bD}):(0,B.jsx)(GT,{})]}),d=i===void 0?null:(0,B.jsx)(gD,{number:i},i),f=r.data&&a.length===0?(0,B.jsx)(CD,{loading:r.data.loading,loaded:r.data.loaded,error:r.data.error,onRetry:r.reload}):(0,B.jsx)(UT,{wide:t,list:u,detail:d,open:i!==void 0,onClose:yD,hint:`Select an issue to read it.`,describe:`Issue detail`});return(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[f,(0,B.jsx)(wD,{onCreate:c})]})}var ED=[`master`,`designer`,`backend`,`qa`],DD={master:`Master (oracle)`,designer:`Designer`,backend:`Backend`,qa:`QA`},OD={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`},kD=`Every write archives the version before it.`;function AD(e){if(e<1e3)return String(e);let t=e/1e3;return`${t>=10?Math.round(t):t.toFixed(1)}k`}function jD(e){return`over the compaction threshold — ask the oracle to compact ${e}`}function MD(e){return{text:e.text,occurrence:e.occurrence}}function ND(e){return ED.map(t=>{let n=e.filter(e=>e.agent===t);return{agent:t,files:n,notes:n.reduce((e,t)=>e+t.notes,0)}}).filter(e=>e.files.length>0)}function PD(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function FD({initial:e,busy:t,onSave:n,onCancel:r}){let[i,a]=(0,m.useState)(e),o=()=>{!t&&i.trim()&&n(i)};return(0,B.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-input p-3`,children:[(0,B.jsx)(`label`,{htmlFor:`knowledge-entry`,className:`text-sm font-medium text-foreground`,children:`Edit entry`}),(0,B.jsx)(Jp,{id:`knowledge-entry`,value:i,rows:4,autoFocus:!0,onChange:e=>a(e.target.value),onKeyDown:e=>{PD(e)&&(e.preventDefault(),o())}}),(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:kD}),(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:r,disabled:t,children:`Cancel`}),(0,B.jsxs)(q,{className:`h-10`,onClick:o,disabled:t||!i.trim(),children:[t?(0,B.jsx)(_m,{}):null,`Save`]})]})]})]})}function ID({open:e,file:t,initial:n,busy:r,onClose:i,onSave:a}){let[o,s]=(0,m.useState)(n);return(0,B.jsx)(Ip,{open:e,onOpenChange:e=>!e&&i(),children:(0,B.jsxs)(Bp,{side:`bottom`,className:`mx-auto max-h-[80svh] w-full max-w-3xl gap-3 p-4`,children:[(0,B.jsxs)(Vp,{className:`p-0`,children:[(0,B.jsxs)(Hp,{children:[`Edit `,t]}),(0,B.jsx)(Up,{children:kD})]}),(0,B.jsx)(Jp,{value:o,rows:14,className:`min-h-0 flex-1 font-mono text-sm`,onChange:e=>s(e.target.value)}),(0,B.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:i,disabled:r,children:`Cancel`}),(0,B.jsxs)(q,{className:`h-10`,onClick:()=>a(o),disabled:r,children:[r?(0,B.jsx)(_m,{}):null,`Save file`]})]})]})})}function LD({note:e,about:t,onTakeBack:n,busy:r}){let i=t?`about "${t.replace(/\s+/g,` `).trim().slice(0,50)}": ${e.text}`:e.text;return(0,B.jsxs)(`li`,{className:`flex items-start gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(`span`,{className:`shrink-0 text-primary`,"aria-hidden":`true`,children:`✎`}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:i}),(0,B.jsx)(q,{variant:`ghost`,className:`h-10 shrink-0 text-xs`,disabled:r,onClick:()=>n(e.id),children:`Take back`})]})}function RD({entry:e,index:t,selected:n,notes:r,onPick:i,onTakeBack:a,busy:o}){let s=()=>i(t);return(0,B.jsxs)(`li`,{role:`button`,tabIndex:0,"aria-pressed":n,onClick:s,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s())},className:n?`flex min-h-11 cursor-pointer flex-col gap-1 rounded-lg bg-muted p-2 outline-none focus-visible:ring-3 focus-visible:ring-ring/50`:`flex min-h-11 cursor-pointer flex-col gap-1 rounded-lg p-2 outline-none hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50`,children:[(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.jsx)(`span`,{className:n?`shrink-0 text-primary`:`shrink-0 text-muted-foreground`,"aria-hidden":`true`,children:n?`▸`:` `}),(0,B.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,B.jsx)(Ew,{text:e.text})})]}),r.length>0?(0,B.jsx)(`ul`,{className:`flex flex-col gap-1 pl-4`,children:r.map(e=>(0,B.jsx)(LD,{note:e,onTakeBack:a,busy:o},e.id))}):null]})}function zD({notes:e,onTakeBack:t,busy:n}){return e.length===0?null:(0,B.jsx)(lE,{title:`Notes on entries that changed`,right:String(e.length),children:(0,B.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map(e=>(0,B.jsx)(LD,{note:e,about:e.entry,onTakeBack:t,busy:n},e.id))})})}function BD({view:e}){let t=e.entries.length;return(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`h2`,{className:`text-base font-medium`,children:[OD[e.agent],` · `,e.file]}),(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t,` `,t===1?`entry`:`entries`,` · `,AD(e.chars),` chars`]}),e.over?(0,B.jsx)(`p`,{className:`text-sm text-foreground`,children:jD(e.file)}):null]})}function VD({draft:e,picked:t,setDraft:n,onEditFile:r,onDelete:i}){let a=!!e;return(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,B.jsx)(q,{variant:`outline`,className:`h-10`,disabled:a||!t,onClick:()=>n({kind:`edit`,entry:t}),children:`Edit`}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,disabled:a,onClick:()=>n({kind:`add`,entry:t}),children:t?`Add after`:`Add entry`}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,disabled:a||!t,onClick:()=>n({kind:`comment`,entry:t}),children:`Comment`}),(0,B.jsx)(cE,{label:`Delete`,title:`Delete this entry?`,description:`The entry and its notes are removed. The version before is archived.`,confirmLabel:`Delete entry`,variant:`destructive`,disabled:a||!t,onConfirm:i}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,disabled:a,onClick:r,children:`Edit file`})]})}function HD({agent:e,file:t,onChanged:n}){let r=RT(`knowledge.open`,{agent:e,file:t},[`knowledge`]),[i,a]=(0,m.useState)(0),[o,s]=(0,m.useState)(),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=r.data?.view,p=f?.entries??[],h=p[Math.min(i,Math.max(0,p.length-1))],g=async e=>{d(!0),await e(),s(void 0),r.reload(),n(),d(!1)},_=e=>void g(()=>$(`knowledge.unnote`,{id:e})),v=()=>{h&&g(()=>$(`knowledge.remove`,{agent:e,file:t,ref:MD(h)}))},y=n=>{let r=o?.entry;if(o?.kind===`edit`&&r)return void g(()=>$(`knowledge.edit`,{agent:e,file:t,ref:MD(r),text:n}));if(o?.kind===`comment`&&r)return void g(()=>$(`knowledge.comment`,{agent:e,file:t,ref:MD(r),text:n}));g(()=>$(`knowledge.add`,{agent:e,file:t,...h?{ref:MD(h)}:{},text:n}))};return f?(0,B.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${OD[e]} ${t}`,children:[(0,B.jsx)(BD,{view:f}),p.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing here yet. Add the first entry below.`}):null,(0,B.jsx)(`ul`,{className:`flex flex-col gap-1`,children:p.map((e,t)=>(0,B.jsx)(RD,{entry:e,index:t,selected:t===i,notes:f.attached.filter(t=>t.entry===e.text),onPick:a,onTakeBack:_,busy:u},`${t}-${e.text}`))}),o?.kind===`edit`?(0,B.jsx)(FD,{initial:o.entry.text,busy:u,onSave:y,onCancel:()=>s(void 0)}):null,o?.kind===`comment`?(0,B.jsx)(tD,{label:`Comment on this entry`,hint:kD,buttonLabel:`Add note`,onSend:async e=>(y(e),!0)}):null,o?.kind===`add`?(0,B.jsx)(tD,{label:`Add an entry`,hint:kD,buttonLabel:`Add entry`,onSend:async e=>(y(e),!0)}):null,u&&!o?(0,B.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(_m,{}),` saving…`]}):null,(0,B.jsx)(zD,{notes:f.detached,onTakeBack:_,busy:u}),(0,B.jsx)(VD,{draft:o,picked:h,setDraft:s,onEditFile:()=>l(!0),onDelete:v}),(0,B.jsx)(ID,{open:c,file:t,initial:f.content,busy:u,onClose:()=>l(!1),onSave:n=>{l(!1),g(()=>$(`knowledge.replaceFile`,{agent:e,file:t,text:n}))}})]}):r.error?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not read the file. `,r.error]}):(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`reading…`})}function UD(e){return`${e.agent}/${e.file}`}function WD({info:e}){return(0,B.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 text-xs text-muted-foreground tabular-nums`,children:[(0,B.jsx)(`span`,{children:AD(e.chars)}),e.over?(0,B.jsx)(`span`,{className:`text-foreground`,children:`· over`}):null,e.notes>0?(0,B.jsxs)(`span`,{className:`text-primary`,children:[`✎ `,e.notes]}):null]})}function GD({info:e,selected:t,onSelect:n}){return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(UD(e)),className:z(`flex min-h-11 w-full items-center justify-between gap-3 rounded-lg px-3 py-2 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50`,t&&`bg-muted ring-2 ring-ring ring-inset`),children:[(0,B.jsx)(`span`,{className:z(`min-w-0 truncate text-sm text-foreground`,t&&`font-medium`),children:e.label}),(0,B.jsx)(WD,{info:e})]})})}function KD({files:e,selectedKey:t,onSelect:n}){return(0,B.jsx)(`div`,{className:`flex flex-col pb-2`,children:ND(e).map(e=>(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`h3`,{className:`flex items-center justify-between border-b px-3 pt-4 pb-1 text-xs font-medium tracking-wide text-muted-foreground`,children:[(0,B.jsx)(`span`,{children:DD[e.agent]}),e.notes>0?(0,B.jsxs)(`span`,{className:`text-primary`,children:[`✎ `,e.notes]}):null]}),(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-1 pt-1`,children:e.files.map(e=>(0,B.jsx)(GD,{info:e,selected:UD(e)===t,onSelect:n},UD(e)))})]},e.agent))})}var qD=()=>IT(FT(`knowledge`)),JD=e=>{let[t,n]=e.split(`/`);IT(FT(`knowledge`,t??``,n??``))};function YD(){return(0,B.jsx)(pm,{className:`m-4 flex-1 border border-border bg-card`,children:(0,B.jsx)(mm,{children:(0,B.jsx)(gm,{children:`No knowledge files yet.`})})})}function XD(e,t,n,r){let i=e.find(e=>e.agent===t&&e.file===n);return i?(0,B.jsx)(HD,{agent:i.agent,file:i.file,onChanged:r},UD(i)):t&&n?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That file is not on the list any more.`}):null}function ZD({agent:e,file:t}){let n=BT(),r=RT(`knowledge.files`,{},[`knowledge`]),i=r.data?.files??[];if(!r.data&&r.error)return(0,B.jsx)(ym,{message:`Could not load the knowledge files. ${r.error}`,onRetry:r.reload});if(r.data&&i.length===0)return(0,B.jsx)(YD,{});let a=i.reduce((e,t)=>e+t.notes,0),o=i.find(n=>n.agent===e&&n.file===t),s=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(WT,{title:`Knowledge`,count:a>0?`✎ ${a}`:void 0}),r.data?(0,B.jsx)(KD,{files:i,selectedKey:o?UD(o):void 0,onSelect:JD}):(0,B.jsx)(GT,{})]});return(0,B.jsx)(UT,{wide:n,list:s,detail:XD(i,e,t,r.reload),open:!!(e&&t),onClose:qD,hint:`Select a file to read its entries.`,describe:`Knowledge file`})}var QD=`Sessions`,$D=`No sessions yet. A session is a live Excalidraw room that you and your agents draw in together.`,eO=`a add one: in Excalidraw, Share → Live collaboration → Start session, then paste the link`,tO=`n or make a new room here and open its link in Excalidraw`,nO=`Up to 5 sessions; each can be assigned to one agent or several.`,rO=`agents may draw here (w: look only)`,iO=`agents may only look (w: let them draw)`,aO=`checking the room…`,oO=`t checks that the room can be reached`,sO=`Assigned to`,cO=`Assigned agents read the board and draw on it with excalidraw_read and excalidraw_draw, and appear in the room under their own name.`,lO=`Add or rename`,uO=`Add by link`,dO=`In Excalidraw, Share → Live collaboration → Start session, then paste the link. Enter adds it.`,fO=`New room`,pO=`Makes a fresh room link to open in Excalidraw; the name is optional.`,mO=`Rename`,hO=`draw`,gO=`look only`,_O=`Copied to the clipboard`,vO=`Could not reveal the link.`,yO=[`master`,`designer`,`backend`,`qa`,`scout`,`researcher`,`quickfix`,`planner`],bO={master:`Master (oracle)`,designer:`Designer`,backend:`Backend`,qa:`QA`,scout:`Scouts`,researcher:`Researcher`,quickfix:`Quick fix`,planner:`Planner`};function xO(e){return e===0?`no agents`:`${e} agent${e===1?``:`s`}`}function SO(e){return e?e.ok?`✓`:`!`:``}function CO({id:e,label:t,hint:n,buttonLabel:r,initial:i=``,required:a,onSubmit:o}){let[s,c]=(0,m.useState)(i),l=async()=>{(!a||s.trim())&&await o(s)&&c(i)};return(0,B.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,B.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium text-foreground`,children:t}),(0,B.jsx)(`input`,{id:e,value:s,maxLength:80,onChange:e=>c(e.target.value),className:`h-10 w-full rounded-lg border border-input bg-transparent px-3 text-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50`}),n?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n}):null,(0,B.jsx)(q,{type:`submit`,className:`h-10 self-end`,disabled:a&&!s.trim(),children:r})]})}function wO({onChanged:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(tD,{label:uO,hint:dO,buttonLabel:`Add`,onSend:async t=>await $(`excalidraw.add`,{link:t})?(e(),!0):!1}),(0,B.jsx)(CO,{id:`new-room`,label:fO,hint:pO,buttonLabel:fO,onSubmit:async t=>{let n=t.trim();return await $(`excalidraw.create`,n?{name:n}:{})?(e(),!0):!1}})]})}function TO({session:e}){let[t,n]=(0,m.useState)(),r=async()=>{try{n((await tm(`excalidraw.reveal`,{id:e.id})).link)}catch(e){ce.error(e instanceof Error?e.message:vO)}};return(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`p`,{className:`font-mono text-sm break-all text-foreground`,children:t??e.masked}),(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(q,{variant:`outline`,className:`h-10`,onClick:()=>void navigator.clipboard?.writeText(t??``).then(()=>ce(_O)).catch(()=>void 0),children:[(0,B.jsx)(dp,{"aria-hidden":`true`}),`Copy`]}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,asChild:!0,children:(0,B.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,children:`Open board`})})]}):(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void r(),children:`Reveal`})})]})}function EO({session:e,onChanged:t}){let n=async()=>{await $(`excalidraw.toggleContribute`,{id:e.id})&&t()};return(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsx)(`p`,{className:e.contribute?`text-sm text-primary`:`text-sm text-muted-foreground`,children:e.contribute?rO:iO}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void n(),children:e.contribute?`Look only`:`Let agents draw`})]})}function DO({check:e,checking:t,onCheck:n}){return(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsxs)(q,{variant:`outline`,className:`h-10`,disabled:t,onClick:n,children:[t?(0,B.jsx)(_m,{className:`size-3.5`}):null,`Check`]}),t?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:aO}):e?(0,B.jsxs)(`p`,{className:e.ok?`text-sm text-primary`:`text-sm text-foreground`,children:[e.ok?`✓`:`!`,` `,e.text]}):(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:oO})]})}function OO({agent:e,on:t,onToggle:n}){return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":t,onClick:()=>n(e),className:`flex min-h-11 w-full items-center gap-2 rounded-lg px-2 text-left text-sm outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:t?`text-primary`:`text-muted-foreground`,children:t?`[x]`:`[ ]`}),(0,B.jsx)(`span`,{className:t?`text-foreground`:`text-muted-foreground`,children:bO[e]})]})})}function kO({session:e,onChanged:t}){let n=async n=>{await $(`excalidraw.toggleAgent`,{id:e.id,agent:n})&&t()},r=async()=>{await $(`excalidraw.toggleAll`,{id:e.id})&&t()},i=e.agents.length===yO.length;return(0,B.jsxs)(lE,{title:sO,right:xO(e.agents.length),children:[(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:yO.map(t=>(0,B.jsx)(OO,{agent:t,on:e.agents.includes(t),onToggle:n},t))}),(0,B.jsx)(q,{variant:`ghost`,className:`h-10 self-start`,onClick:()=>void r(),children:i?`No agents`:`Every agent`}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:cO})]})}function AO({session:e,onChanged:t}){return(0,B.jsx)(CO,{id:`rename-room`,label:mO,initial:e.name,required:!0,buttonLabel:mO,onSubmit:async n=>await $(`excalidraw.rename`,{id:e.id,name:n.trim()})?(t(),!0):!1},e.name)}function jO({session:e,check:t,checking:n,onCheck:r,onChanged:i,onRemove:a}){return(0,B.jsxs)(`article`,{"aria-label":`Session detail`,className:`flex flex-col gap-4`,children:[(0,B.jsx)(`h2`,{className:`text-base font-medium break-words`,children:e.name}),(0,B.jsx)(TO,{session:e}),(0,B.jsx)(EO,{session:e,onChanged:i}),(0,B.jsx)(DO,{check:t,checking:n,onCheck:r}),(0,B.jsx)(kO,{session:e,onChanged:i}),(0,B.jsxs)(lE,{title:lO,children:[(0,B.jsx)(wO,{onChanged:i}),(0,B.jsx)(AO,{session:e,onChanged:i})]}),(0,B.jsx)(`div`,{children:(0,B.jsx)(cE,{label:`Remove`,title:`Remove "${e.name}"?`,description:`Agents lose this session at once; the Excalidraw room itself is not touched.`,confirmLabel:`Remove session`,variant:`destructive`,onConfirm:a})})]})}function MO({check:e,checking:t}){if(t)return(0,B.jsx)(_m,{className:`size-3.5 shrink-0 text-muted-foreground`});let n=SO(e);return n?(0,B.jsx)(`span`,{className:z(`w-3.5 shrink-0 text-center`,e?.ok?`text-primary`:`text-foreground`),"aria-hidden":`true`,children:n}):(0,B.jsx)(`span`,{className:`w-3.5 shrink-0`,"aria-hidden":`true`})}function NO({session:e,check:t,checking:n,selected:r,onSelect:i}){return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,"aria-current":r?`true`:void 0,onClick:()=>i(e.id),className:`flex min-h-11 w-full flex-col gap-0.5 rounded-lg px-3 py-2 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=true]:bg-muted aria-[current=true]:ring-2 aria-[current=true]:ring-inset aria-[current=true]:ring-ring`,children:[(0,B.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,B.jsx)(MO,{check:t,checking:n}),(0,B.jsx)(`span`,{className:z(`min-w-0 flex-1 break-words text-foreground`,r&&`font-medium`),children:e.name}),(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:xO(e.agents.length)})]}),(0,B.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,B.jsx)(`span`,{className:`font-mono break-all`,children:e.masked}),(0,B.jsx)(cm,{variant:`secondary`,children:e.contribute?hO:gO})]})]})})}function PO({sessions:e,checks:t,checking:n,selectedId:r,onSelect:i}){return(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5 p-1`,children:e.map(e=>(0,B.jsx)(NO,{session:e,check:t[e.id],checking:n.includes(e.id),selected:e.id===r,onSelect:i},e.id))})}var FO=()=>IT(FT(`excalidraw`)),IO=e=>IT(FT(`excalidraw`,e));function LO({onChanged:e}){return(0,B.jsxs)(pm,{className:`m-4 flex-1 border border-border bg-card`,children:[(0,B.jsxs)(mm,{children:[(0,B.jsx)(hm,{children:$D}),(0,B.jsx)(gm,{className:`font-mono`,children:eO}),(0,B.jsx)(gm,{className:`font-mono`,children:tO}),(0,B.jsx)(gm,{children:nO})]}),(0,B.jsx)(`div`,{className:`flex w-full max-w-md flex-col gap-4 text-left`,children:(0,B.jsx)(wO,{onChanged:e})})]})}function RO({id:e}){let t=BT(),n=RT(`excalidraw.list`,{},[`excalidraw`]),[r,i]=(0,m.useState)({}),[a,o]=(0,m.useState)([]),s=n.data?.sessions??[],c=s.find(t=>t.id===e),l=async e=>{o(t=>[...t,e]);let t=await $(`excalidraw.check`,{id:e});o(t=>t.filter(t=>t!==e)),t&&i(n=>({...n,[e]:t}))},u=async()=>{c&&await $(`excalidraw.remove`,{id:c.id})&&(n.reload(),FO())};if(!n.data&&n.error)return(0,B.jsx)(ym,{message:`Could not load sessions. ${n.error}`,onRetry:n.reload});if(n.data&&s.length===0)return(0,B.jsx)(LO,{onChanged:n.reload});let d=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(WT,{title:QD,count:n.data?`${s.length}/5`:void 0}),n.data?(0,B.jsx)(PO,{sessions:s,checks:r,checking:a,selectedId:e,onSelect:IO}):(0,B.jsx)(GT,{})]}),f=c?(0,B.jsx)(jO,{session:c,check:r[c.id],checking:a.includes(c.id),onCheck:()=>void l(c.id),onChanged:n.reload,onRemove:()=>void u()}):null;return(0,B.jsx)(UT,{wide:t,list:d,detail:f,open:c!==void 0,onClose:FO,hint:`Select a session to see its link and agents.`,describe:`Session detail`})}var zO={MASTER:`text-primary`,DEV:`text-source-dev`,DESIGN:`text-source-design`,QA:`text-source-qa`,RESEARCH:`text-source-research`,"QUICK FIX":`text-source-quickfix`,ORACLE:`text-primary`,LOBBY:`text-muted-foreground`};function BO(e){return zO[e]??`text-muted-foreground`}function VO(e){if(e.role===`researcher`)return`RESEARCH`;let t=e.domain??e.role;return t===`backend`||t===`dev`?`DEV`:t===`designer`||t===`design`?`DESIGN`:t===`researcher`||t===`research`?`RESEARCH`:t===`qa`?`QA`:t?String(t).toUpperCase():`AGENT`}function HO(e){return e?.runs??[]}function UO(e,t=40){let n=new Map;for(let t of e)n.set(t.source,t);return[...n.values()].sort((e,t)=>e.at-t.at).slice(-t)}function WO({entry:e}){return e.pending?(0,B.jsx)(_m,{className:`size-3`,"aria-hidden":`true`,role:`presentation`}):e.kind===`error`?(0,B.jsx)(`span`,{className:`text-destructive`,children:`✗`}):e.kind===`warning`?(0,B.jsx)(`span`,{className:`text-chart-1`,children:`!`}):e.kind===`success`?(0,B.jsx)(`span`,{className:`text-chart-2`,children:`✓`}):(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:`·`})}function GO({entry:e}){return(0,B.jsxs)(`li`,{className:`flex items-start gap-2 text-xs`,children:[(0,B.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground`,children:qT(e.at)}),(0,B.jsx)(`span`,{className:z(`w-20 shrink-0 truncate font-mono font-medium`,BO(e.source)),children:e.source}),(0,B.jsx)(`span`,{className:`mt-px shrink-0`,"aria-hidden":`true`,children:(0,B.jsx)(WO,{entry:e})}),(0,B.jsx)(`span`,{className:`sr-only`,children:e.pending?`pending`:e.kind}),(0,B.jsx)(`span`,{className:z(`min-w-0 flex-1`,e.kind===`error`?`text-destructive`:e.pending?``:`text-muted-foreground`),children:e.pending?`${e.text}…`:e.text})]})}function KO({entries:e}){let t=e.slice(-400);return(0,B.jsxs)(`section`,{className:`flex min-h-0 flex-col overflow-hidden rounded-xl border bg-card`,"aria-label":`Activity`,children:[(0,B.jsx)(`header`,{className:`flex shrink-0 items-center justify-between border-b px-3 py-2`,children:(0,B.jsx)(`h2`,{className:`text-sm font-medium`,children:`Activity`})}),(0,B.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-2`,role:`log`,"aria-label":`Activity`,children:t.length===0?(0,B.jsx)(`p`,{className:`py-6 text-center text-sm text-muted-foreground`,children:`No activity yet.`}):(0,B.jsx)(`ul`,{className:`space-y-1.5`,children:t.map(e=>(0,B.jsx)(GO,{entry:e},e.id))})})]})}var qO=`↑ earlier messages load as you scroll up`,JO=`No task is running in this session.`,YO=`Type a request below and press enter to start one: the oracle scouts, proposes, plans and delegates.`,XO=`Or plan it first with the whole planning panel in 3 Plan, or make a direct change in 4 Quick fix.`,ZO=`Nothing said yet. Type below to talk to the oracle about this task.`;function QO({entry:e}){let t=e.text.startsWith(`✗`);return(0,B.jsxs)(`div`,{className:t?`flex items-center gap-2 text-xs text-destructive`:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,B.jsx)(`span`,{className:`h-px flex-1 bg-border`,"aria-hidden":`true`}),(0,B.jsxs)(`span`,{children:[e.text,e.at?` · ${qT(e.at)}`:``]}),(0,B.jsx)(`span`,{className:`h-px flex-1 bg-border`,"aria-hidden":`true`})]})}function $O({entry:e}){return e.role===`you`?(0,B.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[(0,B.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[qT(e.at),` You ●`]}),(0,B.jsx)(`div`,{className:`max-w-[85%] rounded-lg bg-primary/10 px-3 py-2`,children:(0,B.jsx)(Ew,{text:e.text})})]}):(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`◆ `,e.role===`panel`?`Panel`:`Oracle`,` `,qT(e.at)]}),(0,B.jsx)(Ew,{text:e.text})]})}var ek=(0,m.memo)(function({entry:e}){return e.role===`note`?(0,B.jsx)(QO,{entry:e}):(0,B.jsx)($O,{entry:e})},(e,t)=>e.entry.id===t.entry.id&&e.entry.text===t.entry.text&&e.entry.at===t.entry.at);function tk({text:e,busy:t}){let n=!!e?.trim();return!n&&!t?null:(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[`◆ Oracle`,t?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(_m,{className:`size-3`,"aria-hidden":`true`,role:`presentation`}),n?`writing`:`working…`]}):null]}),n?(0,B.jsx)(Ew,{text:e??``}):null]})}function nk({hasTask:e}){return(0,B.jsx)(pm,{className:`h-full border-0`,children:(0,B.jsxs)(mm,{children:[e?null:(0,B.jsx)(hm,{children:JO}),(0,B.jsxs)(gm,{children:[e?ZO:YO,e?null:(0,B.jsxs)(B.Fragment,{children:[` `,XO]})]})]})})}async function rk(e){let t=await tm(`lobby.history`,{before:e});return{entries:t.entries,hasOlder:t.hasOlder}}function ik(e,t,n){let[r,i]=(0,m.useState)([]),[a,o]=(0,m.useState)(t),[s,c]=(0,m.useState)(!1),l=(0,m.useMemo)(()=>{let t=new Set(e.map(e=>e.id));return[...r.filter(e=>!t.has(e.id)),...e]},[r,e]);return{merged:l,more:a,loading:s,load:(0,m.useCallback)(async()=>{let e=l[0]?.id;if(e===void 0||s||!a)return;c(!0);let t=n.current,r=t?.scrollHeight??0,u=t?.scrollTop??0;try{let t=await rk(e);i(e=>[...t.entries,...e]),o(t.hasOlder),window.requestAnimationFrame(()=>{let e=n.current;e&&(e.scrollTop=e.scrollHeight-r+u)})}catch{o(!1)}finally{c(!1)}},[l,s,a,n])}}function ak(e){let t=(0,m.useRef)(null),[n,r]=(0,m.useState)(!0),i=(0,m.useCallback)(()=>{let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[]);return(0,m.useEffect)(()=>{n&&i()},[n,i,e]),{ref:t,atBottom:n,stick:i,onScroll:(0,m.useCallback)(()=>{let e=t.current;e&&r(e.scrollHeight-e.scrollTop-e.clientHeight<48)},[])}}function ok({chat:e,reply:t,busy:n,hasOlder:r,hasTask:i}){let{ref:a,atBottom:o,stick:s,onScroll:c}=ak(e.length+(t?.length??0)),{merged:l,more:u,loading:d,load:f}=ik(e,r,a),p=(0,m.useCallback)(()=>{c();let e=a.current;e&&e.scrollTop<80&&u&&!d&&f()},[c,a,u,d,f]),h=l.length===0&&!t?.trim()&&!n;return(0,B.jsxs)(`section`,{className:`relative flex min-h-0 flex-col overflow-hidden rounded-xl border bg-card`,"aria-label":`Conversation`,children:[(0,B.jsxs)(`header`,{className:`flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2`,children:[(0,B.jsx)(`h2`,{className:`text-sm font-medium`,children:`Conversation`}),u?(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:qO}):null]}),(0,B.jsx)(`div`,{ref:a,onScroll:p,className:`min-h-0 flex-1 overflow-y-auto px-4 py-3`,role:`log`,"aria-label":`Conversation`,children:h?(0,B.jsx)(nk,{hasTask:i}):(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[l.map(e=>(0,B.jsx)(ek,{entry:e},e.id)),(0,B.jsx)(tk,{text:t,busy:n})]})}),o?null:(0,B.jsxs)(q,{type:`button`,size:`lg`,className:`absolute right-4 bottom-4 h-10`,onClick:s,children:[(0,B.jsx)(Yf,{"aria-hidden":`true`}),`Jump to latest`]})]})}function sk(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]),t}function ck(e){return e===`running`?(0,B.jsx)(_m,{className:`size-3`,"aria-hidden":`true`,role:`presentation`}):e===`success`?`✓`:e===`failed`||e===`timeout`||e===`error`?`✗`:`·`}function lk(e,t){let n=e.startedAt?Date.parse(e.startedAt):NaN;return JT((e.finishedAt?Date.parse(e.finishedAt):t)-n)}function uk({runs:e}){let t=sk(e.some(e=>e.status===`running`));return e.length===0?null:(0,B.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,"aria-label":`Runs`,children:[(0,B.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Runs`}),e.map((e,n)=>(0,B.jsxs)(cm,{variant:`outline`,className:`h-7 gap-1.5 font-normal`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:ck(e.status)}),(0,B.jsx)(`span`,{className:`sr-only`,children:e.status??`unknown`}),(0,B.jsx)(`span`,{className:`font-medium`,children:VO(e)}),e.activity??e.step?(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:e.activity??e.step}):null,(0,B.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:lk(e,t)})]},e.runId??n))]})}function dk({className:e,size:t=`default`,...n}){return(0,B.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:z(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function fk({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`card-header`,className:z(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...t})}function pk({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`card-title`,className:z(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function mk({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`card-description`,className:z(`text-sm text-muted-foreground`,e),...t})}function hk({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`card-content`,className:z(`px-(--card-spacing)`,e),...t})}var gk=8;function _k(e){return e?e.path===`fast`?`fast track (${e.size})`:`full workflow (${e.size})`:``}function vk(e,t){let n=Math.min(t,gk);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 yk({done:e,total:t}){return(0,B.jsx)(`span`,{className:`inline-flex items-center gap-0.5 align-middle`,"aria-hidden":`true`,children:vk(e,t).map((e,t)=>(0,B.jsx)(`span`,{className:z(`h-1.5 w-3 rounded-full`,e?`bg-primary`:`bg-border`)},t))})}function bk({task:e,branch:t}){let n=_k(e.track),r=e.git?.branch??t,i=e.git?.from;return(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-xs text-muted-foreground`,children:[(0,B.jsx)(`p`,{children:[e.id,n,(e.domains??[]).join(`, `)].filter(Boolean).join(` · `)}),r?(0,B.jsxs)(`p`,{children:[`⎇ `,r,i?` · from ${i}`:``,` · owner: this window`]}):null,e.progress?(0,B.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,B.jsx)(yk,{done:e.progress.done,total:e.progress.total}),(0,B.jsxs)(`span`,{children:[e.progress.done,` of `,e.progress.total,` steps`]}),e.currentStep?(0,B.jsxs)(`span`,{className:`text-foreground/80`,children:[`current: `,e.currentStep,` `,(0,B.jsx)(`span`,{className:`text-primary`,children:`◂ now`})]}):null]}):null]})}function xk({task:e,status:t}){let n=t?.branch??t?.workspace.branch;return(0,B.jsxs)(dk,{size:`sm`,className:`shrink-0`,children:[(0,B.jsxs)(fk,{children:[(0,B.jsxs)(pk,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsx)(`span`,{children:e?.title??`No task is running in this session.`}),e?(0,B.jsx)(cm,{variant:`outline`,className:`font-normal`,children:e.state}):null]}),(0,B.jsx)(mk,{children:e?e.id:t?.sessionName??`Type a request below to start one.`})]}),e?(0,B.jsx)(hk,{children:(0,B.jsx)(bk,{task:e,branch:n})}):null]})}function Sk({thought:e}){return(0,B.jsxs)(`li`,{className:`flex items-start gap-2 text-xs`,children:[(0,B.jsx)(`span`,{className:z(`w-20 shrink-0 truncate font-mono font-medium`,BO(e.source)),children:e.source}),(0,B.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground italic`,children:(0,B.jsx)(Ew,{text:e.text})}),e.live?(0,B.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-primary`,children:[(0,B.jsx)(_m,{className:`size-3`,"aria-hidden":`true`,role:`presentation`}),`thinking`]}):null]})}function Ck({thoughts:e}){let t=UO(e);return(0,B.jsxs)(`section`,{className:`flex max-h-44 min-h-0 shrink-0 flex-col overflow-hidden rounded-xl border bg-card`,"aria-label":`Thinking`,children:[(0,B.jsx)(`header`,{className:`flex shrink-0 items-center justify-between border-b px-3 py-2`,children:(0,B.jsx)(`h2`,{className:`text-sm font-medium`,children:`Thinking`})}),(0,B.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-2`,role:`log`,"aria-label":`Thinking`,children:t.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Thoughts from the oracle and every agent appear here, and only here.`}):(0,B.jsx)(`ul`,{className:`space-y-2`,children:t.map(e=>(0,B.jsx)(Sk,{thought:e},e.id))})})]})}function wk(){return(0,B.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(_m,{}),(0,B.jsx)(`span`,{children:`Connecting…`})]})}function Tk(){let e=Zp(`lobby`),t=Zp(`status`),n=e.data;return!n&&e.loading?(0,B.jsx)(wk,{}):!n&&e.error?(0,B.jsx)(ym,{message:e.error,onRetry:()=>sn.onHello({})}):(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-4`,children:[(0,B.jsx)(xk,{task:n?.task,status:t.data}),(0,B.jsx)(uk,{runs:HO(n)}),(0,B.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-rows-2 gap-3 lg:grid-rows-1 lg:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]`,children:[(0,B.jsx)(ok,{chat:n?.chat??[],reply:n?.reply,busy:t.data?.busy??!1,hasOlder:n?.hasOlderChat??!1,hasTask:!!n?.task}),(0,B.jsx)(KO,{entries:n?.activity??[]})]}),(0,B.jsx)(Ck,{thoughts:n?.thoughts??[]})]})}var Ek={master:`master`,scout:`scout`,worker:`worker`,reviewer:`QA gate`,researcher:`research`,quickfix:`quick fix`,planner:`oracle (plan)`,panel:`panel`};function Dk(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 Ok(e){return e>0?Dk(e):`—`}function kk(e,t){return t>0?`${Math.round(e/t*100)}%`:`—`}function Ak(e){return e<=0?`—`:e<.01?`<$0.01`:`$${e.toFixed(2)}`}function jk(e){return!Number.isFinite(e)||e<1e3?String(Math.max(0,Math.round(e||0))):e<1e6?`${Math.round(e/1e3)}k`:`${(e/1e6).toFixed(1)}M`}function Mk(e){return e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)}s`}function Nk(e){return e>=.9?{icon:`✓`,word:`healthy`,tone:`healthy`}:e>=.7?{icon:`!`,word:`shaky`,tone:`shaky`}:{icon:`✗`,word:`failing`,tone:`failing`}}function Pk(e){return e===`healthy`?`text-primary`:e===`failing`?`text-destructive`:`text-foreground`}function Fk(e){return e===`model`?`by model · thinking`:`by model · thinking · agent`}function Ik(e,t){let n=t===`model-kind`?Ek[e.kinds[0]??``]??e.kinds[0]??``:``;return[e.model,e.thinking,n].filter(Boolean).join(` · `)}var Lk=[`bg-chart-1`,`bg-chart-2`,`bg-chart-3`,`bg-chart-4`,`bg-chart-5`];function Rk(e){let t=0;for(let n of e)t=(t*31+n.charCodeAt(0))%Lk.length;return Lk[t]??Lk[0]}function zk(e){return Ek[e]??e}function Bk({title:e,right:t,children:n}){return(0,B.jsxs)(dk,{size:`sm`,children:[(0,B.jsx)(fk,{children:(0,B.jsxs)(pk,{className:`flex flex-wrap items-baseline justify-between gap-2 text-sm`,children:[(0,B.jsx)(`span`,{children:e}),(0,B.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:t})]})}),(0,B.jsx)(hk,{children:n})]})}function Vk(e,t){return`${t>0?Math.max(2,Math.round(e/t*100)):0}%`}function Hk({label:e,value:t,max:n,valueText:r,sub:i}){return(0,B.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-sm`,children:[(0,B.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,title:e,children:e}),(0,B.jsxs)(`span`,{className:`shrink-0 text-foreground tabular-nums`,children:[r,i?(0,B.jsx)(`span`,{className:`ml-2 text-xs text-muted-foreground`,children:i}):null]})]}),(0,B.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-muted`,role:`img`,"aria-label":`${e}: ${r}`,children:(0,B.jsx)(`div`,{className:`h-full rounded-full bg-chart-1`,style:{width:Vk(t,n)}})})]})}function Uk({groups:e,label:t}){let n=e.filter(e=>e.avgMs>0).sort((e,t)=>t.avgMs-e.avgMs),r=Math.max(...n.map(e=>e.avgMs),1);return(0,B.jsx)(Bk,{title:`Average run time`,right:`per model · thinking`,children:n.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,B.jsx)(`ul`,{className:`flex flex-col gap-3`,children:n.map(e=>(0,B.jsx)(Hk,{label:t(e),value:e.avgMs,max:r,valueText:Ok(e.avgMs),sub:`p90 ${Ok(e.p90Ms)}`},t(e)))})})}var Wk={healthy:`bg-primary`,shaky:`bg-foreground`,failing:`bg-destructive`};function Gk({label:e,rate:t,runs:n}){let r=Nk(t),i=`${Math.round(t*100)}%`;return(0,B.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-sm`,children:[(0,B.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,title:e,children:e}),(0,B.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 tabular-nums`,children:[(0,B.jsxs)(`span`,{className:`flex items-center gap-1 ${Pk(r.tone)}`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:r.icon}),(0,B.jsx)(`span`,{className:`sr-only`,children:r.word}),(0,B.jsx)(`span`,{children:i})]}),(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n})]})]}),(0,B.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-muted`,role:`img`,"aria-label":`${e}: ${r.word}, ${i} of ${n} runs`,children:(0,B.jsx)(`div`,{className:`h-full rounded-full ${Wk[r.tone]}`,style:{width:Vk(t,1)}})})]})}function Kk({groups:e,label:t}){let n=[...e].sort((e,t)=>e.successes/e.runs-t.successes/t.runs);return(0,B.jsx)(Bk,{title:`Success rate`,right:`✓ ≥90% · ! ≥70% · ✗ below`,children:n.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No runs yet.`}):(0,B.jsx)(`ul`,{className:`flex flex-col gap-3`,children:n.map(e=>(0,B.jsx)(Gk,{label:t(e),rate:e.runs>0?e.successes/e.runs:0,runs:e.runs},t(e)))})})}function qk({share:e}){return(0,B.jsx)(`ul`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs`,children:e.map(e=>(0,B.jsxs)(`li`,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,B.jsx)(`span`,{className:`inline-block size-2.5 rounded-sm ${Rk(e.agent)}`,"aria-hidden":`true`}),(0,B.jsx)(`span`,{className:`text-foreground`,children:e.agent}),(0,B.jsxs)(`span`,{className:`tabular-nums`,children:[Math.round(e.share*100),`%`]}),(0,B.jsxs)(`span`,{className:`tabular-nums`,children:[`avg `,Dk(e.ms/Math.max(1,e.runs)),` ×`,e.runs]})]},e.agent))})}function Jk({share:e}){return(0,B.jsx)(`div`,{className:`flex h-3 overflow-hidden rounded-full bg-muted`,role:`img`,"aria-label":`Share of run time by agent`,children:e.map(e=>(0,B.jsx)(`span`,{className:Rk(e.agent),style:{width:`${e.share*100}%`},title:`${e.agent} ${Math.round(e.share*100)}%`},e.agent))})}function Yk({times:e}){if(e.length===0)return null;let t=Math.max(...e.map(e=>e.avgMs),1);return(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-medium`,children:`Request to done, by the oracle's model`}),(0,B.jsx)(`ul`,{className:`flex flex-col gap-3`,children:e.map(e=>(0,B.jsx)(Hk,{label:[e.model,e.thinking].filter(Boolean).join(` · `),value:e.avgMs,max:t,valueText:Dk(e.avgMs),sub:`×${e.tasks}`},`${e.model}-${e.thinking}`))})]})}function Xk({timeShare:e}){let t=e.byAgent;return(0,B.jsx)(Bk,{title:`Where the time goes`,right:`share of run time by agent`,children:t.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsx)(Jk,{share:t}),(0,B.jsx)(qk,{share:t}),(0,B.jsx)(Yk,{times:e.taskTimes})]})})}function Zk(e){if(e.calls===0)return`no calls recorded`;let t=Object.entries(e.byPurpose).sort((e,t)=>t[1]-e[1]).map(([e,t])=>`${e} ${t}`).join(` · `);return[`${e.calls} call${e.calls===1?``:`s`}`,`${kk(e.ok,e.calls)} ok`,`p50 ${Mk(e.p50Ms)}`,`p90 ${Mk(e.p90Ms)}`,e.input>0?`${jk(e.input)} tokens read`:``,t].filter(Boolean).join(` · `)}function Qk(e){return[`${e.seatRunsSkipped} seat run${e.seatRunsSkipped===1?``:`s`} skipped`,`${e.questionsAnswered} question${e.questionsAnswered===1?``:`s`} answered`,`${e.quickFixesHeld} quick fix${e.quickFixesHeld===1?``:`es`} held`,e.routed>0?`${e.routed} run${e.routed===1?``:`s`} routed down, ${kk(e.routedOk,e.routed)} ok`:`no runs routed`].join(` · `)}function $k({summary:e}){return(0,B.jsxs)(dk,{size:`sm`,children:[(0,B.jsx)(fk,{children:(0,B.jsx)(pk,{className:`text-sm`,children:`Classifier (Jev)`})}),(0,B.jsxs)(hk,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:[(0,B.jsx)(`p`,{className:`break-words`,children:Zk(e)}),(0,B.jsxs)(`p`,{className:`break-words`,children:[(0,B.jsx)(`span`,{className:`text-primary`,children:`spared`}),` `,Qk(e)]})]})]})}var eA=[`Runs`,`OK`,`Avg`,`p50`,`p90`,`Turns`,`Tools`,`Tokens`,`tok/s`,`$/run`,`$ total`,`Stalls`];function tA(e,t=0){return e>0?e.toFixed(t):`—`}function nA(e){return[String(e.runs),kk(e.successes,e.runs),Ok(e.avgMs),Ok(e.p50Ms),Ok(e.p90Ms),tA(e.avgTurns,1),tA(e.avgTools,1),e.avgTokens>0?jk(e.avgTokens):`—`,e.tokensPerSecond>0?e.tokensPerSecond.toFixed(0):`—`,Ak(e.avgCost),Ak(e.totalCost),e.timeouts>0?String(e.timeouts):`—`]}function rA(e,t){return t===`model-kind`?zk(e.kinds[0]??``):e.kinds.map(zk).join(`, `)}function iA({groups:e,groupBy:t}){return(0,B.jsxs)(`section`,{className:`flex min-h-0 flex-col gap-2`,"aria-label":`All models`,children:[(0,B.jsxs)(`h2`,{className:`flex flex-wrap items-baseline justify-between gap-2 border-b pb-1 text-sm font-medium`,children:[(0,B.jsx)(`span`,{children:`All models`}),(0,B.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[t===`model`?`by model · thinking`:`by model · thinking · agent`,` · sorted by runs`]})]}),(0,B.jsx)(`div`,{className:`max-h-96 overflow-auto rounded-lg border`,children:(0,B.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,B.jsx)(`thead`,{className:`sticky top-0 bg-card text-xs text-muted-foreground`,children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{scope:`col`,className:`px-3 py-2 text-left font-medium`,children:`Model`}),(0,B.jsx)(`th`,{scope:`col`,className:`px-3 py-2 text-left font-medium`,children:`Think`}),(0,B.jsx)(`th`,{scope:`col`,className:`px-3 py-2 text-left font-medium`,children:t===`model-kind`?`Agent`:`Agents`}),eA.map(e=>(0,B.jsx)(`th`,{scope:`col`,className:`px-3 py-2 text-right font-medium whitespace-nowrap`,children:e},e))]})}),(0,B.jsx)(`tbody`,{children:e.map(e=>(0,B.jsxs)(`tr`,{className:`border-t`,children:[(0,B.jsx)(`th`,{scope:`row`,className:`px-3 py-2 text-left font-normal text-foreground`,children:e.model}),(0,B.jsx)(`td`,{className:`px-3 py-2 whitespace-nowrap text-muted-foreground`,children:e.thinking||`—`}),(0,B.jsx)(`td`,{className:`px-3 py-2 whitespace-nowrap text-muted-foreground`,children:rA(e,t)||`—`}),nA(e).map((e,t)=>(0,B.jsx)(`td`,{className:`px-3 py-2 text-right tabular-nums whitespace-nowrap text-foreground`,children:e},eA[t]))]},Ik(e,t)))})]})})]})}function aA({label:e,value:t,sub:n,tone:r}){return(0,B.jsxs)(dk,{size:`sm`,className:`gap-1`,children:[(0,B.jsx)(fk,{children:(0,B.jsx)(pk,{className:`text-xs font-medium tracking-wide text-muted-foreground`,children:e})}),(0,B.jsxs)(hk,{className:`flex flex-col gap-0.5`,children:[(0,B.jsx)(`span`,{className:`text-2xl leading-tight font-medium tabular-nums ${r??`text-foreground`}`,children:t}),(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n||`\xA0`})]})]})}function oA(e){let t=Nk(e.runs>0?e.successes/e.runs:0),n=`${e.runs-e.successes} failed${e.stalls>0?` · ${e.stalls} stalled`:``}`;return{value:`${t.icon} ${kk(e.successes,e.runs)}`,sub:n,tone:Pk(t.tone)}}function sA({tiles:e}){let t=oA(e);return(0,B.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5`,children:[(0,B.jsx)(aA,{label:`Runs`,value:String(e.runs),sub:e.runs===0?`no runs yet`:``}),(0,B.jsx)(aA,{label:`Success`,value:t.value,sub:t.sub,tone:t.tone}),(0,B.jsx)(aA,{label:`Avg run`,value:Ok(e.avgMs),sub:`p90 ${Ok(e.p90Ms)}`}),(0,B.jsx)(aA,{label:`Cost`,value:Ak(e.cost),sub:e.runs>0?`${Ak(e.cost/e.runs)} per run`:`—`}),(0,B.jsx)(aA,{label:`Tasks`,value:`${e.completed} done`,sub:e.avgCompleteMs>0?`avg ${Dk(e.avgCompleteMs)} · ${e.active} active`:`${e.active} active`})]})}var cA=`No runs recorded yet. Every Master turn, subagent run, quick fix and planning round lands here with its model, thinking level, time, tokens and cost.`;function lA({groupBy:e,onGroup:t}){return(0,B.jsx)(`div`,{role:`group`,"aria-label":`Group by`,className:`flex gap-1 rounded-lg bg-muted p-1`,children:[`model`,`model-kind`].map(n=>(0,B.jsx)(q,{variant:e===n?`secondary`:`ghost`,"aria-pressed":e===n,className:`h-10`,onClick:()=>t(n),children:Fk(n)},n))})}function uA({query:e,onQuery:t}){return(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`label`,{htmlFor:`metrics-search`,className:`text-xs font-medium text-muted-foreground`,children:`Search runs`}),(0,B.jsx)(`input`,{id:`metrics-search`,type:`search`,value:e,maxLength:500,placeholder:`model, agent, tool…`,onChange:e=>t(e.target.value),className:`h-10 w-full min-w-48 rounded-lg border border-input bg-transparent px-3 text-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50`})]})}function dA(e){return(0,B.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,B.jsx)(lA,{groupBy:e.groupBy,onGroup:e.onGroup}),(0,B.jsx)(uA,{query:e.query,onQuery:e.onQuery})]})}function fA({data:e,groupBy:t,query:n}){let r=e=>Ik(e,t);return e.tiles.runs===0?(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,B.jsx)(sA,{tiles:e.tiles}),(0,B.jsx)(`p`,{className:`rounded-lg border border-border bg-card p-4 text-sm text-muted-foreground`,children:n?`No run matches "${n}".`:cA})]}):(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,B.jsx)(sA,{tiles:e.tiles}),e.classifier?(0,B.jsx)($k,{summary:e.classifier}):null,(0,B.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,B.jsx)(Uk,{groups:e.groups,label:r}),(0,B.jsx)(Kk,{groups:e.groups,label:r})]}),(0,B.jsx)(Xk,{timeShare:e.timeShare}),(0,B.jsx)(iA,{groups:e.groups,groupBy:t})]})}function pA(){return(0,B.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5`,role:`status`,"aria-label":`Loading metrics`,children:[0,1,2,3,4].map(e=>(0,B.jsx)(`div`,{className:`h-24 rounded-xl bg-muted motion-safe:animate-pulse`},e))})}function mA(){let[e,t]=(0,m.useState)(`model`),[n,r]=(0,m.useState)(``),i=RT(`metrics.get`,{groupBy:e,query:n},[`metrics`]);return!i.data&&i.error?(0,B.jsx)(ym,{message:`Could not load metrics. ${i.error}`,onRetry:i.reload}):(0,B.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,B.jsxs)(`header`,{className:`flex flex-wrap items-baseline justify-between gap-2`,children:[(0,B.jsx)(`h1`,{className:`text-lg font-medium`,children:`Metrics`}),i.loading&&i.data?(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`⠋ refreshing`}):null]}),(0,B.jsx)(dA,{groupBy:e,query:n,onGroup:t,onQuery:r}),i.data?(0,B.jsx)(fA,{data:i.data,groupBy:e,query:n}):(0,B.jsx)(pA,{})]})}var hA=`(prefers-color-scheme: dark)`,gA=[`dark`,`light`,`system`],_A=m.createContext(void 0);function vA(e){return e!==null&&gA.includes(e)}function yA(){return window.matchMedia(hA).matches?`dark`:`light`}function bA(){let e=document.createElement(`style`);return e.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;transition:none!important}`)),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.remove()})})}}function xA(e){return e instanceof HTMLElement&&!!(e.isContentEditable||e.closest(`input, textarea, select, [contenteditable='true']`))}function SA({children:e,defaultTheme:t=`system`,storageKey:n=`theme`,disableTransitionOnChange:r=!0,...i}){let[a,o]=m.useState(()=>{let e=localStorage.getItem(n);return vA(e)?e:t}),s=m.useCallback(e=>{localStorage.setItem(n,e),o(e)},[n]),c=m.useCallback(e=>{let t=document.documentElement,n=e===`system`?yA():e,i=r?bA():null;t.classList.remove(`light`,`dark`),t.classList.add(n),i&&i()},[r]);m.useEffect(()=>{if(c(a),a!==`system`)return;let e=window.matchMedia(hA),t=()=>{c(`system`)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}},[a,c]),m.useEffect(()=>{let e=e=>{e.repeat||e.metaKey||e.ctrlKey||e.altKey||xA(e.target)||e.key.toLowerCase()===`d`&&o(e=>{let t=e===`dark`?`light`:e===`light`?`dark`:yA()===`dark`?`light`:`dark`;return localStorage.setItem(n,t),t})};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[n]),m.useEffect(()=>{let e=e=>{if(e.storageArea===localStorage&&e.key===n){if(vA(e.newValue)){o(e.newValue);return}o(t)}};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}},[t,n]);let l=m.useMemo(()=>({theme:a,setTheme:s}),[a,s]);return(0,B.jsx)(_A.Provider,{...i,value:l,children:e})}var CA=()=>{let e=m.useContext(_A);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e};function wA({className:e,type:t,...n}){return(0,B.jsx)(`input`,{type:t,"data-slot":`input`,className:z(`flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-1 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80`,e),...n})}function TA(e){return(0,B.jsx)(Hu,{"data-slot":`select`,...e})}function EA(e){return(0,B.jsx)(Ku,{"data-slot":`select-value`,...e})}function DA({className:e,children:t,...n}){return(0,B.jsxs)(Wu,{"data-slot":`select-trigger`,className:z(`flex h-10 w-full min-w-0 items-center justify-between gap-2 rounded-lg border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[t,(0,B.jsx)(qu,{asChild:!0,children:(0,B.jsx)($f,{className:`text-muted-foreground`})})]})}function OA({className:e,children:t,position:n=`popper`,...r}){return(0,B.jsx)(Xu,{children:(0,B.jsx)(Qu,{"data-slot":`select-content`,position:n,className:z(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),...r,children:(0,B.jsx)(cd,{className:`p-1`,children:t})})})}function kA({className:e,children:t,...n}){return(0,B.jsxs)(md,{"data-slot":`select-item`,className:z(`relative flex w-full cursor-default items-center gap-2 rounded-md py-2 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,B.jsx)(`span`,{className:`absolute right-2 flex size-4 items-center justify-center`,children:(0,B.jsx)(vd,{children:(0,B.jsx)(Zf,{className:`size-4`})})}),(0,B.jsx)(gd,{children:t})]})}function AA({className:e,...t}){return(0,B.jsx)(Id,{"data-slot":`switch`,className:z(`peer relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors outline-none before:absolute before:-inset-x-2 before:-inset-y-2.5 before:content-[''] focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...t,children:(0,B.jsx)(Rd,{"data-slot":`switch-thumb`,className:`pointer-events-none block size-5 rounded-full bg-background shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`})})}var jA=[`master`,`designer`,`backend`,`qa`,`scout`,`researcher`,`quickfix`,`planner`],MA={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`,scout:`Scout`,researcher:`Researcher`,quickfix:`Quick fix`,planner:`Planner`},NA={model:`Model`,thinking:`Thinking`,fallback:`Fallback model`,fallbackThinking:`Fallback thinking`,timeout:`Time limit`,instructions:`Instructions`},PA=`inherit`,FA=`inherit`,IA=`Use the session's current model`,LA=`__custom__`,RA=`custom…`,zA=`Type a provider/model id`,BA=`none`,VA=`No fallback: when its model runs out of usage the run fails`,HA=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],UA={agents:`Agents`,workflow:`Workflow`,lobby:`Lobby`,classifier:`Classifier (Jev)`,appearance:`Appearance`,notifications:`Notifications`,install:`Install as app`},WA=[{id:`autoOpen`,label:`Open with a task`,help:`open the lobby when this session starts or resumes a task`},{id:`autoAsk`,label:`Ask at once`,help:`put the panel's questions to you as soon as a round ends, while the Plan tab is open`},{id:`mouse`,label:`Mouse`,help:`click tabs and draft lines, scroll with the wheel (shift+drag still selects text)`},{id:`miniLine`,label:`Status line when hidden`,help:`one line under the editor while the lobby is hidden: task steps, the planning round, a quick fix, or idle`},{id:`issues`,label:`Issues tab`,help:`the GitHub Issues tab`}],GA=[{id:`conversation`,label:`Conversation pane`},{id:`activity`,label:`Activity log pane`},{id:`thinking`,label:`Thinking pane`}],KA=`shown on the Lobby tab; its key in the lobby toggles it too`,qA=`Planning rounds`,JA=`enter cycles 2, 3, 5, 8, unlimited; the last round the oracle settles alone`,YA=[2,3,5,8,0],XA=`Split long plans`,ZA=`saving a plan with more steps offers to split it into up to 5 tasks · enter cycles 6, 8, 10, 12, never`,QA=[6,8,10,12,0],$A=`Web UI`,ej=`start the loopback browser UI with /bot-lobby web`,tj=`Port`,nj=`the base port (then the next free up to +20); 0 means any free port`,rj=`Open browser`,ij=`open the link in the browser on /bot-lobby web`,aj=`Questions`,oj=`where the web UI's questions are answered: both, or the terminal only`,sj=[`both`,`terminal`],cj=[{id:`off`,label:`off`,help:`tasks work in the folder you started them in`},{id:`branch`,label:`branch`,help:`each new task gets a git branch named after it, checked out in the working folder`},{id:`worktree`,label:`worktree`,help:`each new task gets its own worktree and branch, named after it: every agent runs there, apart from your checkout`}],lj=`Git isolation`,uj=[{id:`auto`,label:`Auto (OpenCode's free Jev, else TypeSafe)`},{id:`opencode`,label:`OpenCode Zen`},{id:`typesafe`,label:`TypeSafe`},{id:`openrouter`,label:`OpenRouter`},{id:`vercel`,label:`Vercel AI Gateway`}],dj=[{id:`seats`,label:`Planning seats`,help:`each round, only the seats your idea or latest answers touch sit; 1-4 in the Plan tab pins one`},{id:`answers`,label:`Obvious answers`,help:`a panel question whose recommended option the conversation already makes clearly right is answered for you (listed under Assumptions)`},{id:`triage`,label:`Task triage`,help:`a new task's size, domains and research need reach the Master as hints; a quick fix that is really a task is held for you`},{id:`effort`,label:`Effort routing`,help:`a simple step runs one thinking level lower, a trivial one on the cheaper model below; a routed run that falls short runs again on your settings`},{id:`review`,label:`Pull request read`,help:`the Git tab's quick read of a pull request: its size, and how likely it is risky, security-relevant, breaking or untested, before an agent reviews it`},{id:`knowledge`,label:`Relevant knowledge`,help:`when an agent's knowledge, standards or decisions file is too long for its prompt, Jev picks the sections that bear on the step, and the agent is told where the rest is`},{id:`files`,label:`File hints`,help:`scouts, workers, quick fixes and the planning panel start with the files most likely needed, and can look more up with find_relevant_files`}],fj={enabled:`Classifier`,enabledHelp:`Jev makes the obvious decisions so large models spend fewer tokens on them`,host:`Host`,model:`Model`,modelHelp:`empty uses the host's default`,key:`API key`,keyNote:`the key pi already holds for this host; it is never read by this page`,cheap:`Cheaper model`,cheapNone:`none: trivial steps keep their model and drop a thinking level`,cheapHelp:`what effort routing runs trivial steps on`},pj={title:`Settings`,intro:`Every setting the terminal's /bot-lobby settings menu writes, saved to the same config file.`,loading:`Loading settings…`,loadFailed:`Could not load settings.`,saved:`Settings saved`,saving:`Saving…`,appearanceHelp:`The page's own light/dark theme; it is not sent to the server.`,themeLabel:`Theme`,themeItems:[{id:`light`,label:`Light`},{id:`dark`,label:`Dark`},{id:`system`,label:`System`}],notificationsLabel:`Browser notifications`,notificationsHelp:`While this page is hidden, tell me when a question waits, a task finishes or a background session asks something.`,notificationsBlocked:`Notifications are blocked in your browser. Allow them for this site and try again.`,notificationsUnsupported:`This browser does not offer notifications.`,notificationsOn:`Browser notifications are on.`,notificationsOff:`Browser notifications are off.`,installLabel:`Install bot-lobby`,installHelp:`Keep it in its own window, with the shell cached so it opens when Pi is not running.`,installButton:`Install app`,installUnavailable:`Use your browser's “Install app” or “Add to Home Screen” action.`,installDone:`bot-lobby is installed.`},mj={master:[`master`],designer:[`agents`,`designer`],backend:[`agents`,`backend`],qa:[`agents`,`qa`],scout:[`scout`],researcher:[`researcher`],quickfix:[`quickFix`],planner:[`planner`]},hj=[...WA,...GA.map(e=>({id:`panel:${e.id}`,label:e.label,help:KA}))];function gj(e,t){switch(t){case`master`:return e.master;case`scout`:return{model:e.scout.model,thinking:`low`,timeoutMs:e.scout.timeoutMs,...e.scout.fallbackModel?{fallbackModel:e.scout.fallbackModel}:{}};case`researcher`:return e.researcher;case`quickfix`:return e.quickFix;case`planner`:return e.planner;default:return e.agents[t]}}function _j(e,t,n){return mj[e].reduceRight((e,t)=>({[t]:e}),{[t]:n})}function vj(e,t){return e.find(e=>e.id===t)?.thinkingLevels??HA}function yj(e,t){return(t.includes(e)?t:[e,...t]).map(e=>({value:e,label:e}))}var bj=e=>e>0?`${e} round${e===1?``:`s`}`:`unlimited`,xj=e=>e>0?`over ${e} steps`:`never`;function Sj({label:e,help:t,children:n}){return(0,B.jsxs)(`div`,{className:`grid gap-1.5 sm:grid-cols-[minmax(0,1fr)_minmax(0,20rem)] sm:items-start sm:gap-4`,children:[(0,B.jsxs)(`div`,{className:`min-w-0 py-1`,children:[(0,B.jsx)(`div`,{className:`text-sm font-medium`,children:e}),t?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}):null]}),(0,B.jsx)(`div`,{className:`min-w-0`,children:n})]})}function Cj({value:e,items:t,label:n,onChange:r}){return(0,B.jsxs)(TA,{value:e,onValueChange:r,children:[(0,B.jsx)(DA,{"aria-label":n,children:(0,B.jsx)(EA,{})}),(0,B.jsx)(OA,{children:t.map(e=>(0,B.jsx)(kA,{value:e.value,children:(0,B.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,B.jsx)(`span`,{className:`truncate`,children:e.label}),e.help?(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.help}):null]})},e.value))})]})}function wj(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:PA,label:FA,help:IA}]:[],...e.none?[{value:PA,label:BA,help:VA}]:[],...!e.inherit&&!e.none&&e.value===`inherit`?[{value:PA,label:FA,help:IA}]:[],...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:zA}]:[],{value:LA,label:RA,help:zA}],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,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(Cj,{value:e.value,items:o,label:e.label,onChange:s}),t?(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.jsx)(wA,{autoFocus:!0,value:r,placeholder:`provider/model`,"aria-label":`Model id`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),(0,B.jsx)(q,{type:`button`,variant:`outline`,className:`h-10`,onClick:c,children:`Use`})]}):null]})}function Tj({label:e,help:t,checked:n,onChange:r}){return(0,B.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-lg border border-border px-3 py-2.5`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`div`,{className:`text-sm font-medium`,children:e}),t?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}):null]}),(0,B.jsx)(AA,{checked:n,onCheckedChange:r,"aria-label":e,className:`mt-0.5`})]})}function Ej({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,B.jsx)(wA,{value:i,placeholder:n,"aria-label":r,onChange:e=>a(e.target.value),onBlur:o,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())}})}function Dj({value:e,label:t,onSave:n}){let r=Math.round(e/6e4);return(0,B.jsx)(kj,{label:t,value:String(r),min:1,suffix:`min`,onSave:e=>{let t=Number(e);return!Number.isFinite(t)||t<=0?(ce.error(`"${e}" is not a positive number of minutes.`),!1):(n(Math.round(t*6e4)),!0)}})}function Oj({value:e,onSave:t}){return(0,B.jsx)(kj,{label:tj,value:String(e),min:0,max:65535,onSave:e=>!/^\d+$/.test(e)||Number(e)>65535?(ce.error(`"${e}" is not a port (0, or 1-65535).`),!1):(t(Number(e)),!0)})}function kj({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,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(wA,{type:`number`,inputMode:`numeric`,min:n,max:r,value:o,"aria-label":e,onChange:e=>s(e.target.value),onBlur:c,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),i?(0,B.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:i}):null]})}function Aj({value:e,label:t,onSave:n}){let[r,i]=(0,m.useState)(e);return(0,m.useEffect)(()=>i(e),[e]),(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsx)(Jp,{rows:3,value:r,"aria-label":t,onChange:e=>i(e.target.value),onBlur:()=>{r.trim()!==e&&n(r.trim())}}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Saved when the field loses focus.`})]})}function jj({kind:e,config:t,models:n,save:r}){let i=gj(t,e),a=(t,n)=>void r(_j(e,t,n)),o=MA[e];return(0,B.jsxs)(dk,{size:`sm`,children:[(0,B.jsx)(fk,{children:(0,B.jsx)(pk,{children:o})}),(0,B.jsxs)(hk,{className:`flex flex-col gap-4`,children:[(0,B.jsx)(Sj,{label:NA.model,children:(0,B.jsx)(wj,{value:i.model,models:n,label:`${o} model`,inherit:e===`master`,onChange:e=>a(`model`,e)})}),(0,B.jsx)(Sj,{label:NA.thinking,help:e===`scout`?`fixed for scouts`:void 0,children:e===`scout`?(0,B.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`low`}):(0,B.jsx)(Cj,{value:i.thinking,items:yj(i.thinking,vj(n,i.model)),label:`${o} thinking`,onChange:e=>a(`thinking`,e)})}),(0,B.jsx)(Sj,{label:NA.fallback,help:VA,children:(0,B.jsx)(wj,{value:i.fallbackModel??`inherit`,models:n,label:`${o} fallback model`,none:!0,onChange:e=>a(`fallbackModel`,e)})}),e!==`scout`&&i.fallbackModel?(0,B.jsx)(Sj,{label:NA.fallbackThinking,children:(0,B.jsx)(Cj,{value:i.fallbackThinking??i.thinking,items:yj(i.fallbackThinking??i.thinking,vj(n,i.fallbackModel)),label:`${o} fallback thinking`,onChange:e=>a(`fallbackThinking`,e)})}):null,e===`master`?null:(0,B.jsx)(Sj,{label:NA.timeout,help:`in minutes; default ${Math.round(t.workflow.agentTimeoutMs/6e4)}`,children:(0,B.jsx)(Dj,{value:i.timeoutMs??t.workflow.agentTimeoutMs,label:`${o} time limit`,onSave:e=>a(`timeoutMs`,e)})}),e!==`scout`&&e!==`researcher`?(0,B.jsx)(Sj,{label:NA.instructions,children:(0,B.jsx)(Aj,{value:i.instructions??``,label:`${o} instructions`,onSave:e=>a(`instructions`,e)})}):null]})]})}function Mj(e,t){return t.startsWith(`panel:`)?e.lobby.panels[t.slice(6)]:e.lobby[t]}function Nj({config:e,item:t,save:n}){let r=t.id.startsWith(`panel:`);return(0,B.jsx)(Tj,{label:t.label,help:t.help,checked:Mj(e,t.id),onChange:e=>{n(r?{lobby:{panels:{[t.id.slice(6)]:e}}}:{lobby:{[t.id]:e}})}})}function Pj({config:e,save:t}){let n=e.workflow.gitIsolation;return(0,B.jsx)(lE,{title:UA.workflow,children:(0,B.jsx)(Sj,{label:lj,help:cj.find(e=>e.id===n)?.help??`enter cycles off, branch, worktree`,children:(0,B.jsx)(Cj,{value:n,items:cj.map(e=>({value:e.id,label:e.label})),label:lj,onChange:e=>void t({workflow:{gitIsolation:e}})})})})}function Fj({config:e,save:t}){let n=e.lobby.web;return(0,B.jsx)(lE,{title:UA.lobby,children:(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsx)(`div`,{className:`flex flex-col gap-2`,children:hj.map(n=>(0,B.jsx)(Nj,{config:e,item:n,save:t},n.id))}),(0,B.jsx)(Sj,{label:qA,help:JA,children:(0,B.jsx)(Cj,{value:String(e.lobby.maxPlanningRounds),items:YA.map(e=>({value:String(e),label:bj(e)})),label:qA,onChange:e=>void t({lobby:{maxPlanningRounds:Number(e)}})})}),(0,B.jsx)(Sj,{label:XA,help:ZA,children:(0,B.jsx)(Cj,{value:String(e.lobby.splitPlanAbove),items:QA.map(e=>({value:String(e),label:xj(e)})),label:XA,onChange:e=>void t({lobby:{splitPlanAbove:Number(e)}})})}),(0,B.jsx)(Tj,{label:$A,help:ej,checked:n.enabled,onChange:e=>void t({lobby:{web:{enabled:e}}})}),(0,B.jsx)(Sj,{label:tj,help:nj,children:(0,B.jsx)(Oj,{value:n.port,onSave:e=>void t({lobby:{web:{port:e}}})})}),(0,B.jsx)(Tj,{label:rj,help:ij,checked:n.openBrowser,onChange:e=>void t({lobby:{web:{openBrowser:e}}})}),(0,B.jsx)(Sj,{label:aj,help:oj,children:(0,B.jsx)(Cj,{value:n.questions,items:sj.map(e=>({value:e,label:e})),label:aj,onChange:e=>void t({lobby:{web:{questions:e}}})})})]})})}function Ij({config:e,models:t,save:n}){let r=e.classifier,i=uj.find(e=>e.id===r.provider)?.label;return(0,B.jsx)(lE,{title:UA.classifier,children:(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsx)(Tj,{label:fj.enabled,help:fj.enabledHelp,checked:r.enabled,onChange:e=>void n({classifier:{enabled:e}})}),(0,B.jsx)(Sj,{label:fj.host,children:(0,B.jsx)(Cj,{value:r.provider,items:uj.map(e=>({value:e.id,label:e.label})),label:fj.host,onChange:e=>void n({classifier:{provider:e}})})}),(0,B.jsx)(Sj,{label:fj.model,help:fj.modelHelp,children:(0,B.jsx)(Ej,{value:r.model,label:fj.model,placeholder:`the host's default`,onSave:e=>void n({classifier:{model:e}})})}),(0,B.jsx)(Sj,{label:fj.key,help:fj.keyNote,children:(0,B.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:i??r.provider})}),(0,B.jsx)(`div`,{className:`flex flex-col gap-2`,children:dj.map(e=>(0,B.jsx)(Tj,{label:e.label,help:e.help,checked:r.features[e.id],onChange:t=>void n({classifier:{features:{[e.id]:t}}})},e.id))}),(0,B.jsx)(Sj,{label:fj.cheap,help:fj.cheapHelp,children:(0,B.jsx)(wj,{value:r.effort.cheapModel,models:t,label:fj.cheap,none:!0,onChange:e=>void n({classifier:{effort:{cheapModel:e}}})})})]})})}function Lj(){let{theme:e,setTheme:t}=CA();return(0,B.jsx)(lE,{title:UA.appearance,children:(0,B.jsx)(Sj,{label:pj.themeLabel,help:pj.appearanceHelp,children:(0,B.jsx)(Cj,{value:e,items:pj.themeItems.map(e=>({value:e.id,label:e.label})),label:pj.themeLabel,onChange:e=>t(e)})})})}function Rj(){let e=TT(),t=async e=>{if(!e)return DT();let t=await ET();t===`granted`?ce.success(pj.notificationsOn):ce.error(t===`unsupported`?pj.notificationsUnsupported:pj.notificationsBlocked)};return(0,B.jsx)(lE,{title:UA.notifications,children:(0,B.jsx)(Tj,{label:pj.notificationsLabel,help:pj.notificationsHelp,checked:e,onChange:e=>void t(e)})})}function zj(){let{available:e,install:t}=y();return(0,B.jsx)(lE,{title:UA.install,children:(0,B.jsx)(Sj,{label:pj.installLabel,help:pj.installHelp,children:e?(0,B.jsx)(q,{type:`button`,className:`h-10`,onClick:()=>void t().then(()=>ce.success(pj.installDone)),children:pj.installButton}):(0,B.jsx)(`p`,{className:`py-2 text-xs text-muted-foreground`,children:pj.installUnavailable})})})}function Bj({config:e,models:t,onConfig:n}){let r=async e=>{try{return n((await tm(`settings.set`,{patch:e})).config),ce.success(pj.saved),!0}catch(e){return ce.error(e instanceof Error?e.message:`That did not work. Try again.`),!1}};return(0,B.jsxs)(`div`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-6 p-4`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`h1`,{className:`text-lg font-medium`,children:pj.title}),(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:pj.intro})]}),(0,B.jsx)(lE,{title:UA.agents,children:(0,B.jsx)(`div`,{className:`flex flex-col gap-3`,children:jA.map(n=>(0,B.jsx)(jj,{kind:n,config:e,models:t,save:r},n))})}),(0,B.jsx)(Pj,{config:e,save:r}),(0,B.jsx)(Fj,{config:e,save:r}),(0,B.jsx)(Ij,{config:e,models:t,save:r}),(0,B.jsx)(Lj,{}),(0,B.jsx)(Rj,{}),(0,B.jsx)(zj,{})]})}function Vj(){return(0,B.jsx)(`div`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-4 p-4`,role:`status`,"aria-label":pj.loading,children:[0,1,2,3].map(e=>(0,B.jsx)(`div`,{className:`h-48 rounded-xl bg-muted motion-safe:animate-pulse`},e))})}function Hj(){let e=RT(`settings.get`,{},[]),[t,n]=(0,m.useState)();return(0,m.useEffect)(()=>{e.data&&n(e.data.config)},[e.data]),!t&&e.error?(0,B.jsx)(ym,{message:`${pj.loadFailed} ${e.error}`,onRetry:e.reload}):t?(0,B.jsx)(Bj,{config:t,models:e.data?.models??[],onConfig:n}):(0,B.jsx)(Vj,{})}function Uj({questions:e}){return(0,B.jsx)(`ol`,{className:`flex flex-col gap-3`,children:e.map((e,t)=>(0,B.jsxs)(`li`,{className:`flex flex-col gap-1 text-sm`,children:[(0,B.jsxs)(`p`,{children:[(0,B.jsxs)(`span`,{className:`tabular-nums text-muted-foreground`,children:[String(t+1).padStart(2,`0`),`. `]}),(0,B.jsx)(`span`,{className:z(`font-medium`,BO(e.from)),children:e.from}),` `,e.text]}),(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5 pl-6 text-muted-foreground`,children:e.options.map(e=>(0,B.jsxs)(`li`,{children:[`○ `,e.label,e.description?` — ${e.description}`:``]},e.label))})]},t))})}function Wj({message:e}){return(0,B.jsx)(B.Fragment,{children:(e.decided??[]).map((e,t)=>(0,B.jsxs)(`p`,{className:`text-sm`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`✓ `}),(0,B.jsxs)(`span`,{className:z(`font-medium`,BO(e.from)),children:[`[`,e.from,`]`]}),` `,e.question,` → `,(0,B.jsx)(`strong`,{children:e.answer}),` `,(0,B.jsxs)(`span`,{className:`text-muted-foreground`,children:[`· decided by the classifier (`,e.probability.toFixed(2),`); comment on the plan to overrule`]})]},t))})}function Gj({message:e}){let t=e.at>0?qT(e.at):``;if(e.role===`you`)return(0,B.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[(0,B.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[t,` You ●`]}),(0,B.jsx)(`div`,{className:`max-w-[85%] rounded-lg bg-primary/10 px-3 py-2`,children:(0,B.jsx)(Ew,{text:e.text})})]});let n=e.questions??[];return(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`◆ Panel `,t]}),n.length>0?(0,B.jsx)(Uj,{questions:n}):(0,B.jsx)(Ew,{text:e.text}),(0,B.jsx)(Wj,{message:e})]})}function Kj({messages:e,seed:t}){return(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,role:`log`,"aria-label":`Panel conversation`,children:[t?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t}):null,e.map((e,t)=>(0,B.jsx)(Gj,{message:e},`${e.at}-${t}`))]})}var qj=`ORACLE`,Jj=`No draft yet.`,Yj=`The draft appears after the panel's first round.`,Xj=`What each seat needs`,Zj=[`backend`,`designer`,`qa`,`researcher`],Qj={backend:`DEV`,designer:`DESIGN`,qa:`QA`,researcher:`RESEARCH`};function $j(e){return`Describe a task below and the panel questions you until the plan is clear${e>0?` (at most ${e} rounds; the last one the oracle settles alone)`:``}.`}function eM(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 tM(e,t){return`${e} ${t}${e===1?``:`s`}`}function nM(e){return e.round===0&&e.messages.length===0&&!e.busy}function rM(e){let t=e.members.find(e=>e.status===`failed`);if(t)return(t.error??`${Qj[t.member]} failed`).split(`
|
|
78
|
-
`)[0]}function iM(e){let t=[],n=rM(e);return e.busy?t.push(eM(e.round,e.limit)):n?t.push(`✗ ${n} — Retry runs the round again`):e.questions.length>0&&t.push(`● ${tM(e.questions.length,`question`)} waiting`),!e.busy&&e.round>0&&t.push(eM(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 aM(e,t){let n=Qj[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`:tM(o,`question`)}}function oM(e){let t=e.questions.filter(e=>e.from===qj).length;return[{label:qj,seated:!0,working:e.busy,text:e.busy?`chairing`:t?tM(t,`question`):`·`},...Zj.map(t=>aM(t,e))]}function sM(e){let t=!1;return e.split(`
|
|
79
|
-
`).map(e=>{let n=e.trimStart().startsWith("```");return n&&(t=!t),{text:e,fenced:t||n}})}function cM({notes:e}){return(0,B.jsx)(B.Fragment,{children:e.map((e,t)=>(0,B.jsxs)(`p`,{className:`pl-6 text-sm text-foreground italic`,children:[`↳ `,e]},t))})}function lM({row:e,notes:t,onComment:n}){let r=e.text.trim(),i=()=>n(r);return(0,B.jsxs)(`li`,{children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-1`,children:[(0,B.jsx)(`span`,{className:`w-5 shrink-0 pt-2 text-center text-sm text-foreground`,"aria-hidden":`true`,children:t.length>0?`◆`:``}),(0,B.jsx)(`div`,{className:z(`min-w-0 flex-1 cursor-pointer rounded-md py-1.5 hover:bg-muted/60`,e.fenced&&`font-mono text-sm whitespace-pre-wrap break-words`),onClick:e=>!e.target.closest(`a`)&&i(),children:e.fenced?e.text:(0,B.jsx)(Ew,{text:e.text})}),(0,B.jsx)(q,{type:`button`,variant:`ghost`,className:`size-10 shrink-0`,"aria-label":`Comment on this line: ${r}`,onClick:i,children:(0,B.jsx)(yp,{"aria-hidden":`true`})})]}),(0,B.jsx)(cM,{notes:t})]})}function uM({draft:e,comments:t,onComment:n}){return(0,B.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`Draft plan lines`,children:sM(e).map((e,r)=>e.text.trim()?(0,B.jsx)(lM,{row:e,notes:t.get(e.text.trim())??[],onComment:n},r):(0,B.jsx)(`li`,{"aria-hidden":`true`,className:`h-2`},r))})}function dM({notes:e}){return e.length===0?null:(0,B.jsx)(lE,{title:Xj,children:(0,B.jsx)(`dl`,{className:`flex flex-col gap-2 text-sm`,children:e.map((e,t)=>(0,B.jsxs)(`div`,{className:`flex gap-3`,children:[(0,B.jsx)(`dt`,{className:z(`w-20 shrink-0 font-medium`,BO(e.from)),children:e.from}),(0,B.jsx)(`dd`,{className:`min-w-0 flex-1`,children:(0,B.jsx)(Ew,{text:e.text})})]},t))})})}function fM({cell:e,intro:t}){let n=t?e.member?e.seated?`seated`:`not seated`:`chairs`:e.text;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z(`font-medium`,e.seated?BO(e.label):`text-muted-foreground`),children:e.label}),e.working&&!t?(0,B.jsx)(_m,{className:`size-3.5`,"aria-hidden":`true`}):null,(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:n})]})}function pM({cell:e,intro:t,onToggled:n}){let{member:r}=e,i=`inline-flex min-h-10 items-center gap-2 rounded-lg border px-3 text-sm`;if(!r)return(0,B.jsx)(`li`,{className:z(i,`border-border`),children:(0,B.jsx)(fM,{cell:e,intro:t})});let a=async()=>{await $(`planner.toggleSeat`,{member:r})&&n()};return(0,B.jsx)(`li`,{children:(0,B.jsx)(q,{type:`button`,variant:`ghost`,"aria-pressed":e.seated,onClick:()=>void a(),className:z(i,`h-auto font-normal`,e.seated?`border-border bg-muted/50`:`border-dashed`),children:(0,B.jsx)(fM,{cell:e,intro:t})})})}function mM({cells:e,intro:t,onToggled:n}){return(0,B.jsx)(`ul`,{"aria-label":`Panel`,className:`flex flex-wrap gap-2`,children:e.map(e=>(0,B.jsx)(pM,{cell:e,intro:t,onToggled:n},e.label))})}function hM({snap:e}){let t=iM(e),n=!e.busy&&t[0]?.startsWith(`✗`);return(0,B.jsxs)(`p`,{role:`status`,className:n?`flex items-center gap-2 text-sm text-destructive`:`flex items-center gap-2 text-sm text-muted-foreground`,children:[e.busy?(0,B.jsx)(_m,{className:`size-3.5`,"aria-hidden":`true`}):null,t.join(` · `)]})}function gM({snap:e,onDone:t}){let n=e=>async()=>{await $(e,{})&&t()};return(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.questions.length>0&&!e.busy?(0,B.jsx)(q,{className:`h-10`,onClick:()=>void n(`planner.answer`)(),children:`Answer questions`}):null,e.retryable?(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void n(`planner.retry`)(),children:`Retry`}):null,(0,B.jsx)(q,{variant:`outline`,className:`h-10`,disabled:!e.draft||e.busy,onClick:()=>void n(`planner.save`)(),children:`Save`}),(0,B.jsx)(cE,{label:`New plan`,title:`Start a new plan?`,description:`The conversation and the draft are left behind. Saved plans are not touched.`,confirmLabel:`New plan`,onConfirm:()=>void $(`planner.new`,{}).then(t)})]})}function _M({snap:e,onDone:t}){return(0,B.jsxs)(`header`,{className:`flex flex-col gap-3`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,B.jsx)(`h2`,{className:`text-base font-medium`,children:`Planning`}),(0,B.jsx)(hM,{snap:e})]}),(0,B.jsx)(gM,{snap:e,onDone:t})]}),(0,B.jsx)(mM,{cells:oM(e),intro:!1,onToggled:t})]})}function vM({line:e,onClose:t,onSent:n}){return(0,B.jsx)(Ip,{open:e!==void 0,onOpenChange:e=>!e&&t(),children:(0,B.jsxs)(Bp,{side:`bottom`,className:`mx-auto max-h-[80svh] w-full max-w-2xl gap-3 p-4`,children:[(0,B.jsxs)(Vp,{className:`p-0`,children:[(0,B.jsx)(Hp,{children:`Comment on this line`}),(0,B.jsx)(Up,{className:`line-clamp-3 break-words`,children:e})]}),(0,B.jsx)(tD,{label:`Your comment`,hint:`Enter adds the comment · Esc cancels`,buttonLabel:`Add comment`,onSend:async r=>e===void 0||!await $(`planner.commentLine`,{line:e,text:r.trim()})?!1:(n(e,r.trim()),t(),!0)})]})})}function yM(e){let t=(0,m.useRef)(null);return(0,m.useEffect)(()=>{let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[e]),t}function bM({snap:e,onDone:t}){return(0,B.jsxs)(VT,{className:`flex flex-col gap-4 p-4`,children:[(0,B.jsx)(`h2`,{className:`text-base font-medium`,children:`Plan`}),(0,B.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:$j(e.limit)}),(0,B.jsx)(mM,{cells:oM(e),intro:!0,onToggled:t})]})}function xM({snap:e,wide:t}){let n=yM(e.messages.length);return(0,B.jsxs)(VT,{className:`flex flex-col`,children:[(0,B.jsx)(`h2`,{className:`border-b px-3 py-2 text-base font-medium`,children:`Conversation`}),(0,B.jsx)(`div`,{ref:n,className:z(`min-h-0 overflow-y-auto p-4`,t?`flex-1`:`max-h-[45svh]`),children:(0,B.jsx)(Kj,{messages:e.messages})})]})}function SM({snap:e,comments:t,onComment:n}){return(0,B.jsxs)(VT,{className:`flex flex-col`,children:[(0,B.jsx)(`h2`,{className:`border-b px-3 py-2 text-base font-medium`,children:`Draft plan`}),(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[e.draft?(0,B.jsx)(uM,{draft:e.draft,comments:t,onComment:n}):(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.busy?Yj:Jj}),(0,B.jsx)(dM,{notes:e.notes})]})]})}function CM({fresh:e,onSent:t}){return(0,B.jsx)(VT,{className:`shrink-0 p-3`,children:(0,B.jsx)(tD,{label:e?`Describe a task`:`Message the panel`,hint:`Enter sends · Shift+Enter adds a line`,buttonLabel:`Send to the panel`,onSend:async e=>{let n=await $(`planner.send`,{text:e});return n&&t(),n!==void 0}})})}function wM({snap:e,reload:t}){let n=BT(),[r,i]=(0,m.useState)(),[a,o]=(0,m.useState)(new Map);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(_M,{snap:e,onDone:t}),(0,B.jsxs)(`div`,{className:n?`grid min-h-0 flex-1 grid-cols-[minmax(0,46fr)_minmax(0,54fr)] grid-rows-[minmax(0,1fr)] gap-3`:`flex flex-col gap-3`,children:[(0,B.jsx)(xM,{snap:e,wide:n}),(0,B.jsx)(SM,{snap:e,comments:a,onComment:i})]}),(0,B.jsx)(vM,{line:r,onClose:()=>i(void 0),onSent:(e,t)=>o(n=>new Map(n).set(e,[...n.get(e)??[],t]))})]})}function TM(){let e=RT(`planner.get`,{},[`planner`]),t=e.data;if(!t&&e.error)return(0,B.jsx)(ym,{message:`Could not load the plan. ${e.error}`,onRetry:e.reload});if(!t)return(0,B.jsx)(`p`,{role:`status`,className:`p-4 text-sm text-muted-foreground`,children:`Loading the plan…`});let n=nM(t);return(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-4`,children:[n?(0,B.jsx)(bM,{snap:t,onDone:e.reload}):(0,B.jsx)(wM,{snap:t,reload:e.reload}),(0,B.jsx)(CM,{fresh:n,onSent:e.reload})]})}var EM=`Describe a small change below and one agent makes it now, beside any running task.`,DM={queued:`…`,running:``,success:`✓`,failed:`✗`,timeout:`✗`,cancelled:`·`,held:`‖`};function OM(e){return e.prompt.split(`
|
|
80
|
-
`).find(e=>e.trim())?.trim()??`(empty)`}function kM(e){return[...e].reverse()}function AM(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 jM(e,t){return e.startedAt?AM((e.finishedAt??t)-e.startedAt):``}function MM(e,t){let n=e.model?`${e.model}${e.thinking?` · ${e.thinking}`:``}`:e.thinking??``;return[e.status,jM(e,t),n,e.tools?`${e.tools} tool${e.tools===1?``:`s`}`:``,e.usage?.cost?`$${e.usage.cost.toFixed(2)}`:``].filter(Boolean).join(` · `)}function NM(e){return e===`queued`?`Waiting for the quick fix ahead of it.`:e===`running`?`starting…`:e===`held`?`Not started.`:`No tool calls.`}function PM({job:e}){let t=e.status===`held`;return(0,B.jsxs)(B.Fragment,{children:[e.route?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`↓ routed `,e.route]}):null,e.note&&t?(0,B.jsxs)(`p`,{className:`text-sm text-foreground`,children:[`‖ Held: `,e.note,`.`]}):null,e.note&&!t?(0,B.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,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Routed here by the oracle.`}):null]})}function FM({job:e}){let t=e.status===`running`;return e.steps.length===0?(0,B.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[t?(0,B.jsx)(_m,{className:`size-3.5`}):null,NM(e.status)]}):(0,B.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.steps.map((e,n)=>(0,B.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:qT(e.at)}),(0,B.jsx)(`span`,{className:`flex h-5 w-3.5 shrink-0 items-center justify-center`,"aria-hidden":`true`,children:e.pending&&t?(0,B.jsx)(_m,{className:`size-3.5`}):`·`}),(0,B.jsx)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:e.pending&&t?`${e.text}…`:e.text})]},n))})}function IM({job:e}){return e.status===`held`?(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,B.jsx)(q,{className:`h-10`,onClick:()=>void $(`quickfix.runAnyway`,{id:e.id}),children:`Run anyway`}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void $(`quickfix.movedToTask`,{id:e.id}),children:`As a task`})]}):e.status!==`queued`&&e.status!==`running`?null:(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,B.jsx)(cE,{label:`Cancel`,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 $(`quickfix.cancel`,{id:e.id})})})}function LM({job:e,now:t}){return(0,B.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Quick fix detail`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id}),(0,B.jsx)(`p`,{className:`text-sm text-foreground`,children:MM(e,t)})]}),(0,B.jsx)(IM,{job:e}),(0,B.jsx)(Ew,{text:e.prompt}),(0,B.jsx)(PM,{job:e}),(0,B.jsx)(lE,{title:`Steps`,children:(0,B.jsx)(FM,{job:e})}),e.files?.length?(0,B.jsx)(lE,{title:`Edited`,children:(0,B.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.files.map(e=>(0,B.jsxs)(`li`,{className:`break-all`,children:[`· `,e]},e))})}):null,e.error?(0,B.jsxs)(`p`,{className:`text-sm text-destructive`,children:[`✗ `,e.error]}):null,e.report?(0,B.jsx)(lE,{title:`Report`,children:(0,B.jsx)(Ew,{text:e.report})}):null]})}function RM({status:e}){return e===`running`?(0,B.jsx)(_m,{className:`size-3.5`,"aria-label":`running`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:DM[e]}),(0,B.jsx)(`span`,{className:`sr-only`,children:e})]})}function zM({job:e,selected:t,now:n,onSelect:r}){let i=jM(e,n);return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>r(e.id),className:`flex min-h-11 w-full items-start gap-2 rounded-lg px-3 py-2 text-left text-sm outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=true]:bg-muted aria-[current=true]:ring-2 aria-[current=true]:ring-inset aria-[current=true]:ring-ring`,children:[(0,B.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center text-foreground`,children:(0,B.jsx)(RM,{status:e.status})}),(0,B.jsx)(`span`,{className:z(`min-w-0 flex-1 break-words`,t?`font-medium text-foreground`:`text-foreground`),children:OM(e)}),i?(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:i}):null]})})}function BM({jobs:e,selectedId:t,now:n,onSelect:r}){return(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5 p-1`,children:e.map(e=>(0,B.jsx)(zM,{job:e,selected:e.id===t,now:n,onSelect:r},e.id))})}function VM({onSent:e}){return(0,B.jsx)(VT,{className:`mx-4 mb-4 shrink-0 p-3`,children:(0,B.jsx)(tD,{label:`Describe a small change`,hint:`Enter sends · Shift+Enter adds a line`,onSend:async t=>{let n=await $(`quickfix.submit`,{text:t});return n&&e(),n!==void 0}})})}var HM=()=>IT(FT(`quickfix`)),UM=e=>IT(FT(`quickfix`,e));function WM(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 GM(){return(0,B.jsx)(pm,{className:`m-4 flex-1 border border-border bg-card`,children:(0,B.jsx)(mm,{children:(0,B.jsx)(gm,{className:`font-medium text-foreground`,children:EM})})})}function KM({id:e}){let t=BT(),n=RT(`quickfix.list`,{},[`quickfix`]),r=kM(n.data?.jobs??[]),i=WM(r.some(e=>e.status===`running`));if(!n.data&&n.error)return(0,B.jsx)(ym,{message:`Could not load quick fixes. ${n.error}`,onRetry:n.reload});let a=n.data&&r.length===0?(0,B.jsx)(GM,{}):(0,B.jsx)(qM,{id:e,wide:t,loaded:!!n.data,jobs:r,now:i});return(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[a,(0,B.jsx)(VM,{onSent:n.reload})]})}function qM({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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(WT,{title:`Quick fixes`,count:String(r.length)}),n?(0,B.jsx)(BM,{jobs:r,selectedId:a,now:i,onSelect:UM}):(0,B.jsx)(GT,{})]});return(0,B.jsx)(UT,{wide:t,list:s,detail:o?(0,B.jsx)(LM,{job:o,now:i}):e?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That quick fix is not on the list any more.`}):null,open:!!e,onClose:HM,hint:`Select a quick fix to see its steps.`,describe:`Quick fix detail`})}function JM({entry:e}){let t=e.at?qT(e.at):``;if(e.role===`note`)return(0,B.jsxs)(`li`,{className:`text-center text-xs text-muted-foreground`,children:[e.text,t?` · ${t}`:``]});let n=e.role===`you`;return(0,B.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[t,` `,n?`You ●`:`◆ Oracle`]}),(0,B.jsx)(Ew,{text:e.text})]})}function YM({entries:e,more:t,loading:n,onMore:r,empty:i}){return(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t?(0,B.jsx)(q,{variant:`outline`,className:`h-10 self-center`,disabled:n,onClick:r,children:`Load earlier messages`}):null,e.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i}):(0,B.jsx)(`ol`,{"aria-label":`Conversation`,className:`flex flex-col gap-3`,children:e.map(e=>(0,B.jsx)(JM,{entry:e},e.id))})]})}function XM({address:e,empty:t}){let n=RT(`sessions.chat`,e,[`sessions`]),[r,i]=(0,m.useState)(),[a,o]=(0,m.useState)(!1),s=n.data?.entries??[],c=new Set(s.map(e=>e.id)),l=[...(r?.entries??[]).filter(e=>!c.has(e.id)),...s],u=async()=>{let t=l[0];if(!t)return;o(!0);let n=await $(`sessions.chat`,{...e,before:t.id});n&&i({entries:[...n.entries,...r?.entries??[]],more:n.hasOlder}),o(!1)},d=r?.more??n.data?.hasOlder??!1;return(0,B.jsx)(YM,{entries:l,more:d,loading:a,onMore:()=>void u(),empty:n.loading&&!n.data?`Loading the conversation…`:t})}var ZM={"this window":`THIS WINDOW`,background:`BACKGROUND`,"other terminal":`OTHER TERMINALS`},QM={"this window":`●`,background:`◆`,"other terminal":`◇`},$M=[`this window`,`background`,`other terminal`],eN=`Nothing said yet.`,tN=`This session runs in another terminal: its conversation shows here and your messages reach its oracle within seconds, but live activity only streams from sessions started in this window.`,nN=`No other sessions. Start one below.`,rN=`Start a task in a new session`;function iN(e,t,n){let r=t?.task;return{id:`here`,where:`this window`,name:e?.sessionName??r?.title??`unnamed session`,status:e?.busy?`working`:r?.state??`no task`,waiting:n,alive:!0,dialogs:[],...r?{task:r}:{}}}function aN(e){let t=e.status===`exited`?`ended`:e.status===`starting`?`starting`:e.busy?`working`:`idle`;return{id:e.key,where:`background`,name:e.name,status:t,waiting:e.dialogs.length,key:e.key,alive:e.alive,dialogs:e.dialogs,...e.sessionId?{sessionId:e.sessionId}:{}}}function oN(e){return{id:e.sessionId,where:`other terminal`,name:e.name??`unnamed session`,status:`running`,waiting:0,pid:e.pid,sessionId:e.sessionId,alive:!0,dialogs:[]}}function sN(e,t,n,r,i){let a=new Set([e?.sessionId,...r.map(e=>e.sessionId)].filter(e=>!!e)),o=i.filter(e=>!a.has(e.sessionId));return[iN(e,t,n),...r.map(aN),...o.map(oN)]}function cN(e){return`● ${e} question${e===1?``:`s`} waiting for you`}function lN(e){return e.status===`starting`?`starting ${e.name}…`:e.alive?`${e.name} has not said anything yet.`:`${e.name} has ended.`}function uN(e){return[e.where,e.status.replace(/_/g,` `),e.pid?`pid ${e.pid}`:``].filter(Boolean).join(` · `)}function dN(e){return e.key?{key:e.key}:e.sessionId?{sessionId:e.sessionId}:void 0}function fN({options:e,send:t}){return(0,B.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void t({value:e}),children:e},e))})}function pN({dialog:e,send:t}){let n=(0,m.useId)(),[r,i]=(0,m.useState)(e.prefill??``);return(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`label`,{htmlFor:n,className:`sr-only`,children:e.title}),(0,B.jsx)(Jp,{id:n,rows:e.method===`editor`?4:2,value:r,placeholder:e.placeholder,onChange:e=>i(e.target.value)}),(0,B.jsx)(q,{className:`h-10 self-end`,disabled:!r.trim(),onClick:()=>void t({value:r.trim()}),children:`Send answer`})]})}function mN({dialog:e,send:t}){return e.method===`select`?(0,B.jsx)(fN,{options:e.options??[],send:t}):e.method===`confirm`?(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,B.jsx)(q,{className:`h-10`,onClick:()=>void t({confirmed:!0}),children:`Yes`}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void t({confirmed:!1}),children:`No`})]}):(0,B.jsx)(pN,{dialog:e,send:t})}function hN({sessionKey:e,dialog:t,onAnswered:n}){let r=async r=>{await $(`sessions.answer`,{key:e,dialogId:t.id,answer:r})&&n()};return(0,B.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-border p-3`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:t.title}),t.message?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t.message}):null]}),(0,B.jsx)(mN,{dialog:t,send:r}),(0,B.jsx)(q,{variant:`ghost`,className:`h-10 self-start text-muted-foreground`,onClick:()=>void r({cancelled:!0}),children:`Put it away`})]})}function gN({sessionKey:e,dialogs:t,onAnswered:n}){return t.length===0?null:(0,B.jsxs)(`section`,{"aria-label":`Questions waiting`,className:`flex flex-col gap-2`,children:[(0,B.jsx)(`p`,{role:`status`,className:`text-sm font-medium text-foreground`,children:cN(t.length)}),t.map(t=>(0,B.jsx)(hN,{sessionKey:e,dialog:t,onAnswered:n},t.id))]})}function _N({task:e}){let t=e.progress;return(0,B.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2 text-sm text-muted-foreground`,children:[(0,B.jsx)(`span`,{className:`break-all`,children:e.id}),t&&t.total>0?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(yk,{done:t.done,total:t.total}),(0,B.jsxs)(`span`,{className:`tabular-nums`,children:[t.done,`/`,t.total]})]}):null]})}function vN({entry:e}){let{key:t}=e;return e.where===`this window`?(0,B.jsx)(q,{className:`h-10 self-start`,onClick:()=>IT(`#/lobby`),children:`Back to this window`}):t?(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,B.jsx)(q,{className:`h-10`,onClick:()=>void $(`sessions.switch`,{key:t}),children:`Move here`}),(0,B.jsx)(cE,{label:`Stop`,title:`Stop ${e.name}?`,description:`Its process ends. The task keeps its state and can be resumed in this window.`,confirmLabel:`Stop session`,variant:`destructive`,disabled:!e.alive,onConfirm:()=>void $(`sessions.stop`,{key:t})})]}):null}function yN({entry:e,onSent:t}){let n=dN(e);return!n||!e.alive?null:(0,B.jsx)(tD,{label:`Message ${e.name}`,hint:`Enter sends · Shift+Enter adds a line`,onSend:async e=>{let r=await $(`sessions.message`,{...n,text:e});return r&&t(),r!==void 0}})}function bN({entry:e,lobby:t}){let n=dN(e);return e.where===`this window`?(0,B.jsx)(YM,{entries:t?.chat??[],more:!1,empty:eN}):n?(0,B.jsx)(XM,{address:n,empty:e.where===`other terminal`?`Nothing said in this session yet.`:lN(e)},e.id):(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:eN})}function xN({entry:e,lobby:t,onChanged:n}){return(0,B.jsxs)(`article`,{"aria-label":`Session detail`,className:`flex flex-col gap-4`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`h3`,{className:`text-base font-medium text-foreground`,children:[(0,B.jsxs)(`span`,{"aria-hidden":`true`,children:[QM[e.where],` `]}),e.name]}),(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:uN(e)}),e.task?(0,B.jsx)(_N,{task:e.task}):null,e.where!==`background`&&e.waiting>0?(0,B.jsx)(`p`,{className:`text-sm text-foreground`,children:cN(e.waiting)}):null]}),(0,B.jsx)(vN,{entry:e}),e.where===`other terminal`?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:tN}):null,e.key?(0,B.jsx)(gN,{sessionKey:e.key,dialogs:e.dialogs,onAnswered:n}):null,(0,B.jsx)(lE,{title:`Conversation`,children:(0,B.jsx)(bN,{entry:e,lobby:t})}),(0,B.jsx)(yN,{entry:e,onSent:n})]})}function SN({entry:e,selected:t,onSelect:n}){return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:`flex min-h-11 w-full items-start gap-2 rounded-lg px-3 py-2 text-left text-sm outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=true]:bg-muted aria-[current=true]:ring-2 aria-[current=true]:ring-inset aria-[current=true]:ring-ring`,children:[(0,B.jsx)(`span`,{className:`w-4 shrink-0 text-center text-foreground`,"aria-hidden":`true`,children:QM[e.where]}),(0,B.jsx)(`span`,{className:z(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.name}),(0,B.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[e.status===`working`||e.status===`starting`?(0,B.jsx)(_m,{className:`size-3`,"aria-hidden":`true`}):null,e.status.replace(/_/g,` `),e.waiting>0?(0,B.jsxs)(`span`,{className:`font-medium text-foreground`,children:[`● `,e.waiting]}):null]})]})})}function CN({where:e,entries:t,selectedId:n,onSelect:r}){return(0,B.jsxs)(`section`,{"aria-label":ZM[e],className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`h3`,{className:`flex items-center justify-between px-3 pt-2 text-xs font-medium tracking-wide text-muted-foreground`,children:[(0,B.jsx)(`span`,{children:ZM[e]}),(0,B.jsx)(`span`,{className:`tabular-nums`,children:t.length})]}),(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:t.map(e=>(0,B.jsx)(SN,{entry:e,selected:e.id===n,onSelect:r},e.id))})]})}function wN({entries:e,selectedId:t,onSelect:n}){return(0,B.jsx)(`div`,{className:`flex flex-col gap-2 p-1`,children:$M.map(r=>{let i=e.filter(e=>e.where===r);return i.length>0?(0,B.jsx)(CN,{where:r,entries:i,selectedId:t,onSelect:n},r):null})})}var TN=()=>IT(`#/sessions`),EN=e=>IT(`#/sessions/${encodeURIComponent(e)}`);function DN({windows:e}){return e.length===0?null:(0,B.jsx)(`div`,{className:`px-3 pb-3`,children:(0,B.jsx)(lE,{title:`Other windows`,children:(0,B.jsx)(`ul`,{className:`flex flex-col`,children:e.map(e=>(0,B.jsx)(`li`,{children:(0,B.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex min-h-10 items-center rounded-md px-2 text-sm text-foreground underline underline-offset-4 hover:bg-muted`,children:e.name})},e.url))})})})}function ON({onStarted:e}){return(0,B.jsx)(VT,{className:`mx-4 mb-4 shrink-0 p-3`,children:(0,B.jsx)(tD,{label:rN,hint:`Enter starts it · Shift+Enter adds a line`,buttonLabel:`Start session`,onSend:async t=>{let n=await $(`sessions.start`,{request:t});return n?(e(),n.key&&EN(n.key),!0):!1}})})}function kN(){return(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That session is not on the list any more.`})}function AN({id:e}){let t=BT(),n=Zp(`status`).data,r=Zp(`lobby`).data,i=Zp(`prompts`).data?.prompts.length??0,a=RT(`sessions.list`,{},[`sessions`]);if(!a.data&&a.error)return(0,B.jsx)(ym,{message:`Could not load sessions. ${a.error}`,onRetry:a.reload});let o=sN(n,r,i,a.data?.background??[],a.data?.live??[]),s=e??(t?o[0]?.id:void 0),c=o.find(e=>e.id===s),l=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(WT,{title:`Sessions`,count:String(o.length)}),a.data?(0,B.jsx)(wN,{entries:o,selectedId:s,onSelect:EN}):(0,B.jsx)(GT,{}),a.data&&o.length===1?(0,B.jsx)(`p`,{className:`px-4 pb-3 text-sm text-muted-foreground`,children:nN}):null,(0,B.jsx)(DN,{windows:n?.windows??[]})]}),u=c?(0,B.jsx)(xN,{entry:c,lobby:r,onChanged:a.reload},c.id):e?(0,B.jsx)(kN,{}):null;return(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,B.jsx)(UT,{wide:t,list:l,detail:u,open:!!e,onClose:TN,hint:`Select a session to see its conversation.`,describe:`Session detail`}),(0,B.jsx)(ON,{onStarted:a.reload})]})}var jN={open:`○`,delivered:`◐`,addressed:`✓`},MN={open:`waiting for the owning session`,delivered:`sent to the oracle`,addressed:`plan amended`};function NN({comment:e}){let t=XT(Date.now()-Date.parse(e.createdAt));return(0,B.jsxs)(`li`,{className:`flex gap-2`,children:[(0,B.jsx)(`span`,{className:`shrink-0 text-foreground`,"aria-hidden":`true`,children:jN[e.status]}),(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(Ew,{text:e.text}),(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`— `,MN[e.status],`, `,t]})]})]})}function PN({taskId:e,finished:t,canComment:n}){let r=RT(`tasks.comments`,{taskId:e},[`tasks`]),i=r.data?.comments??[],a=i.filter(e=>e.status!==`addressed`).length;return(0,B.jsxs)(`section`,{"aria-labelledby":`comments-${e}`,className:`flex flex-col gap-3`,children:[(0,B.jsxs)(`h3`,{id:`comments-${e}`,className:`flex items-center justify-between border-b pb-1 text-sm font-medium`,children:[(0,B.jsx)(`span`,{children:`Comments`}),a>0?(0,B.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[a,` open`]}):null]}),i.length===0?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`No comments.`:`No comments yet — comment on the plan below; the oracle amends it.`}):(0,B.jsx)(`ul`,{className:`flex flex-col gap-3`,children:i.map(e=>(0,B.jsx)(NN,{comment:e},e.id))}),n?(0,B.jsx)(tD,{label:`Comment on the plan`,buttonLabel:`Add comment`,onSend:async t=>{let n=await $(`tasks.comment`,{taskId:e,text:t});return r.reload(),n!==void 0}}):null]})}var FN=`☑`,IN=`☐`;function LN({step:e,index:t}){let n=e.status===`done`?FN:IN,r=e.status===`done`?`text-primary`:e.status===`current`?`text-foreground`:`text-muted-foreground`;return(0,B.jsxs)(`li`,{className:`flex items-start gap-2 text-sm`,children:[(0,B.jsx)(`span`,{className:`shrink-0 ${r}`,"aria-hidden":`true`,children:n}),(0,B.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,B.jsx)(`span`,{className:e.status===`current`?`min-w-0 break-words text-foreground`:`min-w-0 break-words text-muted-foreground`,children:e.text}),e.status===`current`?(0,B.jsxs)(`span`,{className:`shrink-0 font-medium text-primary`,children:[`◂ now`,(0,B.jsx)(`span`,{className:`sr-only`,children:` (current step)`})]}):null]})}function RN({steps:e}){let t=e.filter(e=>e.status===`done`).length;return(0,B.jsx)(lE,{title:`Progress`,right:`${t}/${e.length} steps`,children:(0,B.jsx)(`ol`,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,B.jsx)(LN,{step:e,index:t},`${t}-${e.text}`))})})}function zN({detail:e,finished:t}){return e.plan?(0,B.jsx)(lE,{title:`Approved plan`,children:(0,B.jsx)(Ew,{text:e.plan})}):e.proposal?(0,B.jsx)(lE,{title:t?`Proposal`:`Proposal (no plan yet)`,children:(0,B.jsx)(Ew,{text:e.proposal})}):(0,B.jsx)(lE,{title:`Plan`,children:(0,B.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 BN({amendments:e}){return e.length===0?null:(0,B.jsx)(lE,{title:`Amendments`,children:(0,B.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,children:e.map(e=>(0,B.jsx)(`li`,{className:`break-words`,children:e},e))})})}function VN({detail:e}){return e.waiting.length===0&&e.blockers.length===0?null:(0,B.jsx)(lE,{title:`Waiting on`,children:(0,B.jsxs)(`ul`,{className:`flex flex-col gap-1 text-sm`,children:[e.waiting.map((e,t)=>(0,B.jsxs)(`li`,{className:`flex gap-2`,children:[(0,B.jsx)(`span`,{className:`shrink-0 text-primary`,"aria-hidden":`true`,children:`!`}),(0,B.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.kind,` `,e.detail]})]},`${t}-${e.kind}`)),e.blockers.map((e,t)=>(0,B.jsxs)(`li`,{className:`flex gap-2`,children:[(0,B.jsx)(`span`,{className:`shrink-0 text-destructive`,"aria-hidden":`true`,children:`✗`}),(0,B.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.reason,` (needs: `,e.need,`)`]})]},`${t}-${e.reason}`))]})})}function HN({runs:e}){return e.length===0?null:(0,B.jsx)(lE,{title:`Recent runs`,children:(0,B.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.map((e,t)=>(0,B.jsx)(`li`,{className:`break-words`,children:e},`${t}-${e}`))})})}function UN({detail:e,finished:t}){return(0,B.jsxs)(B.Fragment,{children:[e.request?(0,B.jsx)(lE,{title:`Request`,children:(0,B.jsx)(Ew,{text:e.request})}):null,e.steps.length>0?(0,B.jsx)(RN,{steps:e.steps}):null,(0,B.jsx)(zN,{detail:e,finished:t})]})}function WN({detail:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(BN,{amendments:e.amendments}),(0,B.jsx)(VN,{detail:e}),(0,B.jsx)(HN,{runs:e.runs})]})}var GN={mine:`THIS SESSION`,others:`OTHER SESSIONS`,pending:`PENDING`,recent:`FINISHED`,archived:`ARCHIVED`},KN={open:`☐`,done:`☑`,dropped:`☒`},qN={open:`open`,done:`done`,dropped:`abandoned`},JN=`No tasks yet. Start one from the Lobby tab, or plan one in the Plan tab.`;function YN(e,t){return`${e.replace(/_/g,` `)}${t?` · paused`:``}`}function XN(e){return e===`now`?`just now`:`${e} ago`}function ZN(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[YN(e.status,e.paused),e.auto?`⟳ auto`:``,t].filter(Boolean).join(` · `)}function QN(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 $N(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 eP({split:e}){let t=e.after.length>0?`, after ${e.after.map(e=>`part ${e}`).join(` and `)}`:``;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,B.jsxs)(`span`,{className:`text-primary`,children:[`part `,e.part,` of `,e.of]}),` of one plan that was split into tasks`,t?(0,B.jsx)(`span`,{className:`text-foreground`,children:t}):null]}),(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.titles.map((t,n)=>(0,B.jsxs)(`span`,{children:[n>0?(0,B.jsx)(`span`,{className:`text-muted-foreground/60`,children:` · `}):null,(0,B.jsxs)(`span`,{className:n+1===e.part?`font-medium text-foreground`:void 0,children:[n+1,`. `,t]})]},`${n}-${t}`))})]})}function tP({planId:e}){let t=RT(`plans.get`,{planId:e},[`plans`]),n=t.data;return n?(0,B.jsxs)(B.Fragment,{children:[n.issue?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`from issue #`,n.issue.number,` — `,n.issue.title,n.issue.url?(0,B.jsxs)(`span`,{className:`break-all`,children:[` `,n.issue.url]}):null]}):null,n.split?(0,B.jsx)(eP,{split:n.split}):null,(0,B.jsx)(lE,{title:`Agreed plan`,children:(0,B.jsx)(Ew,{text:n.brief})})]}):t.error?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the agreed plan. `,t.error]}):null}function nP({row:e,onGone:t}){let n=async n=>{await $(`plans.start`,{planId:e.id,where:n})&&t()},r=async()=>{await $(`plans.discard`,{planId:e.id})&&t()};return(0,B.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":e.title,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`h2`,{className:`flex gap-2 text-base font-medium`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:KN.open}),(0,B.jsx)(`span`,{className:`min-w-0 break-words`,children:e.title})]}),(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`pending`,e.age?` · saved ${XN(e.age)}`:``]}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),(0,B.jsx)(tP,{planId:e.id}),(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,B.jsx)(q,{className:`h-10`,onClick:()=>void n(`here`),children:`Start here`}),(0,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void n(`session`),children:`Start in a new session`}),(0,B.jsx)(cE,{label:`Discard`,title:`Discard "${e.title}"?`,description:`The saved plan is removed from the list. This cannot be undone.`,confirmLabel:`Discard`,variant:`destructive`,onConfirm:()=>void r()})]})]})}function rP(e){if(e.kind===`archived`)return`archived ${XN(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`} ${XN(e.age)}`:``;return[YN(e.status,e.paused),t?``:n,r].filter(Boolean).join(` · `)}function iP(e){return e?[_k(e.track),e.domains.join(`, `)].filter(Boolean).join(` · `):``}function aP({row:e,task:t}){return e.progress?(0,B.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,B.jsx)(yk,{done:e.progress.done,total:e.progress.total}),(0,B.jsxs)(`span`,{children:[e.progress.done,` of `,e.progress.total,` steps`]}),t?.currentStep?(0,B.jsxs)(`span`,{className:`text-foreground`,children:[t.currentStep,` `,(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`◂ now`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`(current step)`})]}):null]}):null}function oP({row:e,task:t}){let n=t?.git?`⎇ ${t.git.branch}${t.git.from?` · from ${t.git.from}`:``}`:``;return(0,B.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,B.jsxs)(`h2`,{className:`flex gap-2 text-base font-medium`,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:KN[e.check]}),(0,B.jsxs)(`span`,{className:`sr-only`,children:[qN[e.check],`:`]}),(0,B.jsx)(`span`,{className:e.check===`dropped`?`min-w-0 break-words line-through`:`min-w-0 break-words`,children:e.title})]}),(0,B.jsx)(`p`,{className:`text-sm text-foreground`,children:rP(e)}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:[e.id,iP(t)].filter(Boolean).join(` · `)}),n?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n}):null,(0,B.jsx)(aP,{row:e,task:t})]})}function sP({row:e,onGone:t,onChanged:n}){let r=e.id;return{restore:async()=>{await $(`tasks.restore`,{taskId:r},{undo:()=>void $(`tasks.archive`,{taskId:r})})&&t()},archive:async()=>{await $(`tasks.archive`,{taskId:r},{undo:()=>void $(`tasks.restore`,{taskId:r})})&&t()},remove:async()=>{await $(`tasks.delete`,{taskId:r,where:e.kind===`archived`?`archive`:`list`})&&t()},toggleAuto:()=>void $(`tasks.auto`,{taskId:r,on:!e.auto}).then(n)}}function cP({row:e,archive:t}){return e.check===`open`?(0,B.jsx)(cE,{label:`Archive`,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,B.jsx)(q,{variant:`outline`,className:`h-10`,onClick:()=>void t(),children:`Archive`})}function lP(e){let{row:t}=e,{restore:n,archive:r,remove:i,toggleAuto:a}=sP(e),o=t.kind===`archived`;return(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[o?(0,B.jsxs)(q,{variant:`outline`,className:`h-10`,onClick:()=>void n(),children:[(0,B.jsx)(Cp,{"aria-hidden":`true`}),`Restore`]}):null,t.check===`open`&&!o?(0,B.jsxs)(q,{variant:`outline`,className:`h-10`,"aria-pressed":!!t.auto,onClick:a,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`⟳`}),` Auto`]}):null,o?null:(0,B.jsx)(cP,{row:t,archive:r}),(0,B.jsx)(cE,{label:o?`Delete for good`:`Delete`,title:`Delete "${t.title}" for good?`,description:`This cannot be undone.`,confirmLabel:`Delete`,variant:`destructive`,onConfirm:()=>void i()})]})}function uP(e){let{row:t}=e,n=t.kind===`plan`,r=RT(`tasks.get`,{taskId:t.id},[`tasks`],!n),i=Zp(`lobby`).data?.task,a=i?.id===t.id?i:void 0;if(n)return(0,B.jsx)(nP,{row:t,onGone:e.onGone});let o=t.check===`open`&&t.kind===`task`;return(0,B.jsxs)(`article`,{className:`flex flex-col gap-5`,"aria-label":t.title,children:[(0,B.jsx)(oP,{row:t,task:a}),r.data?(0,B.jsx)(UN,{detail:r.data,finished:!o}):null,(0,B.jsx)(PN,{taskId:t.id,finished:!o,canComment:o}),o?(0,B.jsx)(tD,{label:`Message the oracle`,hint:`Left for the oracle that owns this task.`,onSend:async e=>await $(`tasks.message`,{taskId:t.id,text:e})!==void 0}):null,r.data?(0,B.jsx)(WN,{detail:r.data}):null,r.error&&!r.data?(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the plan detail. `,r.error]}):null,(0,B.jsx)(lP,{...e})]})}function dP({row:e}){return e.check===`open`&&e.progress?(0,B.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground tabular-nums`,children:[(0,B.jsx)(yk,{done:e.progress.done,total:e.progress.total}),(0,B.jsxs)(`span`,{children:[e.progress.done,`/`,e.progress.total]})]}):e.age&&e.check!==`open`?(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.age}):null}function fP(e){return e.check===`dropped`?`text-muted-foreground line-through`:e.kind===`archived`||e.check===`done`?`text-muted-foreground`:`text-foreground`}function pP({row:e,selected:t,onSelect:n}){return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:`flex min-h-11 w-full flex-col gap-0.5 rounded-lg px-3 py-2 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 aria-[current=true]:bg-muted aria-[current=true]:ring-2 aria-[current=true]:ring-inset aria-[current=true]:ring-ring`,children:[(0,B.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,B.jsx)(`span`,{className:`w-3 shrink-0 text-foreground`,"aria-hidden":`true`,children:t?`▸`:``}),(0,B.jsx)(`span`,{className:`shrink-0 text-foreground`,"aria-hidden":`true`,children:KN[e.check]}),(0,B.jsxs)(`span`,{className:`sr-only`,children:[qN[e.check],`:`]}),(0,B.jsx)(`span`,{className:z(`min-w-0 flex-1 break-words`,fP(e),t&&`font-medium text-foreground`),children:e.title}),(0,B.jsx)(dP,{row:e})]}),e.check===`open`?(0,B.jsx)(`span`,{className:`pl-[2.125rem] text-xs text-muted-foreground`,children:ZN(e)}):null]})})}function mP({rows:e,selectedId:t,onSelect:n}){return(0,B.jsx)(`div`,{className:`flex flex-col pb-2`,children:QN(e).map(({section:e,rows:r})=>(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`h3`,{className:`flex items-center justify-between border-b px-3 pt-4 pb-1 text-xs font-medium tracking-wide text-muted-foreground`,children:[(0,B.jsx)(`span`,{children:GN[e]}),(0,B.jsx)(`span`,{className:`tabular-nums`,children:r.length})]}),(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-1 pt-1`,children:r.map(e=>(0,B.jsx)(pP,{row:e,selected:e.id===t,onSelect:n},`${e.kind}-${e.id}`))})]},e))})}var hP=()=>IT(FT(`tasks`)),gP=e=>IT(FT(`tasks`,e));function _P(){return(0,B.jsxs)(pm,{className:`m-4 flex-1 border border-border bg-card`,children:[(0,B.jsx)(mm,{children:(0,B.jsx)(gm,{children:JN})}),(0,B.jsx)(q,{className:`h-10`,onClick:()=>IT(FT(`plan`)),children:`Plan a task`})]})}function vP({shown:e,count:t,onToggle:n}){return(0,B.jsxs)(q,{variant:`outline`,className:`h-10`,"aria-pressed":e,onClick:n,children:[`Archived`,(0,B.jsx)(cm,{variant:`secondary`,children:t})]})}function yP({id:e}){let t=BT(),[n,r]=(0,m.useState)(!1),i=RT(`tasks.list`,{},[`tasks`,`plans`]),a=RT(`tasks.archived`,{},[`tasks`]),o=i.data?.rows??[],s=a.data?.rows??[],c=n?[...o,...s]:o;if(!i.data&&i.error)return(0,B.jsx)(ym,{message:`Could not load tasks. ${i.error}`,onRetry:i.reload});if(i.data&&o.length===0&&s.length===0)return(0,B.jsx)(_P,{});let l=e??(t?c[0]?.id:void 0),u=[...c,...s].find(e=>e.id===l),d=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(WT,{title:`Tasks`,count:$N(c),children:(0,B.jsx)(vP,{shown:n,count:s.length,onToggle:()=>r(e=>!e)})}),i.data?c.length===0?(0,B.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:JN}):(0,B.jsx)(mP,{rows:c,selectedId:l,onSelect:gP}):(0,B.jsx)(GT,{})]}),f=u?(0,B.jsx)(uP,{row:u,onGone:hP,onChanged:i.reload},u.id):e?(0,B.jsx)(bP,{}):null;return(0,B.jsx)(UT,{wide:t,list:d,detail:f,open:!!e,onClose:hP,hint:`Select a task to see its detail.`,describe:`Task detail`})}function bP(){return(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That task is not on the list any more.`})}function xP(e){let t=e[0];if(t)try{return decodeURIComponent(t)}catch{return t}}function SP(e){if(e.kind===`settings`)return(0,B.jsx)(Hj,{});if(e.kind===`sessions`)return(0,B.jsx)(AN,{id:xP(e.key?[e.key]:[])});switch(e.tab){case`lobby`:return(0,B.jsx)(Tk,{});case`tasks`:return(0,B.jsx)(yP,{id:xP(e.rest)});case`plan`:return(0,B.jsx)(TM,{});case`quickfix`:return(0,B.jsx)(KM,{id:xP(e.rest)});case`issues`:return(0,B.jsx)(TD,{rest:e.rest});case`metrics`:return(0,B.jsx)(mA,{});case`git`:return(0,B.jsx)($E,{rest:e.rest});case`knowledge`:return(0,B.jsx)(ZD,{agent:e.rest[0],file:e.rest[1]});case`excalidraw`:return(0,B.jsx)(RO,{id:xP(e.rest)})}}function CP(){Yp();let e=sn.get(`notices`),t=(0,m.useRef)(e.version);(0,m.useEffect)(()=>{e.version<=t.current||(t.current=e.version,ce(e.data?.message??e.data?.text??`New lobby notice`))},[e.version,e.data])}function wP(e,t,n){e===`help`?t():e===`settings`?IT(`#/settings`):e===`sessions`?IT(`#/sessions`):e===`nextTab`?n(1):e===`prevTab`?n(-1):e===`search`?ce(`Search arrives with the Lobby tab.`):e===`savePlan`&&ce(`Saving the plan arrives with the Plan tab.`)}function TP({status:e,connection:t,onRetry:n}){return e?.terminalDialog?(0,B.jsxs)(`div`,{role:`status`,className:`shrink-0 border-b bg-muted px-4 py-2 text-sm`,children:[xm(Te),` — answer it there; this page waits.`]}):t===`offline`?(0,B.jsx)(bm,{onRetry:n}):t===`connecting`?(0,B.jsx)(`div`,{className:`shrink-0 border-b bg-muted px-4 py-2 text-sm text-muted-foreground`,children:`Reconnecting…`}):null}function EP(){return(0,B.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-t px-4 py-1.5 text-xs text-muted-foreground`,children:[(0,B.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(tn,{children:`Alt+]`}),` next tab`]}),(0,B.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(tn,{children:`Alt+[`}),` previous tab`]}),(0,B.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(tn,{children:`Alt+H`}),` keys`]})]})}function DP(){let e=LT(),t=Zp(`status`),n=Zp(`lobby`),{prompts:r,answer:i,dismiss:a}=MT(),{connection:o,signedOut:s}=Xp(),[c,l]=(0,m.useState)(!1),u=(0,m.useRef)(null),d=lT();CP(),jT();let f=t.data,p=f?.tabs??[],h=f?.keys??[],g=e.kind===`tab`?e.tab:void 0,_=(0,m.useCallback)(e=>IT(FT(e)),[]),v=(0,m.useCallback)(e=>{if(p.length===0)return;let t=Math.max(0,p.findIndex(e=>e.id===g)),n=p[(t+e+p.length)%p.length];n&&IT(FT(n.id))},[p,g]),y=(0,m.useCallback)(()=>l(e=>!e),[]),b=(0,m.useCallback)(e=>wP(e,y,v),[y,v]),x=(0,m.useCallback)(()=>{let e=document.activeElement;return!e||e===document.body||u.current?.contains(e)===!0},[]);_T({enabled:!!f,keys:h,tabs:p,insideApp:x,onAction:b,onTab:_});let S=(0,m.useCallback)(()=>sn.onHello({}),[]);return s?(0,B.jsx)(fm,{}):!f&&t.loading?(0,B.jsx)(vm,{}):!f&&t.error?(0,B.jsx)(ym,{message:t.error,onRetry:S}):f?(0,B.jsxs)(`div`,{ref:u,className:`flex h-svh flex-col overflow-hidden bg-background pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)] pr-[env(safe-area-inset-right)]`,children:[(0,B.jsx)(um,{status:f,task:n.data?.task,connection:o}),(0,B.jsx)(Am,{tabs:p,activeId:g,questionCount:r.length,onSelect:_}),(0,B.jsx)(TP,{status:f,connection:o,onRetry:d}),(0,B.jsx)(`main`,{id:`main`,role:g?`tabpanel`:void 0,"aria-labelledby":g?`tab-${g}`:void 0,className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:SP(e)}),(0,B.jsx)(rT,{prompts:r,answer:i,dismiss:a}),(0,B.jsx)(om,{}),(0,B.jsx)(EP,{}),(0,B.jsx)(qp,{open:c,onOpenChange:l,keys:h,tabs:p})]}):(0,B.jsx)(vm,{})}async function OP(e){switch(e){case`status`:return tm(`status.get`,{});case`lobby`:return tm(`lobby.snapshot`,{});case`prompts`:return tm(`prompts.list`,{});default:return}}var kP=[`status`,`lobby`,`prompts`];function AP(){let[e,t]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let e=!0;return(async()=>{await rm(),e&&(sn.markUsed(kP,OP),t(!0))})(),()=>{e=!1}},[]),e}function jP(){let e=Qp(`(min-width: 768px)`),t=AP(),{signedOut:n}=Xp();return e?t?n?(0,B.jsx)(fm,{}):(0,B.jsx)(DP,{}):(0,B.jsx)(vm,{}):(0,B.jsx)(Sm,{})}(0,T.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(m.StrictMode,{children:(0,B.jsx)(SA,{children:(0,B.jsxs)(Cm,{children:[(0,B.jsx)(jP,{}),(0,B.jsx)(({...e})=>{let{theme:t=`system`}=CA();return(0,B.jsx)(Se,{theme:t,className:`toaster group`,icons:{success:(0,B.jsx)(ap,{className:`size-4`}),info:(0,B.jsx)(pp,{className:`size-4`}),warning:(0,B.jsx)(jp,{className:`size-4`}),error:(0,B.jsx)(xp,{className:`size-4`}),loading:(0,B.jsx)(_p,{className:`size-4 animate-spin`})},style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},toastOptions:{classNames:{toast:`cn-toast`}},...e})},{})]})})})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`,{updateViaCache:`none`}).catch(()=>void 0)});
|